Skip to content

Commit da11a5f

Browse files
committed
Merge branch 'nightly-testing' of github.com:leanprover-community/mathlib4 into nightly-testing
2 parents 2c776c1 + 3282db1 commit da11a5f

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

Mathlib/CategoryTheory/Comma/StructuredArrow/Basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ def isoMk {f f' : StructuredArrow S T} (g : f.right ≅ f'.right)
154154
f ≅ f' :=
155155
Comma.isoMk (eqToIso (by ext)) g (by simpa using w.symm)
156156

157+
theorem obj_ext (x y : StructuredArrow S T) (hr : x.right = y.right)
158+
(hh : x.hom ≫ T.map (eqToHom hr) = y.hom) : x = y := by
159+
cases x
160+
cases y
161+
cases hr
162+
aesop_cat
163+
157164
theorem ext {A B : StructuredArrow S T} (f g : A ⟶ B) : f.right = g.right → f = g :=
158165
CommaMorphism.ext (Subsingleton.elim _ _)
159166

@@ -500,6 +507,13 @@ def isoMk {f f' : CostructuredArrow S T} (g : f.left ≅ f'.left)
500507
(w : S.map g.hom ≫ f'.hom = f.hom := by aesop_cat) : f ≅ f' :=
501508
Comma.isoMk g (eqToIso (by ext)) (by simpa using w)
502509

510+
theorem obj_ext (x y : CostructuredArrow S T) (hl : x.left = y.left)
511+
(hh : S.map (eqToHom hl) ≫ y.hom = x.hom) : x = y := by
512+
cases x
513+
cases y
514+
cases hl
515+
aesop_cat
516+
503517
theorem ext {A B : CostructuredArrow S T} (f g : A ⟶ B) (h : f.left = g.left) : f = g :=
504518
CommaMorphism.ext h (Subsingleton.elim _ _)
505519

Mathlib/CategoryTheory/IsConnected.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,10 @@ theorem nonempty_hom_of_preconnected_groupoid {G} [Groupoid G] [IsPreconnected G
457457

458458
attribute [instance] nonempty_hom_of_preconnected_groupoid
459459

460+
instance isPreconnected_of_subsingleton [Subsingleton J] : IsPreconnected J where
461+
iso_constant {α} F j := ⟨NatIso.ofComponents (fun x ↦ eqToIso (by simp [Subsingleton.allEq x j]))⟩
462+
463+
instance isConnected_of_nonempty_and_subsingleton [Nonempty J] [Subsingleton J] :
464+
IsConnected J where
465+
460466
end CategoryTheory

Mathlib/CategoryTheory/Limits/Final.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,26 @@ theorem initial_iff_initial_comp [Initial F] : Initial G ↔ Initial (F ⋙ G) :
891891

892892
end
893893

894+
section
895+
896+
variable {C : Type u₁} [Category.{v₁} C] {c : C}
897+
898+
lemma final_fromPUnit_of_isTerminal (hc : Limits.IsTerminal c) : (fromPUnit c).Final where
899+
out c' := by
900+
letI : Inhabited (StructuredArrow c' (fromPUnit c)) := ⟨.mk (Y := default) (hc.from c')⟩
901+
letI : Subsingleton (StructuredArrow c' (fromPUnit c)) :=
902+
fun i j ↦ StructuredArrow.obj_ext _ _ (by aesop_cat) (hc.hom_ext _ _)⟩
903+
infer_instance
904+
905+
lemma initial_fromPUnit_of_isInitial (hc : Limits.IsInitial c) : (fromPUnit c).Initial where
906+
out c' := by
907+
letI : Inhabited (CostructuredArrow (fromPUnit c) c') := ⟨.mk (Y := default) (hc.to c')⟩
908+
letI : Subsingleton (CostructuredArrow (fromPUnit c) c') :=
909+
fun i j ↦ CostructuredArrow.obj_ext _ _ (by aesop_cat) (hc.hom_ext _ _)⟩
910+
infer_instance
911+
912+
end
913+
894914
end Functor
895915

896916
section Filtered

0 commit comments

Comments
 (0)