rocq-prover / rocq-prover/stdlib

Reals: Make "Rsqr x" and an alias for "x^2"

Open
#32 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rocq Prover
Stars
42
Forks
38
Avg merge
14h 6m
Merged PRs (30d)
3

Description

Some developments of the Reals library use a wild mix between Rsqr x (aka ) and x^2. the field tactic supports (afaikt) only x^2 while most of the lemmas connecting x^2 and sqrt use Rsqr. Trigonometric lemmas use a mix of both. As a result many proofs have to convert between the two forms from time to time. Also proof search is made substantially harder by this.

I would suggest to clean this up by making Rsqr an alias for x^2. The small performance advantage given by Rsqr should not be significant and less important that cleanliness and usability of the library.

@silene, @thery : can you please comment on this, especially also on the performance implications e.g. in CoqInterval (I always used x^2 there btw.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Reals library definitions involving Rsqr, x^2, and sqrt, then inspect the field tactic and the trigonometric lemmas mentioned in the issue. Check the performance implications for CoqInterval before proposing the cleanup; done requires agreement on the representation and consistent library behavior.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.