Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Init/Data/Dyadic/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -697,12 +697,12 @@ theorem toRat_lt_toRat_iff {x y : Dyadic} : x.toRat < y.toRat ↔ x < y := blt_i
theorem toRat_le_toRat_iff {x y : Dyadic} : x.toRat ≤ y.toRat ↔ x ≤ y := ble_iff_toRat.symm

@[simp]
protected theorem not_le {x y : Dyadic} : ¬x < y ↔ y ≤ x := by
protected theorem not_lt {x y : Dyadic} : ¬x < y ↔ y ≤ x := by
simp only [· ≤ ·, · < ·, Bool.not_eq_true, blt_eq_false_iff]

@[simp]
protected theorem not_lt {x y : Dyadic} : ¬x ≤ y ↔ y < x := by
rw [← Dyadic.not_le, Decidable.not_not]
protected theorem not_le {x y : Dyadic} : ¬x ≤ y ↔ y < x := by
rw [← Dyadic.not_lt, Decidable.not_not]

@[simp]
protected theorem le_refl (x : Dyadic) : x ≤ x := by
Expand All @@ -723,7 +723,7 @@ protected theorem le_total (x y : Dyadic) : x ≤ y ∨ y ≤ x := by
exact Rat.le_total

instance : Std.LawfulOrderLT Dyadic where
lt_iff a b := by rw [← Dyadic.not_lt, iff_and_self]; exact (Dyadic.le_total _ _).resolve_left
lt_iff a b := by rw [← Dyadic.not_le, iff_and_self]; exact (Dyadic.le_total _ _).resolve_left

instance : Std.IsPreorder Dyadic where
le_refl := Dyadic.le_refl
Expand Down
Loading