-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(Topology/Compactness/CompactSystem): introduce compact Systems #24541
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
Closed
Closed
Changes from 38 commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
ac22b1b
started compactsystems
08d543c
not there for compact
pfaffelh f69f095
not done yet
cf6a0c4
found emptyset
5d99e0b
added mono
dabe67d
compiles
pfaffelh 911f112
dissipate
bbc424d
added dissipate
pfaffelh e2840e7
small update
pfaffelh 960f09c
cleaning
ee70c17
cleaning2
b8ab9fe
cleaning3
b0ae9b5
added mono from diss
3dc1996
diss
be4d94d
Merge branch 'master' into pfaffelh_compactSystem
3e0004c
final?
458b023
Merge branch 'master' into pfaffelh_compactSystem
384af74
merge master
a81f3d8
added or univ
38a87f8
Merge branch 'master' into pfaffelh_compactSystem
59a74e1
Merge branch 'master' into pfaffelh_compactSystem
16b754e
in line with pfaffelh_compactSystem2
8ccc3c1
Merge branch 'master' into pfaffelh_compactSystem
6fced3f
added iff
pfaffelh fb41ddf
Merge branch 'master' into pfaffelh_compactSystem
pfaffelh 8765264
n
pfaffelh 66d9abe
update Mathlib
22514a1
Merge branch 'master' into pfaffelh_compactSystem
2ee5f25
linters dissipate
383923b
run mk_all
pfaffelh ab38ce2
min imports
pfaffelh 0983f2f
deleted hash
847fc5e
Merge branch 'master' into pfaffelh_compactSystem
eb4e37c
cs0
6ef9357
Merge branch 'master' into pfaffelh_compactSystem
2125c02
fininsh?
9d9f1e7
Merge branch 'master' into pfaffelh_compactSystem
285a883
repair dissipate
a708e51
dealing with comments
662c215
Update Mathlib.lean
pfaffelh 6dd67ed
Update Mathlib.lean
pfaffelh f852653
Update Mathlib.lean
pfaffelh 6afe611
Update Mathlib.lean
pfaffelh abba3bf
Update Mathlib.lean
pfaffelh eb54bcf
Update Mathlib.lean
pfaffelh 3a83c6a
Update Mathlib.lean
pfaffelh 8cd31bd
Update Mathlib.lean
pfaffelh 81b59ae
Update Mathlib.lean
pfaffelh 6610961
Update Mathlib.lean
pfaffelh 7731bac
Update Mathlib.lean
pfaffelh 1f004f5
Update Mathlib.lean
pfaffelh 2905ef6
Update Mathlib.lean
pfaffelh b93d00c
Update Mathlib.lean
pfaffelh eac2037
Update Mathlib.lean
pfaffelh 4a94a12
Update Mathlib.lean
pfaffelh 57f06e0
Update Mathlib.lean
pfaffelh de14766
Update Mathlib.lean
pfaffelh 3edbee2
Update Mathlib.lean
pfaffelh 56be952
Update Mathlib.lean
pfaffelh 1949b3b
Update Mathlib.lean
pfaffelh 783c0c3
Update Mathlib.lean
pfaffelh 32439d4
Update Mathlib.lean
pfaffelh 96ef30d
fix two typos
4c77f31
took Mathlib from master
f16b9dc
mk_all
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| /- | ||
| Copyright (c) 2025 Peter Pfaffelhuber. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Peter Pfaffelhuber | ||
| -/ | ||
| import Mathlib.Data.Set.Lattice | ||
| import Mathlib.Order.Directed | ||
| import Mathlib.MeasureTheory.PiSystem | ||
|
|
||
| /-! | ||
| # Dissipate | ||
|
|
||
| The function `Dissipate` takes `s : α → Set β` with `LE α` and returns `⋂ y ≤ x, s y`. | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| In large parts, this file is parallel to `Mathlib.Data.Set.Accumulate`, where | ||
| `Accumulate s := ⋃ y ≤ x, s y` is defined. | ||
|
|
||
| -/ | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| open Nat | ||
|
|
||
| variable {α β : Type*} {s : α → Set β} | ||
|
|
||
| namespace Set | ||
|
|
||
| /-- `Dissipate s` is the intersection of `s y` for `y ≤ x`. -/ | ||
pfaffelh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| def Dissipate [LE α] (s : α → Set β) (x : α) : Set β := | ||
| ⋂ y ≤ x, s y | ||
|
|
||
| @[simp] | ||
pfaffelh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| theorem dissipate_def [LE α] {x : α} : Dissipate s x = ⋂ y ≤ x, s y := rfl | ||
|
|
||
| theorem dissipate_eq {s : ℕ → Set β} {n : ℕ} : Dissipate s n = ⋂ k < n + 1, s k := by | ||
| simp_rw [Nat.lt_add_one_iff] | ||
| rfl | ||
|
|
||
| theorem mem_dissipate [LE α] {x : α} {z : β} : z ∈ Dissipate s x ↔ ∀ y ≤ x, z ∈ s y := by | ||
| simp only [dissipate_def, mem_iInter] | ||
|
|
||
| theorem dissipate_subset [Preorder α] {x y : α} (hy : y ≤ x) : Dissipate s x ⊆ s y := | ||
| biInter_subset_of_mem hy | ||
|
|
||
| theorem dissipate_subset_iInter [Preorder α] (x : α) : ⋂ i, s i ⊆ Dissipate s x := by | ||
| simp only [Dissipate, subset_iInter_iff] | ||
| exact fun x h ↦ iInter_subset_of_subset x fun ⦃a⦄ a ↦ a | ||
|
|
||
| theorem antitone_dissipate [Preorder α] : Antitone (Dissipate s) := | ||
pfaffelh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fun _ _ hab ↦ biInter_subset_biInter_left fun _ hz => le_trans hz hab | ||
|
|
||
| @[gcongr] | ||
| theorem dissipate_subset_dissipate [Preorder α] {x y} (h : y ≤ x) : | ||
| Dissipate s x ⊆ Dissipate s y := | ||
| antitone_dissipate h | ||
|
|
||
| @[simp] | ||
| theorem biInter_dissipate [Preorder α] {s : α → Set β} {x : α} : | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ⋂ y, ⋂ (_ : y ≤ x), ⋂ y_1, ⋂ (_ : y_1 ≤ y), s y_1 = ⋂ y, ⋂ (_ : y ≤ x), s y := by | ||
| apply Subset.antisymm | ||
| · apply iInter_mono fun z y hy ↦ ?_ | ||
| simp only [dissipate_def, mem_iInter] at * | ||
| exact fun h ↦ hy h z <| le_refl z | ||
| · simp only [subset_iInter_iff, Dissipate] | ||
| exact fun i hi z hz ↦ biInter_subset_of_mem <| le_trans hz hi | ||
|
|
||
| @[simp] | ||
| theorem iInter_dissipate [Preorder α] : ⋂ x, ⋂ y, ⋂ (_ : y ≤ x), s y = ⋂ x, s x := by | ||
pfaffelh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| apply Subset.antisymm <;> simp_rw [subset_def, mem_iInter] | ||
| · exact fun z h x' ↦ h x' x' (le_refl x') | ||
| · exact fun z h x' y hy ↦ h y | ||
|
|
||
| lemma dissipate_bot [PartialOrder α] [OrderBot α] (s : α → Set β) : Dissipate s ⊥ = s ⊥ := by | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| simp only [dissipate_def, le_bot_iff, iInter_iInter_eq_left] | ||
|
|
||
| open Nat | ||
|
|
||
| @[simp] | ||
| theorem dissipate_succ (s : ℕ → Set α) (n : ℕ) : | ||
| ⋂ y, ⋂ (_ : y ≤ n + 1), s y = (⋂ y, ⋂ (_ : y ≤ n), s y) ∩ s (n + 1) | ||
| := by | ||
| ext x | ||
| refine ⟨fun hx ↦ ?_, fun hx ↦ ?_⟩ | ||
| · simp only [mem_inter_iff, mem_iInter, Dissipate] at * | ||
| exact ⟨fun i hi ↦ hx i <| le_trans hi <| | ||
| le_add_right n 1, hx (n + 1) <| le_refl (n + 1)⟩ | ||
| · simp only [Dissipate, mem_inter_iff, mem_iInter] at * | ||
| intro i hi | ||
| by_cases h : i ≤ n | ||
| · exact hx.1 i h | ||
| · simp only [not_le] at h | ||
| exact le_antisymm hi h ▸ hx.2 | ||
|
|
||
| lemma dissipate_zero (s : ℕ → Set β) : Dissipate s 0 = s 0 := by | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| simp [dissipate_def] | ||
|
|
||
| lemma exists_subset_dissipate_of_directed {s : ℕ → Set α} | ||
| (hd : Directed (fun (x1 x2 : Set α) => x2 ⊆ x1) s) (n : ℕ) : ∃ m, s m ⊆ Dissipate s n := by | ||
| induction n with | ||
| | zero => use 0; simp | ||
| | succ n hn => | ||
| obtain ⟨m, hm⟩ := hn | ||
| simp_rw [dissipate_def, dissipate_succ] | ||
| obtain ⟨k, hk⟩ := hd m (n+1) | ||
| simp at hk | ||
| use k | ||
| simp only [subset_inter_iff] | ||
| exact ⟨le_trans hk.1 hm, hk.2⟩ | ||
|
|
||
| lemma exists_dissipate_eq_empty_iff {s : ℕ → Set α} | ||
| (hd : Directed (fun (x1 x2 : Set α) => x2 ⊆ x1) s) : | ||
| (∃ n, Dissipate s n = ∅) ↔ (∃ n, s n = ∅) := by | ||
| refine ⟨?_, fun ⟨n, hn⟩ ↦ ⟨n, ?_⟩⟩ | ||
| · rw [← not_imp_not] | ||
| push_neg | ||
| intro h n | ||
| obtain ⟨m, hm⟩ := exists_subset_dissipate_of_directed hd n | ||
| exact Set.Nonempty.mono hm (h m) | ||
| · by_cases hn' : n = 0 | ||
| · rw [hn'] | ||
| exact Eq.trans (dissipate_zero s) (hn' ▸ hn) | ||
| · obtain ⟨k, hk⟩ := exists_eq_add_one_of_ne_zero hn' | ||
| rw [hk, dissipate_def, dissipate_succ, ← hk, hn, Set.inter_empty] | ||
|
|
||
| lemma directed_dissipate {s : ℕ → Set α} : | ||
| Directed (fun (x1 x2 : Set α) => x2 ⊆ x1) (Dissipate s) := | ||
| antitone_dissipate.directed_ge | ||
|
|
||
| lemma exists_dissipate_eq_empty_iff_of_directed (C : ℕ → Set α) | ||
| (hd : Directed (fun (x1 x2 : Set α) => x2 ⊆ x1) C) : | ||
| (∃ n, C n = ∅) ↔ (∃ n, Dissipate C n = ∅) := by | ||
| refine ⟨fun ⟨n, hn⟩ ↦ ⟨n, ?_⟩ , ?_⟩ | ||
| · by_cases hn' : n = 0 | ||
| · rw [hn', dissipate_zero] | ||
| exact hn' ▸ hn | ||
| · obtain ⟨k, hk⟩ := exists_eq_succ_of_ne_zero hn' | ||
| simp_rw [hk, succ_eq_add_one, dissipate_def, dissipate_succ, | ||
| ← succ_eq_add_one, ← hk, hn, Set.inter_empty] | ||
| · rw [← not_imp_not] | ||
| push_neg | ||
| intro h n | ||
| obtain ⟨m, hm⟩ := exists_subset_dissipate_of_directed hd n | ||
| exact Set.Nonempty.mono hm (h m) | ||
|
|
||
| /-- For a ∩-stable attribute `p` on `Set α` and a sequence of sets `s` with this attribute, | ||
| `p (Dissipate s n)` holds. -/ | ||
| lemma dissipate_of_piSystem {s : ℕ → Set α} {p : Set α → Prop} | ||
pfaffelh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| (hp : IsPiSystem p) (h : ∀ n, p (s n)) (n : ℕ) (h' : (Dissipate s n).Nonempty) : | ||
| p (Dissipate s n) := by | ||
| induction n with | ||
| | zero => | ||
| simp only [dissipate_def, le_zero_eq, iInter_iInter_eq_left] | ||
| exact h 0 | ||
| | succ n hn => | ||
| rw [dissipate_def, dissipate_succ] at * | ||
| apply hp (Dissipate s n) (hn (Nonempty.left h')) (s (n+1)) (h (n+1)) h' | ||
|
|
||
| end Set | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.