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

Consistently add the equality after resp in proof names. #2341

Open
mechvel opened this issue Apr 2, 2024 · 2 comments
Open

Consistently add the equality after resp in proof names. #2341

mechvel opened this issue Apr 2, 2024 · 2 comments

Comments

@mechvel
Copy link
Contributor

mechvel commented Apr 2, 2024

In lib-2.0, Algebra.Properties.Magma.Divisibility
introduces the names
∣-respʳ and ∣∣-respʳ-≈.
I suggest to declare ∣∣-respʳ-≈ as obfuscated and to introduce ∣∣-respʳ instead.
And to treat ∣∣-respˡ, ∣∣-resp-≈ similarly.
The reasons are as follows.

  1. A uniform denotation style is desirable.
  2. It is clear for Magma that "_∣_ respects" is about the equality of _≈_ as default
    (for _≡_, one can use subst or to introduce ∣-resp-≡).
    And if one needs ∣-resp with respect to some other relation foo, then it can be
    introduced ∣-resp-foo.
@MatthewDaggitt
Copy link
Contributor

Thanks for the suggestion, but looking at the search results, it's clear with the one exception in Relation.Binary.Properties, the convention in the library is to have the equality afterwards.

Keeping this issue open to fix the proofs at:

≉-respˡ : _≉_ Respectsˡ _≈_
≉-respˡ x≈x′ x≉y = x≉y ∘ trans x≈x′
≉-respʳ : _≉_ Respectsʳ _≈_
≉-respʳ y≈y′ x≉y x≈y′ = x≉y $ trans x≈y′ (sym y≈y′)
≉-resp₂ : _≉_ Respects₂ _≈_
≉-resp₂ = ≉-respʳ , ≉-respˡ

@MatthewDaggitt MatthewDaggitt changed the title lib-2.0: unify ∣-respʳ and ∣∣-respʳ-≈ Consistently add the equality after resp proofs. Apr 11, 2024
@MatthewDaggitt MatthewDaggitt changed the title Consistently add the equality after resp proofs. Consistently add the equality after resp in proof names. Apr 11, 2024
@jamesmckinna
Copy link
Contributor

For the three exceptions noted, I'd be prepared to leave them as is, precisely because _≉_ presupposes the equality relation as part of its definition, so in that sense these properties are not 'uniform' with the style of ad hoc provable 'respects' properties, but true by virtue of the definitions.

On that basis, I'd perhaps prefer to leave them as distinct?

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

No branches or pull requests

3 participants