Skip to content

[Merged by Bors] - chore: adaptations for nightly-2025-04-26 - #24406

Closed
kim-em wants to merge 6156 commits into
bump/v4.20.0from
bump/nightly-2025-04-26
Closed

kim-em wants to merge 6156 commits into
bump/v4.20.0from
bump/nightly-2025-04-26

Conversation

@kim-em

@kim-em kim-em commented Apr 27, 2025 •

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Apr 27, 2025
@github-actions

github-actions Bot commented Apr 27, 2025 •

Copy link
Copy Markdown

PR summary 934a55c547

Import changes exceeding 2%

% File
+3.70% Mathlib.Tactic.Linter.UpstreamableDecl
+3.85% Mathlib.Tactic.MinImports

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Data.Fin.Basic 353 338 -15 (-4.25%)
Mathlib.Tactic.MinImports 26 27 +1 (+3.85%)
Mathlib.Tactic.Linter.UpstreamableDecl 27 28 +1 (+3.70%)
Mathlib.Algebra.GCDMonoid.Nat 416 405 -11 (-2.64%)
Mathlib.Data.Int.GCD 317 311 -6 (-1.89%)
Mathlib.Algebra.Group.Basic 110 109 -1 (-0.91%)
Mathlib.Algebra.GroupWithZero.Basic 121 120 -1 (-0.83%)
Mathlib.Data.Int.Sqrt 256 254 -2 (-0.78%)
Mathlib.Data.Int.Bitwise 355 354 -1 (-0.28%)
Mathlib.Computability.Tape 395 394 -1 (-0.25%)
Mathlib.Data.Nat.ModEq 397 396 -1 (-0.25%)
Mathlib.Data.Nat.Prime.Int 400 399 -1 (-0.25%)
Mathlib.Tactic.Group 513 512 -1 (-0.19%)
Mathlib.NumberTheory.Zsqrtd.Basic 1105 1103 -2 (-0.18%)
Mathlib.Algebra.Polynomial.Laurent 1134 1132 -2 (-0.18%)
Mathlib.Data.Int.Interval 607 606 -1 (-0.16%)
Mathlib.Data.NNRat.Floor 635 634 -1 (-0.16%)
Mathlib.Data.ENNReal.Inv 706 705 -1 (-0.14%)
Mathlib.Combinatorics.Derangements.Finite 745 744 -1 (-0.13%)
Mathlib.Algebra.ContinuedFractions.Computation.TerminatesIffRat 777 776 -1 (-0.13%)
Mathlib.Data.ZMod.Basic 899 898 -1 (-0.11%)
Mathlib.NumberTheory.Multiplicity 941 940 -1 (-0.11%)
Mathlib.NumberTheory.LucasLehmer 959 958 -1 (-0.10%)
Mathlib.GroupTheory.Coxeter.Basic 973 972 -1 (-0.10%)
Mathlib.GroupTheory.CommutingProbability 1093 1092 -1 (-0.09%)
Mathlib.NumberTheory.PellMatiyasevic 1109 1108 -1 (-0.09%)
Mathlib.LinearAlgebra.Matrix.ZPow 1396 1395 -1 (-0.07%)
Mathlib.NumberTheory.Padics.PadicIntegers 1505 1504 -1 (-0.07%)
Mathlib.RingTheory.DedekindDomain.Factorization 1528 1527 -1 (-0.07%)
Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic 1552 1551 -1 (-0.06%)
Mathlib.RingTheory.WittVector.StructurePolynomial 1569 1568 -1 (-0.06%)
Mathlib.Analysis.Calculus.Deriv.ZPow 1683 1682 -1 (-0.06%)
Mathlib.NumberTheory.Transcendental.Liouville.Measure 2155 2154 -1 (-0.05%)
Mathlib.MeasureTheory.Integral.CircleIntegral 2234 2233 -1 (-0.04%)
Mathlib.Analysis.SpecialFunctions.Integrals 2252 2251 -1 (-0.04%)
Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol 2532 2531 -1 (-0.04%)
Mathlib.Tactic.NormNum.LegendreSymbol 2533 2532 -1 (-0.04%)
Import changes for all files
Files Import difference
There are 4581 files with changed transitive imports taking up over 190908 characters: this is too many to display!
You can run scripts/import_trans_difference.sh all locally to see the whole output.

