Skip to content

Commit c8aaaf2

Browse files
committed
feat(Order/Basic): simp lemmas about Subsingleton (#6092)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent b6d0a69 commit c8aaaf2

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Mathlib/Data/Fin/Tuple/Basic.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ section Tuple
4646
/-- There is exactly one tuple of size zero. -/
4747
example (α : Fin 0Sort u) : Unique (∀ i : Fin 0, α i) := by infer_instance
4848

49-
@[simp]
5049
theorem tuple0_le {α : ∀ _ : Fin 0, Type _} [∀ i, Preorder (α i)] (f g : ∀ i, α i) : f ≤ g :=
5150
finZeroElim
5251
#align fin.tuple0_le Fin.tuple0_le

Mathlib/Order/Basic.lean

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,18 @@ theorem not_gt (h : x = y) : ¬y < x :=
241241

242242
end Eq
243243

244+
245+
section
246+
247+
variable [Preorder α] {a b : α}
248+
249+
@[simp] lemma le_of_subsingleton [Subsingleton α] : a ≤ b := (Subsingleton.elim a b).le
250+
251+
-- Making this a @[simp] lemma causes confluences problems downstream.
252+
lemma not_lt_of_subsingleton [Subsingleton α] : ¬a < b := (Subsingleton.elim a b).not_lt
253+
254+
end
255+
244256
namespace LE.le
245257

246258
-- see Note [nolint_ge]
@@ -724,8 +736,7 @@ instance linearOrder (α : Type _) [LinearOrder α] : LinearOrder αᵒᵈ where
724736
decidableLT := (inferInstance : DecidableRel (λ a b : α => b < a))
725737
#align order_dual.linear_order OrderDual.linearOrder
726738

727-
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := λ [x: Inhabited α] => x
728-
739+
instance : ∀ [Inhabited α], Inhabited αᵒᵈ := fun [x : Inhabited α] => x
729740

730741
theorem Preorder.dual_dual (α : Type _) [H : Preorder α] : OrderDual.preorder αᵒᵈ = H :=
731742
Preorder.ext fun _ _ ↦ Iff.rfl

0 commit comments

Comments
 (0)