A Lean Companion to Conceptual Mathematics

Session 23: More on universal mapping propertiesπŸ”—

1. A category of pairs of mapsπŸ”—

Exercise 1 (p. 256)

Formulate and prove in two ways the theorem of uniqueness of the product of two objects B_1 and B_2 of the category π’ž. (One way is the direct proof and the other way is to define the category π’ž_{B_{1}B_{2}}, to prove that it is a category, to prove that its terminal object is the same as a product of B_1 and B_2 in π’ž, and to appeal to the theorem on uniqueness of terminal objects.)

Solution: Exercise 1

The direct proof was already given in Article IV. In Exercise 12 of Article IV, we proved uniqueness of the product in the case of two objects, and on p. 221 we proved uniqueness in the case of an arbitrary family of objects.

We now give the second proof, starting with the definition of the category π’ž_{B_{1}B_{2}}.

variable {π’ž : Type u} [Category.{v, u} π’ž] structure PairOfMaps (B₁ Bβ‚‚ : π’ž) where carrier : π’ž p₁ : carrier ⟢ B₁ pβ‚‚ : carrier ⟢ Bβ‚‚

We show that π’ž_{B_{1}B_{2}} is a valid category.

instance {B₁ Bβ‚‚ : π’ž} : Category (PairOfMaps B₁ Bβ‚‚) where Hom X Y := { f : X.carrier ⟢ Y.carrier // Y.p₁ ⊚ f = X.p₁ ∧ Y.pβ‚‚ ⊚ f = X.pβ‚‚ } id X := βŸ¨πŸ™ X.carrier, π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX:PairOfMaps B₁ Bβ‚‚βŠ’ X.p₁ ⊚ πŸ™ X.carrier = X.p₁ ∧ X.pβ‚‚ ⊚ πŸ™ X.carrier = X.pβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX:PairOfMaps B₁ Bβ‚‚βŠ’ X.p₁ ⊚ πŸ™ X.carrier = X.pβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX:PairOfMaps B₁ Bβ‚‚βŠ’ X.pβ‚‚ ⊚ πŸ™ X.carrier = X.pβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX:PairOfMaps B₁ Bβ‚‚βŠ’ X.p₁ ⊚ πŸ™ X.carrier = X.pβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX:PairOfMaps B₁ Bβ‚‚βŠ’ X.pβ‚‚ ⊚ πŸ™ X.carrier = X.pβ‚‚ All goals completed! πŸ™βŸ© comp f g := ⟨g.val ⊚ f.val, π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX✝:PairOfMaps B₁ Bβ‚‚Y✝:PairOfMaps B₁ Bβ‚‚Z✝:PairOfMaps B₁ Bβ‚‚f:{ f // Y✝.p₁ ⊚ f = X✝.p₁ ∧ Y✝.pβ‚‚ ⊚ f = X✝.pβ‚‚ }g:{ f // Z✝.p₁ ⊚ f = Y✝.p₁ ∧ Z✝.pβ‚‚ ⊚ f = Y✝.pβ‚‚ }⊒ Z✝.p₁ ⊚ ↑g ⊚ ↑f = X✝.p₁ ∧ Z✝.pβ‚‚ ⊚ ↑g ⊚ ↑f = X✝.pβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX✝:PairOfMaps B₁ Bβ‚‚Y✝:PairOfMaps B₁ Bβ‚‚Z✝:PairOfMaps B₁ Bβ‚‚f:{ f // Y✝.p₁ ⊚ f = X✝.p₁ ∧ Y✝.pβ‚‚ ⊚ f = X✝.pβ‚‚ }g:{ f // Z✝.p₁ ⊚ f = Y✝.p₁ ∧ Z✝.pβ‚‚ ⊚ f = Y✝.pβ‚‚ }⊒ Z✝.p₁ ⊚ ↑g ⊚ ↑f = X✝.pβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX✝:PairOfMaps B₁ Bβ‚‚Y✝:PairOfMaps B₁ Bβ‚‚Z✝:PairOfMaps B₁ Bβ‚‚f:{ f // Y✝.p₁ ⊚ f = X✝.p₁ ∧ Y✝.pβ‚‚ ⊚ f = X✝.pβ‚‚ }g:{ f // Z✝.p₁ ⊚ f = Y✝.p₁ ∧ Z✝.pβ‚‚ ⊚ f = Y✝.pβ‚‚ }⊒ Z✝.pβ‚‚ ⊚ ↑g ⊚ ↑f = X✝.pβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX✝:PairOfMaps B₁ Bβ‚‚Y✝:PairOfMaps B₁ Bβ‚‚Z✝:PairOfMaps B₁ Bβ‚‚f:{ f // Y✝.p₁ ⊚ f = X✝.p₁ ∧ Y✝.pβ‚‚ ⊚ f = X✝.pβ‚‚ }g:{ f // Z✝.p₁ ⊚ f = Y✝.p₁ ∧ Z✝.pβ‚‚ ⊚ f = Y✝.pβ‚‚ }⊒ Z✝.p₁ ⊚ ↑g ⊚ ↑f = X✝.p₁ All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žX✝:PairOfMaps B₁ Bβ‚‚Y✝:PairOfMaps B₁ Bβ‚‚Z✝:PairOfMaps B₁ Bβ‚‚f:{ f // Y✝.p₁ ⊚ f = X✝.p₁ ∧ Y✝.pβ‚‚ ⊚ f = X✝.pβ‚‚ }g:{ f // Z✝.p₁ ⊚ f = Y✝.p₁ ∧ Z✝.pβ‚‚ ⊚ f = Y✝.pβ‚‚ }⊒ Z✝.pβ‚‚ ⊚ ↑g ⊚ ↑f = X✝.pβ‚‚ All goals completed! πŸ™βŸ©

Next we show that the terminal object of π’ž_{B_{1}B_{2}} is the same as a product of B_1 and B_2 in π’ž.

example {B₁ Bβ‚‚ : π’ž} {T : PairOfMaps B₁ Bβ‚‚} (hT : IsTerminal T) : βˆ€ (X : π’ž) (f₁ : X ⟢ B₁) (fβ‚‚ : X ⟢ Bβ‚‚), βˆƒ! f : X ⟢ T.carrier, T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚ := π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal T⊒ βˆ€ (X : π’ž) (f₁ : X ⟢ B₁) (fβ‚‚ : X ⟢ Bβ‚‚), βˆƒ! f, T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚βŠ’ βˆƒ! f, T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }⊒ βˆƒ! f, T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ βˆƒ! f, T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) ↑fP ∧ βˆ€ (y : X ⟢ T.carrier), (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) y β†’ y = ↑fP π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) ↑fPπ’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ βˆ€ (y : X ⟢ T.carrier), (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) y β†’ y = ↑fP π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) ↑fP All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XP⊒ βˆ€ (y : X ⟢ T.carrier), (fun f ↦ T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚) y β†’ y = ↑fP π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XPf:X ⟢ T.carrierhf:T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚βŠ’ f = ↑fP π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT:PairOfMaps B₁ Bβ‚‚hT:IsTerminal TX:π’žf₁:X ⟢ B₁fβ‚‚:X ⟢ Bβ‚‚XP:PairOfMaps B₁ Bβ‚‚ := { carrier := X, p₁ := f₁, pβ‚‚ := fβ‚‚ }fP:XP ⟢ T := hT.from XPf:X ⟢ T.carrierhf:T.p₁ ⊚ f = f₁ ∧ T.pβ‚‚ ⊚ f = fβ‚‚fP':XP ⟢ T := ⟨f, hf⟩⊒ f = ↑fP All goals completed! πŸ™

