Skip to content

Remove redundancy in ring morphisms etc #1540

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
merged 8 commits into from
Jul 11, 2021

Conversation

Taneb
Copy link
Member

@Taneb Taneb commented Jul 6, 2021

This redefines NearSemiring, Semiring, and Ring homomorphisms so that
they each build up by adding a single new property to a smaller
structure. This ensures there's only one proof that they're a Rel
homomorphism. For the same reason, Lattice homomorphisms are defined
directly rather than showing it's two magma homomorphisms.

I've tried to make it so that each of these structures provides any
smaller structure at its top level, so if we have a RingMonomorphism we
can easily say that it's a MagmaHomomorphism by multiplication or
whatever, but I might have missed one or two.

Closes #1539

Taneb added 4 commits July 6, 2021 17:05
This redefines NearSemiring, Semiring, and Ring homomorphisms so that
they each build up by adding a single new property to a smaller
structure. This ensures there's only one proof that they're a Rel
homomorphism. For the same reason, Lattice homomorphisms are defined
directly rather than showing it's two magma homomorphisms.

I've tried to make it so that each of these structures provides any
smaller structure at its top level, so if we have a RingMonomorphism we
can easily say that it's a MagmaHomomorphism by multiplication or
whatever, but I might have missed one or two.
I didn't mean to rename that but I prefer this name
Also add that it's a raw near semiring and semiring while I'm at it
Copy link
Contributor

@MatthewDaggitt MatthewDaggitt left a comment

Choose a reason for hiding this comment

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

Looks like a much better design, thank you! Only thing missing is a CHANGELOG entry 😄

@MatthewDaggitt
Copy link
Contributor

@Taneb given the number of great PRs recently, I've also added you to the list of Agda developers. You should now have permission to create PRs on this repo directly if you want to 👍

@Taneb
Copy link
Member Author

Taneb commented Jul 7, 2021

I'm going to make a subsequent PR adding modules like Algebra.Morphism.NearSemiringMonomorphisms and proving that Rationals satisfy some more intermediate algebraic structures, because I've added some of the RawX bundles, but this PR is already bigger than I set out to do so it can wait a little bit.

@MatthewDaggitt MatthewDaggitt merged commit 77d8569 into agda:master Jul 11, 2021
@Taneb Taneb deleted the dedup-morphisms branch July 11, 2021 16:45
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.

Algebra.Morphism.Structures: redundant fields in ring-like morphisms
2 participants