Skip to content

Commit 5518032

Browse files
committed
merge upstream
2 parents 7938fab + fff759c commit 5518032

416 files changed

Lines changed: 4802 additions & 3366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/get-mathlib-ci/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
# Default pinned commit used by workflows unless they explicitly override.
1111
# Update this ref as needed to pick up changes to mathlib-ci scripts
1212
# This is also updated automatically by .github/workflows/update_dependencies.yml
13-
default: 455d84939bba1fbe157ff2c1469a0c258372d05c
13+
default: 78f34ded6a5f5aa11ea5b7c3120fe5d8422db1da
1414
path:
1515
description: Checkout destination path.
1616
required: false

.github/workflows/shake.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@ jobs:
3535
use-github-cache: false
3636
use-mathlib-cache: true
3737

38+
# - name: lake build
39+
# run: |
40+
# lake build Archive Counterexamples
41+
3842
- name: lake shake
3943
id: shake
4044
run: |
41-
lake shake --add-public --keep-implied --keep-prefix --fix --explain > explain.txt 2>&1
45+
# Add back Archive and Counterexamples when they've been modulized
46+
lake shake --add-public --keep-implied --keep-prefix --fix --explain Mathlib > explain.txt 2>&1
4247
if git diff --quiet; then
4348
echo "changed=false" >> "$GITHUB_OUTPUT"
4449
else
@@ -53,12 +58,17 @@ jobs:
5358
5459
- name: Upload explain.txt
5560
id: upload-artifact
56-
if: steps.shake.outputs.changed == 'true'
61+
if: failure() || steps.shake.outputs.changed == 'true'
5762
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5863
with:
5964
name: shake-explain
6065
path: explain.txt
6166

67+
- name: Cleanup explain.txt
68+
if: steps.shake.outputs.changed == 'true'
69+
run: |
70+
rm -f explain.txt
71+
6272
- name: Build PR body
6373
id: pr_body
6474
if: steps.shake.outputs.changed == 'true' && toJson(inputs.dry_run) != 'true'
@@ -118,7 +128,7 @@ jobs:
118128
api-key: ${{ secrets.ZULIP_API_KEY }}
119129
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
120130
organization-url: 'https://leanprover.zulipchat.com'
121-
to: 'nightly-testing'
131+
to: 'nightly-testing-mathlib'
122132
type: 'stream'
123133
topic: 'Mathlib `shake --fix`'
124134
content: |
@@ -134,7 +144,7 @@ jobs:
134144
api-key: ${{ secrets.ZULIP_API_KEY }}
135145
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
136146
organization-url: 'https://leanprover.zulipchat.com'
137-
to: 'nightly-testing'
147+
to: 'nightly-testing-mathlib'
138148
type: 'stream'
139149
topic: 'Mathlib `shake --fix`'
140150
content: |

Archive/Examples/IfNormalization/Result.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import Mathlib.Tactic.Recall
1313
See `Statement.lean` for background.
1414
-/
1515

16-
macro "◾" : tactic => `(tactic| aesop)
17-
macro "◾" : term => `(term| by aesop)
16+
local macro "◾" : tactic => `(tactic| aesop)
17+
local macro "◾" : term => `(term| by aesop)
1818

1919
namespace IfExpr
2020