Finally we appeal to the theorem on uniqueness of terminal objects.

example {B₁ Bβ‚‚ : π’ž} {T₁ Tβ‚‚ : PairOfMaps B₁ Bβ‚‚} (hT₁ : IsTerminal T₁) (hTβ‚‚ : IsTerminal Tβ‚‚) : Nonempty (T₁.carrier β‰… Tβ‚‚.carrier) := π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT₁:PairOfMaps B₁ Bβ‚‚Tβ‚‚:PairOfMaps B₁ Bβ‚‚hT₁:IsTerminal T₁hTβ‚‚:IsTerminal Tβ‚‚βŠ’ Nonempty (T₁.carrier β‰… Tβ‚‚.carrier) π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT₁:PairOfMaps B₁ Bβ‚‚Tβ‚‚:PairOfMaps B₁ Bβ‚‚hT₁:IsTerminal T₁hTβ‚‚:IsTerminal Tβ‚‚t:T₁ ⟢ Tβ‚‚ht_iso:IsIso tright✝:βˆ€ (y : T₁ ⟢ Tβ‚‚), (fun s ↦ IsIso s) y β†’ y = t⊒ Nonempty (T₁.carrier β‰… Tβ‚‚.carrier) π’ž:Type uinst✝:Category.{v, u} π’žB₁:π’žBβ‚‚:π’žT₁:PairOfMaps B₁ Bβ‚‚Tβ‚‚:PairOfMaps B₁ Bβ‚‚hT₁:IsTerminal T₁hTβ‚‚:IsTerminal Tβ‚‚t:T₁ ⟢ Tβ‚‚ht_iso:IsIso tright✝:βˆ€ (y : T₁ ⟢ Tβ‚‚), (fun s ↦ IsIso s) y β†’ y = t⊒ T₁.carrier β‰… Tβ‚‚.carrier All goals completed! πŸ™

