rocq-community / rocq-community/math-classes
Why does rationals_le use the concrete type nat?
Nobody has claimed this yet.
- Dominant language
- Rocq Prover
- Stars
- 169
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
I was surprised when unfolding rationals_le to see that it specifies that le x y if there is a fraction p/q made of nats such that y=x+p/q:
Instance rationals_le `{Rationals Q} : Le Q | 10 := λ x y,
∃ num, ∃ den, y = x + naturals_to_semiring nat Q num / naturals_to_semiring nat Q den.
Why not use any type that is an instance of Naturals?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at orders/rationals.v lines 89-90 and inspect naturals_to_semiring and the typeclass constraints used by rationals_le. Trace whether the concrete nat is intentional and whether a Naturals instance can be abstracted safely. Done when the issue has a documented decision and any accepted change is covered by the repository's existing checks.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100