Metamath Proof Explorer


Theorem reprsuc

Description: Express the representations recursively. (Contributed by Thierry Arnoux, 5-Dec-2021)

Ref Expression
Hypotheses reprval.a φ A
reprval.m φ M
reprval.s φ S 0
reprsuc.f F = c A repr S M b c S b
Assertion reprsuc φ A repr S + 1 M = b A ran F

Proof

Step Hyp Ref Expression
1 reprval.a φ A
2 reprval.m φ M
3 reprval.s φ S 0
4 reprsuc.f F = c A repr S M b c S b
5 1nn0 1 0
6 5 a1i φ 1 0
7 3 6 nn0addcld φ S + 1 0
8 1 2 7 reprval φ A repr S + 1 M = c A 0 ..^ S + 1 | a 0 ..^ S + 1 c a = M
9 simplr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e A 0 ..^ S + 1
10 elmapi e A 0 ..^ S + 1 e : 0 ..^ S + 1 A
11 9 10 syl φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e : 0 ..^ S + 1 A
12 3 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M S 0
13 fzonn0p1 S 0 S 0 ..^ S + 1
14 12 13 syl φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M S 0 ..^ S + 1
15 11 14 ffvelrnd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e S A
16 simpr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b = e S b = e S
17 16 oveq2d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b = e S M b = M e S
18 17 oveq2d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b = e S A repr S M b = A repr S M e S
19 opeq2 b = e S S b = S e S
20 19 sneqd b = e S S b = S e S
21 20 uneq2d b = e S c S b = c S e S
22 21 eqeq2d b = e S e = c S b e = c S e S
23 22 adantl φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b = e S e = c S b e = c S e S
24 18 23 rexeqbidv φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b = e S c A repr S M b e = c S b c A repr S M e S e = c S e S
25 10 adantl φ e A 0 ..^ S + 1 e : 0 ..^ S + 1 A
26 3 adantr φ e A 0 ..^ S + 1 S 0
27 fzossfzop1 S 0 0 ..^ S 0 ..^ S + 1
28 26 27 syl φ e A 0 ..^ S + 1 0 ..^ S 0 ..^ S + 1
29 25 28 fssresd φ e A 0 ..^ S + 1 e 0 ..^ S : 0 ..^ S A
30 29 adantr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S : 0 ..^ S A
31 nnex V
32 31 a1i φ V
33 32 1 ssexd φ A V
34 fzofi 0 ..^ S Fin
35 34 elexi 0 ..^ S V
36 elmapg A V 0 ..^ S V e 0 ..^ S A 0 ..^ S e 0 ..^ S : 0 ..^ S A
37 33 35 36 sylancl φ e 0 ..^ S A 0 ..^ S e 0 ..^ S : 0 ..^ S A
38 37 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S A 0 ..^ S e 0 ..^ S : 0 ..^ S A
39 30 38 mpbird φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S A 0 ..^ S
40 34 a1i φ e A 0 ..^ S + 1 0 ..^ S Fin
41 nnsscn
42 41 a1i φ
43 1 42 sstrd φ A
44 43 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S A
45 29 ffvelrnda φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a A
46 44 45 sseldd φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a
47 40 46 fsumcl φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a
48 47 adantr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S e 0 ..^ S a
49 43 adantr φ e A 0 ..^ S + 1 A
50 26 13 syl φ e A 0 ..^ S + 1 S 0 ..^ S + 1
51 25 50 ffvelrnd φ e A 0 ..^ S + 1 e S A
52 49 51 sseldd φ e A 0 ..^ S + 1 e S
53 52 adantr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e S
54 48 53 pncand φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S e 0 ..^ S a + e S - e S = a 0 ..^ S e 0 ..^ S a
55 nfv a φ e A 0 ..^ S + 1
56 nfcv _ a e S
57 fzonel ¬ S 0 ..^ S
58 57 a1i φ e A 0 ..^ S + 1 ¬ S 0 ..^ S
59 25 adantr φ e A 0 ..^ S + 1 a 0 ..^ S e : 0 ..^ S + 1 A
60 28 sselda φ e A 0 ..^ S + 1 a 0 ..^ S a 0 ..^ S + 1
61 59 60 ffvelrnd φ e A 0 ..^ S + 1 a 0 ..^ S e a A
62 44 61 sseldd φ e A 0 ..^ S + 1 a 0 ..^ S e a
63 fveq2 a = S e a = e S
64 55 56 40 26 58 62 63 52 fsumsplitsn φ e A 0 ..^ S + 1 a 0 ..^ S S e a = a 0 ..^ S e a + e S
65 fzosplitsn S 0 0 ..^ S + 1 = 0 ..^ S S
66 nn0uz 0 = 0
67 65 66 eleq2s S 0 0 ..^ S + 1 = 0 ..^ S S
68 26 67 syl φ e A 0 ..^ S + 1 0 ..^ S + 1 = 0 ..^ S S
69 68 sumeq1d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = a 0 ..^ S S e a
70 simpr φ e A 0 ..^ S + 1 a 0 ..^ S a 0 ..^ S
71 70 fvresd φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a = e a
72 71 sumeq2dv φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a = a 0 ..^ S e a
73 72 oveq1d φ e A 0 ..^ S + 1 a 0 ..^ S e 0 ..^ S a + e S = a 0 ..^ S e a + e S
74 64 69 73 3eqtr4d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = a 0 ..^ S e 0 ..^ S a + e S
75 74 adantr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S + 1 e a = a 0 ..^ S e 0 ..^ S a + e S
76 simpr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S + 1 e a = M
77 75 76 eqtr3d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S e 0 ..^ S a + e S = M
78 77 oveq1d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S e 0 ..^ S a + e S - e S = M e S
79 54 78 eqtr3d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M a 0 ..^ S e 0 ..^ S a = M e S
80 39 79 jca φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S A 0 ..^ S a 0 ..^ S e 0 ..^ S a = M e S
81 fveq1 d = e 0 ..^ S d a = e 0 ..^ S a
82 81 sumeq2sdv d = e 0 ..^ S a 0 ..^ S d a = a 0 ..^ S e 0 ..^ S a
83 82 eqeq1d d = e 0 ..^ S a 0 ..^ S d a = M e S a 0 ..^ S e 0 ..^ S a = M e S
84 83 elrab e 0 ..^ S d A 0 ..^ S | a 0 ..^ S d a = M e S e 0 ..^ S A 0 ..^ S a 0 ..^ S e 0 ..^ S a = M e S
85 80 84 sylibr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S d A 0 ..^ S | a 0 ..^ S d a = M e S
86 1 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M A
87 2 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M M
88 nnssz
89 1 88 sstrdi φ A
90 89 ad2antrr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M A
91 90 15 sseldd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e S
92 87 91 zsubcld φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M M e S
93 86 92 12 reprval φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M A repr S M e S = d A 0 ..^ S | a 0 ..^ S d a = M e S
94 85 93 eleqtrrd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S A repr S M e S
95 simpr φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M c = e 0 ..^ S c = e 0 ..^ S
96 95 uneq1d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M c = e 0 ..^ S c S e S = e 0 ..^ S S e S
97 96 eqeq2d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M c = e 0 ..^ S e = c S e S e = e 0 ..^ S S e S
98 11 ffnd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e Fn 0 ..^ S + 1
99 fnsnsplit e Fn 0 ..^ S + 1 S 0 ..^ S + 1 e = e 0 ..^ S + 1 S S e S
100 98 14 99 syl2anc φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e = e 0 ..^ S + 1 S S e S
101 12 66 eleqtrdi φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M S 0
102 fzodif2 S 0 0 ..^ S + 1 S = 0 ..^ S
103 101 102 syl φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M 0 ..^ S + 1 S = 0 ..^ S
104 103 reseq2d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S + 1 S = e 0 ..^ S
105 104 uneq1d φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e 0 ..^ S + 1 S S e S = e 0 ..^ S S e S
106 100 105 eqtrd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M e = e 0 ..^ S S e S
107 94 97 106 rspcedvd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M c A repr S M e S e = c S e S
108 15 24 107 rspcedvd φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b A c A repr S M b e = c S b
109 108 anasss φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b A c A repr S M b e = c S b
110 simpr φ b A c A repr S M b e = c S b e = c S b
111 1 adantr φ b A A
112 111 adantr φ b A c A repr S M b A
113 2 adantr φ b A M
114 89 sselda φ b A b
115 113 114 zsubcld φ b A M b
116 115 adantr φ b A c A repr S M b M b
117 3 adantr φ b A S 0
118 117 adantr φ b A c A repr S M b S 0
119 simpr φ b A c A repr S M b c A repr S M b
120 112 116 118 119 reprf φ b A c A repr S M b c : 0 ..^ S A
121 simplr φ b A c A repr S M b b A
122 118 121 fsnd φ b A c A repr S M b S b : S A
123 fzodisjsn 0 ..^ S S =
124 123 a1i φ b A c A repr S M b 0 ..^ S S =
125 120 122 124 fun2d φ b A c A repr S M b c S b : 0 ..^ S S A
126 118 67 syl φ b A c A repr S M b 0 ..^ S + 1 = 0 ..^ S S
127 126 feq2d φ b A c A repr S M b c S b : 0 ..^ S + 1 A c S b : 0 ..^ S S A
128 125 127 mpbird φ b A c A repr S M b c S b : 0 ..^ S + 1 A
129 ovex 0 ..^ S + 1 V
130 elmapg A V 0 ..^ S + 1 V c S b A 0 ..^ S + 1 c S b : 0 ..^ S + 1 A
131 33 129 130 sylancl φ c S b A 0 ..^ S + 1 c S b : 0 ..^ S + 1 A
132 131 ad2antrr φ b A c A repr S M b c S b A 0 ..^ S + 1 c S b : 0 ..^ S + 1 A
133 128 132 mpbird φ b A c A repr S M b c S b A 0 ..^ S + 1
134 133 adantr φ b A c A repr S M b e = c S b c S b A 0 ..^ S + 1
135 110 134 eqeltrd φ b A c A repr S M b e = c S b e A 0 ..^ S + 1
136 126 adantr φ b A c A repr S M b e = c S b 0 ..^ S + 1 = 0 ..^ S S
137 136 sumeq1d φ b A c A repr S M b e = c S b a 0 ..^ S + 1 e a = a 0 ..^ S S e a
138 nfv a φ b A c A repr S M b e = c S b
139 34 a1i φ b A c A repr S M b e = c S b 0 ..^ S Fin
140 118 adantr φ b A c A repr S M b e = c S b S 0
141 57 a1i φ b A c A repr S M b e = c S b ¬ S 0 ..^ S
142 43 ad4antr φ b A c A repr S M b e = c S b a 0 ..^ S A
143 128 adantr φ b A c A repr S M b e = c S b c S b : 0 ..^ S + 1 A
144 110 feq1d φ b A c A repr S M b e = c S b e : 0 ..^ S + 1 A c S b : 0 ..^ S + 1 A
145 143 144 mpbird φ b A c A repr S M b e = c S b e : 0 ..^ S + 1 A
146 145 adantr φ b A c A repr S M b e = c S b a 0 ..^ S e : 0 ..^ S + 1 A
147 simpr φ b A c A repr S M b e = c S b a 0 ..^ S a 0 ..^ S
148 elun1 a 0 ..^ S a 0 ..^ S S
149 147 148 syl φ b A c A repr S M b e = c S b a 0 ..^ S a 0 ..^ S S
150 126 ad2antrr φ b A c A repr S M b e = c S b a 0 ..^ S 0 ..^ S + 1 = 0 ..^ S S
151 149 150 eleqtrrd φ b A c A repr S M b e = c S b a 0 ..^ S a 0 ..^ S + 1
152 146 151 ffvelrnd φ b A c A repr S M b e = c S b a 0 ..^ S e a A
153 142 152 sseldd φ b A c A repr S M b e = c S b a 0 ..^ S e a
154 43 ad3antrrr φ b A c A repr S M b e = c S b A
155 140 13 syl φ b A c A repr S M b e = c S b S 0 ..^ S + 1
156 145 155 ffvelrnd φ b A c A repr S M b e = c S b e S A
157 154 156 sseldd φ b A c A repr S M b e = c S b e S
158 138 56 139 140 141 153 63 157 fsumsplitsn φ b A c A repr S M b e = c S b a 0 ..^ S S e a = a 0 ..^ S e a + e S
159 simplr φ b A c A repr S M b e = c S b a 0 ..^ S e = c S b
160 159 fveq1d φ b A c A repr S M b e = c S b a 0 ..^ S e a = c S b a
161 120 ffnd φ b A c A repr S M b c Fn 0 ..^ S
162 161 ad2antrr φ b A c A repr S M b e = c S b a 0 ..^ S c Fn 0 ..^ S
163 122 ffnd φ b A c A repr S M b S b Fn S
164 163 ad2antrr φ b A c A repr S M b e = c S b a 0 ..^ S S b Fn S
165 123 a1i φ b A c A repr S M b e = c S b a 0 ..^ S 0 ..^ S S =
166 fvun1 c Fn 0 ..^ S S b Fn S 0 ..^ S S = a 0 ..^ S c S b a = c a
167 162 164 165 147 166 syl112anc φ b A c A repr S M b e = c S b a 0 ..^ S c S b a = c a
168 160 167 eqtrd φ b A c A repr S M b e = c S b a 0 ..^ S e a = c a
169 168 ralrimiva φ b A c A repr S M b e = c S b a 0 ..^ S e a = c a
170 169 sumeq2d φ b A c A repr S M b e = c S b a 0 ..^ S e a = a 0 ..^ S c a
171 112 adantr φ b A c A repr S M b e = c S b A
172 116 adantr φ b A c A repr S M b e = c S b M b
173 119 adantr φ b A c A repr S M b e = c S b c A repr S M b
174 171 172 140 173 reprsum φ b A c A repr S M b e = c S b a 0 ..^ S c a = M b
175 170 174 eqtrd φ b A c A repr S M b e = c S b a 0 ..^ S e a = M b
176 110 fveq1d φ b A c A repr S M b e = c S b e S = c S b S
177 161 adantr φ b A c A repr S M b e = c S b c Fn 0 ..^ S
178 163 adantr φ b A c A repr S M b e = c S b S b Fn S
179 123 a1i φ b A c A repr S M b e = c S b 0 ..^ S S =
180 snidg S 0 S S
181 140 180 syl φ b A c A repr S M b e = c S b S S
182 fvun2 c Fn 0 ..^ S S b Fn S 0 ..^ S S = S S c S b S = S b S
183 177 178 179 181 182 syl112anc φ b A c A repr S M b e = c S b c S b S = S b S
184 121 adantr φ b A c A repr S M b e = c S b b A
185 fvsng S 0 b A S b S = b
186 140 184 185 syl2anc φ b A c A repr S M b e = c S b S b S = b
187 176 183 186 3eqtrd φ b A c A repr S M b e = c S b e S = b
188 175 187 oveq12d φ b A c A repr S M b e = c S b a 0 ..^ S e a + e S = M - b + b
189 zsscn
190 113 ad2antrr φ b A c A repr S M b e = c S b M
191 189 190 sselid φ b A c A repr S M b e = c S b M
192 187 157 eqeltrrd φ b A c A repr S M b e = c S b b
193 191 192 npcand φ b A c A repr S M b e = c S b M - b + b = M
194 188 193 eqtrd φ b A c A repr S M b e = c S b a 0 ..^ S e a + e S = M
195 137 158 194 3eqtrd φ b A c A repr S M b e = c S b a 0 ..^ S + 1 e a = M
196 135 195 jca φ b A c A repr S M b e = c S b e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M
197 196 r19.29ffa φ b A c A repr S M b e = c S b e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M
198 109 197 impbida φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b A c A repr S M b e = c S b
199 vex c V
200 snex S b V
201 199 200 unex c S b V
202 4 201 elrnmpti e ran F c A repr S M b e = c S b
203 202 rexbii b A e ran F b A c A repr S M b e = c S b
204 198 203 bitr4di φ e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M b A e ran F
205 fveq1 c = e c a = e a
206 205 sumeq2sdv c = e a 0 ..^ S + 1 c a = a 0 ..^ S + 1 e a
207 206 eqeq1d c = e a 0 ..^ S + 1 c a = M a 0 ..^ S + 1 e a = M
208 207 cbvrabv c A 0 ..^ S + 1 | a 0 ..^ S + 1 c a = M = e A 0 ..^ S + 1 | a 0 ..^ S + 1 e a = M
209 208 rabeq2i e c A 0 ..^ S + 1 | a 0 ..^ S + 1 c a = M e A 0 ..^ S + 1 a 0 ..^ S + 1 e a = M
210 eliun e b A ran F b A e ran F
211 204 209 210 3bitr4g φ e c A 0 ..^ S + 1 | a 0 ..^ S + 1 c a = M e b A ran F
212 211 eqrdv φ c A 0 ..^ S + 1 | a 0 ..^ S + 1 c a = M = b A ran F
213 8 212 eqtrd φ A repr S + 1 M = b A ran F