chore: golf using custom elaborators#30357
chore: golf using custom elaborators#30357grunweg wants to merge 102 commits intoleanprover-community:masterfrom
Conversation
PR summary 4166dc3b98
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Geometry.Manifold.Complex | 2553 | 2556 | +3 (+0.12%) |
| Mathlib.Geometry.Manifold.ContMDiffMap | 2211 | 2213 | +2 (+0.09%) |
| Mathlib.Geometry.Manifold.VectorBundle.Tangent | 2219 | 2221 | +2 (+0.09%) |
| Mathlib.Geometry.Manifold.BumpFunction | 2528 | 2530 | +2 (+0.08%) |
| Mathlib.Geometry.Manifold.MFDeriv.FDeriv | 2210 | 2211 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions | 2212 | 2213 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.Algebra.Monoid | 2215 | 2216 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.Algebra.LieGroup | 2216 | 2217 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.Algebra.Structures | 2217 | 2218 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.Algebra.SmoothFunctions | 2218 | 2219 | +1 (+0.05%) |
| Mathlib.Geometry.Manifold.VectorBundle.SmoothSection | 2225 | 2226 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.MFDeriv.Atlas | 2226 | 2227 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable | 2226 | 2227 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential | 2227 | 2228 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.VectorBundle.Hom | 2228 | 2229 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Diffeomorph | 2229 | 2230 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.MFDeriv.Tangent | 2230 | 2231 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.IntegralCurve.Basic | 2231 | 2232 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.LocalDiffeomorph | 2232 | 2233 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.ContMDiffMFDeriv | 2235 | 2236 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.VectorBundle.Riemannian | 2243 | 2244 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.VectorField.Pullback | 2253 | 2254 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.VectorField.LieBracket | 2254 | 2255 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.GroupLieAlgebra | 2258 | 2259 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Instances.Icc | 2290 | 2291 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Instances.Sphere | 2328 | 2329 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Sheaf.Smooth | 2507 | 2508 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Riemannian.PathELength | 2539 | 2540 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.PartitionOfUnity | 2550 | 2551 | +1 (+0.04%) |
| Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff | 2559 | 2560 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.WhitneyEmbedding | 2559 | 2560 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.IntegralCurve.ExistUnique | 2563 | 2564 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.IntegralCurve.UniformTime | 2564 | 2565 | +1 (+0.04%) |
| Mathlib.Analysis.Complex.UpperHalfPlane.Manifold | 2565 | 2566 | +1 (+0.04%) |
| Mathlib.Geometry.Manifold.Riemannian.Basic | 2569 | 2570 | +1 (+0.04%) |
| Mathlib.NumberTheory.ModularForms.EisensteinSeries.MDifferentiable | 2588 | 2589 | +1 (+0.04%) |
| Mathlib.NumberTheory.ModularForms.Basic | 2597 | 2598 | +1 (+0.04%) |
Import changes for all files
| Files | Import difference |
|---|---|
48 filesMathlib.Analysis.Calculus.Rademacher Mathlib.Analysis.Complex.UpperHalfPlane.Manifold Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation Mathlib.Geometry.Manifold.Algebra.LieGroup Mathlib.Geometry.Manifold.Algebra.Monoid Mathlib.Geometry.Manifold.Algebra.SmoothFunctions Mathlib.Geometry.Manifold.Algebra.Structures Mathlib.Geometry.Manifold.ContMDiffMFDeriv Mathlib.Geometry.Manifold.DerivationBundle Mathlib.Geometry.Manifold.Diffeomorph Mathlib.Geometry.Manifold.GroupLieAlgebra Mathlib.Geometry.Manifold.Instances.Icc Mathlib.Geometry.Manifold.Instances.Sphere Mathlib.Geometry.Manifold.Instances.UnitsOfNormedAlgebra Mathlib.Geometry.Manifold.IntegralCurve.Basic Mathlib.Geometry.Manifold.IntegralCurve.ExistUnique Mathlib.Geometry.Manifold.IntegralCurve.Transform Mathlib.Geometry.Manifold.IntegralCurve.UniformTime Mathlib.Geometry.Manifold.LocalDiffeomorph Mathlib.Geometry.Manifold.MFDeriv.Atlas Mathlib.Geometry.Manifold.MFDeriv.FDeriv Mathlib.Geometry.Manifold.MFDeriv.NormedSpace Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions Mathlib.Geometry.Manifold.MFDeriv.Tangent Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential Mathlib.Geometry.Manifold.PartitionOfUnity Mathlib.Geometry.Manifold.PoincareConjecture Mathlib.Geometry.Manifold.Riemannian.Basic Mathlib.Geometry.Manifold.Riemannian.PathELength Mathlib.Geometry.Manifold.Sheaf.LocallyRingedSpace Mathlib.Geometry.Manifold.Sheaf.Smooth Mathlib.Geometry.Manifold.VectorBundle.Hom Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable Mathlib.Geometry.Manifold.VectorBundle.Riemannian Mathlib.Geometry.Manifold.VectorBundle.SmoothSection Mathlib.Geometry.Manifold.VectorField.LieBracket Mathlib.Geometry.Manifold.VectorField.Pullback Mathlib.Geometry.Manifold.WhitneyEmbedding Mathlib.NumberTheory.ModularForms.Basic Mathlib.NumberTheory.ModularForms.Bounds Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic Mathlib.NumberTheory.ModularForms.EisensteinSeries.MDifferentiable Mathlib.NumberTheory.ModularForms.LevelOne Mathlib.NumberTheory.ModularForms.NormTrace Mathlib.NumberTheory.ModularForms.Petersson Mathlib.NumberTheory.ModularForms.QExpansion Mathlib.Topology.Compactification.OnePoint.Sphere |
1 |
4 filesMathlib.Geometry.Manifold.BumpFunction Mathlib.Geometry.Manifold.ContMDiffMap Mathlib.Geometry.Manifold.VectorBundle.Pullback Mathlib.Geometry.Manifold.VectorBundle.Tangent |
2 |
Mathlib.Geometry.Manifold.Complex |
3 |
Declarations diff
++-- hasMFDerivWithinAt
++--+- mdifferentiableWithinAt
+-+- coeFn_mk
+-+- contMDiffAt
+-+- contMDiff_smul
+-+- mdifferentiable'
+-+-++--+- mdifferentiableOn
+-+-++--+-+- mdifferentiableAt
+-+-+-+++--- mdifferentiable
+-+-+-+- contMDiff
--++ hasMFDerivAt
--++ mfderiv_eq
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 scripts/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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
7cecfcf to
e80c292
Compare
|
!bench |
|
Here are the benchmark results for commit 816828b. |
2 files, Instructions -2.0⬝10⁹
|
ac20338 to
60035cc
Compare
|
This pull request has conflicts, please merge |
60035cc to
7e6eb01
Compare
44eca30 to
5644ca6
Compare
|
!bench |
|
Let's benchmark again, now that the list of features is much more complete. |
|
Here are the benchmark results for commit d4a0bdb. |
|
This pull request has conflicts, please merge |
Whenever the `T%` elaborator succeeds, head beta reduce the resulting application. This enables applying it with anonymous functions or inside big operators without issue. (For instance, all changes to `SmoothSection` in #30357 are now possible without additional `dsimp` steps.) In the process, also extract the workhorse component of the elaborator into an independent function and improve its doc-string to mention the corresponding tracing option. Co-authored-by: thorimur <thomasmurrills@gmail.com> Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
|
!bench |
|
Benchmark results for 289de6f against 4166dc3 are in! @grunweg
Small changes (2✅)
|
|
This pull request has conflicts, please merge |
The final pieces from leanprover-community#30357.
The final pieces from #30357.
|
This PR has been merged in pieces now, closing. |
The final pieces from leanprover-community#30357.
The final pieces from leanprover-community#30357.
The final pieces from leanprover-community#30357.
The final pieces from leanprover-community#30357.
Test the elaborators on a large scale by trying them out. They mostly work very well.
Benchmarking results so far are very positive!
Unexpected errors:
Riemannian/Basic.lean; TODO minimise and investigateAtlas.lean: coercion on I itself does not fire?SpecificFunctions.lean: more normed-space-like thingies, perhaps wontfix?XXX: revert ContMDiffOn.smul_section_of_tsupport rename!
TODO: check if there are further opportunities to golf, with newly added lemmas
re-bench!