Skip to content

Commit 0e8103c

Browse files
committed
Merge remote-tracking branch 'origin/master' into sg/new-mvcgen
2 parents c737d23 + 659e8bb commit 0e8103c

72 files changed

Lines changed: 331 additions & 354 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ jobs:
545545
GITHUB_TOKEN: ${{ secrets.RELEASE_INDEX_TOKEN }}
546546
- name: Generate mathlib nightly-testing app token
547547
id: mathlib-app-token
548-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
548+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
549549
continue-on-error: true
550550
with:
551551
app-id: ${{ secrets.MATHLIB_NIGHTLY_TESTING_APP_ID }}

.github/workflows/grove.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Download toolchain for this commit
6060
if: ${{ steps.should-run.outputs.should-run == 'true' }}
6161
id: download-toolchain
62-
uses: dawidd6/action-download-artifact@v11
62+
uses: dawidd6/action-download-artifact@v19
6363
with:
6464
commit: ${{ steps.workflow-info.outputs.sourceHeadSha }}
6565
workflow: ci.yml
@@ -147,7 +147,7 @@ jobs:
147147
# https://github.com/nwtgck/actions-netlify/issues/545
148148
# We work around by using a comment to post the latest link
149149
- name: "Comment on PR with preview links"
150-
uses: marocchino/sticky-pull-request-comment@v2
150+
uses: marocchino/sticky-pull-request-comment@v3
151151
if: ${{ steps.should-run.outputs.should-run == 'true' && steps.workflow-info.outputs.pullRequestNumber != '' }}
152152
with:
153153
number: ${{ env.PR_NUMBER }}

.github/workflows/pr-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Download artifact from the previous workflow.
3737
if: ${{ steps.workflow-info.outputs.pullRequestNumber != '' }}
3838
id: download-artifact
39-
uses: dawidd6/action-download-artifact@v11 # https://github.com/marketplace/actions/download-workflow-artifact
39+
uses: dawidd6/action-download-artifact@v19 # https://github.com/marketplace/actions/download-workflow-artifact
4040
with:
4141
run_id: ${{ github.event.workflow_run.id }}
4242
path: artifacts
@@ -175,7 +175,7 @@ jobs:
175175
- name: Generate GitHub App token for Lean PR comments
176176
if: ${{ steps.workflow-info.outputs.pullRequestNumber != '' }}
177177
id: mathlib-comment-token
178-
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
178+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
179179
with:
180180
app-id: ${{ secrets.MATHLIB_LEAN_PR_TESTING_APP_ID }}
181181
private-key: ${{ secrets.MATHLIB_LEAN_PR_TESTING_PRIVATE_KEY }}
@@ -414,7 +414,7 @@ jobs:
414414
- name: Generate GitHub App token for leanprover-community repos
415415
if: steps.workflow-info.outputs.pullRequestNumber != '' && steps.ready.outputs.mathlib_ready == 'true'
416416
id: mathlib-app-token
417-
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
417+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
418418
with:
419419
app-id: ${{ secrets.MATHLIB_NIGHTLY_TESTING_APP_ID }}
420420
private-key: ${{ secrets.MATHLIB_NIGHTLY_TESTING_PRIVATE_KEY }}

src/Init/Control/Except.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ instance ExceptT.finally {m : Type u → Type v} {ε : Type u} [MonadFinally m]
330330
| (_, .error e) => pure (.error e) -- second error has precedence
331331
| (.error e, _) => pure (.error e)
332332

333+
set_option linter.checkUnivs false in
333334
instance [Monad m] [MonadAttach m] : MonadAttach (ExceptT ε m) where
334335
CanReturn x a := MonadAttach.CanReturn (m := m) x (.ok a)
335336
attach x := show m (Except ε _) from

src/Init/Control/Lawful/Instances.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace ExceptT
3232

3333
@[simp] theorem stM_eq [Monad m] : stM m (ExceptT ε m) α = Except ε α := rfl
3434

35+
set_option linter.checkUnivs false in
3536
@[simp, grind =] theorem run_mk (x : m (Except ε α)) : run (mk x : ExceptT ε m α) = x := rfl
3637

3738
@[simp, grind =] theorem run_pure [Monad m] (x : α) : run (pure x : ExceptT ε m α) = pure (Except.ok x) := rfl

src/Init/Data/Array/Lemmas.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4348,6 +4348,7 @@ theorem sum_toList [Add α] [Zero α] {as : Array α} : as.toList.sum = as.sum :
43484348
cases as
43494349
simp [Array.sum, List.sum]
43504350

4351+
set_option linter.defProp false in
43514352
@[deprecated sum_toList (since := "2026-01-14")]
43524353
def sum_eq_sum_toList := @sum_toList
43534354

src/Init/Data/Array/Subarray.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ def Subarray.start (xs : Subarray α) : Nat :=
6666
def Subarray.stop (xs : Subarray α) : Nat :=
6767
xs.internalRepresentation.stop
6868

