Skip to content

Commit 5179ef5

Browse files
committed
Merge remote-tracking branch 'origin/master' into bump/v4.30.0
2 parents bf131b5 + c46a698 commit 5179ef5

239 files changed

Lines changed: 3599 additions & 3563 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/workflows/build_template.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -816,17 +816,7 @@ jobs:
816816
needs: [style_lint, build, post_steps]
817817
runs-on: ubuntu-latest
818818
steps:
819-
- name: Generate auto merge app token
820-
id: auto-merge-app-token
821-
uses: leanprover-community/mathlib-ci/.github/actions/azure-create-github-app-token@3bb576208589a435eeaeac9b144a1b7c3e948760
822-
with:
823-
app-id: ${{ secrets.MATHLIB_AUTO_MERGE_APP_ID }}
824-
key-vault-name: ${{ vars.MATHLIB_AZ_KEY_VAULT_NAME }}
825-
key-name: mathlib-auto-merge-app-pk
826-
azure-client-id: ${{ vars.GH_APP_AZURE_CLIENT_ID_CI_AUTO_MERGE }}
827-
azure-tenant-id: ${{ secrets.LPC_AZ_TENANT_ID }}
828-
829-
- id: PR_from_push
819+
- id: PR
830820
uses: 8BitJonny/gh-get-current-pr@4056877062a1f3b624d5d4c2bedefa9cf51435c9 # 4.0.0
831821
# TODO: this may not work properly if the same commit is pushed to multiple branches:
832822
# https://github.com/8BitJonny/gh-get-current-pr/issues/8
@@ -835,16 +825,6 @@ jobs:
835825
# Only return if PR is still open
836826
filterOutClosed: true
837827

838-
# TODO: delete this step and rename `PR_from_push` to `PR` if the above step seems to work properly
839-
# Combine the output from the previous action with the metadata supplied by GitHub itself.
840-
# Note that if we fall back to github.event.pull_request data, the list of labels is generated when this workflow is triggered
841-
# and not updated afterwards!
842-
- id: PR
843-
shell: bash
844-
run: |
845-
echo "number=${{ steps.PR_from_push.outputs.number || github.event.pull_request.number }}" | tee -a "$GITHUB_OUTPUT"
846-
echo "pr_labels=${{ steps.PR_from_push.outputs.pr_labels || join(github.event.pull_request.labels.*.name, ',') }}" | tee -a "$GITHUB_OUTPUT"
847-
848828
- id: remove_labels
849829
name: Remove "awaiting-CI"
850830
# we use curl rather than octokit/request-action so that the job won't fail
@@ -854,6 +834,17 @@ jobs:
854834
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ steps.PR.outputs.number }}/labels/awaiting-CI \
855835
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}'
856836
837+
- if: contains(steps.PR.outputs.pr_labels, 'auto-merge-after-CI')
838+
name: Generate auto merge app token
839+
id: auto-merge-app-token
840+
uses: leanprover-community/mathlib-ci/.github/actions/azure-create-github-app-token@3bb576208589a435eeaeac9b144a1b7c3e948760
841+
with:
842+
app-id: ${{ secrets.MATHLIB_AUTO_MERGE_APP_ID }}
843+
key-vault-name: ${{ vars.MATHLIB_AZ_KEY_VAULT_NAME }}
844+
key-name: mathlib-auto-merge-app-pk
845+
azure-client-id: ${{ vars.GH_APP_AZURE_CLIENT_ID_CI_AUTO_MERGE }}
846+
azure-tenant-id: ${{ secrets.LPC_AZ_TENANT_ID }}
847+
857848
- if: contains(steps.PR.outputs.pr_labels, 'auto-merge-after-CI')
858849
name: Get PR label timeline data
859850
# 'auto-merge-after-CI' must be within the last 100 labels added (could be increased to 250 if needed)

.github/workflows/commit_verification.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# - Transient commits (prefix: "transient: ") must have zero net effect
55
# - Automated commits (prefix: "x: <command>") must match command output
6-
# - Posts a summary comment categorizing commits for reviewers
6+
# - Uploads a workflow artifact with verification status and a comment to be posted on the PR
77

88
name: Commit Verification
99

@@ -18,7 +18,6 @@ concurrency:
1818

1919
permissions:
2020
contents: read
21-
pull-requests: write
2221

