Skip to content

Commit 83622cf

Browse files
committed
cleanups
1 parent 19cee19 commit 83622cf

31 files changed

Lines changed: 67 additions & 78 deletions

File tree

Mathlib/Algebra/Category/MonCat/FilteredColimits.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ noncomputable def colimitCocone : Cocone F where
234234
pt := colimit.{v, u} F
235235
ι := { app := coconeMorphism F }
236236

237-
set_option linter.tacticCheckInstances true in
238-
239237
set_option backward.defeqAttrib.useBackward true in
240238
set_option backward.isDefEq.respectTransparency false in
241239
/-- Given a cocone `t` of `F`, the induced monoid homomorphism from the colimit to the cocone point.

Mathlib/Algebra/Lie/DirectSum.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ set_option backward.isDefEq.respectTransparency false in
9090
/-- The projection map onto one component, as a morphism of Lie modules. -/
9191
def lieModuleComponent (j : ι) : (⨁ i, M i) →ₗ⁅R,L⁆ M j :=
9292
{ component R ι M j with
93-
map_lie' := fun {x m} => by
94-
simp [component, lapply] }
93+
map_lie' := fun {x m} => by simp [component, lapply] }
9594

9695
end Modules
9796

@@ -165,8 +164,7 @@ set_option backward.isDefEq.respectTransparency false in
165164
def lieAlgebraComponent (j : ι) : (⨁ i, L i) →ₗ⁅R⁆ L j :=
166165
{ component R ι L j with
167166
toFun := component R ι L j
168-
map_lie' := fun {x y} => by
169-
simp [component, lapply] }
167+
map_lie' := fun {x y} => by simp [component, lapply] }
170168

171169
-- Note(kmill): `ext` cannot generate an iff theorem here since `x` and `y` do not determine `R`.
172170
@[ext (iff := false)]

Mathlib/Algebra/Order/Antidiag/Pi.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def finAntidiagonal.aux (d : ℕ) (n : μ) : {s : Finset (Fin d → μ) // ∀ f
9393
exact ⟨_, _, hf, _, rfl, Fin.cons_self_tail f⟩ }
9494

9595
set_option backward.isDefEq.respectTransparency false in
96-
set_option backward.proofsInPublic true in
9796
/-- `finAntidiagonal d n` is the type of `d`-tuples with sum `n`.
9897
9998
TODO: deduplicate with the less general `Finset.Nat.antidiagonalTuple`. -/