Declarations diff

+ CommRing.toGrindCommRing
+ CommRing.toGrindCommRing_ofNat
+ _root_.Lean.SearchPath.relativize
+ instance (X : Type u) [TopologicalSpace X] [Small.{v} X] :
+ instance [NormedField 𝕜] [NormedCommRing R] [NormedAlgebra 𝕜 R] :
+ merge_isAssociative
+ merge_isCommutative
+ merge_isId
+ merge_isIdempotent
++-- toAffine
+-+--+ of_surjective
- Lean.Expr.LiftLetsConfig
- Lean.Expr.liftLets
- Lean.MVarId.extractLets
- Lean.MVarId.extractLetsAt
- One
- a
- add_eq_left
- add_eq_max_iff
- add_eq_min_iff
- add_eq_one_iff
- add_eq_right
- add_eq_three_iff
- add_eq_two_iff
- add_eq_zero
- add_le_iff_le_sub
- add_le_mul
- add_le_zero_iff_le_neg
- add_le_zero_iff_le_neg'
- add_left_inj
- add_mod_eq_add_mod_left
- add_mod_eq_add_mod_right
- add_mod_eq_ite
- add_nonnneg_iff_neg_le
- add_nonnneg_iff_neg_le'
- add_pos_iff_pos_or_pos
- add_right_inj
- add_sub_one_le_mul
- add_sub_sub_cancel
- add_succ_lt_add
- add_succ_sub_one
- cast_id
- decidableEqNone
- decidableExistsMem
- decidableForallMem
- default_eq_zero
- div_add_mod'
- div_div_div_eq_div
- div_div_self
- div_dvd_of_dvd
- div_eq_iff_eq_of_dvd_dvd
- div_eq_self
- div_eq_sub_mod_div
- div_eq_zero_iff
- div_le_div
- div_le_div_of_mul_le_mul
- div_le_div_right
- div_le_iff_le_mul_add_pred
- div_le_iff_le_mul_of_dvd
- div_left_inj
- div_lt_div_left
- div_lt_div_of_lt_of_dvd
- div_lt_div_right
- div_lt_one_iff
- div_mod_unique
- div_mul_div_comm
- div_mul_div_le
- div_mul_div_le_div
- div_mul_right_comm
- div_ne_zero_iff
- div_ne_zero_iff_of_dvd
- div_pos_iff
- div_pow
- dvd_add_left
- dvd_add_right
- dvd_div_iff_mul_dvd
- dvd_div_of_mul_dvd
- dvd_gcd
- dvd_iff_div_mul_eq
- dvd_iff_dvd_dvd
- dvd_iff_le_div_mul
- dvd_of_mul_dvd_mul_left
- dvd_of_mul_dvd_mul_right
- dvd_sub_mod
- ediv_dvd_ediv
- ediv_dvd_of_dvd
- eq_div_iff_mul_eq_left
- eq_div_of_mul_eq_left
- eq_div_of_mul_eq_right
- eq_mul_of_div_eq_left
- eq_none_iff_forall_some_ne
- eq_none_or_eq_some
- eq_of_dvd_of_div_eq_one
- eq_of_dvd_of_lt_two_mul
- eq_one_of_mul_eq_one_left
- eq_one_of_mul_eq_one_right
- eq_sub_of_add_eq
- eq_sub_of_add_eq'
- eq_zero_of_dvd_of_div_eq_zero
- eq_zero_of_dvd_of_lt
- eq_zero_of_le_div
- eq_zero_of_mul_le
- evalExtractLets
- exists_ne_none
- gcd_assoc
- gcd_comm
- gcd_dvd_gcd_mul_left_right
- gcd_dvd_gcd_mul_right_right
- gcd_dvd_gcd_of_dvd_left
- gcd_dvd_gcd_of_dvd_right
- gcd_eq_left
- gcd_eq_right
- gcd_eq_zero_iff
- gcd_mul_lcm
- gcd_mul_left
- gcd_mul_right
- gcd_natCast_natCast
- gcd_pos_iff
- gcd_pos_of_ne_zero_left
- gcd_pos_of_ne_zero_right
- gcd_self
- gcd_zero_left
- gcd_zero_right
- ge_of_eq
- getLast_cons_cons
- instance (X : Type u) [TopologicalSpace X] [Small.{v} X] : TopologicalSpace (Shrink.{v} X)
- instance (priority := 200) One.ofOfNat1 {α} [OfNat α (nat_lit 1)] : One α
- instance (priority := 300) One.toOfNat1 {α} [One α] : OfNat α (nat_lit 1)
- instance : Pow (BitVec w) ℕ := ⟨fun x n => ofFin <| x.toFin ^ n⟩
- instance [NormedField 𝕜] [NormedCommRing R] [NormedAlgebra 𝕜 R] : NormedSpace 𝕜 C(α, R)₀
- isNone_eq_false_iff
- lcm_assoc
- lcm_comm
- lcm_dvd
- lcm_dvd_iff
- lcm_dvd_mul
- lcm_one_left
- lcm_one_right
- lcm_pos
- lcm_zero_left
- lcm_zero_right
- le_add_iff_sub_le
- le_add_pred_of_pos
- le_and_le_add_one_iff
- le_antisymm_iff
- le_iff_eq_or_lt
- le_iff_lt_or_eq
- le_iff_ne_zero_of_dvd
- le_mul_self
- le_of_eq
- le_of_lt_add_of_dvd
- le_of_pred_lt
- le_one_iff_eq_zero_or_eq_one
- le_or_le_of_add_eq_add_pred
- le_or_lt
- le_rfl
- le_self_pow
- le_sub_one_iff
- le_succ_iff
- lt_asymm
- lt_div_iff_mul_lt'
- lt_div_iff_mul_lt_of_dvd
- lt_div_mul_add
- lt_iff_add_one_le
- lt_iff_le_pred
- lt_iff_lt_of_mul_eq_mul
- lt_mul_div_succ
- lt_mul_iff_one_lt_left
- lt_mul_iff_one_lt_right
- lt_mul_of_div_lt
- lt_mul_self_iff
- lt_of_div_lt_div
- lt_of_lt_pred
- lt_of_pow_dvd_right
- lt_of_toNat_lt
- lt_one_add_iff
- lt_or_le
- lt_or_lt_of_ne
- lt_pred_iff
- lt_sub_iff_add_lt
- lt_sub_iff_add_lt'
- lt_toNat
- max_eq_zero_iff
- max_left_comm
- max_right_comm
- mem_some_iff
- min_eq_zero_iff
- min_left_comm
- min_right_comm
- mod_add_div'
- mod_eq_iff_lt
- mod_succ
- mod_succ_eq_iff_lt
- mod_two_ne_one
- mod_two_ne_zero
- mod_two_not_eq_one
- mod_two_not_eq_zero
- mul_add_mod'
- mul_add_mod_of_lt
- mul_add_mul_div_of_dvd
- mul_div_cancel_left'
- mul_div_eq_iff_dvd
- mul_div_le_mul_div_assoc
- mul_div_lt_iff_not_dvd
- mul_div_mul_comm
- mul_div_right_comm
- mul_dvd_mul
- mul_dvd_mul_iff_left
- mul_dvd_mul_iff_right
- mul_dvd_mul_left
- mul_dvd_mul_right
- mul_dvd_of_dvd_div
- mul_eq_left
- mul_eq_right
- mul_le_mul_iff_of_pos_right
- mul_le_mul_left
- mul_le_mul_left_of_neg
- mul_le_mul_right
- mul_le_mul_right_of_neg
- mul_le_of_le_div
- mul_left_inj
- mul_lt_mul''
- mul_lt_mul_left
- mul_lt_mul_left_of_neg
- mul_lt_mul_pow_succ
- mul_lt_mul_right
- mul_lt_mul_right_of_neg
- mul_ne_mul_left
- mul_ne_mul_right
- mul_nonneg_iff_of_pos_right
- mul_right_inj
- mul_self_inj
- mul_self_le_mul_self
- mul_self_le_mul_self_iff
- mul_self_lt_mul_self
- mul_self_lt_mul_self_iff
- mul_sub_div_of_dvd
- mul_sub_mul_div_of_dvd
- natAbs_add_of_nonneg
- natAbs_add_of_nonpos
- natAbs_cast
- natAbs_ediv_of_dvd
- natAbs_eq_of_dvd_dvd
- natAbs_ofNat'
- natAbs_pow
- natAbs_pow_two
- natCast_ediv
- natCast_eq_zero
- natCast_inj
- natCast_ne_zero
- natCast_ne_zero_iff_pos
- natCast_nonneg
- natCast_nonpos_iff
- natCast_pos
- natCast_sub
- natCast_succ_pos
- neg_emod_two
- neg_neg_iff_pos
- neg_nonneg
- neg_pos
- not_dvd_of_pos_of_lt
- not_succ_lt_self
- ofNat_add_one_out
- ofNat_add_out
- ofNat_eq_natCast
- ofNat_mul_out
- one_add_le_iff
- one_le_div_iff
- one_le_iff_ne_zero
- one_le_of_lt
- one_le_pow
- one_lt_iff_ne_zero_and_ne_one
- one_lt_mul_iff
- one_lt_pow
- one_lt_pow'
- one_lt_pow_iff
- one_lt_succ_succ
- one_lt_two_pow'
- one_mod
- one_mod_eq_one
- one_ne_zero
- one_nonneg
- one_pos
- pbind_eq_bind
- pbind_eq_some
- pbind_map
- pow_dvd_pow_iff
- pow_eq_one
- pow_eq_self_iff
- pow_eq_zero
- pow_le_one_iff
- pow_le_pow_iff_left
- pow_lt_pow_iff_left
- pow_lt_pow_right
- pow_mod
- pow_pos_iff
- pow_right_inj
- pow_self_mul_pow_self_le
- pow_self_pos
- pow_two_sub_pow_two
- pred_add_self
- pred_eq_of_eq_succ
- pred_eq_self_iff
- pred_eq_succ_iff
- pred_le_iff
- pred_one_add
- pred_sub
- self_add_pred
- self_add_sub_one
- sign_natCast_add_one
- sign_natCast_of_ne_zero
- sub_add_sub_cancel
- sub_eq_of_eq_add'
- sub_lt_iff_lt_add
- sub_lt_iff_lt_add'
- sub_lt_sub_iff_right
- sub_mod_eq_zero_of_mod_eq
- sub_nonneg
- sub_one_add_self
- sub_one_lt_iff
- sub_pos
- sub_sub_sub_cancel_right
- sub_succ'
- succ_add_sub_one
- succ_inj
- succ_le_iff
- succ_mul_pos
- succ_ne_succ
- succ_succ_ne_one
- toNat_natCast
- toNat_natCast_add_one
- toNat_sub_of_le
- two_mul
- two_pow_succ
- zero_eq_mul
-+- div_dvd_iff_dvd_mul
-+-+ iic
-+-+-+-+ colimitCoconeIsColimit
-- lcm_mul_left
-- lcm_mul_right
-- le_add_one_iff
--+ dvd_mul_of_div_dvd

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.