69+
set_option linter.defProp false in
6970
@[always_inline, inline, expose, inherit_doc Internal.SubarrayData.start_le_stop]
7071
def Subarray.start_le_stop (xs : Subarray α) : xs.start ≤ xs.stop :=
7172
xs.internalRepresentation.start_le_stop
7273

74+
set_option linter.defProp false in
7375
@[always_inline, inline, expose, inherit_doc Internal.SubarrayData.stop_le_array_size]
7476
def Subarray.stop_le_array_size (xs : Subarray α) : xs.stop ≤ xs.array.size :=
7577
xs.internalRepresentation.stop_le_array_size

src/Init/Data/BitVec/Bitblast.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ structure DivModState.Lawful {w : Nat} (args : DivModArgs w) (qr : DivModState w
873873
hdiv : args.n.toNat >>> qr.wn = args.d.toNat * qr.q.toNat + qr.r.toNat
874874

875875
/-- A lawful DivModState implies `w > 0`. -/
876-
def DivModState.Lawful.hw {args : DivModArgs w} {qr : DivModState w}
876+
theorem DivModState.Lawful.hw {args : DivModArgs w} {qr : DivModState w}
877877
{h : DivModState.Lawful args qr} : 0 < w := by
878878
have hd := h.hdPos
879879
rcases w with rfl | w
@@ -891,7 +891,7 @@ def DivModState.init (w : Nat) : DivModState w := {
891891
}
892892

893893
/-- The initial state is lawful. -/
894-
def DivModState.lawful_init {w : Nat} (args : DivModArgs w) (hd : 0#w < args.d) :
894+
theorem DivModState.lawful_init {w : Nat} (args : DivModArgs w) (hd : 0#w < args.d) :
895895
DivModState.Lawful args (DivModState.init w) := by
896896
simp only [BitVec.DivModState.init]
897897
exact {
@@ -951,7 +951,7 @@ structure DivModState.Poised {w : Nat} (args : DivModArgs w) (qr : DivModState w
951951
In the shift subtract input, the dividend is at least one bit long (`wn > 0`), so
952952
the remainder has bits to be computed (`wr < w`).
953953
-/
954-
def DivModState.wr_lt_w {qr : DivModState w} (h : qr.Poised args) : qr.wr < w := by
954+
theorem DivModState.wr_lt_w {qr : DivModState w} (h : qr.Poised args) : qr.wr < w := by
955955
have hwrn := h.hwrn
956956
have hwn_lt := h.hwn_lt
957957
omega

src/Init/Data/Fin/Lemmas.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,6 @@ theorem coe_cast (h : n = m) (i : Fin n) : (i.cast h : Nat) = i := rfl
520520
@[simp, grind =] theorem cast_cast {k : Nat} (h : n = m) (h' : m = k) {i : Fin n} :
521521
(i.cast h).cast h' = i.cast (Eq.trans h h') := rfl
522522

523-
@[deprecated cast_cast (since := "2025-09-03")] abbrev cast_trans := @cast_cast
524-
525523
theorem castLE_of_eq {m n : Nat} (h : m = n) {h' : m ≤ n} : castLE h' = Fin.cast h := rfl
526524

527525
@[simp, grind =] theorem val_castAdd (m : Nat) (i : Fin n) : (castAdd m i : Nat) = i := rfl

src/Init/Data/Int/DivMod/Bootstrap.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,15 @@ where
111111
← Int.neg_neg (_-_), Int.neg_sub, Int.sub_sub_self, Int.add_right_comm]
112112
exact congrArg (fun x => -(ofNat x + 1)) (Nat.mod_add_div ..)
113113

114-
@[deprecated emod_add_mul_ediv (since := "2025-09-01")]
115-
def emod_add_ediv := @emod_add_mul_ediv
116-
117114
theorem emod_add_ediv_mul (a b : Int) : a % b + a / b * b = a := by
118115
rw [Int.mul_comm]; exact emod_add_mul_ediv ..
119116

120-
@[deprecated emod_add_ediv_mul (since := "2025-09-01")]
121-
def emod_add_ediv' := @emod_add_ediv_mul
122-
123117
theorem mul_ediv_add_emod (a b : Int) : b * (a / b) + a % b = a := by
124118
rw [Int.add_comm]; exact emod_add_mul_ediv ..
125119

126-
@[deprecated mul_ediv_add_emod (since := "2025-09-01")]
127-
def ediv_add_emod := @mul_ediv_add_emod
128-
129120
theorem ediv_mul_add_emod (a b : Int) : a / b * b + a % b = a := by
130121
rw [Int.mul_comm]; exact mul_ediv_add_emod ..
131122

132-
@[deprecated ediv_mul_add_emod (since := "2025-09-01")]
133-
def ediv_add_emod' := @ediv_mul_add_emod
134-
135123
theorem emod_def (a b : Int) : a % b = a - b * (a / b) := by
136124
rw [← Int.add_sub_cancel (a % b), emod_add_mul_ediv]
137125

0 commit comments

Comments
 (0)