Metamath Proof Explorer


Theorem diophin

Description: If two sets are Diophantine, so is their intersection. (Contributed by Stefan O'Rear, 9-Oct-2014) (Revised by Stefan O'Rear, 6-May-2015)

Ref Expression
Assertion diophin A Dioph N B Dioph N A B Dioph N

Proof

Step Hyp Ref Expression
1 eldiophelnn0 A Dioph N N 0
2 id N 0 N 0
3 zex V
4 difexg V N + 1 V
5 3 4 mp1i N 0 N + 1 V
6 ominf ¬ ω Fin
7 nn0z N 0 N
8 lzenom N N + 1 ω
9 enfi N + 1 ω N + 1 Fin ω Fin
10 7 8 9 3syl N 0 N + 1 Fin ω Fin
11 6 10 mtbiri N 0 ¬ N + 1 Fin
12 fz1eqin N 0 1 N = N + 1
13 inss1 N + 1 N + 1
14 12 13 eqsstrdi N 0 1 N N + 1
15 eldioph2b N 0 N + 1 V ¬ N + 1 Fin 1 N N + 1 A Dioph N a mzPoly N + 1 A = c | d 0 N + 1 c = d 1 N a d = 0
16 2 5 11 14 15 syl22anc N 0 A Dioph N a mzPoly N + 1 A = c | d 0 N + 1 c = d 1 N a d = 0
17 nnex V
18 17 a1i N 0 V
19 1z 1
20 nnuz = 1
21 20 uzinf 1 ¬ Fin
22 19 21 mp1i N 0 ¬ Fin
23 elfznn a 1 N a
24 23 ssriv 1 N
25 24 a1i N 0 1 N
26 eldioph2b N 0 V ¬ Fin 1 N B Dioph N b mzPoly B = c | e 0 c = e 1 N b e = 0
27 2 18 22 25 26 syl22anc N 0 B Dioph N b mzPoly B = c | e 0 c = e 1 N b e = 0
28 16 27 anbi12d N 0 A Dioph N B Dioph N a mzPoly N + 1 A = c | d 0 N + 1 c = d 1 N a d = 0 b mzPoly B = c | e 0 c = e 1 N b e = 0
29 reeanv a mzPoly N + 1 b mzPoly A = c | d 0 N + 1 c = d 1 N a d = 0 B = c | e 0 c = e 1 N b e = 0 a mzPoly N + 1 A = c | d 0 N + 1 c = d 1 N a d = 0 b mzPoly B = c | e 0 c = e 1 N b e = 0
30 inab c | d 0 N + 1 c = d 1 N a d = 0 c | e 0 c = e 1 N b e = 0 = c | d 0 N + 1 c = d 1 N a d = 0 e 0 c = e 1 N b e = 0
31 reeanv d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d 0 N + 1 c = d 1 N a d = 0 e 0 c = e 1 N b e = 0
32 simplrl N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d 0 N + 1
33 simplrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e 0
34 12 eqcomd N 0 N + 1 = 1 N
35 34 reseq2d N 0 d N + 1 = d 1 N
36 35 ad3antrrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d N + 1 = d 1 N
37 34 reseq2d N 0 e N + 1 = e 1 N
38 37 ad3antrrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e N + 1 = e 1 N
39 simprrl N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c = e 1 N
40 simprll N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c = d 1 N
41 38 39 40 3eqtr2d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e N + 1 = d 1 N
42 36 41 eqtr4d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d N + 1 = e N + 1
43 elmapresaun d 0 N + 1 e 0 d N + 1 = e N + 1 d e 0 N + 1
44 32 33 42 43 syl3anc N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d e 0 N + 1
45 20 uneq2i N + 1 = N + 1 1
46 19 a1i N 0 1
47 nn0p1nn N 0 N + 1
48 47 nnge1d N 0 1 N + 1
49 lzunuz N 1 1 N + 1 N + 1 1 =
50 7 46 48 49 syl3anc N 0 N + 1 1 =
51 45 50 syl5eq N 0 N + 1 =
52 51 oveq2d N 0 0 N + 1 = 0
53 52 ad3antrrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 0 N + 1 = 0
54 44 53 eleqtrd N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d e 0
55 unidm c c = c
56 40 39 uneq12d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c c = d 1 N e 1 N
57 55 56 eqtr3id N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c = d 1 N e 1 N
58 resundir d e 1 N = d 1 N e 1 N
59 57 58 eqtr4di N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c = d e 1 N
60 uncom d e = e d
61 60 reseq1i d e N + 1 = e d N + 1
62 incom N + 1 = N + 1
63 62 34 syl5eq N 0 N + 1 = 1 N
64 63 reseq2d N 0 e N + 1 = e 1 N
65 64 ad3antrrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e N + 1 = e 1 N
66 63 reseq2d N 0 d N + 1 = d 1 N
67 66 ad3antrrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d N + 1 = d 1 N
68 67 40 39 3eqtr2d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d N + 1 = e 1 N
69 65 68 eqtr4d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e N + 1 = d N + 1
70 elmapresaunres2 e 0 d 0 N + 1 e N + 1 = d N + 1 e d N + 1 = d
71 33 32 69 70 syl3anc N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 e d N + 1 = d
72 61 71 syl5eq N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d e N + 1 = d
73 72 fveq2d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 a d e N + 1 = a d
74 simprlr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 a d = 0
75 73 74 eqtrd N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 a d e N + 1 = 0
76 elmapresaunres2 d 0 N + 1 e 0 d N + 1 = e N + 1 d e = e
77 32 33 42 76 syl3anc N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 d e = e
78 77 fveq2d N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 b d e = b e
79 simprrr N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 b e = 0
80 78 79 eqtrd N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 b d e = 0
81 59 75 80 jca32 N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 c = d e 1 N a d e N + 1 = 0 b d e = 0
82 reseq1 f = d e f 1 N = d e 1 N
83 82 eqeq2d f = d e c = f 1 N c = d e 1 N
84 reseq1 f = d e f N + 1 = d e N + 1
85 84 fveqeq2d f = d e a f N + 1 = 0 a d e N + 1 = 0
86 reseq1 f = d e f = d e
87 86 fveqeq2d f = d e b f = 0 b d e = 0
88 85 87 anbi12d f = d e a f N + 1 = 0 b f = 0 a d e N + 1 = 0 b d e = 0
89 83 88 anbi12d f = d e c = f 1 N a f N + 1 = 0 b f = 0 c = d e 1 N a d e N + 1 = 0 b d e = 0
90 89 rspcev d e 0 c = d e 1 N a d e N + 1 = 0 b d e = 0 f 0 c = f 1 N a f N + 1 = 0 b f = 0
91 54 81 90 syl2anc N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 f 0 c = f 1 N a f N + 1 = 0 b f = 0
92 91 ex N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 f 0 c = f 1 N a f N + 1 = 0 b f = 0
93 92 rexlimdvva N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 f 0 c = f 1 N a f N + 1 = 0 b f = 0
94 simpr N 0 a mzPoly N + 1 b mzPoly f 0 f 0
95 difss N + 1
96 elmapssres f 0 N + 1 f N + 1 0 N + 1
97 94 95 96 sylancl N 0 a mzPoly N + 1 b mzPoly f 0 f N + 1 0 N + 1
98 97 adantr N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 f N + 1 0 N + 1
99 nnssz
100 elmapssres f 0 f 0
101 94 99 100 sylancl N 0 a mzPoly N + 1 b mzPoly f 0 f 0
102 101 adantr N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 f 0
103 simprl N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f 1 N
104 14 ad3antrrr N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 1 N N + 1
105 104 resabs1d N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 f N + 1 1 N = f 1 N
106 103 105 eqtr4d N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f N + 1 1 N
107 simprrl N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 a f N + 1 = 0
108 106 107 jca N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f N + 1 1 N a f N + 1 = 0
109 resabs1 1 N f 1 N = f 1 N
110 24 109 mp1i N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 f 1 N = f 1 N
111 103 110 eqtr4d N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f 1 N
112 simprrr N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 b f = 0
113 108 111 112 jca32 N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f N + 1 1 N a f N + 1 = 0 c = f 1 N b f = 0
114 reseq1 d = f N + 1 d 1 N = f N + 1 1 N
115 114 eqeq2d d = f N + 1 c = d 1 N c = f N + 1 1 N
116 fveqeq2 d = f N + 1 a d = 0 a f N + 1 = 0
117 115 116 anbi12d d = f N + 1 c = d 1 N a d = 0 c = f N + 1 1 N a f N + 1 = 0
118 117 anbi1d d = f N + 1 c = d 1 N a d = 0 c = e 1 N b e = 0 c = f N + 1 1 N a f N + 1 = 0 c = e 1 N b e = 0
119 reseq1 e = f e 1 N = f 1 N
120 119 eqeq2d e = f c = e 1 N c = f 1 N
121 fveqeq2 e = f b e = 0 b f = 0
122 120 121 anbi12d e = f c = e 1 N b e = 0 c = f 1 N b f = 0
123 122 anbi2d e = f c = f N + 1 1 N a f N + 1 = 0 c = e 1 N b e = 0 c = f N + 1 1 N a f N + 1 = 0 c = f 1 N b f = 0
124 118 123 rspc2ev f N + 1 0 N + 1 f 0 c = f N + 1 1 N a f N + 1 = 0 c = f 1 N b f = 0 d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0
125 98 102 113 124 syl3anc N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0
126 125 rexlimdva2 N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0
127 93 126 impbid N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 f 0 c = f 1 N a f N + 1 = 0 b f = 0
128 simplrl N 0 a mzPoly N + 1 b mzPoly f 0 a mzPoly N + 1
129 mzpf a mzPoly N + 1 a : N + 1
130 128 129 syl N 0 a mzPoly N + 1 b mzPoly f 0 a : N + 1
131 nn0ssz 0
132 mapss V 0 0
133 3 131 132 mp2an 0
134 133 sseli f 0 f
135 elmapssres f N + 1 f N + 1 N + 1
136 134 95 135 sylancl f 0 f N + 1 N + 1
137 136 adantl N 0 a mzPoly N + 1 b mzPoly f 0 f N + 1 N + 1
138 130 137 ffvelrnd N 0 a mzPoly N + 1 b mzPoly f 0 a f N + 1
139 138 zred N 0 a mzPoly N + 1 b mzPoly f 0 a f N + 1
140 simplrr N 0 a mzPoly N + 1 b mzPoly f 0 b mzPoly
141 mzpf b mzPoly b :
142 140 141 syl N 0 a mzPoly N + 1 b mzPoly f 0 b :
143 elmapssres f f
144 134 99 143 sylancl f 0 f
145 144 adantl N 0 a mzPoly N + 1 b mzPoly f 0 f
146 142 145 ffvelrnd N 0 a mzPoly N + 1 b mzPoly f 0 b f
147 146 zred N 0 a mzPoly N + 1 b mzPoly f 0 b f
148 sumsqeq0 a f N + 1 b f a f N + 1 = 0 b f = 0 a f N + 1 2 + b f 2 = 0
149 139 147 148 syl2anc N 0 a mzPoly N + 1 b mzPoly f 0 a f N + 1 = 0 b f = 0 a f N + 1 2 + b f 2 = 0
150 134 adantl N 0 a mzPoly N + 1 b mzPoly f 0 f
151 reseq1 g = f g N + 1 = f N + 1
152 151 fveq2d g = f a g N + 1 = a f N + 1
153 152 oveq1d g = f a g N + 1 2 = a f N + 1 2
154 reseq1 g = f g = f
155 154 fveq2d g = f b g = b f
156 155 oveq1d g = f b g 2 = b f 2
157 153 156 oveq12d g = f a g N + 1 2 + b g 2 = a f N + 1 2 + b f 2
158 eqid g a g N + 1 2 + b g 2 = g a g N + 1 2 + b g 2
159 ovex a f N + 1 2 + b f 2 V
160 157 158 159 fvmpt f g a g N + 1 2 + b g 2 f = a f N + 1 2 + b f 2
161 150 160 syl N 0 a mzPoly N + 1 b mzPoly f 0 g a g N + 1 2 + b g 2 f = a f N + 1 2 + b f 2
162 161 eqeq1d N 0 a mzPoly N + 1 b mzPoly f 0 g a g N + 1 2 + b g 2 f = 0 a f N + 1 2 + b f 2 = 0
163 149 162 bitr4d N 0 a mzPoly N + 1 b mzPoly f 0 a f N + 1 = 0 b f = 0 g a g N + 1 2 + b g 2 f = 0
164 163 anbi2d N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
165 164 rexbidva N 0 a mzPoly N + 1 b mzPoly f 0 c = f 1 N a f N + 1 = 0 b f = 0 f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
166 127 165 bitrd N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 e 0 c = d 1 N a d = 0 c = e 1 N b e = 0 f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
167 31 166 bitr3id N 0 a mzPoly N + 1 b mzPoly d 0 N + 1 c = d 1 N a d = 0 e 0 c = e 1 N b e = 0 f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
168 167 abbidv N 0 a mzPoly N + 1 b mzPoly c | d 0 N + 1 c = d 1 N a d = 0 e 0 c = e 1 N b e = 0 = c | f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
169 30 168 syl5eq N 0 a mzPoly N + 1 b mzPoly c | d 0 N + 1 c = d 1 N a d = 0 c | e 0 c = e 1 N b e = 0 = c | f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0
170 simpl N 0 a mzPoly N + 1 b mzPoly N 0
171 fzssuz 1 N 1
172 uzssz 1
173 171 172 sstri 1 N
174 3 173 pm3.2i V 1 N
175 174 a1i N 0 a mzPoly N + 1 b mzPoly V 1 N
176 3 a1i N 0 a mzPoly N + 1 b mzPoly V
177 95 a1i N 0 a mzPoly N + 1 b mzPoly N + 1
178 simprl N 0 a mzPoly N + 1 b mzPoly a mzPoly N + 1
179 mzpresrename V N + 1 a mzPoly N + 1 g a g N + 1 mzPoly
180 176 177 178 179 syl3anc N 0 a mzPoly N + 1 b mzPoly g a g N + 1 mzPoly
181 2nn0 2 0
182 mzpexpmpt g a g N + 1 mzPoly 2 0 g a g N + 1 2 mzPoly
183 180 181 182 sylancl N 0 a mzPoly N + 1 b mzPoly g a g N + 1 2 mzPoly
184 99 a1i N 0 a mzPoly N + 1 b mzPoly
185 simprr N 0 a mzPoly N + 1 b mzPoly b mzPoly
186 mzpresrename V b mzPoly g b g mzPoly
187 176 184 185 186 syl3anc N 0 a mzPoly N + 1 b mzPoly g b g mzPoly
188 mzpexpmpt g b g mzPoly 2 0 g b g 2 mzPoly
189 187 181 188 sylancl N 0 a mzPoly N + 1 b mzPoly g b g 2 mzPoly
190 mzpaddmpt g a g N + 1 2 mzPoly g b g 2 mzPoly g a g N + 1 2 + b g 2 mzPoly
191 183 189 190 syl2anc N 0 a mzPoly N + 1 b mzPoly g a g N + 1 2 + b g 2 mzPoly
192 eldioph2 N 0 V 1 N g a g N + 1 2 + b g 2 mzPoly c | f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0 Dioph N
193 170 175 191 192 syl3anc N 0 a mzPoly N + 1 b mzPoly c | f 0 c = f 1 N g a g N + 1 2 + b g 2 f = 0 Dioph N
194 169 193 eqeltrd N 0 a mzPoly N + 1 b mzPoly c | d 0 N + 1 c = d 1 N a d = 0 c | e 0 c = e 1 N b e = 0 Dioph N
195 ineq12 A = c | d 0 N + 1 c = d 1 N a d = 0 B = c | e 0 c = e 1 N b e = 0 A B = c | d 0 N + 1 c = d 1 N a d = 0 c | e 0 c = e 1 N b e = 0
196 195 eleq1d A = c | d 0 N + 1 c = d 1 N a d = 0 B = c | e 0 c = e 1 N b e = 0 A B Dioph N c | d 0 N + 1 c = d 1 N a d = 0 c | e 0 c = e 1 N b e = 0 Dioph N
197 194 196 syl5ibrcom N 0 a mzPoly N + 1 b mzPoly A = c | d 0 N + 1 c = d 1 N a d = 0 B = c | e 0 c = e 1 N b e = 0 A B Dioph N
198 197 rexlimdvva N 0 a mzPoly N + 1 b mzPoly A = c | d 0 N + 1 c = d 1 N a d = 0 B = c | e 0 c = e 1 N b e = 0 A B Dioph N
199 29 198 syl5bir N 0 a mzPoly N + 1 A = c | d 0 N + 1 c = d 1 N a d = 0 b mzPoly B = c | e 0 c = e 1 N b e = 0 A B Dioph N
200 28 199 sylbid N 0 A Dioph N B Dioph N A B Dioph N
201 1 200 syl A Dioph N A Dioph N B Dioph N A B Dioph N
202 201 anabsi5 A Dioph N B Dioph N A B Dioph N