2. How to calculate productsπŸ”—

Definition: ⟨f₁, fβ‚‚βŸ© (p. 257)

For any pair of maps {A \xrightarrow{f_1} B_1}, {A \xrightarrow{f_2} B_2}, {\langle f_1, f_2 \rangle} is the unique map {A \rightarrow B_1 \times B_2} that satisfies the equations {p_1 \langle f_1, f_2 \rangle = f_1} and {p_2 \langle f_1, f_2 \rangle = f_2}.

The relevant mathlib definition here is prod.lift, which we print below for reference.

@[reducible] def CategoryTheory.Limits.prod.lift.{v, u} : {C : Type u} β†’ [inst : Category.{v, u} C] β†’ {W X Y : C} β†’ [inst_1 : HasBinaryProduct X Y] β†’ (W ⟢ X) β†’ (W ⟢ Y) β†’ (W ⟢ X β¨― Y) := fun {C} [Category.{v, u} C] {W X Y} [HasBinaryProduct X Y] f g ↦ limit.lift (pair X Y) (BinaryFan.mk f g)#print prod.lift
@[reducible] def CategoryTheory.Limits.prod.lift.{v, u} : {C : Type u} β†’
  [inst : Category.{v, u} C] β†’ {W X Y : C} β†’ [inst_1 : HasBinaryProduct X Y] β†’ (W ⟢ X) β†’ (W ⟢ Y) β†’ (W ⟢ X β¨― Y) :=
fun {C} [Category.{v, u} C] {W X Y} [HasBinaryProduct X Y] f g ↦ limit.lift (pair X Y) (BinaryFan.mk f g)
Exercise 2 (p. 260)

Try to create the definition of 'sum' of two objects, in terms of a universal mapping property 'dual' to that of product, by reversing all maps in the definition of product. Then verify that in the category of sets and in the category of graphs, this property actually is satisfied by the intuitive idea of sum: 'Put together with no overlap and no interaction'.

Solution: Exercise 2

We start by defining a CategorySum structure to represent the sum of two objects in an arbitrary category as the dual of the product.

variable {π’ž : Type u} [Category.{v, u} π’ž] structure CategorySum (B₁ Bβ‚‚ : π’ž) where carrier : π’ž j₁ : B₁ ⟢ carrier jβ‚‚ : Bβ‚‚ ⟢ carrier h_univ : βˆ€ (Y : π’ž) (g₁ : B₁ ⟢ Y) (gβ‚‚ : Bβ‚‚ ⟢ Y), βˆƒ! g : carrier ⟢ Y, g ⊚ j₁ = g₁ ∧ g ⊚ jβ‚‚ = gβ‚‚

In the category of sets (types), the intuitive idea of sum as the disjoint union of two sets (types) is given by the Sum type, so we show that Sum satisfies the universal mapping property of our CategorySum structure.

open ConcreteCategory in example {B₁ Bβ‚‚ : Type} : CategorySum B₁ Bβ‚‚ := { carrier := Sum B₁ Bβ‚‚ j₁ := β†ΎSum.inl jβ‚‚ := β†ΎSum.inr h_univ Y g₁ gβ‚‚:= π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆƒ! g, g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) ∧ βˆ€ (y : B₁ βŠ• Bβ‚‚ ⟢ Y), (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) y β†’ y = β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚)π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆ€ (y : B₁ βŠ• Bβ‚‚ ⟢ Y), (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) y β†’ y = β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) ⊚ β†ΎSum.inl = gβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) ⊚ β†ΎSum.inr = gβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) ⊚ β†ΎSum.inl = gβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚) ⊚ β†ΎSum.inr = gβ‚‚ All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆ€ (y : B₁ βŠ• Bβ‚‚ ⟢ Y), (fun g ↦ g ⊚ β†ΎSum.inl = g₁ ∧ g ⊚ β†ΎSum.inr = gβ‚‚) y β†’ y = β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:B₁ βŠ• Bβ‚‚ ⟢ Yhg₁:g ⊚ β†ΎSum.inl = g₁hgβ‚‚:g ⊚ β†ΎSum.inr = gβ‚‚βŠ’ g = β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:B₁ βŠ• Bβ‚‚ ⟢ Yhg₁:g ⊚ β†ΎSum.inl = g₁hgβ‚‚:g ⊚ β†ΎSum.inr = gβ‚‚x:B₁ βŠ• Bβ‚‚βŠ’ (hom g).toFun x = (hom (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚)).toFun x cases x with π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:B₁ βŠ• Bβ‚‚ ⟢ Yhg₁:g ⊚ β†ΎSum.inl = g₁hgβ‚‚:g ⊚ β†ΎSum.inr = gβ‚‚b₁:Bβ‚βŠ’ (hom g).toFun (Sum.inl b₁) = (hom (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚)).toFun (Sum.inl b₁) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:TypeBβ‚‚:TypeY:Typeg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:B₁ βŠ• Bβ‚‚ ⟢ Yhg₁:g ⊚ β†ΎSum.inl = g₁hgβ‚‚:g ⊚ β†ΎSum.inr = gβ‚‚bβ‚‚:Bβ‚‚βŠ’ (hom g).toFun (Sum.inr bβ‚‚) = (hom (β†Ύfun x ↦ match x with | Sum.inl b₁ => (hom g₁) b₁ | Sum.inr bβ‚‚ => (hom gβ‚‚) bβ‚‚)).toFun (Sum.inr bβ‚‚) All goals completed! πŸ™ }