Increase in tech debt: (relative, absolute) = (14.00, 0.10)
Current number Change Type
136 14 adaptation notes

Current commit 934a55c547
Reference commit 44f760b7ee

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).

Comment thread .envrc Resolved
Comment thread .gdb_history Resolved
Comment thread haha.sh Resolved
Comment thread out Resolved
Comment thread prof.json Resolved
Comment thread test_no_init.json Resolved
Comment thread Mathlib/Tactic/MinImports.lean Resolved
@kim-em

kim-em commented Apr 27, 2025

Copy link
Copy Markdown
Contributor Author

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Apr 27, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Apr 27, 2025
Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Sebastian Ullrich <[email protected]>

@kbuzzard kbuzzard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR is almost all changes from Int.ofNat_something to Int.natCast_something where something is in {succ, add, mul, emod, ediv}. I am not really competent to say whether this is what we want to do or clued-up enough to know why this is happening, but I am competent enough to read through the PR and to confirm that this is essentially all that's happening. There are some adaptation notes and removals of adaptation notes, all of which look fine, and then there's some meta code which I'm not competent to review and which I've explicitly flagged as ideally needing another reviewer.

2025-04-26 Why do we need to add `List.getElem_cons_zero` and `List.getElem_cons_succ` here?
They are already `@[simp]` lemmas!
(This will be fixed on nightly-2025-04-27.)
-/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe worth mentioning that the proof used to be simp [Product, commProb_pi, Fin.prod_univ_succ] ? This doesn't seem easy to deduce from what is currently written (if the plan is to restore the proof).