2322
env:
2423
TRANSIENT_PREFIX: "transient: "
@@ -67,6 +66,7 @@ jobs:
6766
else
6867
echo "has_special=false" >> "$GITHUB_OUTPUT"
6968
echo "No transient or automated commits found"
69+
echo "No transient or automated commits found; this comment should never be posted" > comment_body.md
7070
fi
7171
7272
- name: Verify commits
@@ -100,26 +100,22 @@ jobs:
100100
# Save to file (GitHub Actions has issues with multiline outputs)
101101
echo "$COMMENT" > comment_body.md
102102
103-
- name: Find existing comment
104-
if: steps.check.outputs.has_special == 'true'
105-
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4
106-
id: find-comment
107-
with:
108-
issue-number: ${{ github.event.pull_request.number }}
109-
comment-author: 'github-actions[bot]'
110-
body-includes: 'Commit Verification Summary'
111-
112-
- name: Post or update comment
113-
if: steps.check.outputs.has_special == 'true'
114-
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v4
115-
with:
116-
comment-id: ${{ steps.find-comment.outputs.comment-id }}
117-
issue-number: ${{ github.event.pull_request.number }}
118-
body-path: comment_body.md
119-
edit-mode: replace
120-
121-
- name: Set job status
122-
if: steps.check.outputs.has_special == 'true' && steps.verify.outputs.success == 'false'
103+
- name: Prepare bridge outputs
123104
run: |
124-
echo "::error::Commit verification failed. See PR comment for details."
125-
exit 1
105+
jq -n \
106+
--arg has_special "${{ steps.check.outputs.has_special }}" \
107+
--arg success "${{ steps.verify.outputs.success }}" \
108+
'{
109+
has_special: $has_special,
110+
success: $success,
111+
}' > bridge-outputs.json
112+
113+
- name: Emit bridge artifact
114+
uses: leanprover-community/privilege-escalation-bridge/emit@d3bd99c50a4cf8c5350a211e8e3ba07ac19067d8 # v1.1.0
115+
with:
116+
artifact: workflow-data
117+
outputs_file: bridge-outputs.json
118+
include_event: minimal
119+
files: |
120+
comment_body.md
121+
retention_days: 5
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Commit Verification CI (workflow run)
2+
# Verifies transient and automated commits in PRs
3+
#
4+
# - Downloads the workflow artifact uploaded by commit_verification.yml
5+
# - Posts a summary comment categorizing commits for reviewers
6+
7+
name: Commit Verification (workflow_run)
8+
9+
on:
10+
workflow_run:
11+
workflows: ["Commit Verification"]
12+
types:
13+
- completed
14+
15+
permissions:
16+
actions: read
17+
contents: read
18+
pull-requests: write
19+
20+
jobs:
21+
verify:
22+
name: Verify Transient and Automated Commits
23+
runs-on: ubuntu-latest
24+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
25+
steps:
26+
- name: Consume bridge artifact
27+
id: bridge
28+
uses: leanprover-community/privilege-escalation-bridge/consume@d3bd99c50a4cf8c5350a211e8e3ba07ac19067d8 # v1.1.0
29+
with:
30+
token: ${{ github.token }}
31+
artifact: workflow-data
32+
source_workflow: Commit Verification
33+
require_event: pull_request
34+
fail_on_missing: false
35+
extract: |
36+
pr_number=meta.pr_number
37+
has_special=outputs.has_special
38+
success=outputs.success
39+
40+
- name: Find existing comment
41+
if: steps.bridge.outputs.has_special == 'true'
42+
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4
43+
id: find-comment
44+
with:
45+
issue-number: ${{ steps.bridge.outputs.pr_number }}
46+
comment-author: 'github-actions[bot]'
47+
body-includes: 'Commit Verification Summary'
48+
49+
- name: Post or update comment
50+
if: steps.bridge.outputs.has_special == 'true'
51+
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v4
52+
with:
53+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
54+
issue-number: ${{ steps.bridge.outputs.pr_number }}
55+
body-path: .bridge/comment_body.md
56+
edit-mode: replace
57+
58+
- name: Set job status
59+
if: steps.bridge.outputs.has_special == 'true' && steps.bridge.outputs.success == 'false'
60+
run: |
61+
echo "::error::Commit verification failed. See PR comment for details."
62+
exit 1

Archive/Hairer.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Junyan Xu
66
-/
77
import Mathlib.Algebra.MvPolynomial.Funext
88
import Mathlib.Analysis.Analytic.Polynomial
9-
import Mathlib.Analysis.Analytic.Uniqueness
109
import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff
11-
import Mathlib.LinearAlgebra.Dual.Lemmas
10+
import Mathlib.RingTheory.Algebraic.Integral
1211
import Mathlib.RingTheory.MvPolynomial.Basic
1312
import Mathlib.Topology.Algebra.MvPolynomial
1413

