Skip to content

Ring reasoning #2765

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

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Ring reasoning #2765

wants to merge 48 commits into from

Conversation

JacquesCarette
Copy link
Contributor

Reasoning combinators for monoid, renamed and adapted for Ring. Builds on #2692 .

@Taneb
Copy link
Member

Taneb commented Jul 12, 2025

  1. I'd like to see the new semigroup properties here as well
  2. The semigroup properties on * and the monoid properties on + work for RingWithoutOne
  3. In fact, they work on Semiring and SemiringWithoutOne, but we don't have a Properties module for those

@jamesmckinna
Copy link
Contributor

@Taneb 's 1,2,3 above echo my thoughts on looking at these, but maybe, given our ongoing issues regarding naming in #2688 that it isn't so straightforward to back-fill the Properties for weaker structures... yet?

Comment on lines +38 to +45
open PM +-monoid using () renaming
( ε-unique to 0#-unique; ε-comm to 0#-comm
; elimʳ to +-elimʳ; introʳ to +-introʳ
; elimˡ to +-elimˡ; introˡ to +-introˡ
; introᶜ to +-introᶜ
; cancelʳ to +-cancel-invʳ; insertʳ to +-insertʳ
; cancelˡ to +-cancel-invˡ; insertˡ to +-insertˡ
; cancelᶜ to +-cancel-invᶜ; insertᶜ to +-insertᶜ) public
Copy link
Contributor

@jamesmckinna jamesmckinna Jul 13, 2025

Choose a reason for hiding this comment

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

My only nitpick here, in terms of style-guide

* If multiple import modifiers are used, then they should occur in the
following order: `public`, `using` `renaming`, and if `public` is used
then the `using` and `renaming` modifiers should occur on a separate line.
For example:
```agda
open Monoid monoid public
using (ε) renaming (_∙_ to _+_)
```
is as follows:

Suggested change
open PM +-monoid using () renaming
( ε-unique to 0#-unique; ε-comm to 0#-comm
; elimʳ to +-elimʳ; introʳ to +-introʳ
; elimˡ to +-elimˡ; introˡ to +-introˡ
; introᶜ to +-introᶜ
; cancelʳ to +-cancel-invʳ; insertʳ to +-insertʳ
; cancelˡ to +-cancel-invˡ; insertˡ to +-insertˡ
; cancelᶜ to +-cancel-invᶜ; insertᶜ to +-insertᶜ) public
open PM +-monoid public
using ()
renaming ( ε-unique to 0#-unique; ε-comm to 0#-comm
; elimʳ to +-elimʳ; introʳ to +-introʳ
; elimˡ to +-elimˡ; introˡ to +-introˡ
; introᶜ to +-introᶜ
; cancelʳ to +-cancel-invʳ; insertʳ to +-insertʳ
; cancelˡ to +-cancel-invˡ; insertˡ to +-insertˡ
; cancelᶜ to +-cancel-invᶜ; insertᶜ to +-insertᶜ)

plus or minus some additional offset whitespace.

Comment on lines +47 to +54
open PM *-monoid using () renaming
( ε-unique to 1#-unique; ε-comm to 1#-comm
; elimʳ to *-elimʳ; introʳ to *-introʳ
; elimˡ to *-elimˡ; introˡ to *-introˡ
; introᶜ to *-introᶜ
; cancelʳ to *-cancel-invʳ; insertʳ to *-insertʳ
; cancelˡ to *-cancel-invˡ; insertˡ to *-insertˡ
; cancelᶜ to *-cancel-invᶜ; insertᶜ to *-insertᶜ) public
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

Suggested change
open PM *-monoid using () renaming
( ε-unique to 1#-unique; ε-comm to 1#-comm
; elimʳ to *-elimʳ; introʳ to *-introʳ
; elimˡ to *-elimˡ; introˡ to *-introˡ
; introᶜ to *-introᶜ
; cancelʳ to *-cancel-invʳ; insertʳ to *-insertʳ
; cancelˡ to *-cancel-invˡ; insertˡ to *-insertˡ
; cancelᶜ to *-cancel-invᶜ; insertᶜ to *-insertᶜ) public
open PM *-monoid public
using ()
renaming ( ε-unique to 1#-unique; ε-comm to 1#-comm
; elimʳ to *-elimʳ; introʳ to *-introʳ
; elimˡ to *-elimˡ; introˡ to *-introˡ
; introᶜ to *-introᶜ
; cancelʳ to *-cancel-invʳ; insertʳ to *-insertʳ
; cancelˡ to *-cancel-invˡ; insertˡ to *-insertˡ
; cancelᶜ to *-cancel-invᶜ; insertᶜ to *-insertᶜ)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants