[Merged by Bors] - perf: use fast_instance% for instances constructed via non-canonical constructors#20993
[Merged by Bors] - perf: use fast_instance% for instances constructed via non-canonical constructors#20993mattrobball wants to merge 21 commits intomasterfrom
fast_instance% for instances constructed via non-canonical constructors#20993Conversation
Co-authored-by: grunweg <rothgami@math.hu-berlin.de>
Co-authored-by: damiano <adomani@gmail.com>
|
!bench |
PR summary 229fccfc16
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Algebra.Group.Subsemigroup.Defs | 218 | 219 | +1 (+0.46%) |
| Mathlib.Algebra.Group.Submonoid.Defs | 219 | 220 | +1 (+0.46%) |
| Mathlib.RingTheory.NonUnitalSubsemiring.Defs | 236 | 237 | +1 (+0.42%) |
| Mathlib.Algebra.Order.Positive.Ring | 237 | 238 | +1 (+0.42%) |
| Mathlib.Algebra.Ring.Subsemiring.Defs | 237 | 238 | +1 (+0.42%) |
| Mathlib.Algebra.Order.Monoid.Submonoid | 256 | 257 | +1 (+0.39%) |
| Mathlib.Algebra.Order.Interval.Set.Instances | 262 | 263 | +1 (+0.38%) |
| Mathlib.GroupTheory.Congruence.Defs | 276 | 277 | +1 (+0.36%) |
| Mathlib.RingTheory.Congruence.Defs | 293 | 294 | +1 (+0.34%) |
| Mathlib.Algebra.Ring.Subsemiring.Order | 298 | 299 | +1 (+0.34%) |
| Mathlib.Algebra.Group.Subgroup.Defs | 324 | 325 | +1 (+0.31%) |
| Mathlib.RingTheory.NonUnitalSubring.Defs | 342 | 343 | +1 (+0.29%) |
| Mathlib.Algebra.Ring.Subring.Defs | 394 | 395 | +1 (+0.25%) |
| Mathlib.Algebra.Module.Submodule.Defs | 438 | 439 | +1 (+0.23%) |
| Mathlib.Algebra.Module.Submodule.Order | 445 | 446 | +1 (+0.22%) |
| Mathlib.Algebra.Ring.Subring.Order | 457 | 458 | +1 (+0.22%) |
| Mathlib.Algebra.Field.Subfield.Defs | 465 | 466 | +1 (+0.22%) |
| Mathlib.Algebra.Order.Nonneg.Ring | 465 | 466 | +1 (+0.22%) |
| Mathlib.Algebra.Order.Field.Subfield | 478 | 479 | +1 (+0.21%) |
| Mathlib.LinearAlgebra.Quotient.Defs | 483 | 484 | +1 (+0.21%) |
| Mathlib.Data.Finsupp.Defs | 491 | 492 | +1 (+0.20%) |
| Mathlib.Algebra.Order.Nonneg.Field | 499 | 500 | +1 (+0.20%) |
| Mathlib.Algebra.Order.CauSeq.Completion | 573 | 574 | +1 (+0.17%) |
| Mathlib.Algebra.Polynomial.Basic | 740 | 741 | +1 (+0.14%) |
| Mathlib.LinearAlgebra.AffineSpace.AffineSubspace | 844 | 845 | +1 (+0.12%) |
| Mathlib.AlgebraicGeometry.Modules.Tilde | 1797 | 1798 | +1 (+0.06%) |
Import changes for all files
| Files | Import difference |
|---|---|
| There are 3235 files with changed transitive imports taking up over 141996 characters: this is too many to display! | |
You can run scripts/import_trans_difference.sh all locally to see the whole output. |
Declarations diff
+ instance (priority := 75) toDivisionRing (s : S) : DivisionRing s := fast_instance%
+ instance (priority := 75) toGroup : Group H := fast_instance%
+ instance (priority := 75) toModule : Module R S' := fast_instance%
+ instance (priority := 75) toNonAssocSemiring : NonAssocSemiring s := fast_instance%
+ instance (priority := 75) toNonUnitalNonAssocRing : NonUnitalNonAssocRing s := fast_instance%
+ instance (priority := 75) toNonUnitalNonAssocSemiring :
+ instance (priority := 75) toRing : Ring s := fast_instance%
+ instance : Distrib { x : R // 0 < x } := fast_instance%
+ instance : Monoid { x : R // 0 < x } := fast_instance%
+ instance : Semigroup { x : R // 0 < x } := fast_instance%
+ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient := fast_instance%
+ instance [CommSemiring R] (c : RingCon R) : CommSemiring c.Quotient := fast_instance%
+ instance [NonAssocRing R] (c : RingCon R) : NonAssocRing c.Quotient := fast_instance%
+ instance [NonAssocSemiring R] (c : RingCon R) : NonAssocSemiring c.Quotient := fast_instance%
+ instance [NonUnitalNonAssocRing R] (c : RingCon R) :
+ instance [NonUnitalNonAssocSemiring R] (c : RingCon R) :
+ instance [NonUnitalRing R] (c : RingCon R) : NonUnitalRing c.Quotient := fast_instance%
+ instance [NonUnitalSemiring R] (c : RingCon R) : NonUnitalSemiring c.Quotient := fast_instance%
+ instance [Ring R] (c : RingCon R) : Ring c.Quotient := fast_instance%
+ instance [Semiring R] (c : RingCon R) : Semiring c.Quotient := fast_instance%
+-+- monoid
+-+-+-+- semigroup
- instance (priority := 75) toDivisionRing (s : S) : DivisionRing s
- instance (priority := 75) toGroup : Group H
- instance (priority := 75) toModule : Module R S'
- instance (priority := 75) toNonAssocSemiring : NonAssocSemiring s
- instance (priority := 75) toNonUnitalNonAssocRing : NonUnitalNonAssocRing s
- instance (priority := 75) toNonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring s
- instance (priority := 75) toRing : Ring s
- instance : Distrib { x : R // 0 < x }
- instance : Monoid { x : R // 0 < x }
- instance : Semigroup { x : R // 0 < x }
- instance [CommRing R] (c : RingCon R) : CommRing c.Quotient
- instance [CommSemiring R] (c : RingCon R) : CommSemiring c.Quotient
- instance [NonAssocRing R] (c : RingCon R) : NonAssocRing c.Quotient
- instance [NonAssocSemiring R] (c : RingCon R) : NonAssocSemiring c.Quotient
- instance [NonUnitalNonAssocRing R] (c : RingCon R) : NonUnitalNonAssocRing c.Quotient
- instance [NonUnitalNonAssocSemiring R] (c : RingCon R) : NonUnitalNonAssocSemiring c.Quotient
- instance [NonUnitalRing R] (c : RingCon R) : NonUnitalRing c.Quotient
- instance [NonUnitalSemiring R] (c : RingCon R) : NonUnitalSemiring c.Quotient
- instance [Ring R] (c : RingCon R) : Ring c.Quotient
- instance [Semiring R] (c : RingCon R) : Semiring c.Quotient
-+--++ commSemigroup
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
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).
|
Will we accept files with |
|
!bench |
|
Here are the benchmark results for commit 6253f3c. |
|
Here are the benchmark results for commit 42aaec2. Benchmark Metric Change
===============================================================================
+ ~Mathlib.Algebra.Algebra.Subalgebra.Rank instructions -39.5%
+ ~Mathlib.Algebra.Algebra.Subalgebra.Unitization instructions -25.5%
+ ~Mathlib.Algebra.Lie.TraceForm instructions -6.0%
+ ~Mathlib.Algebra.Lie.Weights.Basic instructions -8.8%
+ ~Mathlib.Algebra.Lie.Weights.Cartan instructions -16.9%
+ ~Mathlib.Algebra.Lie.Weights.Linear instructions -16.5%
+ ~Mathlib.Algebra.Ring.Subring.Order instructions -61.0%
+ ~Mathlib.Algebra.Ring.Subsemiring.Order instructions -52.3%
+ ~Mathlib.Algebra.Star.NonUnitalSubalgebra instructions -9.4%
+ ~Mathlib.AlgebraicGeometry.AffineSpace instructions -12.3%
+ ~Mathlib.AlgebraicGeometry.GammaSpecAdjunction instructions -13.2%
+ ~Mathlib.AlgebraicGeometry.Modules.Tilde instructions -17.4%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Basic instructions -18.7%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Scheme instructions -6.7%
+ ~Mathlib.AlgebraicGeometry.Spec instructions -18.5%
+ ~Mathlib.FieldTheory.CardinalEmb instructions -11.3%
+ ~Mathlib.FieldTheory.Extension instructions -23.1%
+ ~Mathlib.FieldTheory.Fixed instructions -41.5%
+ ~Mathlib.FieldTheory.Galois.Basic instructions -19.8%
+ ~Mathlib.FieldTheory.Galois.Infinite instructions -36.9%
+ ~Mathlib.FieldTheory.Galois.Profinite instructions -49.8%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Basic instructions -15.0%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Defs instructions -24.7%
+ ~Mathlib.FieldTheory.IntermediateField.Basic instructions -31.6%
+ ~Mathlib.FieldTheory.LinearDisjoint instructions -24.4%
+ ~Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed instructions -33.2%
+ ~Mathlib.FieldTheory.Normal instructions -12.5%
+ ~Mathlib.FieldTheory.PurelyInseparable instructions -23.7%
+ ~Mathlib.FieldTheory.Relrank instructions -60.9%
+ ~Mathlib.FieldTheory.SeparableDegree instructions -17.3%
+ ~Mathlib.Geometry.Euclidean.Angle.Oriented.Basic instructions -9.4%
- ~Mathlib.LinearAlgebra.Dual instructions 2.7%
- ~Mathlib.LinearAlgebra.TensorProduct.Graded.Internal instructions 23.5%
+ ~Mathlib.LinearAlgebra.TensorProduct.Subalgebra instructions -5.9%
+ ~Mathlib.NumberTheory.Cyclotomic.Basic instructions -15.6%
+ ~Mathlib.NumberTheory.Cyclotomic.Rat instructions -10.2%
+ ~Mathlib.NumberTheory.FLT.Three instructions -22.8%
+ ~Mathlib.NumberTheory.NumberField.Discriminant.Basic instructions -15.6%
+ ~Mathlib.NumberTheory.NumberField.Units.Basic instructions -17.7%
+ ~Mathlib.NumberTheory.Padics.Hensel instructions -34.2%
+ ~Mathlib.NumberTheory.Padics.PadicIntegers instructions -33.7%
+ ~Mathlib.NumberTheory.Padics.RingHoms instructions -21.9%
+ ~Mathlib.RingTheory.Algebraic.MvPolynomial instructions -27.9%
+ ~Mathlib.RingTheory.AlgebraicIndependent.Transcendental instructions -35.8%
+ ~Mathlib.RingTheory.Etale.Field instructions -14.9%
+ ~Mathlib.RingTheory.Etale.Kaehler instructions -7.4%
+ ~Mathlib.RingTheory.FiniteType instructions -39.1%
+ ~Mathlib.RingTheory.Flat.Equalizer instructions -5.3%
+ ~Mathlib.RingTheory.Kaehler.CotangentComplex instructions -4.6%
+ ~Mathlib.RingTheory.Kaehler.JacobiZariski instructions -15.2%
+ ~Mathlib.RingTheory.Kaehler.Polynomial instructions -7.9%
+ ~Mathlib.RingTheory.Kaehler.TensorProduct instructions -7.8%
+ ~Mathlib.RingTheory.LinearDisjoint instructions -23.6%
+ ~Mathlib.RingTheory.LocalRing.Subring instructions -30.9%
+ ~Mathlib.RingTheory.Perfection instructions -27.1%
+ ~Mathlib.RingTheory.Valuation.AlgebraInstances instructions -30.6%
+ ~Mathlib.RingTheory.Valuation.LocalSubring instructions -53.3%
+ ~Mathlib.RingTheory.Valuation.ValuationSubring instructions -22.4%
+ ~Mathlib.Topology.Algebra.Valued.LocallyCompact instructions -47.4%
+ ~Mathlib.Topology.ContinuousMap.Algebra instructions -12.0% |
2 files, Instructions +9.0⬝10⁹
2 files, Instructions +6.0⬝10⁹
4 files, Instructions +4.0⬝10⁹
10 files, Instructions +3.0⬝10⁹
11 files, Instructions +2.0⬝10⁹
20 files, Instructions +1.0⬝10⁹
72 files, Instructions -2.0⬝10⁹
33 files, Instructions -3.0⬝10⁹
18 files, Instructions -4.0⬝10⁹
11 files, Instructions -5.0⬝10⁹
5 files, Instructions -6.0⬝10⁹
9 files, Instructions -7.0⬝10⁹
12 files, Instructions -8.0⬝10⁹
11 files, Instructions -9.0⬝10⁹
5 files, Instructions -10.0⬝10⁹
4 files, Instructions -11.0⬝10⁹
7 files, Instructions -12.0⬝10⁹
5 files, Instructions -13.0⬝10⁹
5 files, Instructions -14.0⬝10⁹
2 files, Instructions -15.0⬝10⁹
2 files, Instructions -17.0⬝10⁹
2 files, Instructions -19.0⬝10⁹
2 files, Instructions -25.0⬝10⁹
2 files, Instructions -28.0⬝10⁹
2 files, Instructions -30.0⬝10⁹
3 files, Instructions -35.0⬝10⁹
2 files, Instructions -39.0⬝10⁹
2 files, Instructions -45.0⬝10⁹
2 files, Instructions -47.0⬝10⁹
|
|
!bench |
|
Here are the benchmark results for commit b48e644. |
|
!bench |
|
Here are the benchmark results for commit a9f3635. Benchmark Metric Change
===============================================================================
+ ~Mathlib.Algebra.Algebra.Subalgebra.Rank instructions -39.5%
+ ~Mathlib.Algebra.Algebra.Subalgebra.Unitization instructions -25.5%
+ ~Mathlib.Algebra.Lie.Submodule instructions -6.8%
+ ~Mathlib.Algebra.Lie.TraceForm instructions -7.6%
+ ~Mathlib.Algebra.Lie.Weights.Basic instructions -9.4%
+ ~Mathlib.Algebra.Lie.Weights.Cartan instructions -17.0%
+ ~Mathlib.Algebra.Lie.Weights.Linear instructions -16.8%
+ ~Mathlib.Algebra.Module.ZLattice.Basic instructions -8.5%
+ ~Mathlib.Algebra.Ring.Subring.Order instructions -61.0%
+ ~Mathlib.Algebra.Ring.Subsemiring.Order instructions -52.3%
+ ~Mathlib.Algebra.Star.NonUnitalSubalgebra instructions -9.3%
+ ~Mathlib.AlgebraicGeometry.AffineSpace instructions -12.3%
+ ~Mathlib.AlgebraicGeometry.GammaSpecAdjunction instructions -13.2%
+ ~Mathlib.AlgebraicGeometry.Modules.Tilde instructions -21.4%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Basic instructions -18.7%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Scheme instructions -6.9%
+ ~Mathlib.AlgebraicGeometry.Spec instructions -18.6%
+ ~Mathlib.FieldTheory.CardinalEmb instructions -11.4%
+ ~Mathlib.FieldTheory.Extension instructions -23.1%
+ ~Mathlib.FieldTheory.Fixed instructions -41.4%
+ ~Mathlib.FieldTheory.Galois.Basic instructions -19.9%
+ ~Mathlib.FieldTheory.Galois.Infinite instructions -37.1%
+ ~Mathlib.FieldTheory.Galois.Profinite instructions -49.9%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Basic instructions -15.3%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Defs instructions -24.6%
+ ~Mathlib.FieldTheory.IntermediateField.Basic instructions -31.5%
+ ~Mathlib.FieldTheory.LinearDisjoint instructions -24.8%
+ ~Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed instructions -33.5%
+ ~Mathlib.FieldTheory.PrimitiveElement instructions -15.8%
+ ~Mathlib.FieldTheory.PurelyInseparable instructions -23.7%
+ ~Mathlib.FieldTheory.Relrank instructions -60.9%
+ ~Mathlib.FieldTheory.SeparableDegree instructions -17.3%
+ ~Mathlib.Geometry.Euclidean.Angle.Oriented.Basic instructions -9.5%
+ ~Mathlib.Geometry.Euclidean.Circumcenter instructions -15.6%
- ~Mathlib.LinearAlgebra.AffineSpace.AffineSubspace instructions 16.3%
+ ~Mathlib.LinearAlgebra.CliffordAlgebra.Even instructions -14.9%
+ ~Mathlib.LinearAlgebra.TensorProduct.Graded.Internal instructions -27.3%
+ ~Mathlib.LinearAlgebra.TensorProduct.Subalgebra instructions -9.1%
+ ~Mathlib.NumberTheory.Cyclotomic.Basic instructions -15.6%
+ ~Mathlib.NumberTheory.Cyclotomic.Rat instructions -10.2%
+ ~Mathlib.NumberTheory.FLT.Three instructions -22.8%
+ ~Mathlib.NumberTheory.NumberField.Discriminant.Basic instructions -15.7%
+ ~Mathlib.NumberTheory.NumberField.Units.Basic instructions -17.6%
+ ~Mathlib.NumberTheory.Padics.Hensel instructions -34.2%
+ ~Mathlib.NumberTheory.Padics.PadicIntegers instructions -33.9%
+ ~Mathlib.NumberTheory.Padics.RingHoms instructions -20.6%
+ ~Mathlib.RingTheory.AdicCompletion.AsTensorProduct instructions -7.7%
+ ~Mathlib.RingTheory.Algebraic.MvPolynomial instructions -27.8%
+ ~Mathlib.RingTheory.AlgebraicIndependent.Transcendental instructions -35.9%
+ ~Mathlib.RingTheory.Etale.Field instructions -15.1%
+ ~Mathlib.RingTheory.Etale.Kaehler instructions -7.7%
+ ~Mathlib.RingTheory.FiniteType instructions -43.2%
+ ~Mathlib.RingTheory.Flat.Equalizer instructions -6.4%
+ ~Mathlib.RingTheory.GradedAlgebra.Basic instructions -22.4%
+ ~Mathlib.RingTheory.Kaehler.CotangentComplex instructions -5.6%
+ ~Mathlib.RingTheory.Kaehler.JacobiZariski instructions -12.6%
+ ~Mathlib.RingTheory.Kaehler.Polynomial instructions -6.6%
+ ~Mathlib.RingTheory.Kaehler.TensorProduct instructions -7.8%
+ ~Mathlib.RingTheory.LinearDisjoint instructions -24.4%
+ ~Mathlib.RingTheory.LocalRing.Subring instructions -30.9%
+ ~Mathlib.RingTheory.Perfection instructions -27.2%
+ ~Mathlib.RingTheory.Smooth.Kaehler instructions -3.9%
+ ~Mathlib.RingTheory.Valuation.AlgebraInstances instructions -30.6%
+ ~Mathlib.RingTheory.Valuation.LocalSubring instructions -53.3%
+ ~Mathlib.RingTheory.Valuation.ValuationSubring instructions -22.3%
+ ~Mathlib.Topology.Algebra.Valued.LocallyCompact instructions -47.2%
+ ~Mathlib.Topology.ContinuousMap.Algebra instructions -12.0% |
97 files, Instructions -2.0⬝10⁹
41 files, Instructions -3.0⬝10⁹
28 files, Instructions -4.0⬝10⁹
17 files, Instructions -5.0⬝10⁹
10 files, Instructions -6.0⬝10⁹
16 files, Instructions -7.0⬝10⁹
10 files, Instructions -8.0⬝10⁹
9 files, Instructions -9.0⬝10⁹
9 files, Instructions -10.0⬝10⁹
7 files, Instructions -11.0⬝10⁹
4 files, Instructions -12.0⬝10⁹
5 files, Instructions -13.0⬝10⁹
5 files, Instructions -14.0⬝10⁹
4 files, Instructions -15.0⬝10⁹
4 files, Instructions -16.0⬝10⁹
2 files, Instructions -17.0⬝10⁹
2 files, Instructions -18.0⬝10⁹
2 files, Instructions -20.0⬝10⁹
3 files, Instructions -26.0⬝10⁹
2 files, Instructions -35.0⬝10⁹
2 files, Instructions -36.0⬝10⁹
3 files, Instructions -39.0⬝10⁹
2 files, Instructions -45.0⬝10⁹
2 files, Instructions -47.0⬝10⁹
|
|
Only one outlier left for regressions now |
|
We drop well below +1b instructions for number 2. |
fast_instance% for instances constructed via (inj|surj)ectivity
|
!bench |
| toFun := Set.inclusion h | ||
| linear := Submodule.inclusion <| AffineSubspace.direction_le h | ||
| map_vadd' _ _ := rfl | ||
| map_vadd' := fun ⟨_,_⟩ ⟨_,_⟩ => rfl |
There was a problem hiding this comment.
These were already problematic on master. The kernel was doing a lot of work without telling it explicitly to expand the subtypes. It got worse with the changes to instance shapes. Since it is the kernel, there is not a ton of visibility as to the steps for further probing
|
Here are the benchmark results for commit 7551764. Benchmark Metric Change
================================================================================
+ build type checking -5.1%
+ ~Mathlib.Algebra.Algebra.Subalgebra.Rank instructions -39.4%
+ ~Mathlib.Algebra.Algebra.Subalgebra.Unitization instructions -25.5%
+ ~Mathlib.Algebra.Lie.Submodule instructions -6.8%
+ ~Mathlib.Algebra.Lie.TensorProduct instructions -14.0%
+ ~Mathlib.Algebra.Lie.TraceForm instructions -7.6%
+ ~Mathlib.Algebra.Lie.Weights.Basic instructions -9.3%
+ ~Mathlib.Algebra.Lie.Weights.Cartan instructions -17.0%
+ ~Mathlib.Algebra.Lie.Weights.Linear instructions -16.8%
+ ~Mathlib.Algebra.Module.ZLattice.Basic instructions -8.5%
+ ~Mathlib.Algebra.Ring.Subring.Order instructions -61.0%
+ ~Mathlib.Algebra.Ring.Subsemiring.Order instructions -52.3%
+ ~Mathlib.Algebra.Star.NonUnitalSubalgebra instructions -9.3%
+ ~Mathlib.AlgebraicGeometry.AffineSpace instructions -12.3%
+ ~Mathlib.AlgebraicGeometry.GammaSpecAdjunction instructions -13.2%
+ ~Mathlib.AlgebraicGeometry.Modules.Tilde instructions -21.4%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Basic instructions -18.7%
+ ~Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Scheme instructions -6.9%
+ ~Mathlib.AlgebraicGeometry.Spec instructions -18.6%
+ ~Mathlib.FieldTheory.CardinalEmb instructions -11.4%
+ ~Mathlib.FieldTheory.Extension instructions -23.1%
+ ~Mathlib.FieldTheory.Fixed instructions -41.5%
+ ~Mathlib.FieldTheory.Galois.Basic instructions -20.0%
+ ~Mathlib.FieldTheory.Galois.Infinite instructions -37.2%
+ ~Mathlib.FieldTheory.Galois.Profinite instructions -50.0%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Basic instructions -15.4%
+ ~Mathlib.FieldTheory.IntermediateField.Adjoin.Defs instructions -24.6%
+ ~Mathlib.FieldTheory.IntermediateField.Basic instructions -31.6%
+ ~Mathlib.FieldTheory.LinearDisjoint instructions -24.9%
+ ~Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed instructions -33.5%
+ ~Mathlib.FieldTheory.PrimitiveElement instructions -15.9%
+ ~Mathlib.FieldTheory.PurelyInseparable instructions -23.7%
+ ~Mathlib.FieldTheory.Relrank instructions -60.6%
+ ~Mathlib.FieldTheory.SeparableDegree instructions -17.3%
+ ~Mathlib.Geometry.Euclidean.Angle.Oriented.Basic instructions -9.4%
+ ~Mathlib.Geometry.Euclidean.Circumcenter instructions -15.7%
+ ~Mathlib.LinearAlgebra.AffineSpace.AffineSubspace instructions -10.7%
+ ~Mathlib.LinearAlgebra.CliffordAlgebra.Even instructions -15.1%
+ ~Mathlib.LinearAlgebra.TensorProduct.Graded.Internal instructions -27.3%
+ ~Mathlib.LinearAlgebra.TensorProduct.Subalgebra instructions -9.5%
+ ~Mathlib.NumberTheory.Cyclotomic.Basic instructions -15.6%
+ ~Mathlib.NumberTheory.Cyclotomic.Rat instructions -10.2%
+ ~Mathlib.NumberTheory.FLT.Three instructions -22.8%
+ ~Mathlib.NumberTheory.NumberField.Discriminant.Basic instructions -15.6%
+ ~Mathlib.NumberTheory.NumberField.Units.Basic instructions -17.6%
+ ~Mathlib.NumberTheory.Padics.Hensel instructions -34.2%
+ ~Mathlib.NumberTheory.Padics.PadicIntegers instructions -33.7%
+ ~Mathlib.NumberTheory.Padics.RingHoms instructions -20.3%
+ ~Mathlib.RingTheory.AdicCompletion.AsTensorProduct instructions -7.7%
+ ~Mathlib.RingTheory.Algebraic.MvPolynomial instructions -27.9%
+ ~Mathlib.RingTheory.AlgebraicIndependent.Transcendental instructions -35.9%
+ ~Mathlib.RingTheory.Etale.Field instructions -15.1%
+ ~Mathlib.RingTheory.Etale.Kaehler instructions -7.7%
+ ~Mathlib.RingTheory.FiniteType instructions -43.6%
+ ~Mathlib.RingTheory.Flat.Equalizer instructions -7.0%
+ ~Mathlib.RingTheory.GradedAlgebra.Basic instructions -22.5%
+ ~Mathlib.RingTheory.Kaehler.CotangentComplex instructions -5.4%
+ ~Mathlib.RingTheory.Kaehler.JacobiZariski instructions -13.3%
+ ~Mathlib.RingTheory.Kaehler.Polynomial instructions -9.7%
+ ~Mathlib.RingTheory.Kaehler.TensorProduct instructions -7.9%
+ ~Mathlib.RingTheory.LinearDisjoint instructions -24.6%
+ ~Mathlib.RingTheory.LocalRing.Subring instructions -30.9%
+ ~Mathlib.RingTheory.Perfection instructions -27.1%
+ ~Mathlib.RingTheory.Smooth.Kaehler instructions -4.3%
+ ~Mathlib.RingTheory.Valuation.AlgebraInstances instructions -30.6%
+ ~Mathlib.RingTheory.Valuation.LocalSubring instructions -53.3%
+ ~Mathlib.RingTheory.Valuation.ValuationSubring instructions -22.2%
+ ~Mathlib.Topology.Algebra.Valued.LocallyCompact instructions -47.5%
+ ~Mathlib.Topology.ContinuousMap.Algebra instructions -11.9% |
101 files, Instructions -2.0⬝10⁹
40 files, Instructions -3.0⬝10⁹
27 files, Instructions -4.0⬝10⁹
18 files, Instructions -5.0⬝10⁹
10 files, Instructions -6.0⬝10⁹
16 files, Instructions -7.0⬝10⁹
10 files, Instructions -8.0⬝10⁹
9 files, Instructions -9.0⬝10⁹
8 files, Instructions -10.0⬝10⁹
7 files, Instructions -11.0⬝10⁹
3 files, Instructions -12.0⬝10⁹
6 files, Instructions -13.0⬝10⁹
6 files, Instructions -14.0⬝10⁹
4 files, Instructions -15.0⬝10⁹
5 files, Instructions -16.0⬝10⁹
2 files, Instructions -17.0⬝10⁹
2 files, Instructions -19.0⬝10⁹
2 files, Instructions -20.0⬝10⁹
3 files, Instructions -26.0⬝10⁹
2 files, Instructions -28.0⬝10⁹
2 files, Instructions -36.0⬝10⁹
3 files, Instructions -39.0⬝10⁹
2 files, Instructions -45.0⬝10⁹
2 files, Instructions -47.0⬝10⁹
|
fast_instance% for instances constructed via (inj|surj)ectivityfast_instance% for instances constructed via non-canonical constructors
|
If every non-canonical constructor here is of the form |
|
I think so but I don't know so. There are some that do not have those at the head of the expression yes (syntactically). Deeper in, I'm not going to figure that out easily. Feel free to clarify your request with this context. |
|
Alright, I wrote something |
…l constructors (#20993) Most the applications have `Function.Injective/Surjective.class` at the head of their expressions except for `Submodule.addCommMonoid/addCommGroup/module'/module`. The latter probably have the former deeper inside. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Matthew Robert Ballard <100034030+mattrobball@users.noreply.github.com> Co-authored-by: Anne C.A. Baanen <vierkantor@vierkantor.com>
| subsheafToTypes (Tilde.isLocallyFraction M) | ||
|
|
||
| instance (U : (Opens (PrimeSpectrum.Top R))ᵒᵖ) : | ||
| noncomputable instance (U : (Opens (PrimeSpectrum.Top R))ᵒᵖ) : |
There was a problem hiding this comment.
Why was this not needed before?
There was a problem hiding this comment.
I think it got smarter because the instance was better structured. The next one is already noncomputable for the same one (probably) this is now.
| "Mathlib.Lean.Expr.ExtraRecognizers": ["Mathlib.Data.Set.Operations"], | ||
| "Mathlib.Lean.Expr.Basic": ["Batteries.Logic"], | ||
| "Mathlib.GroupTheory.MonoidLocalization.Basic": ["Mathlib.Init.Data.Prod"], | ||
| "Mathlib.GroupTheory.Congruence.Defs": ["Mathlib.Tactic.FastInstance"], |
There was a problem hiding this comment.
If you add FastInstance in the first block, the IgnoreImport group, then you do not have to individually unshake it elsewhere.
There was a problem hiding this comment.
Great! I just did the mindless thing and would be happy to see something better done.
adomani
left a comment
There was a problem hiding this comment.
This is awesome! I am very happy to see this merged: my comments are simply intended to keep a record of the changes, not for any kind of immediate action!
|
Pull request successfully merged into master. Build succeeded: |
fast_instance% for instances constructed via non-canonical constructorsfast_instance% for instances constructed via non-canonical constructors
Most the applications have
Function.Injective/Surjective.classat the head of their expressions except forSubmodule.addCommMonoid/addCommGroup/module'/module. The latter probably have the former deeper inside.Co-authored-by: Eric Wieser wieser.eric@gmail.com