Skip to content

Commit d568c8c

Browse files
Garmelonkim-emmathlib-nightly-testing[bot]leanprover-community-mathlib4-bot
committed
chore: bump toolchain to v4.31.0-rc1 (leanprover-community#39980)
Co-authored-by: Joscha <joscha@plugh.de> Co-authored-by: Kim Morrison <kim@tqft.net> Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com> Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com>
1 parent a694d67 commit d568c8c

2,518 files changed

Lines changed: 9035 additions & 4345 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
223223
- name: validate lake-manifest.json inputRevs
224224
# Only enforce this on the main mathlib4 repository, not on nightly-testing
225-
if: github.repository == 'leanprover-community/mathlib4'
225+
if: github.repository == 'leanprover-community/mathlib4' && github.ref_name != 'nightly-testing'
226226
shell: bash
227227
run: |
228228
cd pr-branch

Archive/Examples/IfNormalization/Result.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ We add some local simp lemmas so we can unfold the definitions of the normalizat
2424
attribute [local simp] normalized hasNestedIf hasConstantIf hasRedundantIf disjoint vars
2525
List.disjoint
2626

27+
set_option warning.simp.varHead false in
2728
attribute [local simp] apply_ite ite_eq_iff'
2829

2930
variable {b : Bool} {f : ℕ → Bool} {i : ℕ} {t e : IfExpr}

Archive/Imo/Imo1977Q6.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ theorem imo1977_q6 (f : ℕ+ → ℕ+) (h : ∀ n, f (f n) < f (n + 1)) : ∀ n,
4242
refine imo1977_q6_nat (fun m => if 0 < m then f m.toPNat' else 0) ?_ n
4343
intro x; cases x
4444
· simp
45-
· simpa using h _
45+
· simpa using! h _
4646
simpa

Archive/Imo/Imo1987Q1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def fixedPointsEquiv' :
8585
theorem main_fintype : ∑ k ∈ range (card α + 1), k * p α k = card α * (card α - 1)! := by
8686
have A : ∀ (k) (σ : fiber α k), card (fixedPoints (↑σ : Perm α)) = k := fun k σ => σ.2
8787
simpa [A, ← Fin.sum_univ_eq_sum_range, -card_ofFinset, Finset.card_univ, card_fixed_points,
88-
mul_comm] using card_congr (fixedPointsEquiv' α)
88+
mul_comm] using! card_congr (fixedPointsEquiv' α)
8989

9090
/-- Main statement for permutations of `Fin n`, a version that works for `n = 0`. -/
9191
theorem main₀ (n : ℕ) : ∑ k ∈ range (n + 1), k * p (Fin n) k = n * (n - 1)! := by

Archive/Imo/Imo1988Q6.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ theorem constant_descent_vieta_jumping (x y : ℕ) {claim : Prop} {H : ℕ →
171171
rw [exceptional_empty, Set.diff_empty]
172172
-- Now we are ready to prove that p' = (c, m_x) lies on the upper branch.
173173
-- We need to check two conditions: H(c, m_x) and c < m_x.
174-
constructor <;> dsimp only
174+
constructor
175175
· -- The first condition is not so hard. After all, c is the other root of the quadratic equation.
176176
rw [H_symm, H_quad]
177177
simpa using h_root

Archive/Imo/Imo2002Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ theorem result : {a : ℤ | 0 < a ∧ a ^ n + a ^ 2 - 1 ∣ a ^ m + a - 1}.Infin
113113
conv =>
114114
enter [1, 1, a]
115115
rw [show a ^ 5 + a - 1 = (a ^ 2 - a + 1) * (a ^ 3 + a ^ 2 - 1) by ring]
116-
simpa using Set.Ioi_infinite 0
116+
simpa using! Set.Ioi_infinite 0
117117

118118
end Imo2002Q3

Archive/Imo/Imo2024Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ lemma not_medium_of_N'aux_lt {j : ℕ} (h : N'aux a N < j) : ¬Medium a (a j) :=
403403
rintro i ⟨hk, -⟩
404404
rwa [hc.finite_setOf_apply_eq_iff_not_small (by lia), Small, not_le]
405405
exact fun hm ↦ notMem_of_csSup_lt (le_sup_left.trans_lt h)
406-
(hf.subset fun i hi ↦ (by simpa [s] using hi)).bddAbove hm
406+
(hf.subset fun i hi ↦ (by simpa [s] using! hi)).bddAbove hm
407407

408408
lemma small_or_big_of_N'aux_lt {j : ℕ} (h : N'aux a N < j) : Small a (a j) ∨ Big a (a j) := by
409409
have _ := hc.not_medium_of_N'aux_lt h

Archive/Imo/Imo2024Q6.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ lemma Aquaesulian.injective : Function.Injective f := by
5555
· exact (h.eq_of_apply_eq_inl he.symm hc).symm
5656
· exact h.eq_of_apply_eq_inl he hc
5757

58+
set_option warning.simp.varHead false in
5859
@[simp]
5960
lemma Aquaesulian.apply_zero : f 0 = 0 := by
6061
refine h.injective ?_
@@ -68,6 +69,7 @@ lemma Aquaesulian.apply_neg_apply_add (x : G) : f (-(f x)) + x = 0 := by
6869
· rw [add_neg_cancel, h.apply_zero] at hc
6970
exact hc.symm
7071

72+
set_option warning.simp.varHead false in
7173
@[simp]
7274
lemma Aquaesulian.apply_neg_apply (x : G) : f (-(f x)) = -x := by
7375
rw [← add_eq_zero_iff_eq_neg]

Archive/Sensitivity.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ theorem huang_degree_theorem (H : Set (Q m.succ)) (hH : Card H ≥ 2 ^ m + 1) :
429429
calc
430430
s * |ε q y| = |ε q (s • y)| := by
431431
rw [map_smul, smul_eq_mul, abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)]
432-
_ = |ε q (f m.succ y)| := by rw [← f_image_g y (by simpa using y_mem_g)]
432+
_ = |ε q (f m.succ y)| := by rw [← f_image_g y (by simpa using! y_mem_g)]
433433
_ = |ε q (f m.succ (lc _ (coeffs y)))| := by rw [(dualBases_e_ε _).lc_coeffs y]
434434
_ =
435435
|(coeffs y).sum fun (i : Q m.succ) (a : ℝ) =>

Archive/Wiedijk100Theorems/CubingACube.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
403403
suffices ∀ j : Fin n, ite (j = j') x' ((cs i).b j.succ) ∈ c.side j.succ by
404404
simpa [p', bottom, toSet, tail, side_tail]
405405
intro j₂
406-
by_cases hj₂ : j₂ = j'; · simpa [hj₂] using tail_sub h2i' _ hx'.1
406+
by_cases hj₂ : j₂ = j'; · simpa [hj₂] using! tail_sub h2i' _ hx'.1
407407
simp only [if_false, hj₂]; apply tail_sub hi; apply b_mem_side
408408
rcases v.1 hp' with ⟨_, ⟨i'', rfl⟩, hi''⟩
409409
have h2i'' : i'' ∈ bcubes cs c := ⟨hi''.1.symm, v.2.1 i'' hi''.1.symm ⟨tail p', hi''.2, hp'.2⟩⟩
@@ -413,7 +413,7 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
413413
simp only [toSet, forall_iff_succ, hi.1, bottom_mem_side h2i', true_and, mem_setOf_eq]
414414
intro j₂; by_cases hj₂ : j₂ = j
415415
· simpa [p', side_tail, hj'.symm, hj₂] using hi''.2 j
416-
· simpa [p, hj₂] using hi'.2 j₂
416+
· simpa [p, hj₂] using! hi'.2 j₂
417417
apply not_disjoint_iff.mpr ⟨(cs i).b, (cs i).b_mem_toSet, this⟩ (h.1 i_i')
418418
have i_i'' : i ≠ i'' := by intro h; induction h; simpa [p', hx'.2] using hi''.2 j'
419419
apply Not.elim _ (h.1 i'_i'')
@@ -482,10 +482,10 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp := by
482482
have h3i'' : (cs i).w < (cs i'').w := by
483483
apply mi_strict_minimal _ h2i''; rintro rfl; apply h2p3; convert! hi''.2
484484
let p' := @cons n (fun _ => ℝ) (cs i).xm p3
485-
have hp' : p' ∈ (cs i').toSet := by simpa [i, p', toSet, forall_iff_succ, hi'.symm] using h1p3
485+
have hp' : p' ∈ (cs i').toSet := by simpa [i, p', toSet, forall_iff_succ, hi'.symm] using! h1p3
486486
have h2p' : p' ∈ (cs i'').toSet := by
487487
simp only [p', toSet, forall_iff_succ, cons_succ, cons_zero, mem_setOf_eq]
488-
refine ⟨?_, by simpa [toSet] using hi''.2
488+
refine ⟨?_, by simpa [toSet] using! hi''.2
489489
have : (cs i).b 0 = (cs i'').b 0 := by rw [hi.1, h2i''.1]
490490
simp [side, hw', xm, this, h3i'']
491491
apply not_disjoint_iff.mpr ⟨p', hp', h2p'⟩

0 commit comments

Comments
 (0)