Archive/Sensitivity.lean

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,9 @@ Notations:
5454

5555

5656
/-- The hypercube in dimension `n`. -/
57-
def Q (n : ℕ) :=
57+
abbrev Q (n : ℕ) :=
5858
Fin n → Bool
5959

60-
instance (n) : Inhabited (Q n) := inferInstanceAs (Inhabited (Fin n → Bool))
61-
62-
set_option backward.inferInstanceAs.wrap false in
63-
instance (n) : Fintype (Q n) := inferInstanceAs (Fintype (Fin n → Bool))
64-
6560
/-- The projection from `Q n.succ` to `Q n` forgetting the first value
6661
(i.e. the image of zero). -/
6762
def π {n : ℕ} : Q n.succ → Q n := fun p => p ∘ Fin.succ
@@ -80,7 +75,7 @@ instance : Unique (Q 0) :=
8075
⟨⟨fun _ => true⟩, by intro; ext x; fin_cases x⟩
8176

8277
/-- `Q n` has 2^n elements. -/
83-
theorem card : card (Q n) = 2 ^ n := by simp [Q]
78+
theorem card : card (Q n) = 2 ^ n := by simp
8479

8580
/-! Until the end of this namespace, `n` will be an implicit argument (still
8681
a natural number). -/
@@ -210,7 +205,7 @@ theorem duality (p q : Q n) : ε p (e q) = if p = q then 1 else 0 := by
210205
all_goals
211206
simp only [Bool.cond_true, Bool.cond_false, LinearMap.fst_apply, LinearMap.snd_apply,
212207
LinearMap.comp_apply, IH]
213-
congr 1; rw [Q.succ_n_eq]; simp [hp, hq]
208+
congr 1; simp [Q.succ_n_eq, hp, hq]
214209

215210
/-- Any vector in `V n` annihilated by all `ε p`'s is zero. -/
216211
theorem epsilon_total {v : V n} (h : ∀ p : Q n, (ε p) v = 0) : v = 0 := by

