-
Notifications
You must be signed in to change notification settings - Fork 297
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] - refactor(topology/discrete_quotient): review API #18401
Conversation
def of_clopen {A : set X} (h : is_clopen A) : discrete_quotient X := | ||
{ rel := λ x y, x ∈ A ∧ y ∈ A ∨ x ∉ A ∧ y ∉ A, | ||
equiv := ⟨by tauto!, by tauto!, by tauto!⟩, | ||
clopen := begin | ||
intros x, | ||
by_cases hx : x ∈ A, | ||
{ apply is_clopen.union, | ||
{ convert h, | ||
ext, | ||
exact ⟨λ i, i.2, λ i, ⟨hx,i⟩⟩ }, | ||
{ convert is_clopen_empty, | ||
tidy } }, | ||
{ apply is_clopen.union, | ||
{ convert is_clopen_empty, | ||
tidy }, | ||
{ convert is_clopen.compl h, | ||
ext, | ||
exact ⟨λ i, i.2, λ i, ⟨hx, i⟩⟩ } }, | ||
end } | ||
|
||
lemma refl : ∀ x : X, S.rel x x := S.equiv.1 | ||
lemma symm : ∀ x y : X, S.rel x y → S.rel y x := S.equiv.2.1 | ||
lemma trans : ∀ x y z : X, S.rel x y → S.rel y z → S.rel x z := S.equiv.2.2 | ||
{ to_setoid := ⟨λ x y, x ∈ A ↔ y ∈ A, λ _, iff.rfl, λ _ _, iff.symm, λ _ _ _, iff.trans⟩, | ||
is_open_set_of_rel := λ x, | ||
by by_cases hx : x ∈ A; simp [setoid.rel, hx, h.1, h.2, ← compl_set_of] } | ||
|
||
lemma refl : ∀ x, S.rel x x := S.refl' | ||
lemma symm {x y : X} : S.rel x y → S.rel y x := S.symm' | ||
lemma trans {x y z} : S.rel x y → S.rel y z → S.rel x z := S.trans' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me.
maintainer merge
@@ -40,7 +40,7 @@ variables (X : Profinite.{u}) | |||
|
|||
/-- The functor `discrete_quotient X ⥤ Fintype` whose limit is isomorphic to `X`. -/ | |||
def fintype_diagram : discrete_quotient X ⥤ Fintype := | |||
{ obj := λ S, Fintype.of S, | |||
{ obj := λ S, by haveI := fintype.of_finite S; exact Fintype.of S, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the effect of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed an instance from noncomputable .. fintype
to finite
elsewhere, so I have to use fintype.of_finite
here.
🚀 Pull request has been placed on the maintainer queue by eric-wieser. |
1 similar comment
🚀 Pull request has been placed on the maintainer queue by eric-wieser. |
Thanks! bors merge |
@@ -26,22 +26,31 @@ quotients as setoids whose equivalence classes are clopen. | |||
endowed with a `fintype` instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say finite
?
endowed with a `fintype` instance. | |
endowed with a `finite` instance. |
Backport various changes I made to the API while porting to Lean 4 in leanprover-community/mathlib4#2157. * extend `setoid X`; * require only that the fibers are open in the definition, prove that they are clopen; * golf proofs, reuse lattice structure on `setoid`s; * use bundled continuous maps for `comap`; * swap LHS and RHS in some `simp` lemmas; * generalize the `order_bot` instance from a discrete space to a locally connected space; * prove that a discrete topological space is locally connected.
Pull request successfully merged into master. Build succeeded: |
Backport various changes I made to the API while porting to Lean 4 in leanprover-community/mathlib4#2157.
setoid X
;setoid
s;comap
;simp
lemmas;order_bot
instance from a discrete space to a locally connected space;