Skip to content

Commit

Permalink
chore(number_theory/zsqrtd/basic): simplify le_total proof (#13555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Apr 20, 2022
1 parent 9d6d8c2 commit 741d285
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/number_theory/zsqrtd/basic.lean
Expand Up @@ -516,7 +516,10 @@ protected theorem nonneg_total : Π (a : ℤ√d), nonneg a ∨ nonneg (-a)
| ⟨-[1+ x], (y+1:ℕ)⟩ := nat.le_total

protected theorem le_total (a b : ℤ√d) : a ≤ b ∨ b ≤ a :=
let t := nonneg_total (b - a) in by rw [show -(b-a) = a-b, from neg_sub b a] at t; exact t
begin
have t := (b - a).nonneg_total,
rwa neg_sub at t,
end

instance : preorder ℤ√d :=
{ le := (≤),
Expand Down

0 comments on commit 741d285

Please sign in to comment.