Mathlib.lean

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,7 @@ public import Mathlib.Analysis.InnerProductSpace.Projection.Submodule
19521952
public import Mathlib.Analysis.InnerProductSpace.Rayleigh
19531953
public import Mathlib.Analysis.InnerProductSpace.Reproducing
19541954
public import Mathlib.Analysis.InnerProductSpace.Semisimple
1955+
public import Mathlib.Analysis.InnerProductSpace.SingularValues
19551956
public import Mathlib.Analysis.InnerProductSpace.Spectrum
19561957
public import Mathlib.Analysis.InnerProductSpace.StandardSubspace
19571958
public import Mathlib.Analysis.InnerProductSpace.StarOrder
@@ -2156,40 +2157,22 @@ public import Mathlib.Analysis.Normed.Unbundled.SpectralNorm
21562157
public import Mathlib.Analysis.NormedSpace.Alternating.Basic
21572158
public import Mathlib.Analysis.NormedSpace.Alternating.Curry
21582159
public import Mathlib.Analysis.NormedSpace.Alternating.Uncurry.Fin
2159-
public import Mathlib.Analysis.NormedSpace.BallAction
21602160
public import Mathlib.Analysis.NormedSpace.ConformalLinearMap
21612161
public import Mathlib.Analysis.NormedSpace.Connected
2162-
public import Mathlib.Analysis.NormedSpace.DualNumber
21632162
public import Mathlib.Analysis.NormedSpace.ENormedSpace
21642163
public import Mathlib.Analysis.NormedSpace.Extend
21652164
public import Mathlib.Analysis.NormedSpace.Extr
2166-
public import Mathlib.Analysis.NormedSpace.FunctionSeries
21672165
public import Mathlib.Analysis.NormedSpace.HahnBanach.Extension
21682166
public import Mathlib.Analysis.NormedSpace.HahnBanach.SeparatingDual
21692167
public import Mathlib.Analysis.NormedSpace.HahnBanach.Separation
2170-
public import Mathlib.Analysis.NormedSpace.HomeomorphBall
2171-
public import Mathlib.Analysis.NormedSpace.IndicatorFunction
2172-
public import Mathlib.Analysis.NormedSpace.Int
21732168
public import Mathlib.Analysis.NormedSpace.MStructure
21742169
public import Mathlib.Analysis.NormedSpace.Multilinear.Basic
21752170
public import Mathlib.Analysis.NormedSpace.Multilinear.Curry
21762171
public import Mathlib.Analysis.NormedSpace.MultipliableUniformlyOn
21772172
public import Mathlib.Analysis.NormedSpace.Normalize
2178-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics
2179-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
2180-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear
2181-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
2182-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
2183-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm
2184-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
2185-
public import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
21862173
public import Mathlib.Analysis.NormedSpace.PiTensorProduct.InjectiveSeminorm
21872174
public import Mathlib.Analysis.NormedSpace.PiTensorProduct.ProjectiveSeminorm
2188-
public import Mathlib.Analysis.NormedSpace.Pointwise
2189-
public import Mathlib.Analysis.NormedSpace.RCLike
2190-
public import Mathlib.Analysis.NormedSpace.Real
21912175
public import Mathlib.Analysis.NormedSpace.RieszLemma
2192-
public import Mathlib.Analysis.NormedSpace.SphereNormEquiv
21932176
public import Mathlib.Analysis.ODE.Basic
21942177
public import Mathlib.Analysis.ODE.Gronwall
21952178
public import Mathlib.Analysis.ODE.PicardLindelof
@@ -3266,6 +3249,7 @@ public import Mathlib.CategoryTheory.Sites.Point.Skyscraper
32663249
public import Mathlib.CategoryTheory.Sites.Precoverage
32673250
public import Mathlib.CategoryTheory.Sites.PrecoverageToGrothendieck
32683251
public import Mathlib.CategoryTheory.Sites.Preserves
3252+
public import Mathlib.CategoryTheory.Sites.PreservesLimits
32693253
public import Mathlib.CategoryTheory.Sites.PreservesLocallyBijective
32703254
public import Mathlib.CategoryTheory.Sites.PreservesSheafification
32713255
public import Mathlib.CategoryTheory.Sites.Pretopology
@@ -4054,7 +4038,6 @@ public import Mathlib.Data.Nat.NthRoot.Defs
40544038
public import Mathlib.Data.Nat.Order.Lemmas
40554039
public import Mathlib.Data.Nat.PSub
40564040
public import Mathlib.Data.Nat.Pairing
4057-
public import Mathlib.Data.Nat.PartENat
40584041
public import Mathlib.Data.Nat.Periodic
40594042
public import Mathlib.Data.Nat.PowModTotient
40604043
public import Mathlib.Data.Nat.Prime.Basic
@@ -4275,10 +4258,6 @@ public import Mathlib.Data.ZMod.QuotientRing
42754258
public import Mathlib.Data.ZMod.Units
42764259
public import Mathlib.Data.ZMod.ValMinAbs
42774260
public import Mathlib.Deprecated.Aliases
4278-
public import Mathlib.Deprecated.Estimator
4279-
public import Mathlib.Deprecated.MLList.BestFirst
4280-
public import Mathlib.Deprecated.Order
4281-
public import Mathlib.Deprecated.RingHom
42824261
public import Mathlib.Deprecated.Sort
42834262
public import Mathlib.Dynamics.BirkhoffSum.Average
42844263
public import Mathlib.Dynamics.BirkhoffSum.Basic
@@ -4658,6 +4637,7 @@ public import Mathlib.GroupTheory.SpecificGroups.Alternating.Centralizer
46584637
public import Mathlib.GroupTheory.SpecificGroups.Alternating.KleinFour
46594638
public import Mathlib.GroupTheory.SpecificGroups.Alternating.MaximalSubgroups
46604639
public import Mathlib.GroupTheory.SpecificGroups.Cyclic
4640+
public import Mathlib.GroupTheory.SpecificGroups.Cyclic.Basic
46614641
public import Mathlib.GroupTheory.SpecificGroups.Dihedral
46624642
public import Mathlib.GroupTheory.SpecificGroups.KleinFour
46634643
public import Mathlib.GroupTheory.SpecificGroups.Quaternion
@@ -6774,7 +6754,6 @@ public import Mathlib.RingTheory.Valuation.Extension
67746754
public import Mathlib.RingTheory.Valuation.FiniteField
67756755
public import Mathlib.RingTheory.Valuation.Integers
67766756
public import Mathlib.RingTheory.Valuation.Integral
6777-
public import Mathlib.RingTheory.Valuation.IntegrallyClosed
67786757
public import Mathlib.RingTheory.Valuation.LocalSubring
67796758
public import Mathlib.RingTheory.Valuation.Minpoly
67806759
public import Mathlib.RingTheory.Valuation.PrimeMultiplicity
@@ -7216,6 +7195,7 @@ public import Mathlib.Topology.Algebra.Group.CompactOpen
72167195
public import Mathlib.Topology.Algebra.Group.Defs
72177196
public import Mathlib.Topology.Algebra.Group.Extension
72187197
public import Mathlib.Topology.Algebra.Group.GroupTopology
7198+
public import Mathlib.Topology.Algebra.Group.Matrix
72197199
public import Mathlib.Topology.Algebra.Group.OpenMapping
72207200
public import Mathlib.Topology.Algebra.Group.Pointwise
72217201
public import Mathlib.Topology.Algebra.Group.Quotient
@@ -7277,7 +7257,6 @@ public import Mathlib.Topology.Algebra.Module.PerfectSpace
72777257
public import Mathlib.Topology.Algebra.Module.PointwiseConvergence
72787258
public import Mathlib.Topology.Algebra.Module.Simple
72797259
public import Mathlib.Topology.Algebra.Module.Star
7280-
public import Mathlib.Topology.Algebra.Module.StrongDual
72817260
public import Mathlib.Topology.Algebra.Module.StrongTopology
72827261
public import Mathlib.Topology.Algebra.Module.TransferInstance
72837262
public import Mathlib.Topology.Algebra.Module.UniformConvergence
@@ -7738,8 +7717,10 @@ public import Mathlib.Topology.Sets.Opens
77387717
public import Mathlib.Topology.Sets.Order
77397718
public import Mathlib.Topology.Sets.VietorisTopology
77407719
public import Mathlib.Topology.Sheaves.Abelian
7720+
public import Mathlib.Topology.Sheaves.AddCommGrpCat
77417721
public import Mathlib.Topology.Sheaves.Alexandrov
77427722
public import Mathlib.Topology.Sheaves.CommRingCat
7723+
public import Mathlib.Topology.Sheaves.Flasque
77437724
public import Mathlib.Topology.Sheaves.Forget
77447725
public import Mathlib.Topology.Sheaves.Functors
77457726
public import Mathlib.Topology.Sheaves.Init

