Skip to content

Commit

Permalink
chore(data/nat): remove addl
Browse files Browse the repository at this point in the history
  • Loading branch information
digama0 committed Jul 23, 2017
1 parent 5816424 commit a4b157b
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions data/nat/basic.lean
Expand Up @@ -13,29 +13,6 @@ open tactic

namespace nat

-- TODO(gabriel): can we drop addl?
/- a variant of add, defined by recursion on the first argument -/
def addl : ℕ → ℕ → ℕ
| (succ x) y := succ (addl x y)
| 0 y := y
local infix ` ⊕ `:65 := addl

@[simp] theorem addl_zero_left (n : ℕ) : 0 ⊕ n = n := rfl
@[simp] theorem addl_succ_left (m n : ℕ) : succ m ⊕ n = succ (m ⊕ n) := rfl

@[simp] theorem zero_has_zero : nat.zero = 0 := rfl

local attribute [simp] nat.add_zero nat.add_succ nat.zero_add nat.succ_add

@[simp] theorem addl_zero_right (n : ℕ) : n ⊕ 0 = n :=
begin induction n, simp, simp [ih_1] end

@[simp] theorem addl_succ_right (n m : ℕ) : n ⊕ succ m = succ (n ⊕ m) :=
begin induction n, simp, simp [ih_1] end

@[simp] theorem add_eq_addl (x y : ℕ) : x ⊕ y = x + y :=
begin induction x, simp, simp [ih_1] end

/- successor and predecessor -/

theorem add_one_ne_zero (n : ℕ) : n + 10 := succ_ne_zero _
Expand Down

0 comments on commit a4b157b

Please sign in to comment.