Note about Mathlib/Init/ #
The files in Mathlib/Init are leftovers from the port from Mathlib3.
(They contain content moved from lean3 itself that Mathlib needed but was not moved to lean4.)
We intend to move all the content of these files out into the main Mathlib directory structure.
Contributions assisting with this are appreciated.
#align statements without corresponding declarations
(i.e. because the declaration is in Batteries or Lean) can be left here.
These will be deleted soon so will not significantly delay deleting otherwise empty Init files.
Some Ordering lemmas #
@[simp]
theorem
Ordering.ite_eq_lt_distrib
(c : Prop)
[Decidable c]
(a : Ordering)
(b : Ordering)
:
((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt
@[simp]
theorem
Ordering.ite_eq_eq_distrib
(c : Prop)
[Decidable c]
(a : Ordering)
(b : Ordering)
:
((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq
@[simp]
theorem
Ordering.ite_eq_gt_distrib
(c : Prop)
[Decidable c]
(a : Ordering)
(b : Ordering)
:
((if c then a else b) = Ordering.gt) = if c then a = Ordering.gt else b = Ordering.gt
@[simp]
theorem
cmpUsing_eq_lt
{α : Type u}
{lt : α → α → Prop}
[DecidableRel lt]
(a : α)
(b : α)
:
(cmpUsing lt a b = Ordering.lt) = lt a b
@[simp]
theorem
cmpUsing_eq_gt
{α : Type u}
{lt : α → α → Prop}
[DecidableRel lt]
[IsStrictOrder α lt]
(a : α)
(b : α)
:
cmpUsing lt a b = Ordering.gt ↔ lt b a
@[simp]