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] - fix: Fix FundamentalGroupoid being reducible. #8257

Closed
wants to merge 8 commits into from

Conversation

adamtopaz
Copy link
Contributor

Instead it is now the opposite -- a structure with a single field.

zulip discussion


Open in Gitpod

adamtopaz and others added 2 commits November 7, 2023 15:27
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -205,7 +206,7 @@
inv_hom_id := by
change (projLeft A B).prod' (projRight A B) ⋙ prodToProdTop A B = 𝟭 _
apply CategoryTheory.Functor.hext
· intros; apply Prod.ext <;> simp <;> rfl
· intros; apply FundamentalGroupoid.ext ; apply Prod.ext <;> simp <;> rfl
Copy link

Choose a reason for hiding this comment

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

[lint-style] reported by reviewdog 🐶

Suggested change
· intros; apply FundamentalGroupoid.ext ; apply Prod.ext <;> simp <;> rfl
· intros; apply FundamentalGroupoid.ext; apply Prod.ext <;> simp <;> rfl

Comment on lines 45 to 47
rw [simply_connected_def, equiv_punit_iff_unique]
refine ⟨fun ⟨⟨x⟩,h⟩ => ⟨⟨x.as⟩, fun x y => h _ _⟩,
fun ⟨⟨x⟩,h⟩ => ⟨⟨⟨x⟩⟩, fun x y => h _ _⟩ ⟩
Copy link
Member

Choose a reason for hiding this comment

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

Is there a missing lemma here? Maybe Nonempty (FundamentalGroupoid X) \iff Nonempty X (and similarly for Subsingleton and Nontrivial)

Copy link
Member

Choose a reason for hiding this comment

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

(the trick is to build the equiv and then all these results are there by dot notation)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably. I didn't think too much when I made these changes :) I'll fix this soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added equiv and some related lemmas and instances. I don't want this PR to expand too far beyond the original fix, so I would prefer to leave anything further which is not directly related to a future PR.

@alreadydone
Copy link
Contributor

alreadydone commented Nov 7, 2023

I noticed this a while ago and have another design to fix the problem without changing FundamentalGroupoid to a one-field structure, but I haven't fixed all errors. The ideas is that Lean can't quite identify the coeSort of { α := FundamentalGroupoid X } : Grpd with FundamentalGroupoid X reducibly, and the former is used a lot, so we may just define FundamentalGroupoid X to be { α := X, str := ... } : Grpd and Lean won't confuse it with X itself.

Did you find this because you want to do something with fundamental groupoids, or by import Mathlib? I was doing something towards van Kampen and want to define a functor from the unit interval (with the category structure from its order) to a fundamental groupoid but noticed that the unit interval actually got its fundamental groupoid structure too.

@adamtopaz adamtopaz added the awaiting-review The author would like community review of the PR label Nov 8, 2023
@eric-wieser
Copy link
Member

bors d=@alreadydone

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 8, 2023

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

@github-actions github-actions bot added delegated and removed awaiting-review The author would like community review of the PR labels Nov 8, 2023
Copy link
Contributor

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

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

Thanks! This approach seems to cause the least breakage, as all fixes are straightforward, and I think it will be good enough for my purpose.

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Nov 8, 2023
Instead it is now the opposite -- a structure with a single field.

[zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Groupoid.2EtoCategory/near/400820106)



Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 8, 2023

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Nov 8, 2023
Instead it is now the opposite -- a structure with a single field.

[zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Groupoid.2EtoCategory/near/400820106)



Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 8, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title fix: Fix FundamentalGroupoid being reducible. [Merged by Bors] - fix: Fix FundamentalGroupoid being reducible. Nov 8, 2023
@mathlib-bors mathlib-bors bot closed this Nov 8, 2023
@mathlib-bors mathlib-bors bot deleted the AT-fundamental-groupoid-fix branch November 8, 2023 19:50
grunweg pushed a commit that referenced this pull request Dec 15, 2023
Instead it is now the opposite -- a structure with a single field.

[zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Groupoid.2EtoCategory/near/400820106)



Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants