Skip to content

Commit 6fcaafd

Browse files
committed
chore: add/remove set_option backward after moving to v4.29.0-rc3 (leanprover-community#35952)
This PR adds and removes a number of `set_option backward.isDefEq.respectTransparency` that were missed in other cleanups, but are needed/possible after `master` has moved to `v4.29.0-rc3`.
1 parent 190bf64 commit 6fcaafd

File tree

497 files changed

+392
-627
lines changed

Some content is hidden

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

497 files changed

+392
-627
lines changed

Archive/Imo/Imo2001Q5.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ lemma key_x_equation :
178178

179179
/-! ### Solving the trigonometric equation -/
180180

181-
set_option backward.isDefEq.respectTransparency false in
182181
lemma x_eq : s.x = 2 * π / 9 := by
183182
have work := s.key_x_equation
184183
rw [Real.sin_add_sin, show 2 * π / 3 - s.x = π - 2 * ((s.x + π / 3) / 2) by ring, Real.sin_pi_sub,

Archive/Imo/Imo2019Q4.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ open Finset
3434

3535
namespace Imo2019Q4
3636

37+
set_option backward.isDefEq.respectTransparency false in
3738
theorem upper_bound {k n : ℕ} (hk : k > 0)
3839
(h : (k ! : ℤ) = ∏ i ∈ range n, ((2 : ℤ) ^ n - (2 : ℤ) ^ i)) : n < 6 := by
3940
have h2 : ∑ i ∈ range n, i < k := by

Archive/Imo/Imo2024Q6.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ lemma floor_fExample (x : ℚ) :
225225
rw [Int.floor_eq_iff]
226226
simp [(Int.fract_nonneg x).lt_of_ne' h, (Int.fract_lt_one x).le]
227227

228+
set_option backward.isDefEq.respectTransparency false in
228229
lemma card_range_fExample : #(Set.range (fun x ↦ fExample x + fExample (-x))) = 2 := by
229230
have h : Set.range (fun x ↦ fExample x + fExample (-x)) = {0, -2} := by
230231
ext x

Archive/Wiedijk100Theorems/BuffonsNeedle.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ lemma volume_needleSpace : ℙ (needleSpace d) = ENNReal.ofReal (d * π) := by
129129
ENNReal.ofReal_mul hd.le]
130130
ring_nf
131131

132-
set_option backward.isDefEq.respectTransparency false in
133132
lemma measurable_needleCrossesIndicator : Measurable (needleCrossesIndicator l) := by
134133
unfold needleCrossesIndicator
135134
refine Measurable.indicator measurable_const (IsClosed.measurableSet (IsClosed.and ?_ ?_)) <;>
@@ -289,7 +288,6 @@ lemma integral_min_eq_two_mul :
289288
(by ring : -(π / 2) + π = π / 2), two_mul]
290289
all_goals exact intervalIntegrable_min_const_sin_mul d l _ _
291290

292-
set_option backward.isDefEq.respectTransparency false in
293291
include hd hl in
294292
/--
295293
The first of two adjacent integrals in the long case. In the range `0..(d / l).arcsin`, we

Counterexamples/HeawoodUnitDistance.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ lemma injOn_udMap_sextet : Set.InjOn udMap ({0, 7, 10, 5, 2, 9} : Finset (Fin 14
126126
simp [Fin.forall_fin_succ, f, udMap]
127127
grind
128128

129-
set_option backward.isDefEq.respectTransparency false in
130129
/-- `udMap` is injective and thus can be used in a unit-distance embedding. -/
131130
theorem injective_udMap : udMap.Injective := by
132131
let s : Finset (Fin 14) := {1, 0, 7, 10, 5, 2, 9}

Counterexamples/InvertibleModuleNotIdeal.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ set_option backward.isDefEq.respectTransparency false in
3636
abbrev SqZeroExtQuotMax.algebraBase : Algebra (SqZeroExtQuotMax R) R := TrivSqZeroExt.algebraBase ..
3737

3838
#adaptation_note /-- After nightly-2026-02-23 we need this to avoid timeouts. -/
39-
set_option backward.whnf.reducibleClassField false in
4039
set_option backward.isDefEq.respectTransparency false in
4140
open CommRing (Pic) in
4241
/-- If the Picard group of a commutative ring R is nontrivial, then `SqZeroExtQuotMax R`

Counterexamples/NowhereDifferentiable.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ theorem weierstrass_slope {a : ℝ} (ha : a ∈ Set.Ioo 0 1) {b : ℕ} (hb : Odd
247247
rw [sub_mul (2 / 3), mul_sub |seq b x m - x|]
248248
exact sub_le_sub (weierstrass_remainder ha.1 hb hsum_shift) (weierstrass_partial ha.1 hab x m)
249249

250-
set_option backward.isDefEq.respectTransparency false in
251250
theorem not_differentiableAt_weierstrass
252251
{a : ℝ} (ha : a ∈ Set.Ioo 0 1) {b : ℕ} (hb : Odd b) (hab : 3 / 2 * π + 1 < a * b) (x : ℝ) :
253252
¬ DifferentiableAt ℝ (weierstrass a b) x := by

Mathlib/Algebra/BigOperators/Expect.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ lemma expect_univ [Fintype ι] : 𝔼 i, f i = (∑ i, f i) /ℚ Fintype.card ι
121121
rw [expect, card_univ]
122122

123123
@[simp] lemma expect_empty (f : ι → M) : 𝔼 i ∈ ∅, f i = 0 := by simp [expect]
124+
125+
set_option backward.isDefEq.respectTransparency false in
124126
@[simp] lemma expect_singleton (f : ι → M) (i : ι) : 𝔼 j ∈ {i}, f j = f i := by simp [expect]
127+
125128
@[simp] lemma expect_const_zero (s : Finset ι) : 𝔼 _i ∈ s, (0 : M) = 0 := by simp [expect]
126129

127130
@[congr]
@@ -166,6 +169,7 @@ lemma expect_ite_zero (s : Finset ι) (p : ι → Prop) [DecidablePred p]
166169
section DecidableEq
167170
variable [DecidableEq ι]
168171

172+
set_option backward.isDefEq.respectTransparency false in
169173
lemma expect_ite_mem (s t : Finset ι) (f : ι → M) :
170174
𝔼 i ∈ s, (if i ∈ t then f i else 0) = (#(s ∩ t) / #s : ℚ≥0) • 𝔼 i ∈ s ∩ t, f i := by
171175
obtain hst | hst := (s ∩ t).eq_empty_or_nonempty
@@ -251,13 +255,15 @@ most arguments. -/
251255
lemma expect_equiv (e : ι ≃ κ) (hst : ∀ i, i ∈ s ↔ e i ∈ t) (hfg : ∀ i ∈ s, f i = g (e i)) :
252256
𝔼 i ∈ s, f i = 𝔼 i ∈ t, g i := by simp_rw [expect, card_equiv e hst, sum_equiv e hst hfg]
253257

258+
set_option backward.isDefEq.respectTransparency false in
254259
/-- Expectation over a product set equals the expectation of the fiberwise expectations.
255260
256261
For rewriting in the reverse direction, use `Finset.expect_product'`. -/
257262
lemma expect_product (s : Finset ι) (t : Finset κ) (f : ι × κ → M) :
258263
𝔼 x ∈ s ×ˢ t, f x = 𝔼 i ∈ s, 𝔼 j ∈ t, f (i, j) := by
259264
simp only [expect, card_product, sum_product, smul_sum, mul_inv, mul_smul, Nat.cast_mul]
260265

266+
set_option backward.isDefEq.respectTransparency false in
261267
/-- Expectation over a product set equals the expectation of the fiberwise expectations.
262268
263269
For rewriting in the reverse direction, use `Finset.expect_product`. -/
@@ -340,6 +346,7 @@ end Semiring
340346
section CommSemiring
341347
variable [CommSemiring M] [Module ℚ≥0 M] [IsScalarTower ℚ≥0 M M] [SMulCommClass ℚ≥0 M M]
342348

349+
set_option backward.isDefEq.respectTransparency false in
343350
lemma expect_pow (s : Finset ι) (f : ι → M) (n : ℕ) :
344351
(𝔼 i ∈ s, f i) ^ n = 𝔼 p ∈ Fintype.piFinset fun _ : Fin n ↦ s, ∏ i, f (p i) := by
345352
classical

Mathlib/Algebra/Category/AlgCat/Limits.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ instance limitAlgebra :
6868
inferInstanceAs <| Algebra R (Shrink (sectionsSubalgebra F))
6969

7070
#adaptation_note /-- After nightly-2026-02-23 we need this to avoid timeouts. -/
71-
set_option backward.whnf.reducibleClassField false in
7271
set_option backward.isDefEq.respectTransparency false in
7372
/-- `limit.π (F ⋙ forget (AlgCat R)) j` as an `AlgHom`. -/
7473
def limitπAlgHom (j) :
@@ -155,7 +154,6 @@ instance hasLimits : HasLimits (AlgCat.{w} R) :=
155154
AlgCat.hasLimitsOfSize.{w, w, u}
156155

157156
#adaptation_note /-- After nightly-2026-02-23 we need this to avoid timeouts. -/
158-
set_option backward.whnf.reducibleClassField false in
159157
/-- The forgetful functor from R-algebras to rings preserves all limits.
160158
-/
161159
instance forget₂Ring_preservesLimitsOfSize [UnivLE.{v, w}] :

Mathlib/Algebra/Category/ContinuousCohomology/Basic.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def invariants : Action (TopModuleCat R) G ⥤ TopModuleCat R where
151151
instance : (invariants R G).Linear R where
152152
instance : (invariants R G).Additive where
153153

154-
set_option backward.isDefEq.respectTransparency false in
155154
/-- `homogeneousCochains R G` is the functor taking
156155
an `R`-linear `G`-representation to the complex of homogeneous cochains. -/
157156
def homogeneousCochains : Action (TopModuleCat R) G ⥤ CochainComplex (TopModuleCat R) ℕ :=
@@ -201,7 +200,6 @@ def kerHomogeneousCochainsZeroEquiv
201200
(continuous_induced_rng.mpr ((ContinuousLinearMap.const R G).cont.comp continuous_subtype_val))
202201

203202
#adaptation_note /-- After nightly-2026-02-23 we need this to avoid timeouts. -/
204-
set_option backward.whnf.reducibleClassField false in
205203
set_option backward.isDefEq.respectTransparency false in
206204
open ShortComplex HomologyData in
207205
/-- `H⁰_cont(G, X) ≅ Xᴳ`. -/

0 commit comments

Comments
 (0)