File: .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean

full_name: Nat.add_add_add_comm
code: protected theorem add_add_add_comm (a b c d : Nat) : (a + b) + (c + d) = (a + c) + (b + d) 
goal: a + b + (c + d) = a + c + (b + d)

full_name: Nat.one_add
code: theorem one_add (n) : 1 + n = succ n 
goal: 1 + n = n.succ

full_name: Nat.succ_eq_one_add
code: theorem succ_eq_one_add (n) : succ n = 1 + n 
goal: n.succ = 1 + n

full_name: Nat.succ_add_eq_add_succ
code: theorem succ_add_eq_add_succ (a b) : succ a + b = a + succ b 
goal: a.succ + b = a + b.succ

full_name: Nat.eq_zero_of_add_eq_zero_right
code: protected theorem eq_zero_of_add_eq_zero_right (h : n + m = 0) : n = 0 
goal: n = 0

full_name: Nat.add_eq_zero_iff
code: protected theorem add_eq_zero_iff : n + m = 0 ↔ n = 0 ∧ m = 0 
goal: n + m = 0 ↔ n = 0 ∧ m = 0

full_name: Nat.add_left_cancel_iff
code: protected theorem add_left_cancel_iff {n : Nat} : n + m = n + k ↔ m = k 
goal: n + m = n + k ↔ m = k

full_name: Nat.add_right_cancel_iff
code: protected theorem add_right_cancel_iff {n : Nat} : m + n = k + n ↔ m = k 
goal: m + n = k + n ↔ m = k

full_name: Nat.add_le_add_iff_left
code: protected theorem add_le_add_iff_left {n : Nat} : n + m ≤ n + k ↔ m ≤ k 
goal: n + m ≤ n + k ↔ m ≤ k

full_name: Nat.lt_of_add_lt_add_right
code: protected theorem lt_of_add_lt_add_right : ∀ {n : Nat}, k + n < m + n → k < m
  
goal: k + n < m + n → k < m

full_name: Nat.lt_of_add_lt_add_left
code: protected theorem lt_of_add_lt_add_left {n : Nat} : n + k < n + m → k < m 
goal: n + k < n + m → k < m

full_name: Nat.add_lt_add_iff_left
code: protected theorem add_lt_add_iff_left {k n m : Nat} : k + n < k + m ↔ n < m 
goal: k + n < k + m ↔ n < m

full_name: Nat.add_lt_add_iff_right
code: protected theorem add_lt_add_iff_right {k n m : Nat} : n + k < m + k ↔ n < m 
goal: n + k < m + k ↔ n < m

full_name: Nat.add_lt_add_of_le_of_lt
code: protected theorem add_lt_add_of_le_of_lt {a b c d : Nat} (hle : a ≤ b) (hlt : c < d) :
    a + c < b + d 
goal: a + c < b + d

full_name: Nat.add_lt_add_of_lt_of_le
code: protected theorem add_lt_add_of_lt_of_le {a b c d : Nat} (hlt : a < b) (hle : c ≤ d) :
    a + c < b + d 
goal: a + c < b + d

full_name: Nat.lt_add_of_pos_left
code: protected theorem lt_add_of_pos_left : 0 < k → n < k + n 
goal: 0 < k → n < k + n

full_name: Nat.pos_of_lt_add_right
code: protected theorem pos_of_lt_add_right (h : n < n + k) : 0 < k 
goal: 0 < k

full_name: Nat.pos_of_lt_add_left
code: protected theorem pos_of_lt_add_left : n < k + n → 0 < k 
goal: n < k + n → 0 < k

full_name: Nat.lt_add_right_iff_pos
code: protected theorem lt_add_right_iff_pos : n < n + k ↔ 0 < k 
goal: n < n + k ↔ 0 < k

full_name: Nat.lt_add_left_iff_pos
code: protected theorem lt_add_left_iff_pos : n < k + n ↔ 0 < k 
goal: n < k + n ↔ 0 < k

full_name: Nat.add_pos_left
code: protected theorem add_pos_left (h : 0 < m) (n) : 0 < m + n 
goal: 0 < m + n

full_name: Nat.add_pos_right
code: protected theorem add_pos_right (m) (h : 0 < n) : 0 < m + n 
goal: 0 < m + n

full_name: Nat.add_self_ne_one
code: protected theorem add_self_ne_one : ∀ n, n + n ≠ 1
  
goal: n + n ≠ 1

full_name: Nat.sub_one
code: protected theorem sub_one (n) : n - 1 = pred n 
goal: n - 1 = n.pred

full_name: Nat.one_sub
code: protected theorem one_sub : ∀ n, 1 - n = if n = 0 then 1 else 0
  
goal: 1 - n = if n = 0 then 1 else 0

full_name: Nat.succ_sub_sub_succ
code: theorem succ_sub_sub_succ (n m k) : succ n - m - succ k = n - m - k 
goal: n.succ - m - k.succ = n - m - k

full_name: Nat.add_sub_sub_add_right
code: theorem add_sub_sub_add_right (n m k l : Nat) :
    (n + l) - m - (k + l) = n - m - k 
goal: n + l - m - (k + l) = n - m - k

full_name: Nat.sub_right_comm
code: protected theorem sub_right_comm (m n k : Nat) : m - n - k = m - k - n 
goal: m - n - k = m - k - n

