Skip to content

Commit 2ede655

Browse files
chore: adaptations for nightly-2026-05-11 (#220)
Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com>
1 parent a4ae26a commit 2ede655

13 files changed

Lines changed: 35 additions & 3 deletions

File tree

Mathlib/Algebra/Homology/HomotopyFiber.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ instance [HasBinaryBiproducts C] : HasHomotopyFiber φ where
4444

4545
variable [HasHomotopyFiber φ] [DecidableRel c.Rel]
4646

47+
set_option backward.defeqAttrib.useBackward true in
4748
instance : HasHomotopyCofiber ((opFunctor C c).map φ.op) where
4849
hasBinaryBiproduct i j hij := by
4950
have := HasHomotopyFiber.hasBinaryBiproduct φ j i hij
@@ -58,6 +59,7 @@ end
5859

5960
variable (K) [∀ i, HasBinaryBiproduct (K.X i) (K.X i)]
6061

62+
set_option backward.defeqAttrib.useBackward true in
6163
instance (i : α) : HasBinaryBiproduct (K.op.X i) (K.op.X i) := by
6264
dsimp; infer_instance
6365

@@ -84,6 +86,7 @@ noncomputable def pathObject := (unopFunctor C c.symm).obj (op K.op.cylinder)
8486

8587
namespace pathObject
8688

89+
set_option backward.defeqAttrib.useBackward true in
8790
lemma isZero_X (i : α) (h₁ : IsZero (K.X i)) (h₂ : ∀ (j : α), c.Rel j i → IsZero (K.X j)) :
8891
IsZero (K.pathObject.X i) := by
8992
apply IsZero.unop

Mathlib/Algebra/Homology/Opposite.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ open HomologicalComplex
454454

455455
variable {V : Type*} [Category* V] {ι : Type*} {c : ComplexShape ι} [Preadditive V]
456456

457+
set_option backward.defeqAttrib.useBackward true in
457458
/-- The opposite of a homotopy between morphisms of homological complexes. -/
458459
@[simps]
459460
def op {F G : HomologicalComplex V c} {φ₁ φ₂ : F ⟶ G} (h : Homotopy φ₁ φ₂) :
@@ -466,6 +467,7 @@ def op {F G : HomologicalComplex V c} {φ₁ φ₂ : F ⟶ G} (h : Homotopy φ
466467
nth_rw 2 [add_comm]
467468
rfl)
468469

470+
set_option backward.defeqAttrib.useBackward true in
469471
/-- The homotopy between morphisms of homological complexes that is deduced
470472
from a homotopy in the opposite category. -/
471473
@[simps]

Mathlib/AlgebraicGeometry/Morphisms/FlatRank.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ lemma Scheme.Hom.finrank_eq_one_of_isIso (f : X ⟶ Y) [IsIso f] : finrank f = 1
265265
· exact RingHom.Finite.id R
266266
· exact RingHom.Flat.id ↑R
267267

268+
set_option backward.defeqAttrib.useBackward true in
268269
/-- A finite flat locally finitely presented morphism is an isomorphism if and only if
269270
its rank is constant equal to `1`. -/
270271
nonrec lemma Scheme.Hom.isIso_iff_finrank_eq : IsIso f ↔ finrank f = 1 := by

Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,22 @@ noncomputable def toKaroubiNondegComplexIsoN₁ :
226226
simp only [πSummand_comp_cofan_inj_id_comp_PInfty_eq_PInfty, Karoubi.comp_f,
227227
HomologicalComplex.comp_f, N₁_obj_p, Karoubi.id_f]
228228

229+
set_option backward.defeqAttrib.useBackward true in
229230
@[reassoc (attr := simp)]
230231
lemma toKaroubiNondegComplexIsoN₁_hom_f_PInfty :
231232
dsimp% s.toKaroubiNondegComplexIsoN₁.hom.f ≫ PInfty =
232233
s.toKaroubiNondegComplexIsoN₁.hom.f := by
233234
simpa using s.toKaroubiNondegComplexIsoN₁.hom.comm
234235

236+
set_option backward.defeqAttrib.useBackward true in
235237
@[reassoc (attr := simp)]
236238
lemma toKaroubiNondegComplexIsoN₁_hom_inv_id_f :
237239
dsimp% s.toKaroubiNondegComplexIsoN₁.hom.f ≫ s.toKaroubiNondegComplexIsoN₁.inv.f = 𝟙 _ := by
238240
rw [← dsimp% [-Karoubi.comp_f] Karoubi.comp_f s.toKaroubiNondegComplexIsoN₁.hom
239241
s.toKaroubiNondegComplexIsoN₁.inv, Iso.hom_inv_id]
240242
simp
241243

244+
set_option backward.defeqAttrib.useBackward true in
242245
/-- Given a splitting `s` of a simplicial object `X` in a preadditive category,
243246
this is the split epimorphism from the alternating face map complex of `X` to the chain
244247
complex `s.nondegComplex`. -/
@@ -247,6 +250,7 @@ noncomputable def toNondegComplex : K[X] ⟶ s.nondegComplex :=
247250
(fullyFaithfulToKaroubi _).preimage
248251
({ f := by exact PInfty } ≫ s.toKaroubiNondegComplexIsoN₁.inv)
249252

253+
set_option backward.defeqAttrib.useBackward true in
250254
/-- Given a splitting `s` of a simplicial object `X` in a preadditive category,
251255
this is the split monomormphism from the chain complex `s.nondegComplex` to
252256
the alternating face map complex fo `X`. -/
@@ -255,20 +259,24 @@ noncomputable def fromNondegComplex : s.nondegComplex ⟶ K[X] :=
255259
(fullyFaithfulToKaroubi _).preimage
256260
(s.toKaroubiNondegComplexIsoN₁.hom ≫ { f := PInfty })
257261

262+
set_option backward.defeqAttrib.useBackward true in
258263
@[reassoc (attr := simp)]
259264
lemma PInfty_toNondegComplex : PInfty ≫ s.toNondegComplex = s.toNondegComplex :=
260265
(toKaroubi _).map_injective (by simp [toNondegComplex])
261266

267+
set_option backward.defeqAttrib.useBackward true in
262268
@[reassoc (attr := simp)]
263269
lemma fromNondegComplex_toNondegComplex :
264270
s.fromNondegComplex ≫ s.toNondegComplex = 𝟙 _ :=
265271
(toKaroubi _).map_injective (by simp [toNondegComplex, fromNondegComplex])
266272

273+
set_option backward.defeqAttrib.useBackward true in
267274
@[reassoc]
268275
lemma toNondegComplex_f (n : ℕ) :
269276
s.toNondegComplex.f n = PInfty.f n ≫ s.toKaroubiNondegComplexIsoN₁.inv.f.f n := by
270277
simp [toNondegComplex, fullyFaithfulToKaroubi]
271278

279+
set_option backward.defeqAttrib.useBackward true in
272280
@[reassoc]
273281
lemma fromNondegComplex_f (n : ℕ) :
274282
s.fromNondegComplex.f n = s.ι n ≫ PInfty.f n := by
@@ -281,6 +289,7 @@ instance isSplitEpi_toNondegComplex : IsSplitEpi s.toNondegComplex where
281289
instance isSplitMono_fromNondegComplex : IsSplitMono s.fromNondegComplex where
282290
exists_splitMono := ⟨⟨s.toNondegComplex, by simp⟩⟩
283291

292+
set_option backward.defeqAttrib.useBackward true in
284293
@[reassoc (attr := simp)]
285294
lemma toNondegComplex_fromNondegComplex :
286295
s.toNondegComplex ≫ s.fromNondegComplex = PInfty :=

Mathlib/AlgebraicTopology/ModelCategory/LeftHomotopy.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def postcomp {f g : X ⟶ Y} (h : P.LeftHomotopy f g) {Z : C} (p : Y ⟶ Z) :
8383
P.LeftHomotopy (f ≫ p) (g ≫ p) where
8484
h := h.h ≫ p
8585

86+
set_option backward.defeqAttrib.useBackward true in
8687
/-- Left homotopies in a full subcategory identify to left homotopies in the
8788
ambient category. -/
8889
noncomputable def fullSubcategoryEquiv {P : ObjectProperty C} {X Y : P.FullSubcategory}

Mathlib/AlgebraicTopology/ModelCategory/RightHomotopy.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def precomp {f g : X ⟶ Y} (h : P.RightHomotopy f g) {Z : C} (i : Z ⟶ X) :
8686
P.RightHomotopy (i ≫ f) (i ≫ g) where
8787
h := i ≫ h.h
8888

89+
set_option backward.defeqAttrib.useBackward true in
8990
/-- Right homotopies in a full subcategory identify to right homotopies in the
9091
ambient category. -/
9192
noncomputable def fullSubcategoryEquiv {P : ObjectProperty C} {X Y : P.FullSubcategory}

Mathlib/AlgebraicTopology/SimplicialSet/KanComplex.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ lemma exists_lift_of_kanComplex [KanComplex X]
6262
/-- If `X` is a Kan complex and `f : ∀ (j : Fin (n + 2)) (_ : j ≠ i), Δ[n] ⟶ X`
6363
is a compatible family of morphisms (which defines a morphism `Λ[n + 1, i] ⟶ X`),
6464
then this is a lifting `Δ[n + 1] ⟶ X`. -/
65-
@[no_expose]
6665
noncomputable def liftOfKanComplex [KanComplex X] (hf : horn.IsCompatible f) :
6766
Δ[n + 1] ⟶ X :=
6867
hf.exists_lift_of_kanComplex.choose

Mathlib/CategoryTheory/GuitartExact/HorizontalComposition.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def whiskerHorizontal (α : T' ⟶ T) (β : B ⟶ B') :
4040

4141
namespace GuitartExact
4242

43+
set_option backward.defeqAttrib.useBackward true in
4344
/-- A 2-square stays Guitart exact if we replace the top and bottom functors
4445
by isomorphic functors. See also `whiskerHorizontal_iff`. -/
4546
lemma whiskerHorizontal [w.GuitartExact] (α : T ≅ T') (β : B ≅ B') :
@@ -85,6 +86,7 @@ def hComp' {T₁₂ : C₁ ⥤ C₃} {B₁₂ : D₁ ⥤ D₃} (eT : T₁ ⋙ T
8586

8687
namespace GuitartExact
8788

89+
set_option backward.defeqAttrib.useBackward true in
8890
instance hComp [w.GuitartExact] [w'.GuitartExact] :
8991
(w ≫ₕ w').GuitartExact := by
9092
rw [← guitartExact_op_iff]
@@ -98,6 +100,7 @@ instance hComp' {T₁₂ : C₁ ⥤ C₃} {B₁₂ : D₁ ⥤ D₃} (eT : T₁
98100
dsimp only [TwoSquare.hComp']
99101
infer_instance
100102

103+
set_option backward.defeqAttrib.useBackward true in
101104
/-- The canonical isomorphism between
102105
`w.costructuredArrowRightwards Y₁ ⋙ w'.costructuredArrowRightwards (B₁.obj Y₁)` and
103106
`(w ≫ₕ w').costructuredArrowRightwards Y₁`. -/
@@ -133,6 +136,7 @@ lemma hComp'_iff_of_essSurj
133136
(w.hComp' w' eT eB).GuitartExact ↔ w'.GuitartExact :=
134137
fun _ ↦ of_hComp' w w' eT eB, fun _ ↦ inferInstance⟩
135138

139+
set_option backward.defeqAttrib.useBackward true in
136140
lemma hComp_iff_of_equivalences (eT : C₂ ≌ C₃) (eB : D₂ ≌ D₃)
137141
(w' : eT.functor ⋙ V₃ ≅ V₂ ⋙ eB.functor) :
138142
(w ≫ₕ w'.hom).GuitartExact ↔ w.GuitartExact := by

Mathlib/CategoryTheory/Localization/LocalizerMorphism.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ section
377377

378378
variable [Φ.functor.IsEquivalence] [Φ.IsInduced] [W₂.RespectsIso]
379379

380+
set_option backward.defeqAttrib.useBackward true in
380381
attribute [local simp] Functor.asEquivalence_counitIso_hom_app
381382
Functor.asEquivalence_counitIso_inv_app in
382383
/-- The inverse of a localizer morphism `Φ : LocalizerMorphism W₁ W₂`,
@@ -392,10 +393,12 @@ noncomputable def inv : LocalizerMorphism W₂ W₁ where
392393
(Arrow.isoMk (Φ.functor.asEquivalence.counitIso.app _)
393394
(Φ.functor.asEquivalence.counitIso.app _))).2 hf
394395

396+
set_option backward.defeqAttrib.useBackward true in
395397
instance : Φ.inv.functor.IsEquivalence := by
396398
dsimp
397399
infer_instance
398400

401+
set_option backward.defeqAttrib.useBackward true in
399402
attribute [local simp] Functor.asEquivalence_inverse
400403
Functor.asEquivalence_counitIso_hom_app Functor.asEquivalence_counitIso_inv_app in
401404
instance : Φ.inv.IsInduced where
@@ -406,6 +409,7 @@ instance : Φ.inv.IsInduced where
406409
(Arrow.isoMk (Φ.functor.asEquivalence.counitIso.app _)
407410
(Φ.functor.asEquivalence.counitIso.app _))
408411

412+
set_option backward.defeqAttrib.useBackward true in
409413
lemma isLocalizedEquivalence_of_isInduced :
410414
Φ.IsLocalizedEquivalence := by
411415
refine IsLocalizedEquivalence.of_equivalence _ (fun X Y f hf ↦ ?_)

Mathlib/CategoryTheory/Monoidal/Cartesian/Ring.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ def yonedaRingObj (R : C) [RingObj R] : Cᵒᵖ ⥤ RingCat.{v} where
3636
map_mul' _ _ := MonObj.comp_mul _ _ _
3737
map_add' _ _ := AddMonObj.comp_add _ _ _ }
3838

39+
set_option backward.defeqAttrib.useBackward true in
3940
@[simp]
4041
lemma yonedaRingObj_map_apply {R : C} [RingObj R] {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : X.unop ⟶ R) :
4142
dsimp% (yonedaRingObj R).map f x = f.unop ≫ x := rfl
4243

44+
set_option backward.defeqAttrib.useBackward true in
4345
set_option backward.isDefEq.respectTransparency false in
4446
/-- The yoneda embedding of `RingObjCat C` into presheaves of rings. -/
4547
def yonedaRing : RingObjCat C ⥤ Cᵒᵖ ⥤ RingCat.{v} where
@@ -58,10 +60,12 @@ def yonedaCommRingObj (R : C) [CommRingObj R] : Cᵒᵖ ⥤ CommRingCat.{v} wher
5860
obj X := .of (X.unop ⟶ R)
5961
map f := CommRingCat.ofHom ((yonedaRingObj R).map f).hom
6062

63+
set_option backward.defeqAttrib.useBackward true in
6164
@[simp]
6265
lemma yonedaCommRingObj_map_apply {R : C} [CommRingObj R] {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : X.unop ⟶ R) :
6366
dsimp% (yonedaCommRingObj R).map f x = f.unop ≫ x := rfl
6467

68+
set_option backward.defeqAttrib.useBackward true in
6569
set_option backward.isDefEq.respectTransparency false in
6670
/-- The yoneda embedding of `CommRingObjCat C` into presheaves of commutative rings. -/
6771
@[simps obj]

0 commit comments

Comments
 (0)