Skip to content

Commit 0f18102

Browse files
kim-emjcommelinleanprover-community-mathlib4-bot
committed
chore: bump toolchain to v4.16.0-rc1, and merge bump/v4.16.0 (leanprover-community#20464)
Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com>
1 parent 9837ca9 commit 0f18102

File tree

69 files changed

+187
-542
lines changed

Some content is hidden

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

69 files changed

+187
-542
lines changed

Archive/Imo/Imo2024Q5.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ lemma Path.tail_induction {motive : Path N → Prop} (ind : ∀ p, motive p.tail
302302
case cons head tail hi =>
303303
by_cases h : (p'.cells[1]'p'.one_lt_length_cells).1 = 0
304304
· refine ind p' ?_
305-
simp_rw [Path.tail, if_pos h, List.tail_cons]
305+
simp_rw [Path.tail, if_pos h, p', List.tail_cons]
306306
exact hi _ _ _ _
307307
· exact base p' h
308308

Mathlib.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4841,7 +4841,6 @@ import Mathlib.Tactic.DefEqTransformations
48414841
import Mathlib.Tactic.DeprecateTo
48424842
import Mathlib.Tactic.DeriveCountable
48434843
import Mathlib.Tactic.DeriveFintype
4844-
import Mathlib.Tactic.DeriveToExpr
48454844
import Mathlib.Tactic.DeriveTraversable
48464845
import Mathlib.Tactic.Eqns
48474846
import Mathlib.Tactic.Eval

Mathlib/Algebra/BigOperators/Fin.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ theorem prod_Ioi_succ {M : Type*} [CommMonoid M] {n : ℕ} (i : Fin n) (v : Fin
162162

163163
@[to_additive]
164164
theorem prod_congr' {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b) :
165-
(∏ i : Fin a, f (cast h i)) = ∏ i : Fin b, f i := by
165+
(∏ i : Fin a, f (i.cast h)) = ∏ i : Fin b, f i := by
166166
subst h
167167
congr
168168

Mathlib/Algebra/BigOperators/Group/List.lean

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
55
-/
66
import Mathlib.Algebra.Divisibility.Basic
77
import Mathlib.Algebra.Group.Int
8-
import Mathlib.Data.List.Lemmas
98
import Mathlib.Data.List.Dedup
109
import Mathlib.Data.List.Flatten
1110
import Mathlib.Data.List.Pairwise
@@ -637,10 +636,6 @@ end MonoidHom
637636

638637
end MonoidHom
639638

640-
set_option linter.deprecated false in
641-
@[simp, deprecated "No deprecation message was provided." (since := "2024-10-17")]
642-
lemma Nat.sum_eq_listSum (l : List ℕ) : Nat.sum l = l.sum := rfl
643-
644639
namespace List
645640

646641
lemma length_sigma {σ : α → Type*} (l₁ : List α) (l₂ : ∀ a, List (σ a)) :

Mathlib/Algebra/MvPolynomial/SchwartzZippel.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ lemma schwartz_zippel_sup_sum :
146146
calc
147147
#{x₀ ∈ S 0 | eval (cons x₀ xₜ) p = 0} ≤ #pₓ.roots.toFinset := by
148148
gcongr
149-
simp (config := { contextual := true }) [subset_iff, eval_eq_eval_mv_eval', pₓ, hpₓ₀]
149+
simp +contextual [subset_iff, eval_eq_eval_mv_eval', pₓ, hpₓ₀, p']
150150
_ ≤ Multiset.card pₓ.roots := pₓ.roots.toFinset_card_le
151151
_ ≤ pₓ.natDegree := pₓ.card_roots'
152152
_ = k := hpₓdeg

Mathlib/AlgebraicGeometry/EllipticCurve/NormalForms.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ theorem toCharThreeNF_spec_of_b₂_ne_zero (hb₂ : W.b₂ ≠ 0) :
425425
constructor
426426
· simp
427427
· simp
428-
· field_simp [W.toShortNFOfCharThree_a₂ ▸ hb₂]
428+
· have ha₂ : W'.a₂ ≠ 0 := W.toShortNFOfCharThree_a₂ ▸ hb₂
429+
field_simp [ha₂]
429430
linear_combination (W'.a₄ * W'.a₂ ^ 2 + W'.a₄ ^ 2) * CharP.cast_eq_zero F 3
430431

431432
theorem toCharThreeNF_spec_of_b₂_eq_zero (hb₂ : W.b₂ = 0) :

Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,10 @@ def extendMiddle (c : OrderedFinpartition n) (k : Fin c.length) : OrderedFinpart
401401
rcases eq_or_ne (c.index i) k with rfl | hi
402402
· have A : update c.partSize (c.index i) (c.partSize (c.index i) + 1) (c.index i) =
403403
c.partSize (c.index i) + 1 := by simp
404-
exact ⟨c.index i, cast A.symm (succ (c.invEmbedding i)), by simp⟩
404+
exact ⟨c.index i, (succ (c.invEmbedding i)).cast A.symm , by simp⟩
405405
· have A : update c.partSize k (c.partSize k + 1) (c.index i) = c.partSize (c.index i) := by
406406
simp [hi]
407-
exact ⟨c.index i, cast A.symm (c.invEmbedding i), by simp [hi]⟩
407+
exact ⟨c.index i, (c.invEmbedding i).cast A.symm, by simp [hi]⟩
408408

409409
lemma index_extendMiddle_zero (c : OrderedFinpartition n) (i : Fin c.length) :
410410
(c.extendMiddle i).index 0 = i := by
@@ -678,8 +678,8 @@ def extendEquiv (n : ℕ) :
678678
· simp only [↓reduceDIte, comp_apply]
679679
rcases eq_or_ne j 0 with rfl | hj
680680
· simpa using c.emb_zero
681-
· let j' := Fin.pred (cast B.symm j) (by simpa using hj)
682-
have : j = cast B (succ j') := by simp [j']
681+
· let j' := Fin.pred (j.cast B.symm) (by simpa using hj)
682+
have : j = (succ j').cast B := by simp [j']
683683
simp only [this, coe_cast, val_succ, cast_mk, cases_succ', comp_apply, succ_mk,
684684
Nat.succ_eq_add_one, succ_pred]
685685
rfl

Mathlib/Analysis/Convex/Continuous.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ lemma ConvexOn.lipschitzOnWith_of_abs_le (hf : ConvexOn ℝ (ball x₀ r) f) (h
5151
ε * (f x - f y) ≤ ‖x - y‖ * (f z - f x) := by
5252
rw [mul_sub, mul_sub, sub_le_sub_iff, ← add_mul]
5353
have h := hf.2 hy' hz (by positivity) (by positivity) hab
54-
field_simp [← hxyz, a, b, ← mul_div_right_comm] at h
54+
rw [← hxyz] at h
55+
field_simp [a, b, ← mul_div_right_comm] at h
5556
rwa [← le_div_iff₀' (by positivity), add_comm (_ * _)]
5657
_ ≤ _ := by
5758
rw [sub_eq_add_neg (f _), two_mul]

Mathlib/CategoryTheory/Galois/Decomposition.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,14 @@ lemma connected_component_unique {X A B : C} [IsConnected A] [IsConnected B] (a
154154
have : IsIso v := IsConnected.noTrivialComponent Y v hn
155155
use (asIso u).symm ≪≫ asIso v
156156
have hu : G.map u y = a := by
157-
simp only [y, e, ← PreservesPullback.iso_hom_fst G, fiberPullbackEquiv, Iso.toEquiv_comp,
158-
Equiv.symm_trans_apply, Iso.toEquiv_symm_fun, types_comp_apply, inv_hom_id_apply]
157+
simp only [u, G, y, e, ← PreservesPullback.iso_hom_fst G, fiberPullbackEquiv,
158+
Iso.toEquiv_comp, Equiv.symm_trans_apply, Iso.toEquiv_symm_fun, types_comp_apply,
159+
inv_hom_id_apply]
159160
erw [Types.pullbackIsoPullback_inv_fst_apply (F.map i) (F.map j)]
160161
have hv : G.map v y = b := by
161-
simp only [y, e, ← PreservesPullback.iso_hom_snd G, fiberPullbackEquiv, Iso.toEquiv_comp,
162-
Equiv.symm_trans_apply, Iso.toEquiv_symm_fun, types_comp_apply, inv_hom_id_apply]
162+
simp only [v, G, y, e, ← PreservesPullback.iso_hom_snd G, fiberPullbackEquiv,
163+
Iso.toEquiv_comp, Equiv.symm_trans_apply, Iso.toEquiv_symm_fun, types_comp_apply,
164+
inv_hom_id_apply]
163165
erw [Types.pullbackIsoPullback_inv_snd_apply (F.map i) (F.map j)]
164166
rw [← hu, ← hv]
165167
show (F.toPrefunctor.map u ≫ F.toPrefunctor.map _) y = F.toPrefunctor.map v y

Mathlib/Computability/TMToPartrec.lean

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ theorem move_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁
12381238
swap
12391239
· rw [Function.update_of_ne h₁.symm, List.reverseAux_nil]
12401240
refine TransGen.head' rfl ?_
1241-
simp only [TM2.step, Option.mem_def, TM2.stepAux, Option.elim, ne_eq]
1241+
rw [tr]; simp only [pop', TM2.stepAux]
12421242
revert e; cases' S k₁ with a Sk <;> intro e
12431243
· cases e
12441244
rfl
@@ -1248,7 +1248,7 @@ theorem move_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁
12481248
simp only [e]
12491249
rfl
12501250
· refine TransGen.head rfl ?_
1251-
simp only [TM2.step, Option.mem_def, TM2.stepAux, Option.elim, ne_eq, List.reverseAux_cons]
1251+
rw [tr]; simp only [pop', Option.elim, TM2.stepAux, push']
12521252
cases' e₁ : S k₁ with a' Sk <;> rw [e₁, splitAtPred] at e
12531253
· cases e
12541254
cases e₂ : p a' <;> simp only [e₂, cond] at e
@@ -1273,16 +1273,15 @@ theorem move₂_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k
12731273
⟨some q, none, update (update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂)⟩ := by
12741274
refine (move_ok h₁.1 e).trans (TransGen.head rfl ?_)
12751275
simp only [TM2.step, Option.mem_def, TM2.stepAux, id_eq, ne_eq, Option.elim]
1276-
cases o <;> simp only [Option.elim, id]
1277-
· simp only [TM2.stepAux, Option.isSome, cond_false]
1278-
convert move_ok h₁.2.1.symm (splitAtPred_false _) using 2
1276+
cases o <;> simp only [Option.elim] <;> rw [tr]
1277+
<;> simp only [id, TM2.stepAux, Option.isSome, cond_true, cond_false]
1278+
· convert move_ok h₁.2.1.symm (splitAtPred_false _) using 2
12791279
simp only [Function.update_comm h₁.1, Function.update_idem]
12801280
rw [show update S rev [] = S by rw [← h₂, Function.update_eq_self]]
12811281
simp only [Function.update_of_ne h₁.2.2.symm, Function.update_of_ne h₁.2.1,
12821282
Function.update_of_ne h₁.1.symm, List.reverseAux_eq, h₂, Function.update_self,
12831283
List.append_nil, List.reverse_reverse]
1284-
· simp only [TM2.stepAux, Option.isSome, cond_true]
1285-
convert move_ok h₁.2.1.symm (splitAtPred_false _) using 2
1284+
· convert move_ok h₁.2.1.symm (splitAtPred_false _) using 2
12861285
simp only [h₂, Function.update_comm h₁.1, List.reverseAux_eq, Function.update_self,
12871286
List.append_nil, Function.update_idem]
12881287
rw [show update S rev [] = S by rw [← h₂, Function.update_eq_self]]
@@ -1293,7 +1292,7 @@ theorem clear_ok {p k q s L₁ o L₂} {S : K' → List Γ'} (e : splitAtPred p
12931292
Reaches₁ (TM2.step tr) ⟨some (Λ'.clear p k q), s, S⟩ ⟨some q, o, update S k L₂⟩ := by
12941293
induction' L₁ with a L₁ IH generalizing S s
12951294
· refine TransGen.head' rfl ?_
1296-
simp only [TM2.step, Option.mem_def, TM2.stepAux, Option.elim]
1295+
rw [tr]; simp only [pop', TM2.step, Option.mem_def, TM2.stepAux, Option.elim]
12971296
revert e; cases' S k with a Sk <;> intro e
12981297
· cases e
12991298
rfl
@@ -1303,7 +1302,7 @@ theorem clear_ok {p k q s L₁ o L₂} {S : K' → List Γ'} (e : splitAtPred p
13031302
rcases e with ⟨e₁, e₂⟩
13041303
rw [e₁, e₂]
13051304
· refine TransGen.head rfl ?_
1306-
simp only [TM2.step, Option.mem_def, TM2.stepAux, Option.elim]
1305+
rw [tr]; simp only [pop', TM2.step, Option.mem_def, TM2.stepAux, Option.elim]
13071306
cases' e₁ : S k with a' Sk <;> rw [e₁, splitAtPred] at e
13081307
· cases e
13091308
cases e₂ : p a' <;> simp only [e₂, cond] at e
@@ -1322,9 +1321,10 @@ theorem copy_ok (q s a b c d) :
13221321
· refine TransGen.single ?_
13231322
simp
13241323
refine TransGen.head rfl ?_
1324+
rw [tr]
13251325
simp only [TM2.step, Option.mem_def, TM2.stepAux, elim_rev, List.head?_cons, Option.isSome_some,
13261326
List.tail_cons, elim_update_rev, ne_eq, Function.update_of_ne, elim_main, elim_update_main,
1327-
elim_stack, elim_update_stack, cond_true, List.reverseAux_cons]
1327+
elim_stack, elim_update_stack, cond_true, List.reverseAux_cons, pop', push']
13281328
exact IH _ _ _
13291329

13301330
theorem trPosNum_natEnd : ∀ (n), ∀ x ∈ trPosNum n, natEnd x = false
@@ -1358,6 +1358,7 @@ theorem head_main_ok {q s L} {c d : List Γ'} :
13581358
(splitAtPred_eq _ _ (trNat L.headI) o (trList L.tail) (trNat_natEnd _) ?_)).trans
13591359
(TransGen.head rfl (TransGen.head rfl ?_))
13601360
· cases L <;> simp [o]
1361+
rw [tr]
13611362
simp only [TM2.step, Option.mem_def, TM2.stepAux, elim_update_main, elim_rev, elim_update_rev,
13621363
Function.update_self, trList]
13631364
rw [if_neg (show o ≠ some Γ'.consₗ by cases L <;> simp [o])]
@@ -1375,6 +1376,7 @@ theorem head_stack_ok {q s L₁ L₂ L₃} :
13751376
(move_ok (by decide)
13761377
(splitAtPred_eq _ _ [] (some Γ'.consₗ) L₃ (by rintro _ ⟨⟩) ⟨rfl, rfl⟩))
13771378
(TransGen.head rfl (TransGen.head rfl ?_))
1379+
rw [tr]
13781380
simp only [TM2.step, Option.mem_def, TM2.stepAux, ite_true, id_eq, trList, List.nil_append,
13791381
elim_update_stack, elim_rev, List.reverseAux_nil, elim_update_rev, Function.update_self,
13801382
List.headI_nil, trNat_default]
@@ -1428,7 +1430,8 @@ theorem succ_ok {q s n} {c d : List Γ'} :
14281430
simp [PosNum.succ, trPosNum]
14291431
rfl
14301432
· refine ⟨l₁, _, some Γ'.bit0, rfl, TransGen.single ?_⟩
1431-
simp only [TM2.step, TM2.stepAux, elim_main, elim_update_main, ne_eq, Function.update_of_ne,
1433+
simp only [TM2.step]; rw [tr]
1434+
simp only [TM2.stepAux, pop', elim_main, elim_update_main, ne_eq, Function.update_of_ne,
14321435
elim_rev, elim_update_rev, Function.update_self, Option.mem_def, Option.some.injEq]
14331436
rfl
14341437

@@ -1445,11 +1448,9 @@ theorem pred_ok (q₁ q₂ s v) (c d : List Γ') : ∃ s',
14451448
simp only [TM2.step, trList, trNat.eq_1, trNum, Nat.cast_succ, Num.add_one, Num.succ,
14461449
List.tail_cons, List.headI_cons]
14471450
cases' (n : Num) with a
1448-
· simp only [trPosNum, List.singleton_append, List.nil_append]
1451+
· simp only [trPosNum, Num.succ', List.singleton_append, List.nil_append]
14491452
refine TransGen.head rfl ?_
1450-
simp only [Option.mem_def, TM2.stepAux, elim_main, List.head?_cons, Option.some.injEq,
1451-
decide_false, List.tail_cons, elim_update_main, ne_eq, Function.update_of_ne, elim_rev,
1452-
elim_update_rev, natEnd, Function.update_self, cond_true, cond_false]
1453+
rw [tr]; simp only [pop', TM2.stepAux, cond_false]
14531454
convert unrev_ok using 2
14541455
simp
14551456
simp only [Num.succ']
@@ -1555,13 +1556,11 @@ theorem tr_ret_respects (k v s) : ∃ b₂,
15551556
by_cases h : v.headI = 0 <;> simp only [h, ite_true, ite_false] at this ⊢
15561557
· obtain ⟨c, h₁, h₂⟩ := IH v.tail (trList v).head?
15571558
refine ⟨c, h₁, TransGen.head rfl ?_⟩
1558-
simp only [Option.mem_def, TM2.stepAux, trContStack, contStack, elim_main, this, cond_true,
1559-
elim_update_main]
1559+
rw [trCont, tr]; simp only [pop', TM2.stepAux, elim_main, this, elim_update_main]
15601560
exact h₂
15611561
· obtain ⟨s', h₁, h₂⟩ := trNormal_respects f (Cont.fix f k) v.tail (some Γ'.cons)
15621562
refine ⟨_, h₁, TransGen.head rfl <| TransGen.trans ?_ h₂⟩
1563-
simp only [Option.mem_def, TM2.stepAux, elim_main, this.1, cond_false, elim_update_main,
1564-
trCont]
1563+
rw [trCont, tr]; simp only [pop', TM2.stepAux, elim_main, this.1]
15651564
convert clear_ok (splitAtPred_eq _ _ (trNat v.headI).tail (some Γ'.cons) _ _ _) using 2
15661565
· simp
15671566
convert rfl

0 commit comments

Comments
 (0)