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

simplify isSet<SomeAlgebraicStructure> #1033

Merged

Conversation

MatthiasHu
Copy link
Contributor

This PR simplifies, or at least harmonizes, the definitions of the following lemmas:

isSetGroup
isSetRing
isSetDistLattice
isSetCommAlgebra
isSetLeftModule
isSetField
isSetAlgebra
isSetLattice
isSetCommRing
isSetAbGroup
isSetOrderedCommMonoid
isSetCommMonoid

Each of them is a simple is-set after opening the respective <Something>Str. In the case of Algebra and OrderedCommMonoid, the is-set field was impossible to use since it was exported twice from the respective records; I fixed that by hiding one copy (as it was already done in Ring, for example).

@@ -139,7 +139,7 @@ module _ ((G , abgroupstr _ _ _ GisGroup) : AbGroup ℓ) where
AbGroup→CommMonoid .snd .CommMonoidStr.isCommMonoid .IsCommMonoid.·Comm = IsAbGroup.+Comm GisGroup

isSetAbGroup : (A : AbGroup ℓ) → isSet ⟨ A ⟩
isSetAbGroup A = isSetGroup (AbGroup→Group A)
isSetAbGroup A = is-set (str A)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the single case where the open ...Str ... method was impractical, since the file already opens multiple records with is-set fields.

@felixwellen
Copy link
Collaborator

Thanks for the nice refactoring!

@felixwellen felixwellen merged commit 21ddf92 into agda:master Aug 25, 2023
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