full_name: Nat.add_sub_cancel_right
code: protected theorem add_sub_cancel_right (n m : Nat) : (n + m) - m = n 
goal: n + m - m = n

full_name: Nat.add_sub_cancel'
code: @[simp] protected theorem add_sub_cancel' {n m : Nat} (h : m ≤ n) : m + (n - m) = n 
goal: m + (n - m) = n

full_name: Nat.succ_sub_one
code: theorem succ_sub_one (n) : succ n - 1 = n 
goal: n.succ - 1 = n

full_name: Nat.add_one_sub_one
code: protected theorem add_one_sub_one (n : Nat) : (n + 1) - 1 = n 
goal: n + 1 - 1 = n

full_name: Nat.one_add_sub_one
code: protected theorem one_add_sub_one (n : Nat) : (1 + n) - 1 = n 
goal: 1 + n - 1 = n

full_name: Nat.sub_sub_self
code: protected theorem sub_sub_self {n m : Nat} (h : m ≤ n) : n - (n - m) = m 
goal: n - (n - m) = m

full_name: Nat.sub_add_comm
code: protected theorem sub_add_comm {n m k : Nat} (h : k ≤ n) : n + m - k = n - k + m 
goal: n + m - k = n - k + m

full_name: Nat.sub_eq_zero_iff_le
code: protected theorem sub_eq_zero_iff_le : n - m = 0 ↔ n ≤ m 
goal: n - m = 0 ↔ n ≤ m

full_name: Nat.sub_pos_iff_lt
code: protected theorem sub_pos_iff_lt : 0 < n - m ↔ m < n 
goal: 0 < n - m ↔ m < n

full_name: Nat.sub_le_iff_le_add
code: protected theorem sub_le_iff_le_add {a b c : Nat} : a - b ≤ c ↔ a ≤ c + b 
goal: a - b ≤ c ↔ a ≤ c + b

full_name: Nat.sub_le_iff_le_add'
code: protected theorem sub_le_iff_le_add' {a b c : Nat} : a - b ≤ c ↔ a ≤ b + c 
goal: a - b ≤ c ↔ a ≤ b + c

full_name: Nat.le_sub_iff_add_le
code: protected theorem le_sub_iff_add_le {n : Nat} (h : k ≤ m) : n ≤ m - k ↔ n + k ≤ m 
goal: n ≤ m - k ↔ n + k ≤ m

full_name: Nat.add_le_to_le_sub
code: @[deprecated Nat.le_sub_iff_add_le (since := "2024-02-19")]
protected theorem add_le_to_le_sub (n : Nat) (h : m ≤ k) : n + m ≤ k ↔ n ≤ k - m 
goal: n + m ≤ k ↔ n ≤ k - m

full_name: Nat.add_le_of_le_sub'
code: protected theorem add_le_of_le_sub' {n k m : Nat} (h : m ≤ k) : n ≤ k - m → m + n ≤ k 
goal: n ≤ k - m → m + n ≤ k

