Skip to content

Commit 2422cb5

Browse files
committed
chore(Order): More simp lemmas (#13338)
These lemmas are needed in #13201
1 parent 58141c8 commit 2422cb5

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

Mathlib/Order/Bounds/Basic.lean

+4-4
Original file line numberDiff line numberDiff line change
@@ -624,19 +624,19 @@ end
624624
-/
625625

626626

627-
theorem isGreatest_singleton : IsGreatest {a} a :=
627+
@[simp] theorem isGreatest_singleton : IsGreatest {a} a :=
628628
⟨mem_singleton a, fun _ hx => le_of_eq <| eq_of_mem_singleton hx⟩
629629
#align is_greatest_singleton isGreatest_singleton
630630

631-
theorem isLeast_singleton : IsLeast {a} a :=
631+
@[simp] theorem isLeast_singleton : IsLeast {a} a :=
632632
@isGreatest_singleton αᵒᵈ _ a
633633
#align is_least_singleton isLeast_singleton
634634

635-
theorem isLUB_singleton : IsLUB {a} a :=
635+
@[simp] theorem isLUB_singleton : IsLUB {a} a :=
636636
isGreatest_singleton.isLUB
637637
#align is_lub_singleton isLUB_singleton
638638

639-
theorem isGLB_singleton : IsGLB {a} a :=
639+
@[simp] theorem isGLB_singleton : IsGLB {a} a :=
640640
isLeast_singleton.isGLB
641641
#align is_glb_singleton isGLB_singleton
642642

Mathlib/Order/CompleteLattice.lean

+27-7
Original file line numberDiff line numberDiff line change
@@ -1743,11 +1743,13 @@ instance Pi.instCompleteLattice {α : Type*} {β : α → Type*} [∀ i, Complet
17431743
le_sInf _ _ hf := fun i => le_iInf fun g => hf g g.2 i
17441744
#align pi.complete_lattice Pi.instCompleteLattice
17451745

1746+
@[simp]
17461747
theorem sSup_apply {α : Type*} {β : α → Type*} [∀ i, SupSet (β i)] {s : Set (∀ a, β a)} {a : α} :
17471748
(sSup s) a = ⨆ f : s, (f : ∀ a, β a) a :=
17481749
rfl
17491750
#align Sup_apply sSup_apply
17501751

1752+
@[simp]
17511753
theorem sInf_apply {α : Type*} {β : α → Type*} [∀ i, InfSet (β i)] {s : Set (∀ a, β a)} {a : α} :
17521754
sInf s a = ⨅ f : s, (f : ∀ a, β a) a :=
17531755
rfl
@@ -1792,15 +1794,33 @@ theorem binary_relation_sInf_iff {α β : Type*} (s : Set (α → β → Prop))
17921794

17931795
section CompleteLattice
17941796

1795-
variable [Preorder α] [CompleteLattice β]
1797+
variable {ι : Sort*} [Preorder α] [CompleteLattice β] {s : Set (α → β)} {f : ι → α → β}
1798+
1799+
protected lemma Monotone.sSup (hs : ∀ f ∈ s, Monotone f) : Monotone (sSup s) :=
1800+
fun _ _ h ↦ iSup_mono fun f ↦ hs f f.2 h
1801+
#align monotone_Sup_of_monotone Monotone.sSup
1802+
1803+
protected lemma Monotone.sInf (hs : ∀ f ∈ s, Monotone f) : Monotone (sInf s) :=
1804+
fun _ _ h ↦ iInf_mono fun f ↦ hs f f.2 h
1805+
#align monotone_Inf_of_monotone Monotone.sInf
1806+
1807+
protected lemma Antitone.sSup (hs : ∀ f ∈ s, Antitone f) : Antitone (sSup s) :=
1808+
fun _ _ h ↦ iSup_mono fun f ↦ hs f f.2 h
1809+
1810+
protected lemma Antitone.sInf (hs : ∀ f ∈ s, Antitone f) : Antitone (sInf s) :=
1811+
fun _ _ h ↦ iInf_mono fun f ↦ hs f f.2 h
17961812

1797-
theorem monotone_sSup_of_monotone {s : Set (α → β)} (m_s : ∀ f ∈ s, Monotone f) :
1798-
Monotone (sSup s) := fun _ _ h => iSup_mono fun f => m_s f f.2 h
1799-
#align monotone_Sup_of_monotone monotone_sSup_of_monotone
1813+
@[deprecated (since := "2024-05-29")] alias monotone_sSup_of_monotone := Monotone.sSup
1814+
@[deprecated (since := "2024-05-29")] alias monotone_sInf_of_monotone := Monotone.sInf
18001815

1801-
theorem monotone_sInf_of_monotone {s : Set (α → β)} (m_s : ∀ f ∈ s, Monotone f) :
1802-
Monotone (sInf s) := fun _ _ h => iInf_mono fun f => m_s f f.2 h
1803-
#align monotone_Inf_of_monotone monotone_sInf_of_monotone
1816+
protected lemma Monotone.iSup (hf : ∀ i, Monotone (f i)) : Monotone (⨆ i, f i) :=
1817+
Monotone.sSup (by simpa)
1818+
protected lemma Monotone.iInf (hf : ∀ i, Monotone (f i)) : Monotone (⨅ i, f i) :=
1819+
Monotone.sInf (by simpa)
1820+
protected lemma Antitone.iSup (hf : ∀ i, Antitone (f i)) : Antitone (⨆ i, f i) :=
1821+
Antitone.sSup (by simpa)
1822+
protected lemma Antitone.iInf (hf : ∀ i, Antitone (f i)) : Antitone (⨅ i, f i) :=
1823+
Antitone.sInf (by simpa)
18041824

18051825
end CompleteLattice
18061826

Mathlib/Order/Hom/Basic.lean

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ theorem comp_mono ⦃g₁ g₂ : β →o γ⦄ (hg : g₁ ≤ g₂) ⦃f₁ f₂
344344
g₁.comp f₁ ≤ g₂.comp f₂ := fun _ => (hg _).trans (g₂.mono <| hf _)
345345
#align order_hom.comp_mono OrderHom.comp_mono
346346

347+
@[simp] lemma mk_comp_mk (g : β → γ) (f : α → β) (hg hf) :
348+
comp ⟨g, hg⟩ ⟨f, hf⟩ = ⟨g ∘ f, hg.comp hf⟩ := rfl
349+
347350
/-- The composition of two bundled monotone functions, a fully bundled version. -/
348351
@[simps! (config := .asFn)]
349352
def compₘ : (β →o γ) →o (α →o β) →o α →o γ :=

0 commit comments

Comments
 (0)