In the category of graphs, the intuitive idea of sum can be formalised as follows:

def IGSum (B₁ Bβ‚‚ : IrreflexiveGraph) : IrreflexiveGraph := { carrierA := Sum B₁.carrierA Bβ‚‚.carrierA carrierD := Sum B₁.carrierD Bβ‚‚.carrierD toSrc := β†Ύfun | Sum.inl a₁ => Sum.inl (B₁.toSrc a₁) | Sum.inr aβ‚‚ => Sum.inr (Bβ‚‚.toSrc aβ‚‚) toTgt := β†Ύfun | Sum.inl a₁ => Sum.inl (B₁.toTgt a₁) | Sum.inr aβ‚‚ => Sum.inr (Bβ‚‚.toTgt aβ‚‚) } def IGSum.inl {B₁ Bβ‚‚ : IrreflexiveGraph} : B₁ ⟢ IGSum B₁ Bβ‚‚ := ⟨ (β†ΎSum.inl, β†ΎSum.inl), π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inl, β†ΎSum.inl).1 ∧ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inl, β†ΎSum.inl).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inl, β†ΎSum.inl).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inl, β†ΎSum.inl).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inl, β†ΎSum.inl).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inl, β†ΎSum.inl).2 ⊚ B₁.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inl, β†ΎSum.inl).1 All goals completed! πŸ™ ⟩ def IGSum.inr {B₁ Bβ‚‚ : IrreflexiveGraph} : Bβ‚‚ ⟢ IGSum B₁ Bβ‚‚ := ⟨ (β†ΎSum.inr, β†ΎSum.inr), π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inr, β†ΎSum.inr).1 ∧ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inr, β†ΎSum.inr).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inr, β†ΎSum.inr).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inr, β†ΎSum.inr).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toSrc = (IGSum B₁ Bβ‚‚).toSrc ⊚ (β†ΎSum.inr, β†ΎSum.inr).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraph⊒ (β†ΎSum.inr, β†ΎSum.inr).2 ⊚ Bβ‚‚.toTgt = (IGSum B₁ Bβ‚‚).toTgt ⊚ (β†ΎSum.inr, β†ΎSum.inr).1 All goals completed! πŸ™ ⟩

We then show that IGSum satisfies the universal mapping property of our CategorySum structure.

