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

Lemmas for Positive, Negative, etc. and _+_ and _*_ for rationals #2496

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

Taneb
Copy link
Member

@Taneb Taneb commented Oct 14, 2024

This is pulled out from my branch for real numbers

A discovered annoyance (bug?) is that *-monoˡ-≤-nonNeg corresponds to *-monoʳ-<-pos, not *-monoˡ-<-pos as one may expect. But I don't want to fix that in this PR

@jamesmckinna
Copy link
Contributor

jamesmckinna commented Oct 15, 2024

This is pulled out from my branch for real numbers

Looks good!

A discovered annoyance (bug?) is that *-monoˡ-≤-nonNeg corresponds to *-monoʳ-<-pos, not *-monoˡ-<-pos as one may expect. But I don't want to fix that in this PR

Yes, I think this is an(other) example of left/right being mixed up in the library, and at some point, we should rationalise (and correctly implement) our conventions. Cf. #1436 (comment) and #1579 etc.

See also #2193 ...

Copy link
Contributor

@jamesmckinna jamesmckinna left a comment

Choose a reason for hiding this comment

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

Two comments:

  • it would be great to find a way to make even the arguments p, q themselves inferrable, but I suspect this isn't possible without quotation/indirection, because of the usual 'arithmetic operations can't infer their arguments' objection (but I still have the fantasy that one day we might overcome that)
  • all the lemmas are in Data.Rational.Properties: is there any relationship with/need for, any (additional) ones in Data.Rational.Unnormalised.Properties? (I've never been quite clear about the division of labour between the two...)

@Taneb
Copy link
Member Author

Taneb commented Oct 15, 2024

all the lemmas are in Data.Rational.Properties: is there any relationship with/need for, any (additional) ones in Data.Rational.Unnormalised.Properties? (I've never been quite clear about the division of labour between the two...)

I'll admit I didn't do that simply out of laziness. But looking at it now, I don't think in this case doing it that way would be helpful.

@jamesmckinna jamesmckinna added this pull request to the merge queue Oct 18, 2024
Merged via the queue into master with commit c3c9f4f Oct 18, 2024
2 checks passed
@Taneb Taneb deleted the rational-pos-op branch October 18, 2024 17:04
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.

3 participants