Metamath Proof Explorer


Theorem trclfvdecomr

Description: The transitive closure of a relation may be decomposed into a union of the relation and the composition of the relation with its transitive closure. (Contributed by RP, 18-Jul-2020)

Ref Expression
Assertion trclfvdecomr R V t+ R = R t+ R R

Proof

Step Hyp Ref Expression
1 elex R V R V
2 oveq1 r = R r r n = R r n
3 2 iuneq2d r = R n r r n = n R r n
4 dftrcl3 t+ = r V n r r n
5 nnex V
6 ovex R r n V
7 5 6 iunex n R r n V
8 3 4 7 fvmpt R V t+ R = n R r n
9 1 8 syl R V t+ R = n R r n
10 nnuz = 1
11 2eluzge1 2 1
12 uzsplit 2 1 1 = 1 2 1 2
13 11 12 ax-mp 1 = 1 2 1 2
14 2m1e1 2 1 = 1
15 14 oveq2i 1 2 1 = 1 1
16 1z 1
17 fzsn 1 1 1 = 1
18 16 17 ax-mp 1 1 = 1
19 15 18 eqtri 1 2 1 = 1
20 19 uneq1i 1 2 1 2 = 1 2
21 10 13 20 3eqtri = 1 2
22 iuneq1 = 1 2 n R r n = n 1 2 R r n
23 21 22 ax-mp n R r n = n 1 2 R r n
24 iunxun n 1 2 R r n = n 1 R r n n 2 R r n
25 1ex 1 V
26 oveq2 n = 1 R r n = R r 1
27 25 26 iunxsn n 1 R r n = R r 1
28 27 uneq1i n 1 R r n n 2 R r n = R r 1 n 2 R r n
29 23 24 28 3eqtri n R r n = R r 1 n 2 R r n
30 relexp1g R V R r 1 = R
31 oveq1 r = R r r m = R r m
32 31 iuneq2d r = R m r r m = m R r m
33 dftrcl3 t+ = r V m r r m
34 ovex R r m V
35 5 34 iunex m R r m V
36 32 33 35 fvmpt R V t+ R = m R r m
37 1 36 syl R V t+ R = m R r m
38 37 coeq1d R V t+ R R = m R r m R
39 coiun1 m R r m R = m R r m R
40 uz2m1nn n 2 n 1
41 40 adantl R V n 2 n 1
42 eluzp1p1 m 1 m + 1 1 + 1
43 42 10 eleq2s m m + 1 1 + 1
44 1p1e2 1 + 1 = 2
45 44 fveq2i 1 + 1 = 2
46 43 45 eleqtrdi m m + 1 2
47 46 adantl R V m m + 1 2
48 oveq2 m = n 1 R r m = R r n 1
49 48 coeq1d m = n 1 R r m R = R r n 1 R
50 49 3ad2ant3 R V n 2 m = n 1 R r m R = R r n 1 R
51 oveq2 n = m + 1 R r n = R r m + 1
52 51 3ad2ant3 R V m n = m + 1 R r n = R r m + 1
53 relexpsucnnr R V m R r m + 1 = R r m R
54 53 eqcomd R V m R r m R = R r m + 1
55 relexpsucnnr R V n 1 R r n - 1 + 1 = R r n 1 R
56 40 55 sylan2 R V n 2 R r n - 1 + 1 = R r n 1 R
57 eluzelcn n 2 n
58 npcan1 n n - 1 + 1 = n
59 oveq2 n - 1 + 1 = n R r n - 1 + 1 = R r n
60 57 58 59 3syl n 2 R r n - 1 + 1 = R r n
61 60 eqeq1d n 2 R r n - 1 + 1 = R r n 1 R R r n = R r n 1 R
62 61 adantl R V n 2 R r n - 1 + 1 = R r n 1 R R r n = R r n 1 R
63 56 62 mpbid R V n 2 R r n = R r n 1 R
64 41 47 50 52 54 63 cbviuneq12dv R V m R r m R = n 2 R r n
65 39 64 syl5eq R V m R r m R = n 2 R r n
66 38 65 eqtrd R V t+ R R = n 2 R r n
67 66 eqcomd R V n 2 R r n = t+ R R
68 30 67 uneq12d R V R r 1 n 2 R r n = R t+ R R
69 29 68 syl5eq R V n R r n = R t+ R R
70 9 69 eqtrd R V t+ R = R t+ R R