Auxiliary lemmas for proving that two int numerals are different #
- Lemmas for reducing the problem to the case where the numerals are positive
- Lemmas for proving that positive int numerals are nonneg and positive
Int.natAbs
auxiliary lemmas
theorem
Int.ne_of_natAbs_ne_natAbs_of_nonneg
{a : ℤ}
{b : ℤ}
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(h : Int.natAbs a ≠ Int.natAbs b)
:
a ≠ b
theorem
Int.ne_of_nat_ne_nonneg_case
{a : ℤ}
{b : ℤ}
{n : ℕ}
{m : ℕ}
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(e1 : Int.natAbs a = n)
(e2 : Int.natAbs b = m)
(h : n ≠ m)
:
a ≠ b
- Aux lemmas for pushing
Int.natAbs
inside numeralsInt.natAbs_zero
andInt.natAbs_one
are defined in Std4 and aligned inMatlib/Init/Data/Int/Basic.lean
theorem
Int.natAbs_add_nonneg
{a : ℤ}
{b : ℤ}
:
0 ≤ a → 0 ≤ b → Int.natAbs (a + b) = Int.natAbs a + Int.natAbs b
theorem
Int.natAbs_add_neg
{a : ℤ}
{b : ℤ}
:
a < 0 → b < 0 → Int.natAbs (a + b) = Int.natAbs a + Int.natAbs b
@[deprecated]
@[deprecated]
@[deprecated]
theorem
Int.natAbs_bit1_nonneg_step
{a : ℤ}
{n : ℕ}
(h₁ : 0 ≤ a)
(h₂ : Int.natAbs a = n)
:
Int.natAbs (bit1 a) = bit1 n