Metamath Proof Explorer


Theorem corcltrcl

Description: The composition of the reflexive and transitive closures is the reflexive-transitive closure. (Contributed by RP, 17-Jun-2020)

Ref Expression
Assertion corcltrcl r* t+ = t*

Proof

Step Hyp Ref Expression
1 dfrcl4 r* = a V i 0 1 a r i
2 dftrcl3 t+ = b V j b r j
3 dfrtrcl3 t* = c V k 0 c r k
4 prex 0 1 V
5 nnex V
6 df-n0 0 = 0
7 uncom 0 = 0
8 df-pr 0 1 = 0 1
9 8 uneq1i 0 1 = 0 1
10 unass 0 1 = 0 1
11 1nn 1
12 snssi 1 1
13 11 12 ax-mp 1
14 ssequn1 1 1 =
15 13 14 mpbi 1 =
16 15 uneq2i 0 1 = 0
17 9 10 16 3eqtrri 0 = 0 1
18 6 7 17 3eqtri 0 = 0 1
19 oveq2 k = i d r k = d r i
20 19 cbviunv k 0 1 d r k = i 0 1 d r i
21 ss2iun i 0 1 d r i j d r j r i i 0 1 d r i i 0 1 j d r j r i
22 relexp1g d V d r 1 = d
23 22 elv d r 1 = d
24 oveq2 j = 1 d r j = d r 1
25 24 ssiun2s 1 d r 1 j d r j
26 11 25 ax-mp d r 1 j d r j
27 23 26 eqsstrri d j d r j
28 27 a1i i 0 1 d j d r j
29 ovex d r j V
30 5 29 iunex j d r j V
31 30 a1i i 0 1 j d r j V
32 0nn0 0 0
33 1nn0 1 0
34 prssi 0 0 1 0 0 1 0
35 32 33 34 mp2an 0 1 0
36 35 sseli i 0 1 i 0
37 28 31 36 relexpss1d i 0 1 d r i j d r j r i
38 21 37 mprg i 0 1 d r i i 0 1 j d r j r i
39 20 38 eqsstri k 0 1 d r k i 0 1 j d r j r i
40 oveq2 k = j d r k = d r j
41 40 cbviunv k d r k = j d r j
42 relexp1g j d r j V j d r j r 1 = j d r j
43 30 42 ax-mp j d r j r 1 = j d r j
44 41 43 eqtr4i k d r k = j d r j r 1
45 1ex 1 V
46 45 prid2 1 0 1
47 oveq2 i = 1 j d r j r i = j d r j r 1
48 47 ssiun2s 1 0 1 j d r j r 1 i 0 1 j d r j r i
49 46 48 ax-mp j d r j r 1 i 0 1 j d r j r i
50 44 49 eqsstri k d r k i 0 1 j d r j r i
51 c0ex 0 V
52 51 prid1 0 0 1
53 oveq2 k = 0 d r k = d r 0
54 53 ssiun2s 0 0 1 d r 0 k 0 1 d r k
55 52 54 ax-mp d r 0 k 0 1 d r k
56 ssid k d r k k d r k
57 unss12 d r 0 k 0 1 d r k k d r k k d r k d r 0 k d r k k 0 1 d r k k d r k
58 55 56 57 mp2an d r 0 k d r k k 0 1 d r k k d r k
59 iuneq1 0 1 = 0 1 i 0 1 j d r j r i = i 0 1 j d r j r i
60 8 59 ax-mp i 0 1 j d r j r i = i 0 1 j d r j r i
61 iunxun i 0 1 j d r j r i = i 0 j d r j r i i 1 j d r j r i
62 oveq2 i = 0 j d r j r i = j d r j r 0
63 51 62 iunxsn i 0 j d r j r i = j d r j r 0
64 vex d V
65 nnssnn0 0
66 inelcm 1 0 1 1 0 1
67 46 11 66 mp2an 0 1
68 iunrelexp0 d V 0 0 1 j d r j r 0 = d r 0
69 64 65 67 68 mp3an j d r j r 0 = d r 0
70 63 69 eqtri i 0 j d r j r i = d r 0
71 45 47 iunxsn i 1 j d r j r i = j d r j r 1
72 43 41 eqtr4i j d r j r 1 = k d r k
73 71 72 eqtri i 1 j d r j r i = k d r k
74 70 73 uneq12i i 0 j d r j r i i 1 j d r j r i = d r 0 k d r k
75 60 61 74 3eqtri i 0 1 j d r j r i = d r 0 k d r k
76 iunxun k 0 1 d r k = k 0 1 d r k k d r k
77 58 75 76 3sstr4i i 0 1 j d r j r i k 0 1 d r k
78 1 2 3 4 5 18 39 50 77 comptiunov2i r* t+ = t*