@@ -26,15 +26,15 @@ proofs that they are indeed equivalent to well-foundedness.
2626## Main definitions
2727* `CompleteLattice.IsSupClosedCompact`
2828* `CompleteLattice.IsSupFiniteCompact`
29- * `CompleteLattice. IsCompactElement`
29+ * `IsCompactElement`
3030* `IsCompactlyGenerated`
3131
3232 ## Main results
3333The main result is that the following four conditions are equivalent for a complete lattice:
3434* `well_founded (>)`
3535* `CompleteLattice.IsSupClosedCompact`
3636* `CompleteLattice.IsSupFiniteCompact`
37- * `∀ k, CompleteLattice. IsCompactElement k`
37+ * `∀ k, IsCompactElement k`
3838
3939 This is demonstrated by means of the following four lemmas:
4040* `CompleteLattice.WellFounded.isSupFiniteCompact`
@@ -56,6 +56,16 @@ complete lattice, well-founded, compact
5656@[expose] public section
5757
5858open Set
59+ /-- An element `k` is compact if any directed set with `LUB` (least upper bound) above
60+ `k` has already got above `k` at some point in the set.
61+ Such an element is also called "finite" or "S-compact". -/
62+ def IsCompactElement {α : Type *} [PartialOrder α] (k : α) :=
63+ ∀ (s : Set α) (u : α),
64+ s.Nonempty →
65+ DirectedOn (· ≤ ·) s →
66+ IsLUB s u →
67+ k ≤ u →
68+ ∃ x ∈ s, k ≤ x
5969
6070variable {ι : Sort *} {α : Type *} [CompleteLattice α] {f : ι → α}
6171
@@ -73,49 +83,26 @@ same `sSup`. -/
7383def IsSupFiniteCompact : Prop :=
7484 ∀ s : Set α, ∃ t : Finset α, ↑t ⊆ s ∧ sSup s = t.sup id
7585
76- /-- An element `k` of a complete lattice is said to be compact if any set with `sSup`
77- above `k` has a finite subset with `sSup` above `k`. Such an element is also called
78- "finite" or "S-compact". -/
79- def IsCompactElement {α : Type *} [CompleteLattice α] (k : α) :=
80- ∀ s : Set α, k ≤ sSup s → ∃ t : Finset α, ↑t ⊆ s ∧ k ≤ t.sup id
81-
82- theorem isCompactElement_iff. {u} {α : Type u} [CompleteLattice α] (k : α) :
83- CompleteLattice.IsCompactElement k ↔
84- ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t : Finset ι, k ≤ t.sup s := by
85- classical
86- constructor
87- · intro H ι s hs
88- obtain ⟨t, ht, ht'⟩ := H (Set.range s) hs
89- have : ∀ x : t, ∃ i, s i = x := fun x => ht x.prop
90- choose f hf using this
91- refine ⟨Finset.univ.image f, ht'.trans ?_⟩
92- rw [Finset.sup_le_iff]
93- intro b hb
94- rw [← show s (f ⟨b, hb⟩) = id b from hf _]
95- exact Finset.le_sup (Finset.mem_image_of_mem f <| Finset.mem_univ (Subtype.mk b hb))
96- · intro H s hs
97- obtain ⟨t, ht⟩ :=
98- H s Subtype.val
99- (by
100- delta iSup
101- rwa [Subtype.range_coe])
102- refine ⟨t.image Subtype.val, by simp, ht.trans ?_⟩
103- rw [Finset.sup_le_iff]
104- exact fun x hx => @Finset.le_sup _ _ _ _ _ id _ (Finset.mem_image_of_mem Subtype.val hx)
105-
10686/-- An element `k` is compact if and only if any directed set with `sSup` above
10787`k` already got above `k` at some point in the set. -/
10888theorem isCompactElement_iff_le_of_directed_sSup_le (k : α) :
10989 IsCompactElement k ↔
11090 ∀ s : Set α, s.Nonempty → DirectedOn (· ≤ ·) s → k ≤ sSup s → ∃ x : α, x ∈ s ∧ k ≤ x := by
91+ constructor
92+ · intro hk s hs hs' h_le
93+ exact hk s (sSup s) hs hs' (isLUB_sSup s) h_le
94+ · intro h s u hs hs' hu h_le
95+ rw [isLUB_iff_sSup_eq] at hu
96+ rw [← hu] at h_le
97+ exact h s hs hs' h_le
98+
99+ /-- An element `k` of is compact if any set with `sSup`
100+ above `k` has a finite subset with `sSup` above `k`. -/
101+ theorem isCompactElement_iff_exists_le_sSup_of_le_sSup (k : α) :
102+ IsCompactElement k ↔ ∀ s : Set α, k ≤ sSup s → ∃ t : Finset α, ↑t ⊆ s ∧ k ≤ t.sup id := by
111103 classical
104+ rw [isCompactElement_iff_le_of_directed_sSup_le]
112105 constructor
113- · intro hk s hne hdir hsup
114- obtain ⟨t, ht⟩ := hk s hsup
115- -- certainly every element of t is below something in s, since ↑t ⊆ s.
116- have t_below_s : ∀ x ∈ t, ∃ y ∈ s, x ≤ y := fun x hxt => ⟨x, ht.left hxt, le_rfl⟩
117- obtain ⟨x, ⟨hxs, hsupx⟩⟩ := Finset.sup_le_of_le_directed s hne hdir t t_below_s
118- exact ⟨x, ⟨hxs, le_trans ht.right hsupx⟩⟩
119106 · intro hk s hsup
120107 -- Consider the set of finite joins of elements of the (plain) set s.
121108 let S : Set α := { x | ∃ t : Finset α, ↑t ⊆ s ∧ x = t.sup id }
@@ -145,10 +132,42 @@ theorem isCompactElement_iff_le_of_directed_sSup_le (k : α) :
145132 obtain ⟨t, ⟨htS, htsup⟩⟩ := hjS
146133 use t
147134 exact ⟨htS, by rwa [← htsup]⟩
135+ · intro hk s hne hdir hsup
136+ obtain ⟨t, ht⟩ := hk s hsup
137+ -- certainly every element of t is below something in s, since ↑t ⊆ s.
138+ have t_below_s : ∀ x ∈ t, ∃ y ∈ s, x ≤ y := fun x hxt => ⟨x, ht.left hxt, le_rfl⟩
139+ obtain ⟨x, ⟨hxs, hsupx⟩⟩ := Finset.sup_le_of_le_directed s hne hdir t t_below_s
140+ exact ⟨x, ⟨hxs, le_trans ht.right hsupx⟩⟩
141+
142+ theorem isCompactElement_iff_exists_le_iSup_of_le_iSup. {u} {α : Type u} [CompleteLattice α]
143+ (k : α) : IsCompactElement k ↔
144+ ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t : Finset ι, k ≤ t.sup s := by
145+ classical
146+ rw [isCompactElement_iff_exists_le_sSup_of_le_sSup]
147+ constructor
148+ · intro H ι s hs
149+ obtain ⟨t, ht, ht'⟩ := H (Set.range s) hs
150+ have : ∀ x : t, ∃ i, s i = x := fun x => ht x.prop
151+ choose f hf using this
152+ refine ⟨Finset.univ.image f, ht'.trans ?_⟩
153+ rw [Finset.sup_le_iff]
154+ intro b hb
155+ rw [← show s (f ⟨b, hb⟩) = id b from hf _]
156+ exact Finset.le_sup (Finset.mem_image_of_mem f <| Finset.mem_univ (Subtype.mk b hb))
157+ · intro H s hs
158+ obtain ⟨t, ht⟩ :=
159+ H s Subtype.val
160+ (by
161+ delta iSup
162+ rwa [Subtype.range_coe])
163+ refine ⟨t.image Subtype.val, by simp, ht.trans ?_⟩
164+ rw [Finset.sup_le_iff]
165+ exact fun x hx => @Finset.le_sup _ _ _ _ _ id _ (Finset.mem_image_of_mem Subtype.val hx)
148166
149167theorem IsCompactElement.exists_finset_of_le_iSup {k : α} (hk : IsCompactElement k) {ι : Type *}
150168 (f : ι → α) (h : k ≤ ⨆ i, f i) : ∃ s : Finset ι, k ≤ ⨆ i ∈ s, f i := by
151169 classical
170+ rw [isCompactElement_iff_le_of_directed_sSup_le] at hk
152171 let g : Finset ι → α := fun s => ⨆ i ∈ s, f i
153172 have h1 : DirectedOn (· ≤ ·) (Set.range g) := by
154173 rintro - ⟨s, rfl⟩ - ⟨t, rfl⟩
@@ -160,9 +179,7 @@ theorem IsCompactElement.exists_finset_of_le_iSup {k : α} (hk : IsCompactElemen
160179 (iSup_le fun i =>
161180 le_sSup_of_le ⟨{i}, rfl⟩
162181 (le_iSup_of_le i (le_iSup_of_le (Finset.mem_singleton_self i) le_rfl)))
163- obtain ⟨-, ⟨s, rfl⟩, hs⟩ :=
164- (isCompactElement_iff_le_of_directed_sSup_le α k).mp hk (Set.range g) (Set.range_nonempty g)
165- h1 h2
182+ obtain ⟨-, ⟨s, rfl⟩, hs⟩ := hk (Set.range g) (Set.range_nonempty g) h1 h2
166183 exact ⟨s, hs⟩
167184
168185/-- A compact element `k` has the property that any directed set lying strictly below `k` has
@@ -181,15 +198,14 @@ theorem IsCompactElement.directed_sSup_lt_of_lt {α : Type*} [CompleteLattice α
181198theorem isCompactElement_finsetSup {α β : Type *} [CompleteLattice α] {f : β → α} (s : Finset β)
182199 (h : ∀ x ∈ s, IsCompactElement (f x)) : IsCompactElement (s.sup f) := by
183200 classical
184- rw [isCompactElement_iff_le_of_directed_sSup_le]
201+ simp_rw [isCompactElement_iff_le_of_directed_sSup_le] at ⊢ h
185202 intro d hemp hdir hsup
186203 rw [← Function.id_comp f]
187204 rw [← Finset.sup_image]
188205 apply Finset.sup_le_of_le_directed d hemp hdir
189206 rintro x hx
190207 obtain ⟨p, ⟨hps, rfl⟩⟩ := Finset.mem_image.mp hx
191208 specialize h p hps
192- rw [isCompactElement_iff_le_of_directed_sSup_le] at h
193209 specialize h d hemp hdir (le_trans (Finset.le_sup hps) hsup)
194210 simpa only [exists_prop]
195211
@@ -239,6 +255,7 @@ theorem IsSupClosedCompact.wellFoundedGT (h : IsSupClosedCompact α) :
239255
240256theorem isSupFiniteCompact_iff_all_elements_compact :
241257 IsSupFiniteCompact α ↔ ∀ k : α, IsCompactElement k := by
258+ simp_rw [isCompactElement_iff_exists_le_sSup_of_le_sSup]
242259 refine ⟨fun h k s hs => ?_, fun h s => ?_⟩
243260 · obtain ⟨t, ⟨hts, htsup⟩⟩ := h s
244261 use t, hts
@@ -334,25 +351,25 @@ element is the `sSup` of compact elements. -/
334351class IsCompactlyGenerated (α : Type *) [CompleteLattice α] : Prop where
335352 /-- In a compactly generated complete lattice,
336353 every element is the `sSup` of some set of compact elements. -/
337- exists_sSup_eq : ∀ x : α, ∃ s : Set α, (∀ x ∈ s, CompleteLattice. IsCompactElement x) ∧ sSup s = x
354+ exists_sSup_eq : ∀ x : α, ∃ s : Set α, (∀ x ∈ s, IsCompactElement x) ∧ sSup s = x
338355
339356section
340357
341358variable [IsCompactlyGenerated α] {a : α} {s : Set α}
342359
343360@[simp]
344361theorem sSup_compact_le_eq (b) :
345- sSup { c : α | CompleteLattice. IsCompactElement c ∧ c ≤ b } = b := by
362+ sSup { c : α | IsCompactElement c ∧ c ≤ b } = b := by
346363 rcases IsCompactlyGenerated.exists_sSup_eq b with ⟨s, hs, rfl⟩
347364 exact le_antisymm (sSup_le fun c hc => hc.2 ) (sSup_le_sSup fun c cs => ⟨hs c cs, le_sSup cs⟩)
348365
349366@[simp]
350- theorem sSup_compact_eq_top : sSup { a : α | CompleteLattice. IsCompactElement a } = ⊤ := by
367+ theorem sSup_compact_eq_top : sSup { a : α | IsCompactElement a } = ⊤ := by
351368 refine Eq.trans (congr rfl (Set.ext fun x => ?_)) (sSup_compact_le_eq ⊤)
352369 exact (and_iff_left le_top).symm
353370
354371theorem le_iff_compact_le_imp {a b : α} :
355- a ≤ b ↔ ∀ c : α, CompleteLattice. IsCompactElement c → c ≤ a → c ≤ b :=
372+ a ≤ b ↔ ∀ c : α, IsCompactElement c → c ≤ a → c ≤ b :=
356373 ⟨fun ab _ _ ca => le_trans ca ab, fun h => by
357374 rw [← sSup_compact_le_eq a, ← sSup_compact_le_eq b]
358375 exact sSup_le_sSup fun c hc => ⟨hc.1 , h c hc.1 hc.2 ⟩⟩
@@ -364,8 +381,8 @@ theorem DirectedOn.inf_sSup_eq (h : DirectedOn (· ≤ ·) s) : a ⊓ sSup s =
364381 rw [le_iff_compact_le_imp]
365382 by_cases hs : s.Nonempty
366383 · intro c hc hcinf
367- rw [le_inf_iff] at hcinf
368384 rw [CompleteLattice.isCompactElement_iff_le_of_directed_sSup_le] at hc
385+ rw [le_inf_iff] at hcinf
369386 rcases hc s hs h hcinf.2 with ⟨d, ds, cd⟩
370387 refine (le_inf hcinf.1 cd).trans (le_trans ?_ (le_iSup₂ d ds))
371388 rfl
@@ -409,6 +426,7 @@ theorem inf_sSup_eq_iSup_inf_sup_finset :
409426 (by
410427 rw [le_iff_compact_le_imp]
411428 intro c hc hcinf
429+ rw [CompleteLattice.isCompactElement_iff_exists_le_sSup_of_le_sSup] at hc
412430 rw [le_inf_iff] at hcinf
413431 rcases hc s hcinf.2 with ⟨t, ht1, ht2⟩
414432 refine (le_inf hcinf.1 ht2).trans (le_trans ?_ (le_iSup₂ t ht1))
@@ -498,7 +516,7 @@ theorem Iic_coatomic_of_compact_element {k : α} (h : IsCompactElement k) :
498516 exact lt_irrefl _ hck
499517 · intro S SC cC I _
500518 by_cases hS : S.Nonempty
501- · refine ⟨sSup S, h .directed_sSup_lt_of_lt hS cC.directedOn SC, ?_⟩
519+ · refine ⟨sSup S, IsCompactElement .directed_sSup_lt_of_lt h hS cC.directedOn SC, ?_⟩
502520 intro; apply le_sSup
503521 exact
504522 ⟨b, lt_of_le_of_ne hbk H, by
@@ -538,7 +556,7 @@ theorem iSupIndep.iInf {ι : Type*} {κ : ι → Type*} (f : (i : ι) → κ i
538556
539557instance (priority := 100 ) isAtomic_of_complementedLattice [ComplementedLattice α] : IsAtomic α :=
540558 ⟨fun b => by
541- by_cases h : { c : α | CompleteLattice. IsCompactElement c ∧ c ≤ b } ⊆ {⊥}
559+ by_cases h : { c : α | IsCompactElement c ∧ c ≤ b } ⊆ {⊥}
542560 · left
543561 rw [← sSup_compact_le_eq b, sSup_eq_bot]
544562 exact h
0 commit comments