Skip to content

Commit

Permalink
chore: deprecate Int.ofNat_natAbs_eq_of_nonneg (#432)
Browse files Browse the repository at this point in the history
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
  • Loading branch information
kim-em and digama0 authored Dec 15, 2023
1 parent c4aef3c commit 9dd24a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Std/Data/Int/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1379,9 +1379,7 @@ theorem sign_eq_neg_one_iff_neg (a : Int) : sign a = -1 ↔ a < 0 :=

/-! ### nat abs -/

theorem ofNat_natAbs_eq_of_nonneg : ∀ a : Int, 0 ≤ a → Int.natAbs a = a
| (_:Nat), _ => rfl
| -[n+1], h => absurd (negSucc_lt_zero n) (Int.not_lt.2 h)
@[deprecated] alias ofNat_natAbs_eq_of_nonneg := natAbs_of_nonneg

theorem eq_natAbs_iff_mul_eq_zero : natAbs a = n ↔ (a - n) * (a + n) = 0 := by
rw [natAbs_eq_iff, Int.mul_eq_zero, ← Int.sub_neg, Int.sub_eq_zero, Int.sub_eq_zero]
Expand Down

0 comments on commit 9dd24a3

Please sign in to comment.