Archive/Imo/Imo2024Q5.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,7 @@ lemma winningStrategy_play_one_eq_none_or_play_two_eq_none_of_edge_zero (hN : 2
938938
lia
939939
· simp at hm
940940
exact m.notMem_monsterCells_of_fst_eq_zero rfl hm
941-
· simp at h
942-
lia
941+
· simp [eqComm] at h
943942
· dsimp only [Nat.reduceAdd, Nat.reduceDiv, Fin.mk_one] at hm
944943
have h1N : 1 ≤ N := by lia
945944
rw [m.mk_mem_monsterCells_iff_of_le (le_refl _) h1N] at hm

Cache/Requests.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def findMathlibRemote (mathlibDepPath : FilePath) : IO String := do
9494
let remoteUrl := parts[1]!.takeWhile (· != ' ') |>.copy -- Remove (fetch) or (push) suffix
9595

9696
-- Check if this remote points to leanprover-community/mathlib4
97-
let isMathlibRepo := remoteUrl.containsSubstr "leanprover-community/mathlib4"
97+
let isMathlibRepo := remoteUrl.contains "leanprover-community/mathlib4"
9898

9999
if isMathlibRepo then
100100
if remoteName == "origin" then

Mathlib.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ public import Mathlib.Algebra.Homology.LeftResolution.Transport
652652
public import Mathlib.Algebra.Homology.Linear
653653
public import Mathlib.Algebra.Homology.LocalCohomology
654654
public import Mathlib.Algebra.Homology.Localization
655+
public import Mathlib.Algebra.Homology.ModelCategory.Injective
655656
public import Mathlib.Algebra.Homology.ModelCategory.Lifting
656657
public import Mathlib.Algebra.Homology.Monoidal
657658
public import Mathlib.Algebra.Homology.Opposite
@@ -1323,6 +1324,7 @@ public import Mathlib.AlgebraicGeometry.AffineSpace
13231324
public import Mathlib.AlgebraicGeometry.AffineTransitionLimit
13241325
public import Mathlib.AlgebraicGeometry.AlgClosed.Basic
13251326
public import Mathlib.AlgebraicGeometry.Artinian
1327+
public import Mathlib.AlgebraicGeometry.Birational.RationalMap
13261328
public import Mathlib.AlgebraicGeometry.ColimitsOver
13271329
public import Mathlib.AlgebraicGeometry.Cover.Directed
13281330
public import Mathlib.AlgebraicGeometry.Cover.MorphismProperty
@@ -1423,7 +1425,6 @@ public import Mathlib.AlgebraicGeometry.Properties
14231425
public import Mathlib.AlgebraicGeometry.PullbackCarrier
14241426
public import Mathlib.AlgebraicGeometry.Pullbacks
14251427
public import Mathlib.AlgebraicGeometry.QuasiAffine
1426-
public import Mathlib.AlgebraicGeometry.RationalMap
14271428
public import Mathlib.AlgebraicGeometry.RelativeGluing
14281429
public import Mathlib.AlgebraicGeometry.ResidueField
14291430
public import Mathlib.AlgebraicGeometry.Restrict
@@ -1817,6 +1818,7 @@ public import Mathlib.Analysis.Complex.Arg
18171818
public import Mathlib.Analysis.Complex.Asymptotics
18181819
public import Mathlib.Analysis.Complex.Basic
18191820
public import Mathlib.Analysis.Complex.BorelCaratheodory
1821+
public import Mathlib.Analysis.Complex.BranchLogRoot
18201822
public import Mathlib.Analysis.Complex.CanonicalDecomposition
18211823
public import Mathlib.Analysis.Complex.Cardinality
18221824
public import Mathlib.Analysis.Complex.CauchyIntegral
@@ -2565,6 +2567,7 @@ public import Mathlib.CategoryTheory.CommSq
25652567
public import Mathlib.CategoryTheory.Comma.Arrow
25662568
public import Mathlib.CategoryTheory.Comma.Basic
25672569
public import Mathlib.CategoryTheory.Comma.CardinalArrow
2570+
public import Mathlib.CategoryTheory.Comma.CatCommSq
25682571
public import Mathlib.CategoryTheory.Comma.Final
25692572
public import Mathlib.CategoryTheory.Comma.LocallySmall
25702573
public import Mathlib.CategoryTheory.Comma.Over.Basic
@@ -4616,6 +4619,7 @@ public import Mathlib.Geometry.Manifold.VectorBundle.LocalFrame
46164619
public import Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable
46174620
public import Mathlib.Geometry.Manifold.VectorBundle.Pullback
46184621
public import Mathlib.Geometry.Manifold.VectorBundle.Riemannian
4622+
public import Mathlib.Geometry.Manifold.VectorBundle.SmoothSection
46194623
public import Mathlib.Geometry.Manifold.VectorBundle.Tangent
46204624
public import Mathlib.Geometry.Manifold.VectorBundle.Tensoriality
46214625
public import Mathlib.Geometry.Manifold.VectorField.LieBracket
@@ -5641,6 +5645,7 @@ public import Mathlib.NumberTheory.Harmonic.Int
56415645
public import Mathlib.NumberTheory.Harmonic.ZetaAsymp
56425646
public import Mathlib.NumberTheory.Height.Basic
56435647
public import Mathlib.NumberTheory.Height.MvPolynomial
5648+
public import Mathlib.NumberTheory.Height.Northcott
56445649
public import Mathlib.NumberTheory.Height.NumberField
56455650
public import Mathlib.NumberTheory.Height.Projectivization
56465651
public import Mathlib.NumberTheory.JacobiSum.Basic
@@ -6263,6 +6268,7 @@ public import Mathlib.RepresentationTheory.Basic
62636268
public import Mathlib.RepresentationTheory.Character
62646269
public import Mathlib.RepresentationTheory.Coinduced
62656270
public import Mathlib.RepresentationTheory.Coinvariants
6271+
public import Mathlib.RepresentationTheory.Continuous.Basic
62666272
public import Mathlib.RepresentationTheory.Equiv
62676273
public import Mathlib.RepresentationTheory.FDRep
62686274
public import Mathlib.RepresentationTheory.FinGroupCharZero
@@ -6604,10 +6610,12 @@ public import Mathlib.RingTheory.LocalProperties.Semilocal
66046610
public import Mathlib.RingTheory.LocalProperties.Submodule
66056611
public import Mathlib.RingTheory.LocalRing.Basic
66066612
public import Mathlib.RingTheory.LocalRing.Defs
6613+
public import Mathlib.RingTheory.LocalRing.Etale
66076614
public import Mathlib.RingTheory.LocalRing.Length
66086615
public import Mathlib.RingTheory.LocalRing.LocalSubring
66096616
public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic
66106617
public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs
6618+
public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Square
66116619
public import Mathlib.RingTheory.LocalRing.Module
66126620
public import Mathlib.RingTheory.LocalRing.NonLocalRing
66136621
public import Mathlib.RingTheory.LocalRing.Quotient
@@ -7930,6 +7938,7 @@ public import Mathlib.Topology.Separation.Hausdorff
79307938
public import Mathlib.Topology.Separation.Lemmas
79317939
public import Mathlib.Topology.Separation.LinearUpperLowerSetTopology
79327940
public import Mathlib.Topology.Separation.NotNormal
7941+
public import Mathlib.Topology.Separation.PerfectlyNormal
79337942
public import Mathlib.Topology.Separation.Profinite
79347943
public import Mathlib.Topology.Separation.Regular
79357944
public import Mathlib.Topology.Separation.SeparatedNhds
@@ -8031,6 +8040,7 @@ public import Mathlib.Util.AtomM
80318040
public import Mathlib.Util.AtomM.Recurse
80328041
public import Mathlib.Util.CompileInductive
80338042
public import Mathlib.Util.CountHeartbeats
8043+
public import Mathlib.Util.DelabNonCanonical
80348044
public import Mathlib.Util.Delaborators
80358045
public import Mathlib.Util.DischargerAsTactic
80368046
public import Mathlib.Util.ElabWithoutMVars

Mathlib/Algebra/Algebra/Basic.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,6 @@ theorem coe_inj {a b : R} : (↑a : A) = ↑b ↔ a = b :=
370370
theorem coe_eq_zero_iff (a : R) : (↑a : A) = 0 ↔ a = 0 :=
371371
FaithfulSMul.algebraMap_eq_zero_iff _ _
372372

373-
@[deprecated coe_eq_zero_iff (since := "2025-10-21")]
374-
theorem lift_map_eq_zero_iff (a : R) : (↑a : A) = 0 ↔ a = 0 :=
375-
coe_eq_zero_iff _ _ _
376-
377373
end algebraMap
378374

379375
lemma Algebra.charZero_of_charZero [CharZero R] : CharZero A :=

Mathlib/Algebra/BigOperators/Finsupp/Basic.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,6 @@ theorem Finsupp.sum_apply'' {A F : Type*} [AddZeroClass A] [AddCommMonoid F] [Fu
607607
| empty => simp [h0]
608608
| insert i s hi ih => simp [sum_insert hi, hadd, ih]
609609

610-
@[deprecated "use instead `sum_finsetSum_index` (with equality reversed)" (since := "2025-11-07")]
611-
theorem Finsupp.sum_sum_index' (h0 : ∀ i, t i 0 = 0) (h1 : ∀ i x y, t i (x + y) = t i x + t i y) :
612-
(∑ x ∈ s, f x).sum t = ∑ x ∈ s, (f x).sum t := (sum_finsetSum_index h0 h1).symm
613-
614610
section
615611

616612
variable [NonUnitalNonAssocSemiring R] [NonUnitalNonAssocSemiring S]

Mathlib/Algebra/BigOperators/Group/List/Basic.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ theorem mul_prod_eraseIdx {i} (hlen : i < l.length) (hcomm : ∀ a' ∈ l.take i
216216
hcomm a' (by rwa [take_eraseIdx_eq_take_of_le l i i (Nat.le_refl i)] at a'_mem)),
217217
insertIdx_eraseIdx_getElem hlen]
218218

