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

feat: norm_num extension for Real.sqrt and NNReal.sqrt #21102

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

dupuisf
Copy link
Contributor

@dupuisf dupuisf commented Jan 26, 2025

This PR introduces a norm_num extension for both Real.sqrt and NNReal.sqrt. While the version for Real.sqrt can handle both integers and rationals, the version for NNReal.sqrt can only deal with integers, due to a limitation of norm_num (i.e. the IsRat type requires a Ring instance).

I put the extension directly in Data/Real/Sqrt, but I could put them in a separate file in Tactic/NormNum if this is deemed better. (The obvious downside is that potential users would need to import the file explicitly.)


Open in Gitpod

@dupuisf dupuisf added the t-meta Tactics, attributes or user commands label Jan 26, 2025
Copy link

github-actions bot commented Jan 26, 2025

PR summary 9c84c42927

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ evalNNRealSqrt
+ evalRealSqrt
+ isNat_nnrealSqrt
+ isNat_realSqrt
+ isNat_realSqrt_neg
+ isNat_realSqrt_neg_of_isRat
+ isRat_realSqrt

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@eric-wieser
Copy link
Member

due to a limitation of norm_num (i.e. the IsRat type requires a Ring instance).

#9915 is a rotting attempt to fix this.

dupuisf and others added 3 commits January 26, 2025 23:00
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants