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

Create implementations for the Free Group and for the Bouquet types a… #721

Merged
merged 2 commits into from
May 3, 2022

Conversation

gmagaf
Copy link
Contributor

@gmagaf gmagaf commented Feb 20, 2022

…s HITs.

This PR contains an implementation of the Free Group and the proofs of some basic properties, an implementation of the Bouquet of circles of a type and the proof that the Fundamental Group of the (Bouquet A) is the (FreeGroup A). The proof follows the encode-decode method. As an intermediate construction there is an implementation of the Free Groupoid of A (a free group that has no limitiations over the high dimensional path structure).

Copy link
Contributor

@guilhermehas guilhermehas left a comment

Choose a reason for hiding this comment

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

Suggestions of renaming functions

Cubical/HITs/FreeGroup/Base.agda Outdated Show resolved Hide resolved
data FreeGroup (A : Type ℓ) : Type ℓ where
η : A → FreeGroup A
m : FreeGroup A → FreeGroup A → FreeGroup A
e : FreeGroup A
Copy link
Contributor

Choose a reason for hiding this comment

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

ε is a better name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

Cubical/HITs/Bouquet/FreeGroupoid/Base.agda Outdated Show resolved Hide resolved
data FreeGroupoid (A : Type ℓ) : Type ℓ where
η : A → FreeGroupoid A
m : FreeGroupoid A → FreeGroupoid A → FreeGroupoid A
e : FreeGroupoid A
Copy link
Contributor

Choose a reason for hiding this comment

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

ε is a better name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

@guilhermehas
Copy link
Contributor

Maybe, it is better to define FreeGroup as a truncated version of the FreeGroupoid or prove this property of them.

@gmagaf
Copy link
Contributor Author

gmagaf commented Feb 21, 2022

This property is proved in the file Cubical/HITs/Bouquet/FreeGroupoid/Properties.agda. I think that this way of defining the Free Group is more general and more clear to use for someone not interested in its relation to the Bouquet.

@guilhermehas
Copy link
Contributor

I saw in this file that you proved that FreeGrupoid is isomorphic to the truncated version of it.
But I haven't found the proof that FreeGroup is isomorphic to FreeGrupoid (or the truncated version of it)

@gmagaf
Copy link
Contributor Author

gmagaf commented Feb 22, 2022

In the file Cubical/HITs/Bouquet/FreeGroupoid/Properties.agda the construction freeGroupTruncIdempotent≃ is the proof that the Free Group is equivalent to the set truncation of the Free Groupoid (FreeGroup A ≃ ∥ FreeGroupoid A ∥₂).

Copy link
Collaborator

@mortberg mortberg left a comment

Choose a reason for hiding this comment

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

I had some suggestions for improvements, mostly moving things around and renaming. Some proofs are quite verbose as well with lots of compositions with refl, I think the code would be nicer if these were just one step and one-liners.

Cubical/HITs/Bouquet/FreeGroupoid/Base.agda Outdated Show resolved Hide resolved

idNaturality : action e ≡ idfun (FreeGroupoid A)
idNaturality = funExt pointwise where
pointwise : (g : FreeGroupoid A) → action e g ≡ idfun (FreeGroupoid A) g
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not just prove this in one step?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed that too.

Cubical/HITs/Bouquet/FreeGroupoid/GroupoidActions.agda Outdated Show resolved Hide resolved
Cubical/HITs/Bouquet/FreeGroupoid/GroupoidActions.agda Outdated Show resolved Hide resolved
Cubical/HITs/Bouquet/FreeGroupoid/GroupoidActions.agda Outdated Show resolved Hide resolved
Cubical/HITs/FreeGroup/Base.agda Outdated Show resolved Hide resolved
data FreeGroup (A : Type ℓ) : Type ℓ where
η : A → FreeGroup A
m : FreeGroup A → FreeGroup A → FreeGroup A
e : FreeGroup A
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Cubical/HITs/FreeGroup/Base.agda Outdated Show resolved Hide resolved
@mortberg
Copy link
Collaborator

mortberg commented May 3, 2022

PS: thanks for the contribution! It's a lot of nice stuff and I'm sorry for taking so long to find the time to review it

Changes made:
 - move FreeGroupoid to its own folder inside HITs
 - change names to better suited ones
 - shorten proofs with many steps
@gmagaf gmagaf requested a review from mortberg May 3, 2022 15:11
@mortberg
Copy link
Collaborator

mortberg commented May 3, 2022

Excellent! Will merge once the CI is finished

@mortberg mortberg merged commit ad88c5c into agda:master May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants