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

suggestion for divisibility _∣ʳ_ in lib-2.0 #2235

Closed
mechvel opened this issue Dec 16, 2023 · 3 comments
Closed

suggestion for divisibility _∣ʳ_ in lib-2.0 #2235

mechvel opened this issue Dec 16, 2023 · 3 comments
Labels

Comments

@mechvel
Copy link
Contributor

mechvel commented Dec 16, 2023

May be lib-2.0 could return to the definition of general divisibility _∣_ to its definition in lib-1.7.3 ?

I could not ask this in time, when testing the candidate release, because it seems, this release did not contain this change for divisibility.
My impresssion is that

_∣ʳ_ : Rel A (a ⊔ ℓ)
x ∣ʳ y = ∃ λ q → (q ∙ x) ≈ y

is better than

record _∣ʳ_ (x y : record _∣ʳ_ (x y : A) : Set (a ⊔ ℓ) where
  constructor _,_
  field
    quotient : A
    equality : quotient ∙ x ≈ y

due to the following reasons.

  1. The source mathematical definition for divisibility is
    "x divides y iff there exists q such that q ∙ x ≈ y".
    This is exactly formalized in Agda in lib-1.7.3 via exists, as above.
    This agrees better with intuition.

  2. (minor one) When using _∣_, the variant in lib-2.0 requires two relations to import instead of one, and also to declare open for the record of _∣ʳ_.

And anyway, please, do not change the definition of !

@gallais
Copy link
Member

gallais commented Dec 16, 2023

Related: #1572
See also #2216 for the reason behind the change.

@mechvel
Copy link
Contributor Author

mechvel commented Dec 17, 2023

Personally, I would like the divisibility definition in ...RawMagma as it is in lib-1.7.3
(and my project has a great number of this divisibility usage).
Оn the other hand, the project needs to rely on the most fresh official Agda and most fresh official standard library, and I already can operate with the new definition also without any essential loss.
The matter is that now we have a fork. I need to accomplish a certain project, and need to know:
what definition is taken by the standard library designers as the most stable.
Please, advise.

@MatthewDaggitt
Copy link
Contributor

Sorry for the late reply. @gallais has linked to the reasoning behind the change. We won't be changing it back, as none of those reasons have changed.

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

No branches or pull requests

3 participants