Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(Order/Nucleus): nuclei form a complete lattice #21515

Closed
wants to merge 16 commits into from
29 changes: 29 additions & 0 deletions Mathlib/Order/Nucleus.lean
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,33 @@ instance : BoundedOrder (Nucleus X) where
bot_le _ _ := le_apply
le_top _ _ := by simp

instance : InfSet (Nucleus X) where
sInf s :=
{ toFun x := ⨅ f ∈ s, f x,
map_inf' x y := by
simp only [InfHomClass.map_inf, le_antisymm_iff, le_inf_iff, le_iInf_iff]
refine ⟨⟨?_, ?_⟩, ?_⟩ <;> rintro f hf
· exact iInf₂_le_of_le f hf inf_le_left
· exact iInf₂_le_of_le f hf inf_le_right
· exact ⟨inf_le_of_left_le <| iInf₂_le f hf, inf_le_of_right_le <| iInf₂_le f hf⟩
idempotent' x := by
simp only [le_iInf_iff, iInf_le_iff]
intro a ha b h
rw [← idempotent]
apply le_trans (h a ha)
gcongr
simp_all [iInf_le_iff]
le_apply' x := by simp [le_apply]}

theorem sInf_apply (s : Set (Nucleus X)) (x : X) : sInf s x = ⨅ j ∈ s, j x := rfl
Bergschaf marked this conversation as resolved.
Show resolved Hide resolved

theorem iInf_apply {ι : Type*} (s : ι → (Nucleus X)) (x : X) :
iInf s x = ⨅ j ∈ Set.range s, j x := by simp [iInf, sInf_apply]
Bergschaf marked this conversation as resolved.
Show resolved Hide resolved

instance : CompleteSemilatticeInf (Nucleus X) where
sInf_le := (by simp_all [LE.le, sInf_apply, iInf_le_iff])
le_sInf := (by simp_all [LE.le, sInf_apply])
YaelDillies marked this conversation as resolved.
Show resolved Hide resolved

instance : CompleteLattice (Nucleus X) := completeLatticeOfCompleteSemilatticeInf (Nucleus X)

end Nucleus