full_name: Nat.add_le_of_le_sub_left
code: @[deprecated Nat.add_le_of_le_sub' (since := "2024-02-19")]
protected theorem add_le_of_le_sub_left {n k m : Nat} (h : m ≤ k) : n ≤ k - m → m + n ≤ k 
goal: n ≤ k - m → m + n ≤ k

full_name: Nat.le_sub_of_add_le'
code: protected theorem le_sub_of_add_le' {n k m : Nat} : m + n ≤ k → n ≤ k - m 
goal: m + n ≤ k → n ≤ k - m

full_name: Nat.le_sub_iff_add_le'
code: protected theorem le_sub_iff_add_le' {n : Nat} (h : k ≤ m) : n ≤ m - k ↔ k + n ≤ m 
goal: n ≤ m - k ↔ k + n ≤ m

full_name: Nat.le_of_sub_le_sub_left
code: protected theorem le_of_sub_le_sub_left : ∀ {n k m : Nat}, n ≤ k → k - m ≤ k - n → n ≤ m
  
goal: n ≤ k → k - m ≤ k - n → n ≤ m

full_name: Nat.sub_le_sub_iff_left
code: protected theorem sub_le_sub_iff_left {n m k : Nat} (h : n ≤ k) : k - m ≤ k - n ↔ n ≤ m 
goal: k - m ≤ k - n ↔ n ≤ m

full_name: Nat.sub_lt_of_pos_le
code: protected theorem sub_lt_of_pos_le (h₀ : 0 < a) (h₁ : a ≤ b) : b - a < b 
goal: b - a < b

full_name: Nat.sub_lt_self
code: protected abbrev sub_lt_self 
goal: b - a < b

full_name: Nat.add_lt_of_lt_sub'
code: theorem add_lt_of_lt_sub' {a b c : Nat} : b < c - a → a + b < c 
goal: b < c - a → a + b < c

full_name: Nat.sub_add_lt_sub
code: protected theorem sub_add_lt_sub (h₁ : m + k ≤ n) (h₂ : 0 < k) : n - (m + k) < n - m 
goal: n - (m + k) < n - m

full_name: Nat.sub_one_lt_of_le
code: theorem sub_one_lt_of_le (h₀ : 0 < a) (h₁ : a ≤ b) : a - 1 < b 
goal: a - 1 < b

full_name: Nat.sub_lt_succ
code: theorem sub_lt_succ (a b) : a - b < succ a 
goal: a - b < a.succ

full_name: Nat.sub_lt_add_one
code: theorem sub_lt_add_one (a b) : a - b < a + 1 
goal: a - b < a + 1

full_name: Nat.sub_one_sub_lt
code: theorem sub_one_sub_lt (h : i < n) : n - 1 - i < n 
goal: n - 1 - i < n

full_name: Nat.exists_eq_add_of_le
code: protected theorem exists_eq_add_of_le (h : m ≤ n) : ∃ k : Nat, n = m + k 
goal: ∃ k, n = m + k

full_name: Nat.exists_eq_add_of_le'
code: protected theorem exists_eq_add_of_le' (h : m ≤ n) : ∃ k : Nat, n = k + m 
goal: ∃ k, n = k + m

full_name: Nat.exists_eq_add_of_lt
code: protected theorem exists_eq_add_of_lt (h : m < n) : ∃ k : Nat, n = m + k + 1 
goal: ∃ k, n = m + k + 1

full_name: Nat.succ_min_succ
code: theorem succ_min_succ (x y) : min (succ x) (succ y) = succ (min x y) 
goal: min x.succ y.succ = (min x y).succ

full_name: Nat.min_self
code: @[simp] protected theorem min_self (a : Nat) : min a a = a 
goal: min a a = a

full_name: Nat.«instIdempotentOpMin_.lake»
code: instance : Std.IdempotentOp (α := Nat) min 
goal: Std.IdempotentOp min

full_name: Nat.zero_min
code: @[simp] protected theorem zero_min (a) : min 0 a = 0 
goal: min 0 a = 0

full_name: Nat.min_zero
code: @[simp] protected theorem min_zero (a) : min a 0 = 0 
goal: min a 0 = 0

full_name: Nat.min_assoc
code: @[simp] protected theorem min_assoc : ∀ (a b c : Nat), min (min a b) c = min a (min b c)
  
goal: min (min a b) c = min a (min b c)

full_name: Nat.«instAssociativeMin_.lake»
code: instance : Std.Associative (α := Nat) min 
goal: Std.Associative min

full_name: Nat.min_self_assoc
code: @[simp] protected theorem min_self_assoc {m n : Nat} : min m (min m n) = min m n 
goal: min m (min m n) = min m n

full_name: Nat.min_self_assoc'
code: @[simp] protected theorem min_self_assoc' {m n : Nat} : min n (min m n) = min n m 
goal: min n (min m n) = min n m

full_name: Nat.sub_sub_eq_min
code: protected theorem sub_sub_eq_min : ∀ (a b : Nat), a - (a - b) = min a b
  
goal: a - (a - b) = min a b

full_name: Nat.sub_eq_sub_min
code: protected theorem sub_eq_sub_min (n m : Nat) : n - m = n - min n m 
goal: n - m = n - min n m

full_name: Nat.sub_add_min_cancel
code: @[simp] protected theorem sub_add_min_cancel (n m : Nat) : n - m + min n m = n 
goal: n - m + min n m = n

full_name: Nat.max_eq_right
code: protected theorem max_eq_right {a b : Nat} (h : a ≤ b) : max a b = b 
goal: max a b = b

full_name: Nat.max_eq_left
code: protected theorem max_eq_left {a b : Nat} (h : b ≤ a) : max a b = a 
goal: max a b = a

full_name: Nat.succ_max_succ
code: protected theorem succ_max_succ (x y) : max (succ x) (succ y) = succ (max x y) 
goal: max x.succ y.succ = (max x y).succ

full_name: Nat.max_le_of_le_of_le
code: protected theorem max_le_of_le_of_le {a b c : Nat} : a ≤ c → b ≤ c → max a b ≤ c 
goal: a ≤ c → b ≤ c → max a b ≤ c

full_name: Nat.max_le
code: protected theorem max_le {a b c : Nat} : max a b ≤ c ↔ a ≤ c ∧ b ≤ c 
goal: max a b ≤ c ↔ a ≤ c ∧ b ≤ c

full_name: Nat.max_lt
code: protected theorem max_lt {a b c : Nat} : max a b < c ↔ a < c ∧ b < c 
goal: max a b < c ↔ a < c ∧ b < c

full_name: Nat.max_self
code: @[simp] protected theorem max_self (a : Nat) : max a a = a 
goal: max a a = a

full_name: Nat.«instIdempotentOpMax_.lake»
code: instance : Std.IdempotentOp (α := Nat) max 
goal: Std.IdempotentOp max

full_name: Nat.zero_max
code: @[simp] protected theorem zero_max (a) : max 0 a = a 
goal: max 0 a = a

full_name: Nat.max_zero
code: @[simp] protected theorem max_zero (a) : max a 0 = a 
goal: max a 0 = a

full_name: Nat.«instLawfulIdentityMaxOfNat_.lake»
code: instance : Std.LawfulIdentity (α := Nat) max 0 
goal: Std.LawfulIdentity max 0

full_name: Nat.max_assoc
code: protected theorem max_assoc : ∀ (a b c : Nat), max (max a b) c = max a (max b c)
  
goal: max (max a b) c = max a (max b c)

full_name: Nat.«instAssociativeMax_.lake»
code: instance : Std.Associative (α := Nat) max 
goal: Std.Associative max

full_name: Nat.sub_add_eq_max
code: protected theorem sub_add_eq_max (a b : Nat) : a - b + b = max a b 
goal: a - b + b = max a b

full_name: Nat.sub_eq_max_sub
code: protected theorem sub_eq_max_sub (n m : Nat) : n - m = max n m - m 
goal: n - m = max n m - m

full_name: Nat.max_min_distrib_left
code: protected theorem max_min_distrib_left : ∀ (a b c : Nat), max a (min b c) = min (max a b) (max a c)
  
goal: max a (min b c) = min (max a b) (max a c)

full_name: Nat.min_max_distrib_left
code: protected theorem min_max_distrib_left : ∀ (a b c : Nat), min a (max b c) = max (min a b) (min a c)
  
goal: min a (max b c) = max (min a b) (min a c)

full_name: Nat.max_min_distrib_right
code: protected theorem max_min_distrib_right (a b c : Nat) :
    max (min a b) c = min (max a c) (max b c) 
goal: max (min a b) c = min (max a c) (max b c)

full_name: Nat.min_max_distrib_right
code: protected theorem min_max_distrib_right (a b c : Nat) :
    min (max a b) c = max (min a c) (min b c) 
goal: min (max a b) c = max (min a c) (min b c)

full_name: Nat.add_max_add_right
code: protected theorem add_max_add_right : ∀ (a b c : Nat), max (a + c) (b + c) = max a b + c
  
goal: max (a + c) (b + c) = max a b + c

full_name: Nat.add_min_add_right
code: protected theorem add_min_add_right : ∀ (a b c : Nat), min (a + c) (b + c) = min a b + c
  
goal: min (a + c) (b + c) = min a b + c

full_name: Nat.add_max_add_left
code: protected theorem add_max_add_left (a b c : Nat) : max (a + b) (a + c) = a + max b c 
goal: max (a + b) (a + c) = a + max b c

full_name: Nat.add_min_add_left
code: protected theorem add_min_add_left (a b c : Nat) : min (a + b) (a + c) = a + min b c 
goal: min (a + b) (a + c) = a + min b c

full_name: Nat.pred_min_pred
code: protected theorem pred_min_pred : ∀ (x y), min (pred x) (pred y) = pred (min x y)
  
goal: min x.pred y.pred = (min x y).pred

full_name: Nat.pred_max_pred
code: protected theorem pred_max_pred : ∀ (x y), max (pred x) (pred y) = pred (max x y)
  
goal: max x.pred y.pred = (max x y).pred

full_name: Nat.sub_min_sub_right
code: protected theorem sub_min_sub_right : ∀ (a b c : Nat), min (a - c) (b - c) = min a b - c
  
goal: min (a - c) (b - c) = min a b - c

full_name: Nat.sub_max_sub_right
code: protected theorem sub_max_sub_right : ∀ (a b c : Nat), max (a - c) (b - c) = max a b - c
  
goal: max (a - c) (b - c) = max a b - c

full_name: Nat.sub_min_sub_left
code: protected theorem sub_min_sub_left (a b c : Nat) : min (a - b) (a - c) = a - max b c 
goal: min (a - b) (a - c) = a - max b c

full_name: Nat.sub_max_sub_left
code: protected theorem sub_max_sub_left (a b c : Nat) : max (a - b) (a - c) = a - min b c 
goal: max (a - b) (a - c) = a - min b c

full_name: Nat.mul_max_mul_right
code: protected theorem mul_max_mul_right (a b c : Nat) : max (a * c) (b * c) = max a b * c 
goal: max (a * c) (b * c) = max a b * c

full_name: Nat.mul_min_mul_right
code: protected theorem mul_min_mul_right (a b c : Nat) : min (a * c) (b * c) = min a b * c 
goal: min (a * c) (b * c) = min a b * c

full_name: Nat.mul_max_mul_left
code: protected theorem mul_max_mul_left (a b c : Nat) : max (a * b) (a * c) = a * max b c 
goal: max (a * b) (a * c) = a * max b c

full_name: Nat.mul_min_mul_left
code: protected theorem mul_min_mul_left (a b c : Nat) : min (a * b) (a * c) = a * min b c 
goal: min (a * b) (a * c) = a * min b c

full_name: Nat.mul_le_mul_of_nonneg_left
code: @[deprecated Nat.mul_le_mul_left (since := "2024-02-19")]
protected theorem mul_le_mul_of_nonneg_left {a b c : Nat} : a ≤ b → c * a ≤ c * b 
goal: a ≤ b → c * a ≤ c * b

full_name: Nat.mul_le_mul_of_nonneg_right
code: @[deprecated Nat.mul_le_mul_right (since := "2024-02-19")]
protected theorem mul_le_mul_of_nonneg_right {a b c : Nat} : a ≤ b → a * c ≤ b * c 
goal: a ≤ b → a * c ≤ b * c

full_name: Nat.mul_right_comm
code: protected theorem mul_right_comm (n m k : Nat) : n * m * k = n * k * m 
goal: n * m * k = n * k * m

full_name: Nat.mul_mul_mul_comm
code: protected theorem mul_mul_mul_comm (a b c d : Nat) : (a * b) * (c * d) = (a * c) * (b * d) 
goal: a * b * (c * d) = a * c * (b * d)

full_name: Nat.mul_eq_zero
code: theorem mul_eq_zero : ∀ {m n}, n * m = 0 ↔ n = 0 ∨ m = 0
  
goal: n * m = 0 ↔ n = 0 ∨ m = 0

full_name: Nat.mul_ne_zero_iff
code: protected theorem mul_ne_zero_iff : n * m ≠ 0 ↔ n ≠ 0 ∧ m ≠ 0 
goal: n * m ≠ 0 ↔ n ≠ 0 ∧ m ≠ 0

full_name: Nat.mul_ne_zero
code: protected theorem mul_ne_zero : n ≠ 0 → m ≠ 0 → n * m ≠ 0 
goal: n ≠ 0 → m ≠ 0 → n * m ≠ 0

full_name: Nat.ne_zero_of_mul_ne_zero_left
code: protected theorem ne_zero_of_mul_ne_zero_left (h : n * m ≠ 0) : n ≠ 0 
goal: n ≠ 0

full_name: Nat.mul_left_cancel
code: protected theorem mul_left_cancel {n m k : Nat} (np : 0 < n) (h : n * m = n * k) : m = k 
goal: m = k

full_name: Nat.mul_right_cancel
code: protected theorem mul_right_cancel {n m k : Nat} (mp : 0 < m) (h : n * m = k * m) : n = k 
goal: n = k

full_name: Nat.mul_left_cancel_iff
code: protected theorem mul_left_cancel_iff {n: Nat} (p : 0 < n) (m k : Nat) : n * m = n * k ↔ m = k 
goal: n * m = n * k ↔ m = k

full_name: Nat.mul_right_cancel_iff
code: protected theorem mul_right_cancel_iff {m : Nat} (p : 0 < m) (n k : Nat) : n * m = k * m ↔ n = k 
goal: n * m = k * m ↔ n = k

full_name: Nat.ne_zero_of_mul_ne_zero_right
code: protected theorem ne_zero_of_mul_ne_zero_right (h : n * m ≠ 0) : m ≠ 0 
goal: m ≠ 0

full_name: Nat.le_mul_of_pos_left
code: protected theorem le_mul_of_pos_left (m) (h : 0 < n) : m ≤ n * m 
goal: m ≤ n * m

full_name: Nat.le_mul_of_pos_right
code: protected theorem le_mul_of_pos_right (n) (h : 0 < m) : n ≤ n * m 
goal: n ≤ n * m

full_name: Nat.mul_lt_mul_of_lt_of_le
code: protected theorem mul_lt_mul_of_lt_of_le (hac : a < c) (hbd : b ≤ d) (hd : 0 < d) :
    a * b < c * d 
goal: a * b < c * d

full_name: Nat.mul_lt_mul_of_lt_of_le'
code: protected theorem mul_lt_mul_of_lt_of_le' (hac : a < c) (hbd : b ≤ d) (hb : 0 < b) :
    a * b < c * d 
goal: a * b < c * d

full_name: Nat.mul_lt_mul_of_le_of_lt
code: protected theorem mul_lt_mul_of_le_of_lt (hac : a ≤ c) (hbd : b < d) (hc : 0 < c) :
    a * b < c * d 
goal: a * b < c * d

full_name: Nat.mul_lt_mul_of_le_of_lt'
code: protected theorem mul_lt_mul_of_le_of_lt' (hac : a ≤ c) (hbd : b < d) (ha : 0 < a) :
    a * b < c * d 
goal: a * b < c * d

full_name: Nat.mul_lt_mul_of_lt_of_lt
code: protected theorem mul_lt_mul_of_lt_of_lt {a b c d : Nat} (hac : a < c) (hbd : b < d) :
    a * b < c * d 
goal: a * b < c * d

full_name: Nat.succ_mul_succ
code: theorem succ_mul_succ (a b) : succ a * succ b = a * b + a + b + 1 
goal: a.succ * b.succ = a * b + a + b + 1

full_name: Nat.add_one_mul_add_one
code: theorem add_one_mul_add_one (a b : Nat) : (a + 1) * (b + 1) = a * b + a + b + 1 
goal: (a + 1) * (b + 1) = a * b + a + b + 1

full_name: Nat.mul_le_add_right
code: theorem mul_le_add_right (m k n : Nat) : k * m ≤ m + n ↔ (k-1) * m ≤ n 
goal: k * m ≤ m + n ↔ (k - 1) * m ≤ n

full_name: Nat.succ_mul_succ_eq
code: theorem succ_mul_succ_eq (a b : Nat) : succ a * succ b = a * b + a + b + 1 
goal: a.succ * b.succ = a * b + a + b + 1

full_name: Nat.mul_self_sub_mul_self_eq
code: protected theorem mul_self_sub_mul_self_eq (a b : Nat) : a * a - b * b = (a + b) * (a - b) 
goal: a * a - b * b = (a + b) * (a - b)

full_name: Nat.pos_of_mul_pos_left
code: protected theorem pos_of_mul_pos_left {a b : Nat} (h : 0 < a * b) : 0 < b 
goal: 0 < b

full_name: Nat.pos_of_mul_pos_right
code: protected theorem pos_of_mul_pos_right {a b : Nat} (h : 0 < a * b) : 0 < a 
goal: 0 < a

full_name: Nat.mul_pos_iff_of_pos_left
code: @[simp] protected theorem mul_pos_iff_of_pos_left {a b : Nat} (h : 0 < a) :
    0 < a * b ↔ 0 < b 
goal: 0 < a * b ↔ 0 < b

full_name: Nat.mul_pos_iff_of_pos_right
code: @[simp] protected theorem mul_pos_iff_of_pos_right {a b : Nat} (h : 0 < b) :
    0 < a * b ↔ 0 < a 
goal: 0 < a * b ↔ 0 < a

full_name: Nat.mod_two_eq_zero_or_one
code: theorem mod_two_eq_zero_or_one (n : Nat) : n % 2 = 0 ∨ n % 2 = 1 
goal: n % 2 = 0 ∨ n % 2 = 1

full_name: Nat.le_of_mod_lt
code: theorem le_of_mod_lt {a b : Nat} (h : a % b < a) : b ≤ a 
goal: b ≤ a

full_name: Nat.mul_mod_mul_right
code: theorem mul_mod_mul_right (z x y : Nat) : (x * z) % (y * z) = (x % y) * z 
goal: x * z % (y * z) = x % y * z

full_name: Nat.sub_mul_mod
code: theorem sub_mul_mod {x k n : Nat} (h₁ : n*k ≤ x) : (x - n*k) % n = x % n 
goal: (x - n * k) % n = x % n

full_name: Nat.mod_mod
code: @[simp] theorem mod_mod (a n : Nat) : (a % n) % n = a % n 
goal: a % n % n = a % n

full_name: Nat.mul_mod
code: theorem mul_mod (a b n : Nat) : a * b % n = (a % n) * (b % n) % n 
goal: a * b % n = a % n * (b % n) % n

full_name: Nat.mod_add_mod
code: @[simp] theorem mod_add_mod (m n k : Nat) : (m % n + k) % n = (m + k) % n 
goal: (m % n + k) % n = (m + k) % n

full_name: Nat.add_mod_mod
code: @[simp] theorem add_mod_mod (m n k : Nat) : (m + n % k) % k = (m + n) % k 
goal: (m + n % k) % k = (m + n) % k

full_name: Nat.add_mod
code: theorem add_mod (a b n : Nat) : (a + b) % n = ((a % n) + (b % n)) % n 
goal: (a + b) % n = (a % n + b % n) % n

full_name: Nat.pow_succ'
code: theorem pow_succ' {m n : Nat} : m ^ n.succ = m * m ^ n 
goal: m ^ n.succ = m * m ^ n

full_name: Nat.pow_add_one'
code: theorem pow_add_one' {m n : Nat} : m ^ (n + 1) = m * m ^ n 
goal: m ^ (n + 1) = m * m ^ n

full_name: Nat.pow_eq
code: @[simp] theorem pow_eq {m n : Nat} : m.pow n = m ^ n 
goal: m.pow n = m ^ n

full_name: Nat.one_shiftLeft
code: theorem one_shiftLeft (n : Nat) : 1 <<< n = 2 ^ n 
goal: 1 <<< n = 2 ^ n

full_name: Nat.zero_pow
code: protected theorem zero_pow {n : Nat} (H : 0 < n) : 0 ^ n = 0 
goal: 0 ^ n = 0

full_name: Nat.one_pow
code: @[simp] protected theorem one_pow (n : Nat) : 1 ^ n = 1 
goal: 1 ^ n = 1

full_name: Nat.pow_one
code: @[simp] protected theorem pow_one (a : Nat) : a ^ 1 = a 
goal: a ^ 1 = a

full_name: Nat.pow_two
code: protected theorem pow_two (a : Nat) : a ^ 2 = a * a 
goal: a ^ 2 = a * a

full_name: Nat.pow_add
code: protected theorem pow_add (a m n : Nat) : a ^ (m + n) = a ^ m * a ^ n 
goal: a ^ (m + n) = a ^ m * a ^ n

full_name: Nat.pow_add'
code: protected theorem pow_add' (a m n : Nat) : a ^ (m + n) = a ^ n * a ^ m 
goal: a ^ (m + n) = a ^ n * a ^ m

full_name: Nat.pow_mul
code: protected theorem pow_mul (a m n : Nat) : a ^ (m * n) = (a ^ m) ^ n 
goal: a ^ (m * n) = (a ^ m) ^ n

full_name: Nat.pow_mul'
code: protected theorem pow_mul' (a m n : Nat) : a ^ (m * n) = (a ^ n) ^ m 
goal: a ^ (m * n) = (a ^ n) ^ m

full_name: Nat.pow_right_comm
code: protected theorem pow_right_comm (a m n : Nat) : (a ^ m) ^ n = (a ^ n) ^ m 
goal: (a ^ m) ^ n = (a ^ n) ^ m

full_name: Nat.mul_pow
code: protected theorem mul_pow (a b n : Nat) : (a * b) ^ n = a ^ n * b ^ n 
goal: (a * b) ^ n = a ^ n * b ^ n

full_name: Nat.pow_le_pow_left
code: protected abbrev pow_le_pow_left 
goal: n ^ i ≤ m ^ i

full_name: Nat.pow_le_pow_right
code: protected abbrev pow_le_pow_right 
goal: i ≤ j → n ^ i ≤ n ^ j

full_name: Nat.one_lt_two_pow
code: protected theorem one_lt_two_pow (h : n ≠ 0) : 1 < 2 ^ n 
goal: 1 < 2 ^ n

full_name: Nat.one_lt_two_pow_iff
code: @[simp] protected theorem one_lt_two_pow_iff : 1 < 2 ^ n ↔ n ≠ 0 
goal: 1 < 2 ^ n ↔ n ≠ 0

full_name: Nat.one_le_two_pow
code: protected theorem one_le_two_pow : 1 ≤ 2 ^ n 
goal: 1 ≤ 2 ^ n

full_name: Nat.pow_pos
code: protected theorem pow_pos (h : 0 < a) : 0 < a^n 
goal: 0 < a ^ n

full_name: Nat.pow_lt_pow_succ
code: protected theorem pow_lt_pow_succ (h : 1 < a) : a ^ n < a ^ (n + 1) 
goal: a ^ n < a ^ (n + 1)

full_name: Nat.pow_lt_pow_of_lt
code: protected theorem pow_lt_pow_of_lt {a n m : Nat} (h : 1 < a) (w : n < m) : a ^ n < a ^ m 
goal: a ^ n < a ^ m

full_name: Nat.pow_le_pow_of_le
code: protected theorem pow_le_pow_of_le {a n m : Nat} (h : 1 < a) (w : n ≤ m) : a ^ n ≤ a ^ m 
goal: a ^ n ≤ a ^ m

full_name: Nat.pow_le_pow_iff_right
code: protected theorem pow_le_pow_iff_right {a n m : Nat} (h : 1 < a) :
    a ^ n ≤ a ^ m ↔ n ≤ m 
goal: a ^ n ≤ a ^ m ↔ n ≤ m

full_name: Nat.pow_lt_pow_iff_right
code: protected theorem pow_lt_pow_iff_right {a n m : Nat} (h : 1 < a) :
    a ^ n < a ^ m ↔ n < m 
goal: a ^ n < a ^ m ↔ n < m

full_name: Nat.log2_zero
code: @[simp]
theorem log2_zero : Nat.log2 0 = 0 
goal: Nat.log2 0 = 0

full_name: Nat.le_log2
code: theorem le_log2 (h : n ≠ 0) : k ≤ n.log2 ↔ 2 ^ k ≤ n 
goal: k ≤ n.log2 ↔ 2 ^ k ≤ n

full_name: Nat.log2_lt
code: theorem log2_lt (h : n ≠ 0) : n.log2 < k ↔ n < 2 ^ k 
goal: n.log2 < k ↔ n < 2 ^ k

full_name: Nat.log2_self_le
code: theorem log2_self_le (h : n ≠ 0) : 2 ^ n.log2 ≤ n 
goal: 2 ^ n.log2 ≤ n

full_name: Nat.lt_log2_self
code: theorem lt_log2_self : n < 2 ^ (n.log2 + 1) 
goal: n < 2 ^ (n.log2 + 1)

full_name: Nat.eq_mul_of_div_eq_right
code: protected theorem eq_mul_of_div_eq_right {a b c : Nat} (H1 : b ∣ a) (H2 : a / b = c) :
    a = b * c 
goal: a = b * c

full_name: Nat.div_eq_iff_eq_mul_right
code: protected theorem div_eq_iff_eq_mul_right {a b c : Nat} (H : 0 < b) (H' : b ∣ a) :
    a / b = c ↔ a = b * c 
goal: a / b = c ↔ a = b * c

full_name: Nat.div_eq_iff_eq_mul_left
code: protected theorem div_eq_iff_eq_mul_left {a b c : Nat} (H : 0 < b) (H' : b ∣ a) :
    a / b = c ↔ a = c * b 
goal: a / b = c ↔ a = c * b

full_name: Nat.pow_dvd_pow_iff_pow_le_pow
code: theorem pow_dvd_pow_iff_pow_le_pow {k l : Nat} :
    ∀ {x : Nat}, 0 < x → (x ^ k ∣ x ^ l ↔ x ^ k ≤ x ^ l)
  
goal: 0 < x → (x ^ k ∣ x ^ l ↔ x ^ k ≤ x ^ l)

full_name: Nat.pow_dvd_pow_iff_le_right
code: /-- If `1 < x`, then `x^k` divides `x^l` if and only if `k` is at most `l`. -/
theorem pow_dvd_pow_iff_le_right {x k l : Nat} (w : 1 < x) : x ^ k ∣ x ^ l ↔ k ≤ l 
goal: x ^ k ∣ x ^ l ↔ k ≤ l

full_name: Nat.pow_dvd_pow_iff_le_right'
code: theorem pow_dvd_pow_iff_le_right' {b k l : Nat} : (b + 2) ^ k ∣ (b + 2) ^ l ↔ k ≤ l 
goal: (b + 2) ^ k ∣ (b + 2) ^ l ↔ k ≤ l

full_name: Nat.pow_dvd_pow
code: protected theorem pow_dvd_pow {m n : Nat} (a : Nat) (h : m ≤ n) : a ^ m ∣ a ^ n 
goal: a ^ m ∣ a ^ n

full_name: Nat.pow_sub_mul_pow
code: protected theorem pow_sub_mul_pow (a : Nat) {m n : Nat} (h : m ≤ n) :
    a ^ (n - m) * a ^ m = a ^ n 
goal: a ^ (n - m) * a ^ m = a ^ n

full_name: Nat.pow_dvd_of_le_of_pow_dvd
code: theorem pow_dvd_of_le_of_pow_dvd {p m n k : Nat} (hmn : m ≤ n) (hdiv : p ^ n ∣ k) : p ^ m ∣ k 
goal: p ^ m ∣ k

full_name: Nat.dvd_of_pow_dvd
code: theorem dvd_of_pow_dvd {p k m : Nat} (hk : 1 ≤ k) (hpk : p ^ k ∣ m) : p ∣ m 
goal: p ∣ m

full_name: Nat.pow_div
code: protected theorem pow_div {x m n : Nat} (h : n ≤ m) (hx : 0 < x) : x ^ m / x ^ n = x ^ (m - n) 
goal: x ^ m / x ^ n = x ^ (m - n)

full_name: Nat.shiftLeft_zero
code: @[simp] theorem shiftLeft_zero : n <<< 0 = n 
goal: n <<< 0 = n

full_name: Nat.shiftLeft_succ_inside
code: /-- Shiftleft on successor with multiple moved inside. -/
theorem shiftLeft_succ_inside (m n : Nat) : m <<< (n+1) = (2*m) <<< n 
goal: m <<< (n + 1) = (2 * m) <<< n

full_name: Nat.shiftLeft_succ
code: /-- Shiftleft on successor with multiple moved to outside. -/
theorem shiftLeft_succ : ∀(m n), m <<< (n + 1) = 2 * (m <<< n)

goal: m <<< (n + 1) = 2 * m <<< n

full_name: Nat.shiftRight_succ_inside
code: /-- Shiftright on successor with division moved inside. -/
theorem shiftRight_succ_inside : ∀m n, m >>> (n+1) = (m/2) >>> n

goal: m >>> (n + 1) = (m / 2) >>> n

full_name: Nat.zero_shiftLeft
code: @[simp] theorem zero_shiftLeft : ∀ n, 0 <<< n = 0
  
goal: 0 <<< n = 0

full_name: Nat.zero_shiftRight
code: @[simp] theorem zero_shiftRight : ∀ n, 0 >>> n = 0
  
goal: 0 >>> n = 0

full_name: Nat.shiftLeft_add
code: theorem shiftLeft_add (m n : Nat) : ∀ k, m <<< (n + k) = (m <<< n) <<< k
  
goal: m <<< (n + k) = m <<< n <<< k

full_name: Nat.shiftLeft_shiftLeft
code: @[deprecated shiftLeft_add (since := "2024-06-02")]
theorem shiftLeft_shiftLeft (m n : Nat) : ∀ k, (m <<< n) <<< k = m <<< (n + k)
  
goal: m <<< n <<< k = m <<< (n + k)

full_name: Nat.shiftLeft_shiftRight
code: @[simp] theorem shiftLeft_shiftRight (x n : Nat) : x <<< n >>> n = x 
goal: x <<< n >>> n = x

full_name: Nat.mul_add_div
code: theorem mul_add_div {m : Nat} (m_pos : m > 0) (x y : Nat) : (m * x + y) / m = x + y / m 
goal: (m * x + y) / m = x + y / m

full_name: Nat.mul_add_mod
code: theorem mul_add_mod (m x y : Nat) : (m * x + y) % m = y % m 
goal: (m * x + y) % m = y % m

full_name: Nat.mod_div_self
code: @[simp] theorem mod_div_self (m n : Nat) : m % n / n = 0 
goal: m % n / n = 0

full_name: Nat.decidableBallLT
code: instance decidableBallLT :
  ∀ (n : Nat) (P : ∀ k, k < n → Prop) [∀ n h, Decidable (P n h)], Decidable (∀ n h, P n h)

goal: Decidable (∀ (n_1 : Nat) (h : n_1 < n), P n_1 h)

full_name: Nat.decidableForallFin
code: instance decidableForallFin (P : Fin n → Prop) [DecidablePred P] : Decidable (∀ i, P i) 
goal: Decidable (∀ (i : Fin n), P i)

full_name: Nat.decidableBallLE
code: instance decidableBallLE (n : Nat) (P : ∀ k, k ≤ n → Prop) [∀ n h, Decidable (P n h)] :
    Decidable (∀ n h, P n h) 
goal: Decidable (∀ (n_1 : Nat) (h : n_1 ≤ n), P n_1 h)

full_name: Nat.decidableExistsLT
code: instance decidableExistsLT [h : DecidablePred p] : DecidablePred fun n => ∃ m : Nat, m < n ∧ p m
  
goal: DecidablePred fun n => ∃ m, m < n ∧ p m

full_name: Nat.decidableExistsLE
code: instance decidableExistsLE [DecidablePred p] : DecidablePred fun n => ∃ m : Nat, m ≤ n ∧ p m 
goal: DecidablePred fun n => ∃ m, m ≤ n ∧ p m