219+
@[to_additive (attr := simp)]
220+
theorem prod_filter_bne_one [BEq M] [LawfulBEq M] (l : List M) :
221+
(l.filter (· != 1)).prod = l.prod := by
222+
classical induction l <;> grind
223+
219224
end Monoid
220225

221226
section CommMonoid

Mathlib/Algebra/BigOperators/Ring/Finset.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ lemma sum_pow' (s : Finset κ) (f : κ → R) (n : ℕ) :
166166
(∑ a ∈ s, f a) ^ n = ∑ p ∈ piFinset fun _i : Fin n ↦ s, ∏ i, f (p i) := by
167167
convert @prod_univ_sum (Fin n) _ _ _ _ _ (fun _i ↦ s) fun _i d ↦ f d; simp
168168

169-
set_option backward.isDefEq.respectTransparency false in
170169
/-- The product of `f a + g a` over all of `s` is the sum over the powerset of `s` of the product of
171170
`f` over a subset `t` times the product of `g` over the complement of `t` -/
172171
theorem prod_add (f g : ι → R) (s : Finset ι) :
@@ -184,7 +183,7 @@ theorem prod_add (f g : ι → R) (s : Finset ι) :
184183
(by simp)
185184
(by simp [Classical.em])
186185
(by simp_rw [mem_filter, funext_iff, eq_iff_iff, mem_pi, mem_insert]; tauto)
187-
(by simp_rw [Finset.ext_iff, @mem_filter _ _ (id _), mem_powerset]; tauto)
186+
(by simp_rw [Finset.ext_iff, mem_filter, mem_powerset]; tauto)
188187
(fun a _ ↦ by
189188
simp only [prod_ite, filter_attach', prod_map, Function.Embedding.coeFn_mk,
190189
Subtype.map_coe, id_eq, prod_attach]

0 commit comments

Comments
 (0)