Metamath Proof Explorer


Theorem irinitoringc

Description: The ring of integers is an initial object in the category of unital rings (within a universe containing the ring of integers). Example 7.2 (6) of Adamek p. 101 , and example in Lang p. 58. (Contributed by AV, 3-Apr-2020)

Ref Expression
Hypotheses irinitoringc.u φ U V
irinitoringc.z φ ring U
irinitoringc.c C = RingCat U
Assertion irinitoringc φ ring InitO C

Proof

Step Hyp Ref Expression
1 irinitoringc.u φ U V
2 irinitoringc.z φ ring U
3 irinitoringc.c C = RingCat U
4 zex V
5 4 mptex z z r 1 r V
6 eqid Base C = Base C
7 eqid Hom C = Hom C
8 3 6 1 7 ringchomfval φ Hom C = RingHom Base C × Base C
9 8 adantr φ r Base C Hom C = RingHom Base C × Base C
10 9 oveqd φ r Base C ring Hom C r = ring RingHom Base C × Base C r
11 id ring U ring U
12 zringring ring Ring
13 12 a1i ring U ring Ring
14 11 13 elind ring U ring U Ring
15 2 14 syl φ ring U Ring
16 3 6 1 ringcbas φ Base C = U Ring
17 15 16 eleqtrrd φ ring Base C
18 17 adantr φ r Base C ring Base C
19 simpr φ r Base C r Base C
20 18 19 ovresd φ r Base C ring RingHom Base C × Base C r = ring RingHom r
21 16 eleq2d φ r Base C r U Ring
22 elin r U Ring r U r Ring
23 22 simprbi r U Ring r Ring
24 21 23 syl6bi φ r Base C r Ring
25 24 imp φ r Base C r Ring
26 eqid r = r
27 eqid z z r 1 r = z z r 1 r
28 eqid 1 r = 1 r
29 26 27 28 mulgrhm2 r Ring ring RingHom r = z z r 1 r
30 25 29 syl φ r Base C ring RingHom r = z z r 1 r
31 10 20 30 3eqtrd φ r Base C ring Hom C r = z z r 1 r
32 sneq f = z z r 1 r f = z z r 1 r
33 32 eqeq2d f = z z r 1 r ring Hom C r = f ring Hom C r = z z r 1 r
34 33 spcegv z z r 1 r V ring Hom C r = z z r 1 r f ring Hom C r = f
35 5 31 34 mpsyl φ r Base C f ring Hom C r = f
36 eusn ∃! f f ring Hom C r f ring Hom C r = f
37 35 36 sylibr φ r Base C ∃! f f ring Hom C r
38 37 ralrimiva φ r Base C ∃! f f ring Hom C r
39 3 ringccat U V C Cat
40 1 39 syl φ C Cat
41 12 a1i φ ring Ring
42 2 41 elind φ ring U Ring
43 42 16 eleqtrrd φ ring Base C
44 6 7 40 43 isinito φ ring InitO C r Base C ∃! f f ring Hom C r
45 38 44 mpbird φ ring InitO C