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

Free Commutative Monoid #719

Merged
merged 9 commits into from
Mar 13, 2022
Merged

Free Commutative Monoid #719

merged 9 commits into from
Mar 13, 2022

Conversation

guilhermehas
Copy link
Contributor

I added Free Commutative Monoid in the library.
To prove that it is isomorphic to the associative list, I had to add some auxiliary functions there.

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.

Very nice! Thanks for the contribution

AssocList≃FCMon : FreeComMonoid A ≃ AssocList A
AssocList≃FCMon = isoToEquiv (iso FCM→AL AL→FCM FCM→AL∘AL→FCM≡id AL→FCM∘FCM→AL≡id)

FCMon≡AssocList : AssocList A ≡ FreeComMonoid A
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wait, this name is a bit weird... It should be AssocList≡FreeComMonoid. Similarly for the two definitions 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.

I have already changed the name.

Copy link
Collaborator

@mortberg mortberg Mar 11, 2022

Choose a reason for hiding this comment

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

Great, can you also fix the name of FCMon≃AssocList? And remove AssocList≃FCMon? I think it's unnecessary to have both when we can just use invEquiv to turn one of them around

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 have already made these changes.

@mortberg mortberg merged commit 9e7d3be into agda:master Mar 13, 2022
@guilhermehas guilhermehas deleted the free-com-monoid branch March 20, 2022 01:18
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.

2 participants