Documentation

Init.Data.Nat.Simproc

This contains lemmas used by the Nat simprocs for simplifying arithmetic addition offsets.

theorem Nat.Simproc.sub_add_eq_comm (a b c : Nat) :
a - (b + c) = a - c - b
theorem Nat.Simproc.add_sub_add_le (a c : Nat) {b d : Nat} (h : b d) :
a + b - (c + d) = a - (c + (d - b))
theorem Nat.Simproc.add_sub_add_ge (a c : Nat) {b d : Nat} (h : b d) :
a + b - (c + d) = a + (b - d) - c
theorem Nat.Simproc.add_sub_le (a : Nat) {b c : Nat} (h : b c) :
a + b - c = a - (c - b)
theorem Nat.Simproc.add_eq_gt (a : Nat) {b c : Nat} (h : b > c) :
(a + b = c) = False
theorem Nat.Simproc.eq_add_gt (a : Nat) {b c : Nat} (h : c > a) :
(a = b + c) = False
theorem Nat.Simproc.add_eq_add_le (a c : Nat) {b d : Nat} (h : b d) :
(a + b = c + d) = (a = c + (d - b))
theorem Nat.Simproc.add_eq_add_ge (a c : Nat) {b d : Nat} (h : b d) :
(a + b = c + d) = (a + (b - d) = c)
theorem Nat.Simproc.add_eq_le (a : Nat) {b c : Nat} (h : b c) :
(a + b = c) = (a = c - b)
theorem Nat.Simproc.eq_add_le {a : Nat} (b : Nat) {c : Nat} (h : c a) :
(a = b + c) = (b = a - c)
theorem Nat.Simproc.beqEqOfEqEq {a b c d : Nat} (p : (a = b) = (c = d)) :
(a == b) = (c == d)
theorem Nat.Simproc.beqFalseOfEqFalse {a b : Nat} (p : (a = b) = False) :
(a == b) = false
theorem Nat.Simproc.bneEqOfEqEq {a b c d : Nat} (p : (a = b) = (c = d)) :
(a != b) = (c != d)
theorem Nat.Simproc.bneTrueOfEqFalse {a b : Nat} (p : (a = b) = False) :
(a != b) = true
theorem Nat.Simproc.add_le_add_le (a c : Nat) {b d : Nat} (h : b d) :
(a + b c + d) = (a c + (d - b))
theorem Nat.Simproc.add_le_add_ge (a c : Nat) {b d : Nat} (h : b d) :
(a + b c + d) = (a + (b - d) c)
theorem Nat.Simproc.add_le_le (a : Nat) {b c : Nat} (h : b c) :
(a + b c) = (a c - b)
theorem Nat.Simproc.add_le_gt (a : Nat) {b c : Nat} (h : b > c) :
(a + b c) = False
theorem Nat.Simproc.le_add_le (a : Nat) {b c : Nat} (h : a c) :
(a b + c) = True
theorem Nat.Simproc.le_add_ge (a : Nat) {b c : Nat} (h : a c) :
(a b + c) = (a - c b)