Skip to content

Commit aa03405

Browse files
Merge pull request #2291 from CharlesCNorton/master
Add canonical morphism helpers to Objects.v
2 parents 1cd0581 + a5caf15 commit aa03405

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

theories/Categories/Category/Objects.v

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,25 @@ Existing Instance isinitial_object_initial.
4646

4747
Arguments unique_up_to_unique_isomorphism [C] P.
4848

49+
(** ** Canonical morphisms *)
50+
51+
(** The unique morphism from an initial object. *)
52+
Definition map_from_initial {C : PreCategory} {I : object C}
53+
`{IsInitialObject C I} (Y : object C)
54+
: morphism C I Y
55+
:= center (morphism C I Y).
56+
57+
(** The unique morphism to a terminal object. *)
58+
Definition map_to_terminal {C : PreCategory} {T : object C}
59+
`{IsTerminalObject C T} (X : object C)
60+
: morphism C X T
61+
:= center (morphism C X T).
62+
4963
(** ** Initial and terminal objects are unique up to unique isomorphism *)
5064
Section CategoryObjectsTheorems.
5165
Variable C : PreCategory.
5266

53-
Local Ltac unique :=
67+
Ltac unique :=
5468
repeat first [ intro
5569
| exists _
5670
| exists (center (morphism C _ _))
@@ -69,4 +83,20 @@ Section CategoryObjectsTheorems.
6983
Proof.
7084
unique.
7185
Qed.
86+
87+
(** Any two morphisms from an initial object are equal. *)
88+
Theorem initial_morphism_unique {I X : object C}
89+
`{IsInitialObject C I} (f g : morphism C I X)
90+
: f = g.
91+
Proof.
92+
unique.
93+
Qed.
94+
95+
(** Any two morphisms to a terminal object are equal. *)
96+
Theorem terminal_morphism_unique {T X : object C}
97+
`{IsTerminalObject C T} (f g : morphism C X T)
98+
: f = g.
99+
Proof.
100+
unique.
101+
Qed.
72102
End CategoryObjectsTheorems.

0 commit comments

Comments
 (0)