Metamath Proof Explorer


Theorem rtrclreclem4

Description: The reflexive, transitive closure of R is the smallest reflexive, transitive relation which contains R and the identity. (Contributed by Drahflow, 12-Nov-2015) (Revised by RP, 30-May-2020) (Revised by AV, 13-Jul-2024)

Ref Expression
Hypothesis rtrclreclem.1 φ Rel R
Assertion rtrclreclem4 φ s I dom R ran R s R s s s s t*rec R s

Proof

Step Hyp Ref Expression
1 rtrclreclem.1 φ Rel R
2 eqidd φ R V r V n 0 r r n = r V n 0 r r n
3 oveq1 r = R r r n = R r n
4 3 iuneq2d r = R n 0 r r n = n 0 R r n
5 4 adantl φ R V r = R n 0 r r n = n 0 R r n
6 simpr φ R V R V
7 nn0ex 0 V
8 ovex R r n V
9 7 8 iunex n 0 R r n V
10 9 a1i φ R V n 0 R r n V
11 2 5 6 10 fvmptd φ R V r V n 0 r r n R = n 0 R r n
12 eleq1 i = 0 i 0 0 0
13 12 anbi1d i = 0 i 0 φ R V s s s R s I dom R ran R s 0 0 φ R V s s s R s I dom R ran R s
14 oveq2 i = 0 R r i = R r 0
15 14 sseq1d i = 0 R r i s R r 0 s
16 13 15 imbi12d i = 0 i 0 φ R V s s s R s I dom R ran R s R r i s 0 0 φ R V s s s R s I dom R ran R s R r 0 s
17 eleq1 i = m i 0 m 0
18 17 anbi1d i = m i 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s
19 oveq2 i = m R r i = R r m
20 19 sseq1d i = m R r i s R r m s
21 18 20 imbi12d i = m i 0 φ R V s s s R s I dom R ran R s R r i s m 0 φ R V s s s R s I dom R ran R s R r m s
22 eleq1 i = m + 1 i 0 m + 1 0
23 22 anbi1d i = m + 1 i 0 φ R V s s s R s I dom R ran R s m + 1 0 φ R V s s s R s I dom R ran R s
24 oveq2 i = m + 1 R r i = R r m + 1
25 24 sseq1d i = m + 1 R r i s R r m + 1 s
26 23 25 imbi12d i = m + 1 i 0 φ R V s s s R s I dom R ran R s R r i s m + 1 0 φ R V s s s R s I dom R ran R s R r m + 1 s
27 eleq1 i = n i 0 n 0
28 27 anbi1d i = n i 0 φ R V s s s R s I dom R ran R s n 0 φ R V s s s R s I dom R ran R s
29 oveq2 i = n R r i = R r n
30 29 sseq1d i = n R r i s R r n s
31 28 30 imbi12d i = n i 0 φ R V s s s R s I dom R ran R s R r i s n 0 φ R V s s s R s I dom R ran R s R r n s
32 simprll 0 0 φ R V s s s R s I dom R ran R s φ
33 32 1 syl 0 0 φ R V s s s R s I dom R ran R s Rel R
34 simprlr 0 0 φ R V s s s R s I dom R ran R s R V
35 33 34 relexp0d 0 0 φ R V s s s R s I dom R ran R s R r 0 = I R
36 relfld Rel R R = dom R ran R
37 33 36 syl 0 0 φ R V s s s R s I dom R ran R s R = dom R ran R
38 simprrr φ R V s s s R s I dom R ran R s I dom R ran R s
39 38 adantl 0 0 φ R V s s s R s I dom R ran R s I dom R ran R s
40 reseq2 R = dom R ran R I R = I dom R ran R
41 40 sseq1d R = dom R ran R I R s I dom R ran R s
42 39 41 syl5ibr R = dom R ran R 0 0 φ R V s s s R s I dom R ran R s I R s
43 37 42 mpcom 0 0 φ R V s s s R s I dom R ran R s I R s
44 35 43 eqsstrd 0 0 φ R V s s s R s I dom R ran R s R r 0 s
45 simprrr R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0
46 45 adantl s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0
47 46 adantl φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0
48 47 adantl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0
49 simprl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ R V
50 simprrl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 s s s
51 simprrl φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R s
52 51 adantl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R s
53 simprrl s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 I dom R ran R s
54 53 adantl φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 I dom R ran R s
55 54 adantl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 I dom R ran R s
56 50 52 55 jca32 m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 s s s R s I dom R ran R s
57 48 49 56 jca32 m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0 φ R V s s s R s I dom R ran R s
58 simprrl R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0 φ R V s s s R s I dom R ran R s R r m s
59 58 adantl s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0 φ R V s s s R s I dom R ran R s R r m s
60 59 adantl φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0 φ R V s s s R s I dom R ran R s R r m s
61 60 adantl m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0 φ R V s s s R s I dom R ran R s R r m s
62 57 61 mpd m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m s
63 simprll m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ
64 63 adantl R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ
65 64 1 syl R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 Rel R
66 48 adantl R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m 0
67 65 66 relexpsucrd R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m + 1 = R r m R
68 52 adantl R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R s
69 coss2 R s R r m R R r m s
70 68 69 syl R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m R R r m s
71 coss1 R r m s R r m s s s
72 71 50 sylan9ss R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m s s
73 70 72 sstrd R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m R s
74 67 73 eqsstrd R r m s m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m + 1 s
75 62 74 mpancom m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m + 1 s
76 75 expcom φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m + 1 0 R r m + 1 s
77 76 expcom s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ R V m + 1 0 R r m + 1 s
78 77 expcom R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 s s s φ R V m + 1 0 R r m + 1 s
79 78 anassrs R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 s s s φ R V m + 1 0 R r m + 1 s
80 79 impcom s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ R V m + 1 0 R r m + 1 s
81 80 anassrs s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 φ R V m + 1 0 R r m + 1 s
82 81 impcom φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m + 1 0 R r m + 1 s
83 82 anassrs φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m + 1 0 R r m + 1 s
84 83 impcom m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m + 1 s
85 84 anassrs m + 1 0 φ R V s s s R s I dom R ran R s m 0 φ R V s s s R s I dom R ran R s R r m s m 0 R r m + 1 s
86 85 expcom m 0 φ R V s s s R s I dom R ran R s R r m s m 0 m + 1 0 φ R V s s s R s I dom R ran R s R r m + 1 s
87 86 expcom m 0 m 0 φ R V s s s R s I dom R ran R s R r m s m + 1 0 φ R V s s s R s I dom R ran R s R r m + 1 s
88 16 21 26 31 44 87 nn0ind n 0 n 0 φ R V s s s R s I dom R ran R s R r n s
89 88 anabsi5 n 0 φ R V s s s R s I dom R ran R s R r n s
90 89 expcom φ R V s s s R s I dom R ran R s n 0 R r n s
91 90 ralrimiv φ R V s s s R s I dom R ran R s n 0 R r n s
92 iunss n 0 R r n s n 0 R r n s
93 91 92 sylibr φ R V s s s R s I dom R ran R s n 0 R r n s
94 93 expcom s s s R s I dom R ran R s φ R V n 0 R r n s
95 94 expcom R s I dom R ran R s s s s φ R V n 0 R r n s
96 95 expcom I dom R ran R s R s s s s φ R V n 0 R r n s
97 96 3imp1 I dom R ran R s R s s s s φ R V n 0 R r n s
98 97 expcom φ R V I dom R ran R s R s s s s n 0 R r n s
99 sseq1 r V n 0 r r n R = n 0 R r n r V n 0 r r n R s n 0 R r n s
100 99 imbi2d r V n 0 r r n R = n 0 R r n I dom R ran R s R s s s s r V n 0 r r n R s I dom R ran R s R s s s s n 0 R r n s
101 98 100 syl5ibr r V n 0 r r n R = n 0 R r n φ R V I dom R ran R s R s s s s r V n 0 r r n R s
102 11 101 mpcom φ R V I dom R ran R s R s s s s r V n 0 r r n R s
103 df-rtrclrec t*rec = r V n 0 r r n
104 fveq1 t*rec = r V n 0 r r n t*rec R = r V n 0 r r n R
105 104 sseq1d t*rec = r V n 0 r r n t*rec R s r V n 0 r r n R s
106 105 imbi2d t*rec = r V n 0 r r n I dom R ran R s R s s s s t*rec R s I dom R ran R s R s s s s r V n 0 r r n R s
107 106 imbi2d t*rec = r V n 0 r r n φ R V I dom R ran R s R s s s s t*rec R s φ R V I dom R ran R s R s s s s r V n 0 r r n R s
108 103 107 ax-mp φ R V I dom R ran R s R s s s s t*rec R s φ R V I dom R ran R s R s s s s r V n 0 r r n R s
109 102 108 mpbir φ R V I dom R ran R s R s s s s t*rec R s
110 109 ex φ R V I dom R ran R s R s s s s t*rec R s
111 fvprc ¬ R V t*rec R =
112 0ss s
113 111 112 eqsstrdi ¬ R V t*rec R s
114 113 a1d ¬ R V I dom R ran R s R s s s s t*rec R s
115 110 114 pm2.61d1 φ I dom R ran R s R s s s s t*rec R s
116 115 alrimiv φ s I dom R ran R s R s s s s t*rec R s