Skip to content

Conversation

@yosakaon
Copy link
Contributor

@yosakaon yosakaon commented Jul 7, 2025

Co-authored with @affeldt-aist

Motivation for this change

This PR introduces the lemma is_derive1_sqrt, establishing the derivability of the square root function at any strictly positive real number and provides its derivative formula.
This result is essential to prove of the derivability of the norm function and such calculations.

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers

Reference: How to document

Merge policy

As a rule of thumb:

  • PRs with several commits that make sense individually and that
    all compile are preferentially merged into master.
  • PRs with disorganized commits are very likely to be squash-rebased.
Reminder to reviewers

remove comments

point missing
@t6s
Copy link
Member

t6s commented Jul 7, 2025

the proof script can be compressed a lot (@affeldt-aist will be good at that)

Copy link
Member

@t6s t6s left a comment

Choose a reason for hiding this comment

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

looks good

@affeldt-aist affeldt-aist added this to the 1.13.0 milestone Jul 7, 2025
@affeldt-aist affeldt-aist added the enhancement ✨ This issue/PR is about adding new features enhancing the library label Jul 7, 2025
@affeldt-aist affeldt-aist merged commit dcf9dbc into math-comp:master Jul 7, 2025
34 checks passed
Copy link
Member

@CohenCyril CohenCyril left a comment

Choose a reason for hiding this comment

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

I didn't have time to finish the review
Thanks for the contribution. I had a small remark.

Comment on lines +487 to +488
Lemma sqrK {K : rcfType} : {in Num.pos, cancel (@Num.sqrt K) (fun x => x ^+ 2)}.
Proof. by move=> r r0; rewrite sqr_sqrtr// ltW. Qed.
Copy link
Member

Choose a reason for hiding this comment

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

This looks redundant with sqr_sqrt, (and slightly weaker since Num.pos can be weakened to Num.nneg).
If kept, it should be generalized and renamed sqrtK (the prefix of a K lemma is the section / thing being cancelled)

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for having been too hasty, will fix asap in a new PR.

Copy link
Member

Choose a reason for hiding this comment

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

(an in the long run, we should actually replace sqr_sqrt which has an equivalent statement written in an expanded way and which name is not as canonical as sqrtK)

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

Labels

enhancement ✨ This issue/PR is about adding new features enhancing the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants