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(topology/category/Profinite): Profinite_to_Top creates limits. #7070

Closed
wants to merge 3 commits into from

Conversation

adamtopaz
Copy link
Collaborator

This PR adds a proof that Profinite has limits by showing that the forgetful functor to Top creates limits.


Open in Gitpod

@adamtopaz adamtopaz added the awaiting-review The author would like community review of the PR label Apr 6, 2021
Generally you should just use `limit.cone F`, unless you need the actual definition
(which is in terms of `types.limit_cone`).
This differs from `limit_cone` only in the definition of the topology itself,
which is defined as a subspace topology as opposed to an infemum as in limit_cone.
Copy link
Collaborator

@semorrison semorrison Apr 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
which is defined as a subspace topology as opposed to an infemum as in limit_cone.
which is defined as a subspace topology as opposed to an infimum as in `limit_cone`.

{ X :=
{ to_Top := (Top.limit_cone' $ F ⋙ Profinite_to_Top).X,
is_compact := begin
erw ← compact_iff_compact_space,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't like the erw then apply compact_iff_compact_space.mp, suffices here.

Comment on lines 86 to 91
apply is_closed_Inter,
intros a,
apply is_closed_Inter,
intros b,
apply is_closed_Inter,
intros f,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps

Suggested change
apply is_closed_Inter,
intros a,
apply is_closed_Inter,
intros b,
apply is_closed_Inter,
intros f,
refine is_closed_Inter (λ a, is_closed_Inter (λ b, is_closed_Inter (λ f, _))),

@b-mehta
Copy link
Collaborator

b-mehta commented Apr 6, 2021

Since we already have that the functor Profinite_to_CompHaus is reflective, and CompHaus_to_Top is reflective, they both create limits (and Profinite has limits from there), which would be a much shorter proof than this one.

Comment on lines 94 to 96
refine is_closed.preimage (continuous.prod_mk (continuous_apply _) (continuous_apply _)) _,
refine is_closed_eq _ continuous_snd,
continuity,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
refine is_closed.preimage (continuous.prod_mk (continuous_apply _) (continuous_apply _)) _,
refine is_closed_eq _ continuous_snd,
continuity,
exact is_closed.preimage (by continuity) (is_closed_eq (by continuity) continuous_snd),

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting that by continuity can't solve continuous_snd here, even though continuous_snd has the attribute. I don't see what's going on. continuity! does work, however, so another possibility here is

refine is_closed.preimage _ (is_closed_eq _ _); continuity!

Comment on lines 121 to 122
valid_lift := let I := limit_cone_to_Top F in I ≪≫ limits.is_limit.unique_up_to_iso
(Top.limit_cone'_is_limit _) hA } }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
valid_lift := let I := limit_cone_to_Top F in I ≪≫ limits.is_limit.unique_up_to_iso
(Top.limit_cone'_is_limit _) hA } }
valid_lift := let I := limit_cone_to_Top F in
I ≪≫ limits.is_limit.unique_up_to_iso (Top.limit_cone'_is_limit _) hA } }

Copy link
Collaborator

@semorrison semorrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 94 to 96
refine is_closed.preimage (continuous.prod_mk (continuous_apply _) (continuous_apply _)) _,
refine is_closed_eq _ continuous_snd,
continuity,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting that by continuity can't solve continuous_snd here, even though continuous_snd has the attribute. I don't see what's going on. continuity! does work, however, so another possibility here is

refine is_closed.preimage _ (is_closed_eq _ _); continuity!

@semorrison
Copy link
Collaborator

Don't mind whether or not you take the suggestions, they're all just minor stylistic points.

bors d+

@bors
Copy link

bors bot commented Apr 6, 2021

✌️ adamtopaz can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@b-mehta
Copy link
Collaborator

b-mehta commented Apr 6, 2021

@semorrison I don't think this is ready to merge yet, since this is virtually all work essentially already in mathlib - we're basically five lines from having the result that Profinite has limits from things already in mathlib master, like I mentioned in my comment earlier.

@adamtopaz
Copy link
Collaborator Author

@semorrison I don't think this is ready to merge yet, since this is virtually all work essentially already in mathlib - we're basically five lines from having the result that Profinite has limits from things already in mathlib master, like I mentioned in my comment earlier.

Good point! I'll try to make it work with the reflectors.

@adamtopaz
Copy link
Collaborator Author

Thanks @b-mehta ! That was much easier (modulo some small universe annoyances).

Copy link
Collaborator

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo minor comment.

src/topology/category/Profinite.lean Show resolved Hide resolved
@b-mehta
Copy link
Collaborator

b-mehta commented Apr 7, 2021

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Apr 7, 2021
bors bot pushed a commit that referenced this pull request Apr 7, 2021
…7070)

This PR adds a proof that `Profinite` has limits by showing that the forgetful functor to `Top` creates limits.
@bors
Copy link

bors bot commented Apr 7, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(topology/category/Profinite): Profinite_to_Top creates limits. [Merged by Bors] - feat(topology/category/Profinite): Profinite_to_Top creates limits. Apr 7, 2021
@bors bors bot closed this Apr 7, 2021
@bors bors bot deleted the profinite_has_limits branch April 7, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants