@@ -68,7 +68,7 @@ variable {X Y : C} (f : X ⟶ Y)
68
68
69
69
/-- A factorisation of a morphism `f = e ≫ m`, with `m` monic. -/
70
70
structure MonoFactorisation (f : X ⟶ Y) where
71
- I : C -- Porting note: violates naming conventions but can't think a better replacement
71
+ I : C
72
72
m : I ⟶ Y
73
73
[m_mono : Mono m]
74
74
e : X ⟶ I
@@ -221,7 +221,7 @@ variable (f)
221
221
222
222
/-- Data exhibiting that a morphism `f` has an image. -/
223
223
structure ImageFactorisation (f : X ⟶ Y) where
224
- F : MonoFactorisation f -- Porting note: another violation of the naming convention
224
+ F : MonoFactorisation f
225
225
isImage : IsImage F
226
226
227
227
attribute [inherit_doc ImageFactorisation] ImageFactorisation.F ImageFactorisation.isImage
@@ -321,6 +321,18 @@ theorem IsImage.lift_ι {F : MonoFactorisation f} (hF : IsImage F) :
321
321
hF.lift (Image.monoFactorisation f) ≫ image.ι f = F.m :=
322
322
hF.lift_fac _
323
323
324
+ @[reassoc (attr := simp)]
325
+ theorem image.lift_mk_factorThruImage :
326
+ image.lift { I := image f, m := ι f, e := factorThruImage f } ≫ image.ι f = image.ι f :=
327
+ (Image.isImage f).lift_fac _
328
+
329
+ @[reassoc (attr := simp)]
330
+ theorem image.lift_mk_comp {C : Type u} [Category.{v} C] {X Y Z : C}
331
+ (f : X ⟶ Y) (g : Y ⟶ Z) [HasImage g] [HasImage (f ≫ g)]
332
+ (h : Y ⟶ image g) (H : (f ≫ h) ≫ image.ι g = f ≫ g) :
333
+ image.lift { I := image g, m := ι g, e := (f ≫ h) } ≫ image.ι g = image.ι (f ≫ g) :=
334
+ image.lift_fac _
335
+
324
336
-- TODO we could put a category structure on `MonoFactorisation f`,
325
337
-- with the morphisms being `g : I ⟶ I'` commuting with the `m`s
326
338
-- (they then automatically commute with the `e`s)
@@ -441,23 +453,11 @@ def image.eqToHom (h : f = f') : image f ⟶ image f' :=
441
453
instance (h : f = f') : IsIso (image.eqToHom h) :=
442
454
⟨⟨image.eqToHom h.symm,
443
455
⟨(cancel_mono (image.ι f)).1 (by
444
- -- Porting note: added let's for used to be a simp [ image.eqToHom ]
445
- let F : MonoFactorisation f' :=
446
- ⟨image f, image.ι f, factorThruImage f, (by cat_disch)⟩
447
- dsimp [image.eqToHom]
448
- rw [Category.id_comp,Category.assoc,image.lift_fac F]
449
- let F' : MonoFactorisation f :=
450
- ⟨image f', image.ι f', factorThruImage f', (by cat_disch)⟩
451
- rw [image.lift_fac F'] ),
456
+ subst h
457
+ simp [image.eqToHom, Category.assoc, Category.id_comp]),
452
458
(cancel_mono (image.ι f')).1 (by
453
- -- Porting note: added let's for used to be a simp [ image.eqToHom ]
454
- let F' : MonoFactorisation f :=
455
- ⟨image f', image.ι f', factorThruImage f', (by cat_disch)⟩
456
- dsimp [image.eqToHom]
457
- rw [Category.id_comp,Category.assoc,image.lift_fac F']
458
- let F : MonoFactorisation f' :=
459
- ⟨image f, image.ι f, factorThruImage f, (by cat_disch)⟩
460
- rw [image.lift_fac F])⟩⟩⟩
459
+ subst h
460
+ simp [image.eqToHom])⟩⟩⟩
461
461
462
462
/-- An equation between morphisms gives an isomorphism between the images. -/
463
463
def image.eqToIso (h : f = f') : image f ≅ image f' :=
@@ -469,8 +469,8 @@ the image inclusion maps commute with `image.eqToIso`.
469
469
theorem image.eq_fac [HasEqualizers C] (h : f = f') :
470
470
image.ι f = (image.eqToIso h).hom ≫ image.ι f' := by
471
471
apply image.ext
472
- dsimp [asIso,image.eqToIso, image.eqToHom]
473
- rw [ image.lift_fac] -- Porting note: simp did not fire with this it seems
472
+ subst h
473
+ simp [asIso, image.eqToIso, image.eqToHom]
474
474
475
475
end
476
476
@@ -488,8 +488,7 @@ def image.preComp [HasImage g] [HasImage (f ≫ g)] : image (f ≫ g) ⟶ image
488
488
@[reassoc (attr := simp)]
489
489
theorem image.preComp_ι [HasImage g] [HasImage (f ≫ g)] :
490
490
image.preComp f g ≫ image.ι g = image.ι (f ≫ g) := by
491
- dsimp [image.preComp]
492
- rw [image.lift_fac] -- Porting note: also here, see image.eq_fac
491
+ simp [image.preComp]
493
492
494
493
@[reassoc (attr := simp)]
495
494
theorem image.factorThruImage_preComp [HasImage g] [HasImage (f ≫ g)] :
@@ -512,9 +511,8 @@ theorem image.preComp_comp {W : C} (h : Z ⟶ W) [HasImage (g ≫ h)] [HasImage
512
511
image.preComp f (g ≫ h) ≫ image.preComp g h =
513
512
image.eqToHom (Category.assoc f g h).symm ≫ image.preComp (f ≫ g) h := by
514
513
apply (cancel_mono (image.ι h)).1
515
- dsimp [image.preComp, image.eqToHom]
516
- repeat (rw [Category.assoc,image.lift_fac])
517
- rw [image.lift_fac,image.lift_fac]
514
+ simp only [preComp, Category.assoc, fac, lift_mk_comp, eqToHom]
515
+ rw [image.lift_fac]
518
516
519
517
variable [HasEqualizers C]
520
518
@@ -673,8 +671,6 @@ section
673
671
674
672
attribute [local ext] ImageMap
675
673
676
- /- Porting note: ImageMap.mk.injEq has LHS simplify to True due to the next instance
677
- We make a replacement -/
678
674
theorem ImageMap.map_uniq_aux {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] {sq : f ⟶ g}
679
675
(map : image f.hom ⟶ image g.hom)
680
676
(map_ι : map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right := by cat_disch)
@@ -683,11 +679,11 @@ theorem ImageMap.map_uniq_aux {f g : Arrow C} [HasImage f.hom] [HasImage g.hom]
683
679
have : map ≫ image.ι g.hom = map' ≫ image.ι g.hom := by rw [map_ι,map_ι']
684
680
apply (cancel_mono (image.ι g.hom)).1 this
685
681
686
- -- Porting note: added to get variant on ImageMap.mk.injEq below
687
682
theorem ImageMap.map_uniq {f g : Arrow C} [HasImage f.hom] [HasImage g.hom]
688
683
{sq : f ⟶ g} (F G : ImageMap sq) : F.map = G.map := by
689
684
apply ImageMap.map_uniq_aux _ F.map_ι _ G.map_ι
690
685
686
+ /-- `@[simp]`-normal form of `ImageMap.mk.injEq`. -/
691
687
@[simp]
692
688
theorem ImageMap.mk.injEq' {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] {sq : f ⟶ g}
693
689
(map : image f.hom ⟶ image g.hom)
0 commit comments