Mathlib/Algebra/Order/Module/HahnEmbedding.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ noncomputable
197197
def hahnCoeff : seed.baseDomain →ₗ[K] (⨁ _ : FiniteArchimedeanClass M, R) :=
198198
(DirectSum.lmap seed.coeff') ∘ₗ (DirectSum.decomposeLinearEquiv _).toLinearMap
199199

200-
set_option linter.auxLemma false in -- TODO
201200
theorem hahnCoeff_apply {x : seed.baseDomain} {f : Π₀ c, seed.stratum c}
202201
(h : x.val = f.sum fun c ↦ (seed.stratum c).subtype) (c : FiniteArchimedeanClass M) :
203202
seed.hahnCoeff x c = seed.coeff c (f c) := by

Mathlib/Algebra/Quaternion.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,7 @@ protected instance algebra [CommSemiring S] [Algebra S R] : Algebra S ℍ[R] :=
751751
inferInstanceAs <| Algebra S ℍ[R,-1,0,-1]
752752

753753
instance : Star ℍ[R] := inferInstanceAs <| Star ℍ[R,-1,0,-1]
754-
755754
instance : StarRing ℍ[R] := inferInstanceAs <| StarRing ℍ[R,-1,0,-1]
756-
757755
set_option backward.isDefEq.respectTransparency.types false in
758756
instance : IsStarNormal a := inferInstanceAs <| IsStarNormal (R := ℍ[R,-1,0,-1]) a
759757

Mathlib/AlgebraicGeometry/EllipticCurve/Affine/Formula.lean

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,18 @@ lemma Y_sub_polynomialY : Y - W'.polynomialY = W'.negPolynomial := by
104104
lemma Y_sub_negPolynomial : Y - W'.negPolynomial = W'.polynomialY := by
105105
rw [← Y_sub_polynomialY, sub_sub_cancel]
106106

107+
#adaptation_note
108+
/--
109+
Without this `implicit_reducible` attribute, `simpNF` gives a linter error on `slope_of_Y_eq`
110+
because of a nonconfluence: `negY` can be unfolded on the LHS, which prevents discharging the
111+
side condition of `slope_of_Y_eq` -- except if `negY` is implicit-reducible.
112+
So this attribute improves the confluence of `simp`.
113+
-/
107114
variable (W') in
108115
/-- The `Y`-coordinate of `-(x, y)` for a nonsingular affine point `(x, y)` on a Weierstrass curve
109116
`W`.
110117
111118
This depends on `W`, and has argument order: `x`, `y`. -/
112-
-- Without this `implicit_reducible` attribute, `simpNF` gives a linter error on `slope_of_Y_eq`
113-
-- because of a nonconfluence: `negY` can be unfolded on the LHS, which prevents discharging the
114-
-- side condition of `slope_of_Y_eq` -- except if `negY` is implicit-reducible.
115-
-- So this attribute improves the confluence of `simp`.
116119
@[simp, implicit_reducible]
117120
def negY (x y : R) : R :=
118121
-y - W'.a₁ * x - W'.a₃

Mathlib/AlgebraicTopology/SimplicialSet/Skeleton.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ lemma ι_t_ι_eq_ι_l_b_ι (c : Cell i d) :
313313
lemma ι_l (c : Cell i d) : c.ιSigmaBoundary ≫ l i d = ∂Δ[d].ι ≫ c.ιSigmaStdSimplex := by
314314
simp
315315

316-
/-
316+
#adaptation_note
317+
/--
317318
Now that `Cofan.mk` and `Discrete.functor` are implicit-reducible and
318319
`backward.isDefEq.implicitBump` is enabled, the simp lemma `colimit.ι_desc_assoc` is applicable.
319320
Previously, we had to use `by simp [Sigma.ι_desc_assoc]`, now `by simp` suffices.

Mathlib/CategoryTheory/Comma/StructuredArrow/Basic.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ variable {X Y : CostructuredArrow S T} (f : X ⟶ Y)
540540
/-- The morphism that is part of a morphism of costructured arrows. -/
541541
abbrev Hom.left : X.left ⟶ Y.left := CommaMorphism.left f
542542

543-
/-
543+
#adaptation_note
544+
/--
544545
The combination of `implicitBump` and making `Functor.const` implicit-reducible makes this former
545546
`simp` lemma redundant, so no `simp` annotation.
546547
-/

Mathlib/CategoryTheory/Functor/Const.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ def const : C ⥤ J ⥤ C where
3939
map := fun _ => 𝟙 X }
4040
map f := { app := fun _ => f }
4141

42-
attribute [defeq, simp] const_obj_obj
43-
4442
namespace const
4543

4644
open Opposite

Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -918,15 +918,3 @@ end
918918
end Functor
919919

920920
end CategoryTheory
921-
922-
/-
923-
TODO: Fixing linter errors was nontrivial.
924-
For `#lint` to trigger, I had to disable the module-wide
925-
`set_option backward.defeqAttrib.useBackward true`.
926-
Even then, lemmas didn't seem to involve defeq abuse.
927-
However, when I split the `simp` into multiple parts, the `tacticCheckInstances` linter
928-
started reporting defeq abuse.
929-
Should it actually check after every single simp lemma application?
930-
931-
Also had to make `NatTrans.id` implicit-reducible.
932-
-/

0 commit comments

Comments
 (0)