Skip to content

Commit a7ee3d2

Browse files
author
leanprover-community-mathlib4-bot
committed
Update lean-toolchain for leanprover/lean4#14298
2 parents 79f909f + de3a9cf commit a7ee3d2

2,112 files changed

Lines changed: 7731 additions & 1020 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.

Archive/Hairer.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def L : MvPolynomial ι ℝ →ₗ[ℝ]
9393
(fun p f₁ f₂ ↦ by simp_rw [smul_eq_mul, ← integral_add (int p _) (int p _), ← mul_add]; rfl)
9494
fun r p f ↦ by simp_rw [← integral_smul, smul_comm r]; rfl
9595

96+
set_option backward.isDefEq.respectTransparency.types false in
9697
lemma inj_L : Injective (L ι) :=
9798
(injective_iff_map_eq_zero _).mpr fun p hp ↦ by
9899
have H : ∀ᵐ x : EuclideanSpace ℝ ι, x ∈ ball 0 1 → eval x p = 0 :=

Archive/Imo/Imo1987Q1.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ open Finset (range sum_const)
3131

3232
namespace Imo1987Q1
3333

34+
set_option backward.isDefEq.respectTransparency false in
3435
/-- The set of pairs `(x : α, σ : Perm α)` such that `σ x = x` is equivalent to the set of pairs
3536
`(x : α, σ : Perm {x}ᶜ)`. -/
3637
def fixedPointsEquiv : { σx : α × Perm α // σx.2 σx.1 = σx.1 } ≃ Σ x : α, Perm ({x}ᶜ : Set α) :=
@@ -41,6 +42,7 @@ def fixedPointsEquiv : { σx : α × Perm α // σx.2 σx.1 = σx.1 } ≃ Σ x :
4142
(sigmaCongrRight fun x => Equiv.setCongr <| by simp only [SetCoe.forall]; simp)
4243
_ ≃ Σ x : α, Perm ({x}ᶜ : Set α) := sigmaCongrRight fun x => by apply Equiv.Set.compl
4344

45+
set_option backward.isDefEq.respectTransparency false in
4446
theorem card_fixed_points :
4547
card { σx : α × Perm α // σx.2 σx.1 = σx.1 } = card α * (card α - 1)! := by
4648
simp only [card_congr (fixedPointsEquiv α), card_sigma, card_perm]

Archive/Imo/Imo2013Q1.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ theorem prod_lemma (m : ℕ → ℕ+) (k : ℕ) (nm : ℕ+) :
3939
end Imo2013Q1
4040

4141
open Imo2013Q1
42+
43+
set_option backward.isDefEq.respectTransparency.types false in
4244
theorem imo2013_q1 (n : ℕ+) (k : ℕ) :
4345
∃ m : ℕ → ℕ+, (1 : ℚ) + (2 ^ k - 1) / n = ∏ i ∈ Finset.range k, (1 + 1 / (m i : ℚ)) := by
4446
induction k generalizing n with

Archive/Imo/Imo2024Q5.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def MonsterData.reflect (m : MonsterData N) : MonsterData N where
128128
toFun := Fin.rev ∘ m
129129
inj' := fun i j hij ↦ by simpa using hij
130130

131+
set_option backward.isDefEq.respectTransparency false in
131132
lemma MonsterData.reflect_reflect (m : MonsterData N) : m.reflect.reflect = m := by
132133
ext i
133134
simp [MonsterData.reflect]
@@ -149,7 +150,7 @@ lemma MonsterData.mk_mem_monsterCells_iff_of_le {m : MonsterData N} {r : Fin (N
149150
simp only [monsterCells, Set.mem_range, Prod.mk.injEq]
150151
refine ⟨?_, ?_⟩
151152
· rintro ⟨r', rfl, rfl⟩
152-
simp only [Subtype.coe_eta]
153+
simp only
153154
· rintro rfl
154155
exact ⟨⟨r, hr1, hrN⟩, rfl, rfl⟩
155156

@@ -449,6 +450,7 @@ def Path.reflect (p : Path N) : Path N where
449450
simp_rw [Adjacent, Nat.dist, Cell.reflect, Fin.rev] at h ⊢
450451
lia
451452

453+
set_option backward.isDefEq.respectTransparency false in
452454
lemma Path.firstMonster_reflect (p : Path N) (m : MonsterData N) :
453455
p.reflect.firstMonster m.reflect = (p.firstMonster m).map Cell.reflect := by
454456
simp_rw [firstMonster, reflect, List.find?_map]
@@ -524,6 +526,7 @@ lemma Strategy.ForcesWinIn.mono (s : Strategy N) {k₁ k₂ : ℕ} (h : s.Forces
524526

525527
/-! ### Proof of lower bound with constructions used therein -/
526528

529+
set_option backward.isDefEq.respectTransparency false in
527530
/-- An arbitrary choice of monster positions, which is modified to put selected monsters in
528531
desired places. -/
529532
def baseMonsterData (N : ℕ) : MonsterData N where
@@ -539,6 +542,7 @@ def baseMonsterData (N : ℕ) : MonsterData N where
539542
def monsterData12 (hN : 2 ≤ N) (c₁ c₂ : Fin (N + 1)) : MonsterData N :=
540543
((baseMonsterData N).setValue (row2 hN) c₂).setValue (row1 hN) c₁
541544

545+
set_option backward.isDefEq.respectTransparency false in
542546
lemma monsterData12_apply_row2 (hN : 2 ≤ N) {c₁ c₂ : Fin (N + 1)} (h : c₁ ≠ c₂) :
543547
monsterData12 hN c₁ c₂ (row2 hN) = c₂ := by
544548
rw [monsterData12, Function.Embedding.setValue_eq_of_ne]
@@ -729,6 +733,7 @@ def winningStrategy (hN : 2 ≤ N) : Strategy N
729733
| 1 => fun r => path1 hN ((r 0).getD 0).2
730734
| _ + 2 => fun r => path2 hN ((r 0).getD 0).2 ((r 1).getD 0).1
731735

736+
set_option backward.isDefEq.respectTransparency false in
732737
lemma path0_firstMonster_eq_apply_row1 (hN : 2 ≤ N) (m : MonsterData N) :
733738
(path0 hN).firstMonster m = some (1, m (row1 hN)) := by
734739
simp_rw [path0, Path.firstMonster, Path.ofFn]
@@ -958,6 +963,7 @@ lemma winningStrategy_play_one_eq_none_or_play_two_eq_none_of_edge_zero (hN : 2
958963
exact path2OfEdge0_firstMonster_eq_none_of_path1OfEdge0_firstMonster_eq_some hN hx2N.1
959964
hx2N.2 hc₁0 hx.symm
960965

966+
set_option backward.isDefEq.respectTransparency false in
961967
lemma winningStrategy_play_one_of_edge_N (hN : 2 ≤ N) {m : MonsterData N}
962968
(hc₁N : (m (row1 hN) : ℕ) = N) : (winningStrategy hN).play m 31, by simp⟩ =
963969
((winningStrategy hN).play m.reflect 31, by simp⟩).map Cell.reflect := by
@@ -972,6 +978,7 @@ lemma winningStrategy_play_one_of_edge_N (hN : 2 ≤ N) {m : MonsterData N}
972978
simp_rw [winningStrategy_play_one hN, path1, path1OfEdgeN, dif_neg hc₁0, if_pos hc₁N,
973979
dif_pos hc₁r0, ← Path.firstMonster_reflect, MonsterData.reflect_reflect]
974980

981+
set_option backward.isDefEq.respectTransparency false in
975982
lemma winningStrategy_play_two_of_edge_N (hN : 2 ≤ N) {m : MonsterData N}
976983
(hc₁N : (m (row1 hN) : ℕ) = N) : (winningStrategy hN).play m 32, by simp⟩ =
977984
((winningStrategy hN).play m.reflect 32, by simp⟩).map Cell.reflect := by
@@ -994,6 +1001,7 @@ lemma winningStrategy_play_two_of_edge_N (hN : 2 ≤ N) {m : MonsterData N}
9941001
· rcases h with ⟨x, hx⟩
9951002
simp [hx, Cell.reflect]
9961003

1004+
set_option backward.isDefEq.respectTransparency false in
9971005
lemma winningStrategy_play_one_eq_none_or_play_two_eq_none_of_edge_N (hN : 2 ≤ N)
9981006
{m : MonsterData N} (hc₁N : (m (row1 hN) : ℕ) = N) :
9991007
(winningStrategy hN).play m 31, by simp⟩ = none ∨

Archive/Sensitivity.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ theorem exists_eigenvalue (H : Set (Q m.succ)) (hH : Card H ≥ 2 ^ m + 1) :
407407
rw [Set.toFinset_card] at hH
408408
linarith
409409

410+
set_option backward.isDefEq.respectTransparency false in
410411
open Classical in
411412
/-- **Huang sensitivity theorem** also known as the **Huang degree theorem** -/
412413
theorem huang_degree_theorem (H : Set (Q m.succ)) (hH : Card H ≥ 2 ^ m + 1) :

Archive/Wiedijk100Theorems/FriendshipGraphs.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ theorem isRegularOf_not_existsPolitician (hG' : ¬ExistsPolitician G) :
173173

174174
open scoped Classical in
175175
include hG in
176+
set_option backward.isDefEq.respectTransparency.types false in
176177
/-- Let `A` be the adjacency matrix of a `d`-regular friendship graph, and let `v` be a vector
177178
all of whose components are `1`. Then `v` is an eigenvector of `A ^ 2`, and we can compute
178179
the eigenvalue to be `d * d`, or as `d + (Fintype.card V - 1)`, so those quantities must be equal.

Archive/Wiedijk100Theorems/Konigsberg.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ between them has no Eulerian trail.
1717

1818
namespace Konigsberg
1919

20+
set_option backward.isDefEq.respectTransparency.types false in
2021
/-- The vertices for the Königsberg graph; four vertices for the bodies of land and seven
2122
vertices for the bridges. -/
2223
inductive Verts : Type

Archive/ZagierTwoSquares.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def complexInvo : Function.End (zagierSet k) := fun ⟨⟨x, y, z⟩, h⟩ =>
113113

114114
variable [hk : Fact (4 * k + 1).Prime]
115115

116+
set_option backward.isDefEq.respectTransparency false in
116117
/-- `complexInvo k` is indeed an involution. -/
117118
theorem complexInvo_sq : complexInvo k ^ 2 = 1 := by
118119
change complexInvo k ∘ complexInvo k = id
@@ -139,6 +140,7 @@ theorem complexInvo_sq : complexInvo k ^ 2 = 1 := by
139140
← Nat.add_sub_assoc less, ← add_assoc, Nat.sub_add_cancel more, Nat.sub_sub _ _ y,
140141
← two_mul, add_comm, Nat.add_sub_cancel]
141142

143+
set_option backward.isDefEq.respectTransparency false in
142144
/-- Any fixed point of `complexInvo k` must be `(1, 1, k)`. -/
143145
theorem eq_of_mem_fixedPoints {t : zagierSet k} (mem : t ∈ fixedPoints (complexInvo k)) :
144146
t.val = (1, 1, k) := by
@@ -169,6 +171,7 @@ theorem eq_of_mem_fixedPoints {t : zagierSet k} (mem : t ∈ fixedPoints (comple
169171
def singletonFixedPoint : Finset (zagierSet k) :=
170172
{⟨(1, 1, k), (by simp only [zagierSet, Set.mem_setOf_eq]; linarith)⟩}
171173

174+
set_option backward.isDefEq.respectTransparency false in
172175
/-- `complexInvo k` has exactly one fixed point. -/
173176
theorem card_fixedPoints_eq_one : Fintype.card (fixedPoints (complexInvo k)) = 1 := by
174177
rw [show 1 = Finset.card (singletonFixedPoint k) by rfl, ← Set.toFinset_card]

Counterexamples/AharoniKorman.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ lemma induction_on_level {n : ℕ} {p : (x : Hollom) → x ∈ level n → Prop}
205205
rintro x y _ rfl
206206
exact h _ _
207207

208+
set_option backward.isDefEq.respectTransparency false in
208209
/--
209210
For each `n`, there is an order embedding from ℕ × ℕ (which has the product order) to the Hollom
210211
partial order.
@@ -218,6 +219,7 @@ lemma embed_apply (n : ℕ) (x y : ℕ) : embed n (x, y) = h(x, y, n) := rfl
218219

219220
lemma embed_strictMono {n : ℕ} : StrictMono (embed n) := (embed n).strictMono
220221

222+
set_option backward.isDefEq.respectTransparency false in
221223
lemma level_eq_range (n : ℕ) : level n = Set.range (embed n) := by
222224
simp [level, Set.range, embed]
223225

@@ -812,6 +814,7 @@ variable {n : ℕ}
812814

813815
lemma R_subset_level : R n C ⊆ level n := Set.sep_subset (level n) _
814816

817+
set_option backward.isDefEq.respectTransparency false in
815818
/--
816819
A helper lemma to show `square_subset_R`. In particular shows that if `C ∩ level n` is finite, the
817820
set of points `x` such that `x` is at least as large as every element of `C ∩ level n` contains an
@@ -853,6 +856,7 @@ lemma square_subset_above (h : (C ∩ level n).Finite) :
853856
specialize hab _ _ hfg
854857
lia
855858

859+
set_option backward.isDefEq.respectTransparency false in
856860
lemma square_subset_R (h : (C ∩ level n).Finite) :
857861
∀ᶠ a in atTop, embed n '' Set.Ici (a, a) ⊆ R n C \ (C ∩ level n) := by
858862
filter_upwards [square_subset_above h] with a ha
@@ -935,6 +939,7 @@ lemma S_subset_R : S n C ⊆ R n C := by
935939

936940
lemma S_subset_level : S n C ⊆ level n := S_subset_R.trans R_subset_level
937941

942+
set_option backward.isDefEq.respectTransparency false in
938943
/--
939944
Assuming `C ∩ level n` is finite, and `C ∩ level (n + 1)` is finite, that there exists cofinitely
940945
many `a` such that `{(x, y, n) | x ≥ a ∧ y ≥ a} ⊆ S \ (C ∩ level n)`.

Counterexamples/MapFloor.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ instance isOrderedAddMonoid : IsOrderedAddMonoid ℤ[ε] :=
5959
Function.Injective.isOrderedAddMonoid
6060
(toLex ∘ coeff) (fun _ _ => funext fun _ => coeff_add _ _ _) .rfl
6161

62+
set_option backward.isDefEq.respectTransparency false in
6263
theorem pos_iff {p : ℤ[ε]} : 0 < p ↔ 0 < p.trailingCoeff := by
6364
rw [trailingCoeff]
6465
refine
@@ -118,6 +119,7 @@ theorem forgetEpsilons_floor_lt (n : ℤ) :
118119
exact (if_neg <| by rw [coeff_sub, intCast_coeff_zero]; simp [this]).trans (by
119120
rw [coeff_sub, intCast_coeff_zero]; simp)
120121

122+
set_option backward.isDefEq.respectTransparency false in
121123
/-- The ceil of `n + ε` is `n + 1` but its image under `forgetEpsilons` is `n`, whose ceil is
122124
itself. -/
123125
theorem lt_forgetEpsilons_ceil (n : ℤ) :

0 commit comments

Comments
 (0)