Mathlib/Algebra/DirectSum/Basic.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ lemma of_apply {i : ι} (j : ι) (x : β i) : of β i x j = if h : i = j then Eq
136136

137137
theorem mk_apply_of_mem {s : Finset ι} {f : ∀ i : (↑s : Set ι), β i.val} {n : ι} (hn : n ∈ s) :
138138
mk β s f n = f ⟨n, hn⟩ := by
139-
dsimp only [Finset.coe_sort_coe, mk, AddMonoidHom.coe_mk, ZeroHom.coe_mk, DFinsupp.mk_apply]
140-
rw [dif_pos hn]
139+
dsimp only [Finset.coe_sort_coe, mk, AddMonoidHom.coe_mk, ZeroHom.coe_mk]
140+
-- Previously, `DFinsupp.mk_apply` was in the `dsimp only`
141+
rw [DFinsupp.mk_apply, dif_pos hn]
141142

142143
theorem mk_apply_of_notMem {s : Finset ι} {f : ∀ i : (↑s : Set ι), β i.val} {n : ι} (hn : n ∉ s) :
143144
mk β s f n = 0 := by
144-
dsimp only [Finset.coe_sort_coe, mk, AddMonoidHom.coe_mk, ZeroHom.coe_mk, DFinsupp.mk_apply]
145-
rw [dif_neg hn]
145+
dsimp only [Finset.coe_sort_coe, mk, AddMonoidHom.coe_mk, ZeroHom.coe_mk]
146+
-- Previously, `DFinsupp.mk_apply` was in the `dsimp only`
147+
rw [DFinsupp.mk_apply, dif_neg hn]
146148

147149
@[simp]
148150
theorem support_zero [∀ (i : ι) (x : β i), Decidable (x ≠ 0)] : (0 : ⨁ i, β i).support = ∅ :=

Mathlib/Algebra/Field/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ instance (priority := 100) Field.toGrindField : Lean.Grind.Field K :=
178178
· rw [← Int.natCast_add_one, zpow_natCast, zpow_natCast, pow_succ]
179179
· rw [zpow_add_one₀ h]
180180
zpow_neg a n := by simp
181-
zero_ne_one := zero_ne_one' K }
181+
zero_ne_one := zero_ne_one }
182182

183183
attribute [local simp] mul_assoc mul_comm mul_left_comm
184184

0 commit comments

Comments
 (0)