rocq-prover / rocq-prover/stdlib
Z.mod_mul_r and Z.rem_mul_r reversed
Open
Nobody has claimed this yet.
- Dominant language
- Rocq Prover
- Stars
- 42
- Forks
- 38
- Avg merge
- 14h 6m
- Merged PRs (30d)
- 3
Description
Description of the problem
Check Z.mod_mul_r.
(* forall a b c : Z,
b <> 0 -> c <> 0 -> Z.rem a (b * c) = Z.rem a b + b * Z.rem (a ÷ b) c *)
Check Z.rem_mul_r.
(* forall a b c : Z,
b <> 0 -> 0 < c -> a mod (b * c) = a mod b + b * ((a / b) mod c) *)
Shouldn't these names be switched to be consistent with Nat.mod_mul_r and N.mod_mul_r, which both have similar conclusions to Z.rem_mul_r?
Coq Version
At least 8.8 - master.
Contributor guide
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
Inspect the definitions of Z.mod_mul_r and Z.rem_mul_r, then compare their conclusions with Nat.mod_mul_r and N.mod_mul_r as described in the issue. Confirm whether the theorem names are reversed and update the relevant declarations so each name matches its conclusion.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100