open ConcreteCategory in example {B₁ Bβ‚‚ : IrreflexiveGraph} : CategorySum B₁ Bβ‚‚ := { carrier := IGSum B₁ Bβ‚‚ j₁ := IGSum.inl jβ‚‚ := IGSum.inr h_univ Y g₁ gβ‚‚:= π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆƒ! g, g ⊚ IGSum.inl = g₁ ∧ g ⊚ IGSum.inr = gβ‚‚ use ⟨ (β†Ύfun | Sum.inl a₁ => g₁.val.1 a₁ | Sum.inr aβ‚‚ => gβ‚‚.val.1 aβ‚‚, β†Ύfun | Sum.inl d₁ => g₁.val.2 d₁ | Sum.inr dβ‚‚ => gβ‚‚.val.2 dβ‚‚), π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc = Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1 ∧ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt = Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc = Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt = Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc = Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt = Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yx:(IGSum B₁ Bβ‚‚).carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt)).toFun x = (hom (Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun x π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yx:(IGSum B₁ Bβ‚‚).carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc)).toFun x = (hom (Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun x cases x with π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Ya₁:B₁.carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc)).toFun (Sum.inl a₁) = (hom (Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun (Sum.inl a₁) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yaβ‚‚:Bβ‚‚.carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toSrc)).toFun (Sum.inr aβ‚‚) = (hom (Y.toSrc ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun (Sum.inr aβ‚‚) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yx:(IGSum B₁ Bβ‚‚).carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt)).toFun x = (hom (Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun x cases x with π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Ya₁:B₁.carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt)).toFun (Sum.inl a₁) = (hom (Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun (Sum.inl a₁) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yaβ‚‚:Bβ‚‚.carrierA⊒ (hom ((β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).2 ⊚ (IGSum B₁ Bβ‚‚).toTgt)).toFun (Sum.inr aβ‚‚) = (hom (Y.toTgt ⊚ (β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚).1)).toFun (Sum.inr aβ‚‚) All goals completed! πŸ™ ⟩ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (fun g ↦ g ⊚ IGSum.inl = g₁ ∧ g ⊚ IGSum.inr = gβ‚‚) ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆ€ (y : IGSum B₁ Bβ‚‚ ⟢ Y), (fun g ↦ g ⊚ IGSum.inl = g₁ ∧ g ⊚ IGSum.inr = gβ‚‚) y β†’ y = ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ (fun g ↦ g ⊚ IGSum.inl = g₁ ∧ g ⊚ IGSum.inr = gβ‚‚) ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© ⊚ IGSum.inl = gβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© ⊚ IGSum.inr = gβ‚‚ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© ⊚ IGSum.inl = gβ‚π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© ⊚ IGSum.inr = gβ‚‚ All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Y⊒ βˆ€ (y : IGSum B₁ Bβ‚‚ ⟢ Y), (fun g ↦ g ⊚ IGSum.inl = g₁ ∧ g ⊚ IGSum.inr = gβ‚‚) y β†’ y = ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚βŠ’ g = ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2⊒ g = ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2⊒ g = ⟨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ© π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2⊒ (↑g).1 = (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2⊒ (↑g).2 = (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2⊒ (↑g).1 = (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).1π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2⊒ (↑g).2 = (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2 π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2x:(IGSum B₁ Bβ‚‚).carrierD⊒ (hom (↑g).2).toFun x = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2).toFun x π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2x:(IGSum B₁ Bβ‚‚).carrierA⊒ (hom (↑g).1).toFun x = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).1).toFun x cases x with π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2a₁:B₁.carrierA⊒ (hom (↑g).1).toFun (Sum.inl a₁) = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).1).toFun (Sum.inl a₁) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2aβ‚‚:Bβ‚‚.carrierA⊒ (hom (↑g).1).toFun (Sum.inr aβ‚‚) = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).1).toFun (Sum.inr aβ‚‚) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2x:(IGSum B₁ Bβ‚‚).carrierD⊒ (hom (↑g).2).toFun x = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2).toFun x cases x with π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2d₁:B₁.carrierD⊒ (hom (↑g).2).toFun (Sum.inl d₁) = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2).toFun (Sum.inl d₁) All goals completed! πŸ™ π’ž:Type uinst✝:Category.{v, u} π’žB₁:IrreflexiveGraphBβ‚‚:IrreflexiveGraphY:IrreflexiveGraphg₁:B₁ ⟢ Ygβ‚‚:Bβ‚‚ ⟢ Yg:IGSum B₁ Bβ‚‚ ⟢ Yhg₁:g ⊚ IGSum.inl = g₁hgβ‚‚:g ⊚ IGSum.inr = gβ‚‚hg₁1:(↑(g ⊚ IGSum.inl)).1 = (↑g₁).1hg₁2:(↑(g ⊚ IGSum.inl)).2 = (↑g₁).2hgβ‚‚1:(↑(g ⊚ IGSum.inr)).1 = (↑gβ‚‚).1hgβ‚‚2:(↑(g ⊚ IGSum.inr)).2 = (↑gβ‚‚).2dβ‚‚:Bβ‚‚.carrierD⊒ (hom (↑g).2).toFun (Sum.inr dβ‚‚) = (hom (β†‘βŸ¨(β†Ύfun x ↦ match x with | Sum.inl a₁ => (hom (↑g₁).1) a₁ | Sum.inr aβ‚‚ => (hom (↑gβ‚‚).1) aβ‚‚, β†Ύfun x ↦ match x with | Sum.inl d₁ => (hom (↑g₁).2) d₁ | Sum.inr dβ‚‚ => (hom (↑gβ‚‚).2) dβ‚‚), β‹―βŸ©).2).toFun (Sum.inr dβ‚‚) All goals completed! πŸ™ }