-- (There does not seem to be an easy way to determine, given `Syntax` and `ConstInfo`,
-- whether the `ConstInfo` is a constructor declared in this piece of `Syntax`.)
let defs := constInfos.filter (fun constInfo => !(constInfo.isTheorem || constInfo.isCtor))
let defs := constInfos.filter (fun constInfo => !(constInfo matches .thmInfo _ | .ctorInfo _))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not competent to review the changes in this file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can help with this one: this just inlines the current definition of .isTheorem resp. .isCtor, so is functionally equivalent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you comment on why this change is necessary? I would like to understand, if only for my own learning. Thanks a lot!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@grunweg There's a bit of context here: #nightly-testing > Mathlib status updates @ 💬. The other missing part is that with the module system (which is not yet enabled anywhere but Init), imported theorems may be represented as ConstantInfo.axiomInfo if the proof was not imported.

let (_, { visited, .. }) := CollectAxioms.collect decl |>.run env |>.run {}
visited
/-- Extracts the names of the declarations in `env` on which `decl` depends. -/
def getVisited (decl : Name) : CommandElabM NameSet := do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not competent to review the changes in this file.

if decl.isTheorem || !decl.hasValue then
return decl
else
if decl matches .defnInfo _ then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not competent to review the changes in this file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can review this change locally: this does what the doc-string change says it does. (I don't understand why that change is made, though.)

@mathlib-bors

mathlib-bors Bot commented Apr 27, 2025

Copy link
Copy Markdown
Contributor

Build failed:

@kim-em

kim-em commented Apr 27, 2025

Copy link
Copy Markdown
Contributor Author

bors merge

mathlib-bors Bot pushed a commit that referenced this pull request Apr 27, 2025
Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Sebastian Ullrich <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Apr 27, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into bump/v4.20.0.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore: adaptations for nightly-2025-04-26 [Merged by Bors] - chore: adaptations for nightly-2025-04-26 Apr 27, 2025
@mathlib-bors mathlib-bors Bot closed this Apr 27, 2025
@mathlib-bors
mathlib-bors Bot deleted the bump/nightly-2025-04-26 branch April 27, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large-import Automatically added label for PRs with a significant increase in transitive imports ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants