2 (* ========================================================================== *)
\r
3 (* FLYSPECK - BOOK FORMALIZATION *)
\r
5 (* Chapter: Local Fan *)
\r
6 (* Author: Hoang Le Truong *)
\r
7 (* Date: 2012-04-01 *)
\r
8 (* ========================================================================= *)
\r
13 module Wjscpro = struct
\r
33 open Prove_by_refinement;;
\r
35 open Wrgcvdr_cizmrrh;;
\r
38 open Dih2k_hypermap;;
\r
42 let POWER_MOD_FUN=prove(`!n. 1<=n /\ 1<k ==> ((\i. ((1+i):num MOD k)) POWER n) i = (\i. ((n+i):num MOD k)) i`,
\r
45 DISJ_CASES_TAC(ARITH_RULE`n=0 \/ 1<=n`)
\r
47 ASM_REWRITE_TAC[POWER;I_DEF;ARITH_RULE`SUC 0=1`;o_DEF];
\r
49 THEN POP_ASSUM MP_TAC
\r
50 THEN DISCH_THEN(LABEL_TAC"THY")
\r
51 THEN STRIP_TAC THEN STRIP_TAC
\r
52 THEN REMOVE_THEN "THY" MP_TAC
\r
54 THEN ASM_REWRITE_TAC[COM_POWER;o_DEF;ADD1;MOD_ADD_MOD]
\r
55 THEN MP_TAC(ARITH_RULE`1<k==> ~(k=0)`)
\r
57 THEN MRESA_TAC MOD_LT[`1:num`;`k:num`]
\r
58 THEN MRESAL_TAC MOD_ADD_MOD[`1`;`n+i:num`;`k:num`][ARITH_RULE`(n + 1) + i=1+n+i`]]]);;
\r
63 let CLOSED_SY=prove_by_refinement(`
\r
64 stable_system k d (0..k-1) a b J (\i. ((1+i):num MOD k)) /\k= dimindex(:M)
\r
67 closed {matvec(v:real^3^M) | (!i. 1<=i /\ i <= dimindex(:M)==> row i v IN ball_annulus) /\ CONDITION1_SY a b v /\ CONDITION2_SY v }`,
\r
68 [REWRITE_TAC[CONDITION2_SY;CONDITION1_SY;stable_system]
\r
69 THEN REPEAT GEN_TAC THEN REWRITE_TAC[CLOSED_SEQUENTIAL_LIMITS] THEN REWRITE_TAC[LIM_SEQUENTIALLY; IN_ELIM_THM; dist]
\r
70 THEN REPEAT STRIP_TAC
\r
72 THEN DISCH_THEN(LABEL_TAC"THYGIANG2")
\r
73 THEN DISCH_THEN(LABEL_TAC"THYGIANG")
\r
74 THEN DISCH_THEN(LABEL_TAC"THYGIANG1")
\r
75 THEN REPEAT STRIP_TAC
\r
76 THEN EXISTS_TAC`vecmats (l:real^(M,3)finite_product)`
\r
77 THEN SIMP_TAC[MATVEC_VECMATS_ID]
\r
78 THEN POP_ASSUM MP_TAC
\r
79 THEN POP_ASSUM MP_TAC
\r
80 THEN REWRITE_TAC[SKOLEM_THM]
\r
82 THEN POP_ASSUM MP_TAC
\r
83 THEN DISCH_THEN(LABEL_TAC"THY1")
\r
84 THEN DISCH_THEN(LABEL_TAC"THY2")
\r
86 !i j. 1 <= i /\ i <= dimindex (:M) /\ 1 <= j /\ j <= dimindex (:M)
\r
88 ((\n. row i (v n) - row j ((v:num->real^3^M) n)) --> row i (vecmats l) - row j (vecmats (l:real^(M,3)finite_product)))
\r
89 sequentially`ASSUME_TAC;
\r
91 SIMP_TAC[EVENTUALLY_SEQUENTIALLY;TRIVIAL_LIMIT_SEQUENTIALLY;LIM_SEQUENTIALLY]
\r
92 THEN REPEAT STRIP_TAC
\r
93 THEN SIMP_TAC[dist;VECTOR_ARITH`A-B-(C-D)=(A-C)-(B-D):real^N`]
\r
94 THEN MP_TAC(REAL_ARITH`&0< e==> &0< e/ &2`)
\r
96 THEN REMOVE_THEN "THY2"(fun th-> MRESA1_TAC th`e/ &2:real`)
\r
97 THEN POP_ASSUM MP_TAC
\r
98 THEN DISCH_THEN(LABEL_TAC"THY2")
\r
99 THEN EXISTS_TAC`N:num`
\r
100 THEN REPEAT STRIP_TAC
\r
101 THEN REMOVE_THEN "THY2"(fun th-> MRESA1_TAC th`n:num`)
\r
102 THEN MP_TAC(ARITH_RULE`1<=i /\ i <= dimindex (:M)==> i -1 < dimindex (:M)/\ SUC(i-1)=i`)
\r
104 THEN MP_TAC(ARITH_RULE`1<=j /\ j <= dimindex (:M)==> j -1 < dimindex (:M)/\ SUC(j-1)=j`)
\r
106 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`i-1`;`((v:num->real^3^M) n)`]
\r
107 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`i-1`;`vecmats (l:real^(M,3)finite_product)`]
\r
108 THEN POP_ASSUM MP_TAC
\r
109 THEN SIMP_TAC[MATVEC_VECMATS_ID]
\r
111 THEN MRESAL_TAC (GEN_ALL NORM_VECMAT)[`i-1`;`matvec ((v:num->real^3^M) n) - (l:real^(M,3)finite_product)`][VECMAT_SUB]
\r
112 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`j-1`;`((v:num->real^3^M) n)`]
\r
113 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`j-1`;`vecmats (l:real^(M,3)finite_product)`]
\r
114 THEN POP_ASSUM MP_TAC
\r
115 THEN SIMP_TAC[MATVEC_VECMATS_ID]
\r
117 THEN MRESAL_TAC (GEN_ALL NORM_VECMAT)[`j-1`;`matvec ((v:num->real^3^M) n) - (l:real^(M,3)finite_product)`][VECMAT_SUB]
\r
118 THEN MRESAL_TAC NORM_TRIANGLE[`row i ((v:num->real^3^M) n) - row i (vecmats (l:real^(M,3)finite_product))`;`--(row j ((v:num->real^3^M) n) - row j (vecmats (l:real^(M,3)finite_product)))`][NORM_NEG;VECTOR_ARITH`A+ --B=A-B:real^N` ]
\r
119 THEN POP_ASSUM MP_TAC
\r
120 THEN POP_ASSUM MP_TAC
\r
121 THEN REMOVE_ASSUM_TAC
\r
122 THEN REMOVE_ASSUM_TAC
\r
123 THEN POP_ASSUM MP_TAC
\r
124 THEN REMOVE_ASSUM_TAC
\r
125 THEN REMOVE_ASSUM_TAC
\r
126 THEN REMOVE_ASSUM_TAC
\r
127 THEN REMOVE_ASSUM_TAC
\r
128 THEN REMOVE_ASSUM_TAC
\r
129 THEN REMOVE_ASSUM_TAC
\r
130 THEN POP_ASSUM MP_TAC
\r
131 THEN REAL_ARITH_TAC;
\r
134 !i. 1 <= i /\ i <= dimindex (:M) ==>
\r
135 ((\n. row i ((v:num->real^3^M) n)) --> row i (vecmats (l:real^(M,3)finite_product)))
\r
136 sequentially`ASSUME_TAC;
\r
138 SIMP_TAC[EVENTUALLY_SEQUENTIALLY;TRIVIAL_LIMIT_SEQUENTIALLY;LIM_SEQUENTIALLY]
\r
139 THEN REPEAT STRIP_TAC
\r
140 THEN SIMP_TAC[dist;VECTOR_ARITH`A-B-(C-D)=(A-C)-(B-D):real^N`]
\r
141 THEN MP_TAC(REAL_ARITH`&0< e==> &0< e/ &2`)
\r
143 THEN REMOVE_THEN "THY2"(fun th-> MRESA1_TAC th`e:real`)
\r
144 THEN POP_ASSUM MP_TAC
\r
145 THEN DISCH_THEN(LABEL_TAC"THY2")
\r
146 THEN EXISTS_TAC`N:num`
\r
147 THEN REPEAT STRIP_TAC
\r
148 THEN REMOVE_THEN "THY2"(fun th-> MRESA1_TAC th`n:num`)
\r
149 THEN MP_TAC(ARITH_RULE`1<=i /\ i <= dimindex (:M)==> i -1 < dimindex (:M)/\ SUC(i-1)=i`)
\r
151 THEN MP_TAC(ARITH_RULE`1<=j /\ j <= dimindex (:M)==> j -1 < dimindex (:M)/\ SUC(j-1)=j`)
\r
153 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`i-1`;`((v:num->real^3^M) n)`]
\r
154 THEN MRESA_TAC (GEN_ALL VECMAT_ROW)[`i-1`;`vecmats (l:real^(M,3)finite_product)`]
\r
155 THEN POP_ASSUM MP_TAC
\r
156 THEN SIMP_TAC[MATVEC_VECMATS_ID]
\r
158 THEN MRESAL_TAC (GEN_ALL NORM_VECMAT)[`i-1`;`matvec ((v:num->real^3^M) n) - (l:real^(M,3)finite_product)`][VECMAT_SUB]
\r
159 THEN POP_ASSUM MP_TAC
\r
160 THEN REMOVE_ASSUM_TAC
\r
161 THEN REMOVE_ASSUM_TAC
\r
162 THEN REMOVE_ASSUM_TAC
\r
163 THEN REMOVE_ASSUM_TAC
\r
164 THEN REMOVE_ASSUM_TAC
\r
165 THEN POP_ASSUM MP_TAC
\r
166 THEN REAL_ARITH_TAC;
\r
169 THEN DISCH_THEN(LABEL_TAC"YEU2")
\r
170 THEN SUBGOAL_THEN`(!i j.
\r
171 1 <= i /\ i <= dimindex (:M) /\ 1 <= j /\ j <= dimindex (:M)
\r
172 ==> (a:num#num->real) (i,j) <= norm (row i (vecmats l) - row j (vecmats l)) /\
\r
173 norm (row i (vecmats l) - row j (vecmats (l:real^(M,3)finite_product))) <= (b:num#num->real) (i,j))` ASSUME_TAC;
\r
177 MRESA_TAC LIM_NORM_LBOUND[`sequentially`;`(\n. row i (v n) - row j ((v:num->real^3^M) n))`;`row i (vecmats l) - row j (vecmats (l:real^(M,3)finite_product))`;`(a:num#num->real)(i,j)`]
\r
178 THEN POP_ASSUM MATCH_MP_TAC
\r
179 THEN ASM_SIMP_TAC[EVENTUALLY_SEQUENTIALLY;TRIVIAL_LIMIT_SEQUENTIALLY;LIM_SEQUENTIALLY];
\r
181 MRESA_TAC LIM_NORM_UBOUND[`sequentially`;`(\n. row i (v n) - row j ((v:num->real^3^M) n))`;`row i (vecmats l) - row j (vecmats (l:real^(M,3)finite_product))`;`(b:num#num->real)(i,j)`]
\r
182 THEN POP_ASSUM MATCH_MP_TAC
\r
183 THEN ASM_SIMP_TAC[EVENTUALLY_SEQUENTIALLY;TRIVIAL_LIMIT_SEQUENTIALLY;LIM_SEQUENTIALLY];
\r
186 THEN SUBGOAL_THEN`!i j.
\r
187 1 <= i /\ i <= dimindex (:M) /\ 1 <= j /\ j <= dimindex (:M) /\ ~(i=j)
\r
188 ==> &2 <= norm (row i (vecmats (l:real^(M,3)finite_product)) - row j (vecmats l))` ASSUME_TAC;
\r
191 THEN DISCH_THEN(LABEL_TAC"THY3")
\r
192 THEN REPEAT STRIP_TAC
\r
193 THEN REMOVE_THEN "THY3"(fun th-> MRESA_TAC th[`i:num`;`j:num`])
\r
194 THEN MATCH_MP_TAC(REAL_ARITH`a (i,j) <= norm (row i (vecmats l) - row j (vecmats l)) /\ &2<= a(i,j)==> &2 <= norm (row i (vecmats l) - row j (vecmats l))`)
\r
195 THEN MP_TAC(ARITH_RULE`i <= dimindex (:M)==> i <= dimindex (:M)-1 \/ i = dimindex (:M)`);
\r
199 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`);
\r
203 REMOVE_THEN"THYGIANG"MP_TAC
\r
204 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
206 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i:num`;`j:num`][ARITH_RULE`0<= i:num`]);
\r
208 MP_TAC(ARITH_RULE`1<= i==> ~(i = 0)`)
\r
210 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
211 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
213 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i:num`;`0:num`][ARITH_RULE`0<= i:num`])
\r
214 THEN MP_TAC(ARITH_RULE`1<k ==> 1<=k`)
\r
216 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
217 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
218 THEN REWRITE_TAC[constraint_system]
\r
220 THEN REMOVE_ASSUM_TAC
\r
221 THEN REMOVE_ASSUM_TAC
\r
222 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`i:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
223 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`];
\r
225 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`);
\r
229 MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
230 THEN MP_TAC(ARITH_RULE`1<k ==> 1<=k`)
\r
232 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
233 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
234 THEN REWRITE_TAC[constraint_system]
\r
236 THEN REMOVE_ASSUM_TAC
\r
237 THEN REMOVE_ASSUM_TAC
\r
238 THEN POP_ASSUM MP_TAC
\r
239 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
241 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
242 THEN MP_TAC(ARITH_RULE`1<= j==> ~(j = 0)`)
\r
244 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
245 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
247 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`j:num`;`0:num`][ARITH_RULE`0<= i:num`]);
\r
249 POP_ASSUM(fun th-> ASM_TAC THEN REWRITE_TAC[th])
\r
253 THEN POP_ASSUM MP_TAC
\r
254 THEN DISCH_THEN(LABEL_TAC"THY3")
\r
255 THEN DISCH_THEN(LABEL_TAC"THY4")
\r
256 THEN SUBGOAL_THEN`!i.
\r
257 1 <= i /\ i <= dimindex (:M)
\r
258 ==> norm (row i (vecmats (l:real^(M,3)finite_product)) - row (SUC (i MOD dimindex (:M))) (vecmats l))<= cstab` ASSUME_TAC;
\r
261 THEN MP_TAC(ARITH_RULE`i<= dimindex (:M) ==> i< dimindex (:M) \/ i=dimindex (:M)`)
\r
264 MP_TAC(ARITH_RULE`i< dimindex (:M) ==> i<= dimindex (:M) /\ i+1<=dimindex (:M) /\ i<= dimindex (:M)-1`)
\r
266 THEN MRESAL_TAC MOD_LT[`i:num`;`k:num`][ADD1]
\r
267 THEN REMOVE_THEN "THY3"(fun th-> MRESAL_TAC th[`i:num`;`i+1:num`][ARITH_RULE`1<= i+1`])
\r
268 THEN POP_ASSUM MP_TAC
\r
269 THEN REMOVE_THEN"THYGIANG1"MP_TAC
\r
270 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
272 THEN POP_ASSUM (fun th-> MRESAL1_TAC th`i:num`[ARITH_RULE`0<= i:num`])
\r
273 THEN POP_ASSUM MP_TAC
\r
274 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
275 THEN REWRITE_TAC[constraint_system]
\r
277 THEN REMOVE_ASSUM_TAC
\r
278 THEN REMOVE_ASSUM_TAC
\r
279 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`i:num`;`i+1:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
280 THEN MP_TAC(ARITH_RULE`1<k ==> 1<=k`)
\r
282 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`i+1:num`;`k:num`]
\r
283 THEN MRESAL_TAC MOD_MULT_ADD[`1`;`k:num`;`i+1`][ARITH_RULE`1*A=A`]
\r
285 THEN ONCE_REWRITE_TAC[ARITH_RULE`A+1=1+A`]
\r
286 THEN POP_ASSUM MP_TAC
\r
287 THEN REAL_ARITH_TAC;
\r
289 MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ SUC 0=1`]
\r
290 THEN REMOVE_THEN "THY3"(fun th-> MRESAL_TAC th[`k:num`;`1:num`][ARITH_RULE`1<= 1/\ dimindex (:M) <= dimindex (:M)`;DIMINDEX_GE_1])
\r
291 THEN POP_ASSUM MP_TAC
\r
292 THEN MP_TAC(ARITH_RULE` (1 <= dimindex (:M)) ==> 0 <= dimindex (:M) - 1` )
\r
293 THEN SIMP_TAC[DIMINDEX_GE_1]
\r
295 THEN REMOVE_THEN"THYGIANG1"MP_TAC
\r
296 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
298 THEN POP_ASSUM (fun th-> MRESAL1_TAC th`0:num`[ARITH_RULE`0<= 0:num/\ 0+1=1`;])
\r
299 THEN POP_ASSUM MP_TAC
\r
300 THEN MRESAL_TAC MOD_LT[`1:num`;`k:num`][ARITH_RULE`0<1`]
\r
301 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
302 THEN REWRITE_TAC[constraint_system]
\r
304 THEN REMOVE_ASSUM_TAC
\r
305 THEN REMOVE_ASSUM_TAC
\r
306 THEN POP_ASSUM MP_TAC
\r
307 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`k:num`;`1:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `] THEN
\r
308 MRESAL_TAC th[`0:num`;`1:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
310 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`1:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
311 THEN MP_TAC(ARITH_RULE`1<k ==> 1<=k`)
\r
313 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
314 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
315 THEN REAL_ARITH_TAC;
\r
317 SUBGOAL_THEN`(!i. 1 <= i /\ i <= dimindex (:M) ==> row i (vecmats (l:real^(M,3)finite_product)) IN ball_annulus)` ASSUME_TAC;
\r
319 MP_TAC COMPACT_BALL_ANNULUS
\r
320 THEN ASM_SIMP_TAC[COMPACT_EQ_BOUNDED_CLOSED]
\r
321 THEN REWRITE_TAC[CLOSED_SEQUENTIAL_LIMITS] THEN REWRITE_TAC[ IN_ELIM_THM; dist]
\r
322 THEN REWRITE_TAC[SKOLEM_THM]
\r
324 THEN POP_ASSUM MP_TAC
\r
325 THEN DISCH_THEN(LABEL_TAC"YEU")
\r
326 THEN REPEAT STRIP_TAC
\r
327 THEN REMOVE_THEN "YEU" (fun th-> MRESA_TAC th[`(\n. row i ((v:num->real^3^M) n)) `;` row i (vecmats (l:real^(M,3)finite_product))`])
\r
328 THEN POP_ASSUM MATCH_MP_TAC
\r
329 THEN ASM_SIMP_TAC[];
\r
331 SUBGOAL_THEN`!i. 1 <= i /\ i <= dimindex (:M)
\r
333 ~(row i (vecmats l) =
\r
334 row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))) `ASSUME_TAC;
\r
337 THEN REMOVE_ASSUM_TAC
\r
338 THEN POP_ASSUM MP_TAC
\r
339 THEN DISCH_THEN(LABEL_TAC"THY5")
\r
340 THEN REPEAT STRIP_TAC
\r
341 THEN MRESA_TAC (GEN_ALL SUC_NOT)[`i:num`;`k:num`]
\r
342 THEN REMOVE_THEN"THY5"(fun th-> MRESAL_TAC th[`i:num`;`SUC (i MOD dimindex (:M))`][VECTOR_ARITH`A-A = vec 0`;NORM_0])
\r
343 THEN POP_ASSUM MP_TAC
\r
344 THEN REAL_ARITH_TAC;
\r
346 ASM_REWRITE_TAC[convex_local_fan]
\r
347 THEN ASM_REWRITE_TAC[local_fan]
\r
348 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
349 THEN SUBGOAL_THEN `FAN (vec 0,V_SY (vecmats (l:real^(M,3)finite_product)),E_SY (vecmats l))`ASSUME_TAC;
\r
354 REWRITE_TAC[SUBSET;UNIONS;E_SY;V_SY;IN_ELIM_THM;rows]
\r
355 THEN REPEAT STRIP_TAC
\r
356 THEN POP_ASSUM MP_TAC
\r
357 THEN ASM_REWRITE_TAC[SET_RULE`A IN {B,C}<=> A=B \/ A=C`]
\r
361 THEN ASM_REWRITE_TAC[];
\r
363 EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
364 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
365 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
366 THEN POP_ASSUM MP_TAC
\r
371 REWRITE_TAC[GRAPH;E_SY;IN_ELIM_THM]
\r
372 THEN REPEAT STRIP_TAC
\r
373 THEN ASM_REWRITE_TAC[HAS_SIZE]
\r
374 THEN ASM_SIMP_TAC[HAS_SIZE; CARD_CLAUSES; FINITE_INSERT; FINITE_EMPTY ; IN_INSERT; NOT_IN_EMPTY]
\r
379 REWRITE_TAC[fan1;V_SY;rows]
\r
382 MRESAL_TAC FINITE_IMAGE[`(\i. row i (vecmats (l:real^(M,3)finite_product)))`;`1..k`][IMAGE;IN_ELIM_THM;FINITE_NUMSEG;IN_NUMSEG]
\r
383 THEN POP_ASSUM MP_TAC
\r
384 THEN SUBGOAL_THEN`{y | ?x. (1 <= x /\ x <= dimindex (:M)) /\ y = row x (vecmats l)}={row i (vecmats (l:real^(M,3)finite_product)) | 1 <= i /\ i <= dimindex (:M)}`ASSUME_TAC;
\r
386 REWRITE_TAC[EXTENSION;IN_ELIM_THM];
\r
390 REWRITE_TAC[SET_RULE`~(A SUBSET {})<=> ?a. a IN A`;IN_ELIM_THM]
\r
391 THEN EXISTS_TAC`row 1(vecmats (l:real^(M,3)finite_product))`
\r
393 THEN ASM_REWRITE_TAC[ARITH_RULE`1<=1`;DIMINDEX_GE_1];
\r
397 REWRITE_TAC[fan2;V_SY;IN_ELIM_THM;rows;NOT_EXISTS_THM;DE_MORGAN_THM]
\r
398 THEN REPEAT STRIP_TAC
\r
399 THEN DISJ_CASES_TAC(SET_RULE`~(1<= i) \/ 1<= i`);
\r
403 DISJ_CASES_TAC(SET_RULE`~(i<= dimindex (:M)) \/ i<= dimindex (:M)`);
\r
408 THEN POP_ASSUM MP_TAC
\r
409 THEN POP_ASSUM MP_TAC
\r
410 THEN REMOVE_ASSUM_TAC
\r
411 THEN POP_ASSUM MP_TAC
\r
412 THEN DISCH_THEN(LABEL_TAC"YEUEM")
\r
413 THEN REPEAT STRIP_TAC
\r
414 THEN REMOVE_THEN"YEUEM"(fun th-> MRESAL1_TAC th `i:num`[ball_annulus;IN_ELIM_THM])
\r
415 THEN POP_ASSUM MP_TAC
\r
416 THEN POP_ASSUM(fun th-> REWRITE_TAC[SYM th;DIFF;IN_ELIM_THM;ball;DE_MORGAN_THM;dist;VECTOR_ARITH`vec 0- vec 0=vec 0`;NORM_0;REAL_ARITH`&0< &2`]);
\r
418 SUBGOAL_THEN`!i. (1 <= i /\ i <= dimindex (:M))
\r
419 ==> ~collinear ({vec 0} UNION {row i (vecmats l), row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))})`ASSUME_TAC;
\r
422 THEN POP_ASSUM MP_TAC
\r
423 THEN ASM_REWRITE_TAC[]
\r
424 THEN MATCH_MP_TAC NONPARALLEL_BALL_ANNULUS
\r
425 THEN ASM_SIMP_TAC[]
\r
426 THEN MRESA_TAC (GEN_ALL SUC_NOT)[`i:num`;`k:num`]
\r
427 THEN ASM_SIMP_TAC[];
\r
430 THEN REWRITE_TAC[SET_RULE`{A} UNION {B,C}={A,B,C}`]
\r
431 THEN REPEAT STRIP_TAC;
\r
433 REWRITE_TAC[fan6;E_SY;IN_ELIM_THM]
\r
434 THEN REPEAT STRIP_TAC
\r
435 THEN POP_ASSUM MP_TAC
\r
436 THEN ASM_REWRITE_TAC[]
\r
437 THEN MATCH_MP_TAC NONPARALLEL_BALL_ANNULUS
\r
438 THEN ASM_SIMP_TAC[]
\r
439 THEN MRESA_TAC (GEN_ALL SUC_NOT)[`i:num`;`k:num`]
\r
440 THEN ASM_SIMP_TAC[];
\r
443 THEN SUBGOAL_THEN`!i. 1 <= i /\ i <= dimindex (:M)
\r
444 ==> ~(vec 0= row i (vecmats l)) /\ ~(vec 0 = row (SUC (i MOD dimindex (:M)))(vecmats (l:real^(M,3)finite_product)))`ASSUME_TAC;
\r
448 THEN MRESA_TAC th3[`(vec 0):real^3`;`row i (vecmats (l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`]
\r
449 THEN POP_ASSUM MP_TAC
\r
450 THEN ASM_SIMP_TAC[];
\r
453 u IN V_SY (vecmats l) /\
\r
454 w IN V_SY (vecmats (l:real^(M,3)finite_product))
\r
455 ==> aff_ge {vec 0} {u} INTER aff_ge {vec 0} {w} =
\r
456 aff_ge {vec 0} ({u} INTER {w})`ASSUME_TAC;
\r
458 REWRITE_TAC[V_SY;IN_ELIM_THM;rows]
\r
459 THEN REPEAT STRIP_TAC
\r
460 THEN DISJ_CASES_TAC(SET_RULE`u=w:real^3 \/ {u} INTER {w}={}`);
\r
462 POP_ASSUM(fun th-> REWRITE_TAC[th;SET_RULE`A INTER A=A`]);
\r
464 ASM_REWRITE_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING]
\r
465 THEN POP_ASSUM MP_TAC
\r
466 THEN ASM_REWRITE_TAC[SET_RULE`{u} INTER {w} = {} <=> ~(u=w) `;EXTENSION; INTER;IN_ELIM_THM;IN_SING]
\r
467 THEN REPEAT STRIP_TAC
\r
471 THEN MATCH_MP_TAC (GEN_ALL VEC0_BALL_ANNULUS)
\r
472 THEN EXISTS_TAC`u:real^3`
\r
473 THEN EXISTS_TAC`w:real^3`
\r
474 THEN DISJ_CASES_TAC(SET_RULE`i=i':num \/ ~(i=i')`);
\r
476 POP_ASSUM(fun th-> ASM_TAC THEN REWRITE_TAC[th] THEN SET_TAC[]);
\r
481 THEN ASM_REWRITE_TAC[ENDS_IN_HALFLINE];
\r
484 THEN POP_ASSUM MP_TAC
\r
485 THEN POP_ASSUM MP_TAC
\r
486 THEN POP_ASSUM MP_TAC
\r
487 THEN POP_ASSUM MP_TAC
\r
488 THEN POP_ASSUM MP_TAC
\r
489 THEN DISCH_THEN(LABEL_TAC"THY50")
\r
490 THEN DISCH_THEN(LABEL_TAC"THY5")
\r
491 THEN DISCH_THEN(LABEL_TAC"THY55")
\r
492 THEN DISCH_THEN(LABEL_TAC"THY6")
\r
493 THEN DISCH_THEN(LABEL_TAC"THY7")
\r
494 THEN DISCH_THEN(LABEL_TAC"THY8")
\r
495 THEN SUBGOAL_THEN`!e1 v.
\r
496 e1 IN E_SY (vecmats l) /\ v IN V_SY (vecmats (l:real^(M,3)finite_product))
\r
497 ==> aff_ge {vec 0} e1 INTER aff_ge {vec 0} {v} =
\r
498 aff_ge {vec 0} (e1 INTER {v})` ASSUME_TAC;
\r
500 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
501 THEN REPEAT STRIP_TAC
\r
502 THEN POP_ASSUM MP_TAC
\r
503 THEN DISCH_THEN(LABEL_TAC"GIANG")
\r
504 THEN ABBREV_TAC`y=row i (vecmats (l:real^(M,3)finite_product))`
\r
505 THEN ABBREV_TAC`z=row (SUC (i MOD dimindex (:M))) (vecmats
\r
506 (l:real^(M,3)finite_product))`
\r
507 THEN ASM_REWRITE_TAC[]
\r
508 THEN DISJ_CASES_TAC(SET_RULE`y= v' \/ z= v' \/ (~(v'=y)/\ ~(v'=z:real^3))`);
\r
510 ASM_REWRITE_TAC[SET_RULE`{A,B} INTER {A}={A}`]
\r
511 THEN REMOVE_THEN "THY6"(fun th-> MRESA1_TAC th`i:num`)
\r
512 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
518 ASM_REWRITE_TAC[SET_RULE`{A,B} INTER {B}={B}`]
\r
519 THEN REMOVE_THEN "THY6"(fun th-> MRESA1_TAC th`i:num`)
\r
520 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
523 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
525 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
526 THEN EXISTS_TAC`i:num`
\r
527 THEN ASM_REWRITE_TAC[];
\r
529 SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
531 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
532 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
533 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
534 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
535 THEN POP_ASSUM MP_TAC
\r
538 REMOVE_THEN "THY6"(fun th-> MRESA1_TAC th`i:num`)
\r
539 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
540 THEN REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`v':real^3`] THEN MRESA_TAC th[`z:real^3`;`v':real^3`])
\r
541 THEN MP_TAC(SET_RULE`~(y= v') /\ ~(z= v') ==> {y} INTER {v':real^3}={}/\ {z} INTER {v':real^3}={} /\ {y,z} INTER {v':real^3}={}`)
\r
543 THEN ASM_REWRITE_TAC[SET_RULE`(A UNION B UNION C) INTER D=(A INTER D) UNION (B INTER D) UNION (C INTER D)`;SET_RULE`A UNION A=A`]
\r
544 THEN REMOVE_THEN "THY50"(fun th-> MRESA1_TAC th`i:num`)
\r
545 THEN USE_THEN"GIANG" MP_TAC
\r
546 THEN REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
548 THEN SUBGOAL_THEN`1 <= SUC (i MOD dimindex (:M)) /\
\r
549 SUC (i MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
551 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
552 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
553 THEN POP_ASSUM MP_TAC
\r
556 REMOVE_THEN "THY5"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MRESA1_TAC th`(SUC (i MOD dimindex (:M))):num`)
\r
557 THEN DISJ_CASES_TAC(SET_RULE`i= i' \/ ~(i= i':num)`);
\r
559 POP_ASSUM( fun th-> ASM_TAC THEN REWRITE_TAC[th] THEN REPEAT RESA_TAC);
\r
561 DISJ_CASES_TAC(SET_RULE`i'= SUC (i MOD dimindex (:M)) \/ ~(i'= SUC (i MOD dimindex (:M)):num)`);
\r
563 POP_ASSUM( fun th-> ASM_TAC THEN REWRITE_TAC[th] THEN REPEAT RESA_TAC);
\r
575 MRESA_TAC (GEN_ALL SUC_NOT)[`i:num`;`k:num`]
\r
576 THEN REMOVE_THEN"THY4"(fun th-> MRESA_TAC th[`i':num`;`i:num`] THEN MRESA_TAC th[`i':num`;`SUC (i MOD dimindex (:M)):num`] THEN MRESA_TAC th[`i:num`;`SUC (i MOD dimindex (:M)):num`])
\r
577 THEN DISJ_CASES_TAC(SET_RULE`collinear{vec 0, y, v':real^3}\/ ~collinear{vec 0, y, v':real^3}`);
\r
581 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
582 THEN MRESA_TAC (GEN_ALL Local_lemmas.collinear_fan22)[`vec 0:real^3`;`v':real^3`;`y:real^3`]
\r
583 THEN POP_ASSUM MP_TAC
\r
584 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,B,A}`]
\r
586 THEN REMOVE_THEN"THY7"(fun th-> MRESA1_TAC th`i':num`)
\r
587 THEN MRESAL_TAC Planarity.sym_line_fan[`vec 0:real^3`;`v':real^3`;`y:real^3`][SET_RULE`DISJOINT {x} {y,z} <=> ~(x=y)/\ ~(x=z)`]
\r
588 THEN MRESA_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
589 THEN POP_ASSUM MP_TAC
\r
590 THEN MRESAL_TAC AFF_GE_SUBSET_AFFINE_HULL[`{vec 0:real^3}`;`{v':real^3}`][SET_RULE`{A} UNION {B}={A,B}`]
\r
591 THEN POP_ASSUM MP_TAC
\r
592 THEN ASM_REWRITE_TAC[aff]
\r
595 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {v'} SUBSET affine hull {vec 0, v'}
\r
596 /\ affine hull {vec 0, v'} INTER aff_gt {vec 0} {y, z} = {}
\r
597 ==> aff_gt {vec 0} {y, z:real^3} INTER aff_ge {vec 0} {v'} = {}`)
\r
601 DISJ_CASES_TAC(SET_RULE`collinear{vec 0, z, v':real^3}\/ ~collinear{vec 0, z, v':real^3}`);
\r
605 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
606 THEN MRESA_TAC (GEN_ALL Local_lemmas.collinear_fan22)[`vec 0:real^3`;`v':real^3`;`z:real^3`]
\r
607 THEN POP_ASSUM MP_TAC
\r
608 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,B,A}`]
\r
610 THEN REMOVE_THEN"THY7"(fun th-> MRESA1_TAC th`i':num`)
\r
611 THEN MRESAL_TAC Planarity.sym_line_fan[`vec 0:real^3`;`v':real^3`;`z:real^3`][SET_RULE`DISJOINT {x} {y,z} <=> ~(x=y)/\ ~(x=z)`]
\r
612 THEN MRESA_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`z:real^3`;`y:real^3`]
\r
613 THEN POP_ASSUM MP_TAC
\r
614 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
615 THEN ASM_REWRITE_TAC[]
\r
616 THEN MRESAL_TAC AFF_GE_SUBSET_AFFINE_HULL[`{vec 0:real^3}`;`{v':real^3}`][SET_RULE`{A} UNION {B}={A,B}`]
\r
617 THEN POP_ASSUM MP_TAC
\r
618 THEN ASM_REWRITE_TAC[aff]
\r
621 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {v'} SUBSET affine hull {vec 0, v'}
\r
622 /\ affine hull {vec 0, v'} INTER aff_gt {vec 0} {z,y} = {}
\r
623 ==> aff_gt {vec 0} { z:real^3,y} INTER aff_ge {vec 0} {v'} = {}`)
\r
625 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
626 THEN ASM_REWRITE_TAC[]
\r
629 MRESA_TAC (GEN_ALL BALL_ANNULUS_4PONITS_AFF_GT)[`v':real^3`;`y:real^3`;`z:real^3`]
\r
630 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`v':real^3`]
\r
631 THEN MRESA_TAC (GEN_ALL AFF_GE_INTER_AFF_GT_EQ_EMPTY)[`v':real^3`;`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
632 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
633 THEN ASM_REWRITE_TAC[]
\r
636 SUBGOAL_THEN`!e1 e2.
\r
637 e1 IN E_SY (vecmats l) /\
\r
638 e2 IN E_SY (vecmats (l:real^(M,3)finite_product)) /\ (e1 INTER e2={})
\r
639 ==> aff_gt {vec 0} e1 INTER aff_gt {vec 0} e2 = {}` ASSUME_TAC;
\r
642 THEN DISCH_THEN(LABEL_TAC"YEU")
\r
643 THEN REPEAT GEN_TAC
\r
645 THEN POP_ASSUM (fun th-> MP_TAC th
\r
646 THEN REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
648 THEN POP_ASSUM MP_TAC
\r
652 THEN ABBREV_TAC`y=row i (vecmats (l:real^(M,3)finite_product))`
\r
653 THEN ABBREV_TAC`z=row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`
\r
654 THEN ABBREV_TAC`y1=row i' (vecmats (l:real^(M,3)finite_product))`
\r
655 THEN ABBREV_TAC`z1=row (SUC (i' MOD dimindex (:M))) (vecmats
\r
656 (l:real^(M,3)finite_product))`
\r
657 THEN DISJ_CASES_TAC(SET_RULE`(?v3. v3 IN aff_gt {vec 0} {y, z} INTER aff_gt {vec 0} {y1, z1}) \/ aff_gt {vec 0} {y, z} INTER aff_gt {vec 0} {y1, z1:real^3}={}`);
\r
660 THEN REWRITE_TAC[INTER;IN_ELIM_THM]
\r
662 THEN REMOVE_THEN"THY6"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MP_TAC(th) THEN DISCH_THEN(LABEL_TAC"THY6"))
\r
663 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`y:real^3`;`z:real^3`;`v3:real^3`;]
\r
664 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`z:real^3`;`y:real^3`;`v3:real^3`;]
\r
665 THEN POP_ASSUM MP_TAC
\r
666 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
667 THEN ASM_REWRITE_TAC[]
\r
668 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
670 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`v3:real^3`;]
\r
671 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`z1:real^3`;`y1:real^3`;`v3:real^3`;]
\r
672 THEN POP_ASSUM MP_TAC
\r
673 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
674 THEN ASM_REWRITE_TAC[]
\r
675 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
677 THEN DISJ_CASES_TAC(REAL_ARITH`(v3 cross y:real^3) dot y1 = &0 \/ &0< (v3 cross y) dot y1 \/ &0< --((v3 cross y) dot y1)`);
\r
679 MRESAL_TAC (GEN_ALL Local_lemmas.COPLANAR_IFF_CROSS_DOT)[`y:real^3`;`v3:real^3`;`y1:real^3`;`vec 0:real^3`;][VECTOR_ARITH`A- vec 0=A`]
\r
680 THEN SUBGOAL_THEN`y1 IN aff {vec 0, v3,y:real^3}` ASSUME_TAC;
\r
682 ASM_SIMP_TAC[Conforming.aff_3_rep_cross_dot;IN_ELIM_THM;VECTOR_ARITH`A- vec 0=A`];
\r
685 THEN REWRITE_TAC[aff; AFFINE_HULL_3;IN_ELIM_THM;VECTOR_ARITH`A % vec 0+B=B`]
\r
687 THEN POP_ASSUM(fun th-> ASSUME_TAC(SYM th))
\r
688 THEN DISJ_CASES_TAC(REAL_ARITH`&0<= w\/ &0<= -- w`);
\r
690 SUBGOAL_THEN`y1 IN aff_ge {vec 0,v3} {y:real^3}` ASSUME_TAC;
\r
692 ASM_SIMP_TAC[AFF_GE_2_1;th3;IN_ELIM_THM]
\r
693 THEN EXISTS_TAC`u:real`
\r
694 THEN EXISTS_TAC`v':real`
\r
695 THEN EXISTS_TAC`w:real`
\r
696 THEN ASM_REWRITE_TAC[]
\r
697 THEN VECTOR_ARITH_TAC;
\r
699 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`v3:real^3`;`y:real^3`;`y1:real^3`];
\r
701 MRESA_TAC Planarity.aff_gt3_subset_aff_gt[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`v3:real^3`]
\r
702 THEN POP_ASSUM MP_TAC
\r
703 THEN ASM_SIMP_TAC[th3;SET_RULE`{A,B}={B,A}`]
\r
705 THEN MP_TAC(SET_RULE`y IN aff_gt {vec 0} {v3, y1} /\ aff_gt {vec 0} {v3, y1} SUBSET aff_gt {vec 0} {y1, z1} /\ aff_gt {vec 0} {y1, z1} SUBSET aff_ge {vec 0} {y1, z1}
\r
706 ==> y IN aff_ge {vec 0} {y1, z1:real^3}`)
\r
707 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
709 THEN MRESA_TAC Planarity.aff_ge_1_1_subset_aff_ge_fan[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`y:real^3`;]
\r
710 THEN POP_ASSUM MP_TAC
\r
711 THEN ASM_SIMP_TAC[th3]
\r
712 THEN MRESA_TAC th3[`vec 0:real^3`;`v3:real^3`;`y:real^3`]
\r
714 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {y} SUBSET aff_ge {vec 0} {y1, z1}
\r
715 ==> aff_ge {vec 0} {y1, z1} INTER aff_ge {vec 0} {y} =aff_ge {vec 0} {y:real^3} `)
\r
717 THEN SUBGOAL_THEN`y IN V_SY(vecmats (l:real^(M,3)finite_product))`ASSUME_TAC;
\r
719 ASM_SIMP_TAC[IN_ELIM_THM;V_SY;rows]
\r
720 THEN EXISTS_TAC`i:num`
\r
721 THEN ASM_REWRITE_TAC[];
\r
723 MP_TAC(SET_RULE`y IN aff_gt {vec 0} {v3, y1}/\ aff_gt {vec 0} {v3, y1} SUBSET aff_gt {vec 0} {y1, z1:real^3} ==> y IN aff_gt {vec 0} {y1, z1}`)
\r
725 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`y:real^3`]
\r
726 THEN POP_ASSUM MP_TAC
\r
727 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={B,C,A}`]
\r
729 THEN MRESA_TAC th3[`y:real^3`;`y1:real^3`;`vec 0:real^3`]
\r
730 THEN MRESA_TAC Planarity.properties_of_collinear4_points_fan[`vec 0:real^3`;`z1:real^3`;`y1:real^3`;`y:real^3`]
\r
731 THEN POP_ASSUM MP_TAC
\r
732 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
734 THEN POP_ASSUM MP_TAC
\r
735 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={B,C,A}`]
\r
737 THEN MRESA_TAC th3[`z1:real^3`;`y:real^3`;`vec 0:real^3`]
\r
738 THEN MP_TAC(SET_RULE`~(y = y1) /\ ~(z1=y)==> {y1,z1:real^3} INTER {y}={}`)
\r
740 THEN REMOVE_THEN"YEU"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`y:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
741 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y:real^3`][IN_SING];
\r
743 MP_TAC(SET_RULE`v3 IN aff_gt {vec 0} {y, z} /\ aff_gt {vec 0} {y, z} SUBSET aff_ge {vec 0} {y, z}
\r
744 ==> v3 IN aff_ge {vec 0} {y, z:real^3}`)
\r
745 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
747 THEN MRESA_TAC Planarity.aff_ge1_subset_aff_ge[`vec 0:real^3`;`z:real^3`;`y:real^3`;`v3:real^3`]
\r
748 THEN POP_ASSUM MP_TAC
\r
749 THEN ASM_SIMP_TAC[th3;SET_RULE`{A,B}={B,A}`]
\r
751 THEN MP_TAC(SET_RULE`y1 IN aff_ge {vec 0} {v3, y} /\ aff_ge {vec 0} {v3, y} SUBSET aff_ge {vec 0} {y, z}
\r
752 ==> y1 IN aff_ge {vec 0} {y, z:real^3}`)
\r
754 THEN MRESA_TAC Planarity.aff_ge_1_1_subset_aff_ge_fan[`vec 0:real^3`;`y:real^3`;`z:real^3`;`y1:real^3`;]
\r
755 THEN POP_ASSUM MP_TAC
\r
756 THEN ASM_SIMP_TAC[th3]
\r
757 THEN MRESA_TAC th3[`vec 0:real^3`;`v3:real^3`;`y1:real^3`]
\r
759 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {y1} SUBSET aff_ge {vec 0} {y, z}
\r
760 ==> aff_ge {vec 0} {y, z} INTER aff_ge {vec 0} {y1} =aff_ge {vec 0} {y1:real^3} `)
\r
762 THEN SUBGOAL_THEN`y1 IN V_SY(vecmats (l:real^(M,3)finite_product))`ASSUME_TAC;
\r
764 ASM_SIMP_TAC[IN_ELIM_THM;V_SY;rows]
\r
765 THEN EXISTS_TAC`i':num`
\r
766 THEN ASM_REWRITE_TAC[];
\r
768 MP_TAC(SET_RULE`{y,z} INTER {y1,z1:real^3}={}==> {y,z} INTER {y1}={}`)
\r
770 THEN REMOVE_THEN"YEU"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`y1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
771 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y1:real^3`][IN_SING];
\r
773 SUBGOAL_THEN`y1 IN aff_ge {vec 0,v3} {z:real^3}` ASSUME_TAC;
\r
775 ASM_SIMP_TAC[AFF_GE_2_1;th3;IN_ELIM_THM]
\r
776 THEN POP_ASSUM MP_TAC
\r
777 THEN POP_ASSUM MP_TAC
\r
778 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
779 THEN POP_ASSUM MP_TAC
\r
780 THEN ASM_SIMP_TAC[th3]
\r
782 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y, z:real^3}`
\r
783 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
786 THEN POP_ASSUM(fun th-> REWRITE_TAC[SYM th;VECTOR_ARITH`v' % (t2 % y + t3 % z) + w % y= (v' * t2+w) % y + (v'*t3) % z /\
\r
787 t2' % (t2 % y + t3 % z) + t3' % z = (t2' *t2) % y + (t2'*t3+t3') % z`])
\r
789 THEN MP_TAC(REAL_ARITH`&0<t2/\ &0< t3==> ~(t2= &0) /\ &0<= t3 /\ &0<= t2`)
\r
791 THEN MRESA1_TAC REAL_MUL_LINV`t2:real`
\r
792 THEN EXISTS_TAC`&1- (v' * t2 + w)* inv t2 -(v' * t3 - (v' * t2 + w)* inv t2 * t3):real`
\r
793 THEN EXISTS_TAC`(v' * t2 + w)* inv t2 :real`
\r
794 THEN EXISTS_TAC`v' * t3 - (v' * t2 + w)* inv t2 * t3:real`
\r
795 THEN ASM_REWRITE_TAC[REAL_ARITH`&1-A-B+A+B= &1/\ ((v' * t2 + w) * inv t2) * t3 + v' * t3 - (v' * t2 + w) * inv t2 * t3 =v' * t3 /\ (A*B)*C=A*(B*C) /\A * &1=A
\r
796 /\ v' * t3 - (v' * t2 + w) * inv t2 * t3= (v' - v' * (inv t2 *t2) - w* inv t2) * t3 /\ A-A -B*C= (--B)* C`;]
\r
797 THEN MATCH_MP_TAC REAL_LE_MUL
\r
798 THEN ASM_REWRITE_TAC[]
\r
799 THEN MATCH_MP_TAC REAL_LE_MUL
\r
800 THEN ASM_REWRITE_TAC[]
\r
801 THEN MATCH_MP_TAC REAL_LE_INV
\r
802 THEN ASM_REWRITE_TAC[];
\r
804 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`v3:real^3`;`z:real^3`;`y1:real^3`];
\r
806 MRESA_TAC Planarity.aff_gt3_subset_aff_gt[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`v3:real^3`]
\r
807 THEN POP_ASSUM MP_TAC
\r
808 THEN ASM_SIMP_TAC[th3;SET_RULE`{A,B}={B,A}`]
\r
810 THEN MP_TAC(SET_RULE`z IN aff_gt {vec 0} {v3, y1} /\ aff_gt {vec 0} {v3, y1} SUBSET aff_gt {vec 0} {y1, z1} /\ aff_gt {vec 0} {y1, z1} SUBSET aff_ge {vec 0} {y1, z1}
\r
811 ==> z IN aff_ge {vec 0} {y1, z1:real^3}`)
\r
812 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
814 THEN MRESA_TAC Planarity.aff_ge_1_1_subset_aff_ge_fan[`vec 0:real^3`;`y1:real^3`;`z1:real^3`;`z:real^3`;]
\r
815 THEN POP_ASSUM MP_TAC
\r
816 THEN ASM_SIMP_TAC[th3]
\r
817 THEN MRESA_TAC th3[`vec 0:real^3`;`v3:real^3`;`z:real^3`]
\r
819 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {z} SUBSET aff_ge {vec 0} {y1, z1}
\r
820 ==> aff_ge {vec 0} {y1, z1} INTER aff_ge {vec 0} {z} =aff_ge {vec 0} {z:real^3} `)
\r
822 THEN SUBGOAL_THEN`z IN V_SY(vecmats (l:real^(M,3)finite_product))`ASSUME_TAC;
\r
824 ASM_SIMP_TAC[IN_ELIM_THM;V_SY;rows]
\r
825 THEN EXISTS_TAC`(SUC (i MOD dimindex (:M))):num`
\r
826 THEN ASM_REWRITE_TAC[]
\r
827 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
828 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
829 THEN POP_ASSUM MP_TAC
\r
832 MP_TAC(SET_RULE`{y,z} INTER {y1,z1}={} ==> {y1, z1} INTER {z:real^3}={}`)
\r
834 THEN REMOVE_THEN"YEU"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`z:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
835 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z:real^3`][IN_SING];
\r
837 MP_TAC(SET_RULE`v3 IN aff_gt {vec 0} {y, z} /\ aff_gt {vec 0} {y, z} SUBSET aff_ge {vec 0} {y, z}
\r
838 ==> v3 IN aff_ge {vec 0} {y, z:real^3}`)
\r
839 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
841 THEN MRESA_TAC Planarity.aff_ge1_subset_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`;`v3:real^3`]
\r
842 THEN POP_ASSUM MP_TAC
\r
843 THEN ASM_SIMP_TAC[th3;]
\r
845 THEN MP_TAC(SET_RULE`y1 IN aff_ge {vec 0} {v3, z} /\ aff_ge {vec 0} {v3, z} SUBSET aff_ge {vec 0} {y, z}
\r
846 ==> y1 IN aff_ge {vec 0} {y, z:real^3}`)
\r
848 THEN MRESA_TAC Planarity.aff_ge_1_1_subset_aff_ge_fan[`vec 0:real^3`;`y:real^3`;`z:real^3`;`y1:real^3`;]
\r
849 THEN POP_ASSUM MP_TAC
\r
850 THEN ASM_SIMP_TAC[th3]
\r
851 THEN MRESA_TAC th3[`vec 0:real^3`;`v3:real^3`;`y1:real^3`]
\r
853 THEN MP_TAC(SET_RULE`aff_ge {vec 0} {y1} SUBSET aff_ge {vec 0} {y, z}
\r
854 ==> aff_ge {vec 0} {y, z} INTER aff_ge {vec 0} {y1} =aff_ge {vec 0} {y1:real^3} `)
\r
856 THEN SUBGOAL_THEN`y1 IN V_SY(vecmats (l:real^(M,3)finite_product))`ASSUME_TAC;
\r
858 ASM_SIMP_TAC[IN_ELIM_THM;V_SY;rows]
\r
859 THEN EXISTS_TAC`i':num`
\r
860 THEN ASM_REWRITE_TAC[];
\r
862 MP_TAC(SET_RULE`{y,z} INTER {y1,z1}={} ==> {y, z} INTER {y1:real^3}={}`)
\r
864 THEN REMOVE_THEN"YEU"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`y1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
865 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y1:real^3`][IN_SING];
\r
870 MRESAL_TAC Planarity.aff_gt_1_2_cross_dotr_4point[`vec 0:real^3`;`v3:real^3`;`y:real^3`;`y1:real^3`;`z1:real^3`][VECTOR_ARITH`A- vec 0=A`]
\r
871 THEN POP_ASSUM MP_TAC
\r
872 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
874 THEN SUBGOAL_THEN`&0<(z cross y) dot y1` ASSUME_TAC;
\r
877 THEN POP_ASSUM MP_TAC
\r
878 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
879 THEN POP_ASSUM MP_TAC
\r
880 THEN ASM_SIMP_TAC[th3]
\r
882 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y, z:real^3}`
\r
883 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
885 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;VECTOR_ARITH`t% vec 0 +A=A`]
\r
886 THEN REWRITE_TAC[DOT_LMUL]
\r
888 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
890 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
891 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
892 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * ((z cross y) dot y1)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
894 SUBGOAL_THEN`&0< --((z cross y) dot z1)` ASSUME_TAC;
\r
897 THEN POP_ASSUM MP_TAC
\r
898 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
899 THEN POP_ASSUM MP_TAC
\r
900 THEN ASM_SIMP_TAC[th3]
\r
902 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y, z:real^3}`
\r
903 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
905 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;VECTOR_ARITH`t% vec 0 +A=A`]
\r
906 THEN REWRITE_TAC[DOT_LMUL;REAL_ARITH`--(A*B)=A*(--B)`]
\r
908 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
910 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
911 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
912 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * --((z cross y) dot z1)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
914 SUBGOAL_THEN`&0<(z1 cross y) dot y1` ASSUME_TAC;
\r
917 THEN REMOVE_ASSUM_TAC
\r
918 THEN REMOVE_ASSUM_TAC
\r
919 THEN POP_ASSUM MP_TAC
\r
920 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y1:real^3`;`z1:real^3`]
\r
921 THEN POP_ASSUM MP_TAC
\r
922 THEN ASM_SIMP_TAC[th3]
\r
924 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y1, z1:real^3}`
\r
925 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
927 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;REAL_ARITH`t* &0 +A=A`;DOT_LADD;DOT_CROSS_SELF;DOT_LMUL]
\r
929 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
931 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
932 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
933 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * ((z1 cross y) dot y1)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
935 MRESAL_TAC Planarity.aff_gt_1_2_cross_dotr_4point[`vec 0:real^3`;`v3:real^3`;`z1:real^3`;`y:real^3`;`z:real^3`][VECTOR_ARITH`A- vec 0=A`]
\r
936 THEN POP_ASSUM MP_TAC
\r
937 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
939 THEN POP_ASSUM MP_TAC
\r
940 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
941 THEN REWRITE_TAC[DOT_LNEG]
\r
942 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
943 THEN ASM_REWRITE_TAC[REAL_ARITH`-- -- A=A`]
\r
945 THEN SUBGOAL_THEN`&0< --((z1 cross z) dot y1)` ASSUME_TAC;
\r
948 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y1:real^3`;`z1:real^3`]
\r
949 THEN POP_ASSUM MP_TAC
\r
950 THEN ASM_SIMP_TAC[th3]
\r
952 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y1, z1:real^3}`
\r
953 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
955 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;REAL_ARITH`A+t* &0 =A`;DOT_LADD;DOT_CROSS_SELF;DOT_LMUL;REAL_ARITH`--(A*B)= A*(--B)`]
\r
957 THEN MP_TAC(REAL_ARITH`&0 < t2==> ~(t2= &0)`)
\r
959 THEN MRESA1_TAC REAL_LT_INV`t2:real`
\r
960 THEN MRESA1_TAC REAL_MUL_LINV`t2:real`
\r
961 THEN MRESAL_TAC REAL_LT_MUL[`inv t2`;`t2 * ((y1 cross z) dot z1)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`]
\r
962 THEN ONCE_REWRITE_TAC[GSYM CROSS_TRIPLE]
\r
963 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
964 THEN REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
965 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
966 THEN ASM_REWRITE_TAC[];
\r
968 SUBGOAL_THEN`1 <= SUC (i MOD dimindex (:M)) /\
\r
969 SUC (i MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
971 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
972 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
973 THEN POP_ASSUM MP_TAC
\r
976 SUBGOAL_THEN`1 <= SUC (i' MOD dimindex (:M)) /\
\r
977 SUC (i' MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
979 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
980 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
981 THEN POP_ASSUM MP_TAC
\r
984 REMOVE_THEN "YEU2" (fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num`
\r
985 THEN MRESA1_TAC th`SUC (i MOD dimindex (:M))` THEN MRESA1_TAC th`SUC (i' MOD dimindex (:M))` THEN MP_TAC th THEN DISCH_THEN(LABEL_TAC"YEU2"))
\r
987 MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`z:real^3`;`y:real^3`;`y1:real^3`]
\r
988 THEN POP_ASSUM MP_TAC
\r
989 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
990 THEN MP_TAC(REAL_ARITH`&0< (z cross y) dot y1==> &0< ((z cross y) dot y1)/ &4`)
\r
993 THEN POP_ASSUM(fun th-> MRESA1_TAC th`((z cross y) dot y1)/ &4`)
\r
994 THEN SUBGOAL_THEN`!n. N <= n
\r
995 ==> &0< (row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot
\r
996 row i' (v n) ` ASSUME_TAC;
\r
999 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1000 THEN REPEAT STRIP_TAC
\r
1001 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1002 THEN MRESA_TAC ABS_LT_EPSI[`(row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot row i' (v n)`;`(z cross y) dot y1`];
\r
1005 THEN DISCH_THEN(LABEL_TAC"YEUTHY1")
\r
1006 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`z1:real^3`;`y:real^3`;`y1:real^3`]
\r
1007 THEN POP_ASSUM MP_TAC
\r
1008 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1009 THEN MP_TAC(REAL_ARITH`&0< (z1 cross y) dot y1==> &0< ((z1 cross y) dot y1)/ &4`)
\r
1012 THEN POP_ASSUM(fun th-> MRESA1_TAC th`((z1 cross y) dot y1)/ &4`)
\r
1013 THEN SUBGOAL_THEN`!n. N' <= n
\r
1014 ==> &0< (row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot
\r
1015 row i' (v n) ` ASSUME_TAC;
\r
1018 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1019 THEN REPEAT STRIP_TAC
\r
1020 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1021 THEN MRESA_TAC ABS_LT_EPSI[`(row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot row i' (v n)`;`(z1 cross y) dot y1`];
\r
1024 THEN DISCH_THEN(LABEL_TAC"YEUTHY2")
\r
1025 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`z:real^3`;`y:real^3`;`z1:real^3`]
\r
1026 THEN POP_ASSUM MP_TAC
\r
1027 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1028 THEN MP_TAC(REAL_ARITH`&0< --((z cross y) dot z1)==> &0< --((z cross y) dot z1)/ &4`)
\r
1031 THEN POP_ASSUM(fun th-> MRESA1_TAC th`--((z cross y) dot z1)/ &4`)
\r
1032 THEN SUBGOAL_THEN`!n. N'' <= n
\r
1033 ==> &0< --((row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot
\r
1034 row (SUC (i' MOD dimindex (:M))) (v n)) ` ASSUME_TAC;
\r
1037 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1038 THEN REPEAT STRIP_TAC
\r
1039 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1040 THEN MRESA_TAC ABS_LT_EPSI[`--((row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i (v n)) dot row (SUC (i' MOD dimindex (:M))) (v n))`;`--((z cross y) dot z1)`]
\r
1041 THEN POP_ASSUM MATCH_MP_TAC
\r
1042 THEN ASM_SIMP_TAC[REAL_ARITH`-- A - --B= --(A-B)`;REAL_ABS_NEG];
\r
1045 THEN DISCH_THEN(LABEL_TAC"YEUTHY3")
\r
1046 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`z1:real^3`;`z:real^3`;`y1:real^3`]
\r
1047 THEN POP_ASSUM MP_TAC
\r
1048 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1049 THEN MP_TAC(REAL_ARITH`&0< --((z1 cross z) dot y1)==> &0< --((z1 cross z) dot y1)/ &4`)
\r
1052 THEN POP_ASSUM(fun th-> MRESA1_TAC th`--((z1 cross z) dot y1)/ &4`)
\r
1053 THEN SUBGOAL_THEN`!n. N''' <= n
\r
1054 ==> &0< --((row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row (SUC (i MOD dimindex (:M))) (v n)) dot
\r
1055 row i' (v n)) ` ASSUME_TAC;
\r
1058 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1059 THEN REPEAT STRIP_TAC
\r
1060 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1061 THEN MRESA_TAC ABS_LT_EPSI[`--((row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row (SUC (i MOD dimindex (:M))) (v n)) dot row i' (v n))`;`--((z1 cross z) dot y1)`]
\r
1062 THEN POP_ASSUM MATCH_MP_TAC
\r
1063 THEN ASM_SIMP_TAC[REAL_ARITH`-- A - --B= --(A-B)`;REAL_ABS_NEG];
\r
1065 MRESA1_TAC (SET_RULE`!A. ~A\/ A`)`(?N2:num. !n. N2<=n ==> ~( row (SUC (i MOD dimindex (:M))) (v n) IN {row i' ((v:num->real^3^M) n), row (SUC (i' MOD dimindex (:M))) (v n)}))`;
\r
1068 THEN REWRITE_TAC[NOT_EXISTS_THM;NOT_FORALL_THM;SKOLEM_THM;NOT_IMP;]
\r
1070 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y:real^3`;`(\n. row i ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1071 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y1:real^3`;`(\n. row i' ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1072 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z:real^3`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1073 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z1:real^3`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1074 THEN MRESAL_TAC LIM_IN_SET[`(\m:num. row i' ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`y1:real^3`;`z1:real^3`;`z:real^3`][o_DEF]
\r
1075 THEN POP_ASSUM MP_TAC
\r
1076 THEN ASM_SIMP_TAC[]
\r
1078 THEN MP_TAC(SET_RULE`z IN{y1,z1}==> ~({y,z} INTER {y1,z1:real^3}={})`)
\r
1081 MRESA1_TAC (SET_RULE`!A. ~A\/ A`)`(?N3:num. !n. N3<=n ==> ~(row i ((v:num->real^3^M) n) IN {row i' ((v:num->real^3^M) n), row (SUC (i' MOD dimindex (:M))) (v n)}))`;
\r
1084 THEN REWRITE_TAC[NOT_EXISTS_THM;NOT_FORALL_THM;SKOLEM_THM;NOT_IMP;]
\r
1086 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y:real^3`;`(\n. row i ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1087 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y1:real^3`;`(\n. row i' ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1088 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z:real^3`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1089 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z1:real^3`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1090 THEN MRESAL_TAC LIM_IN_SET[`(\m:num. row i' ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row i ((v:num->real^3^M) m)) o (n:num->num)`;`y1:real^3`;`z1:real^3`;`y:real^3`][o_DEF]
\r
1091 THEN POP_ASSUM MP_TAC
\r
1092 THEN ASM_SIMP_TAC[]
\r
1094 THEN MP_TAC(SET_RULE`y IN{y1,z1}==> ~({y,z} INTER {y1,z1:real^3}={})`)
\r
1098 THEN POP_ASSUM MP_TAC
\r
1099 THEN POP_ASSUM MP_TAC
\r
1100 THEN DISCH_THEN(LABEL_TAC"YEUTHY4")
\r
1101 THEN DISCH_THEN(LABEL_TAC"YEUTHY5")
\r
1102 THEN DISCH_THEN(LABEL_TAC"YEUTHY6")
\r
1103 THEN ABBREV_TAC`N1=N+N'+N''+N'''+N2+N3:num`
\r
1104 THEN MP_TAC(ARITH_RULE`N+N'+N''+N'''+N2+N3= N1:num ==> N<= N1/\ N'<= N1 /\ N''<= N1/\ N'''<= N1 /\ N2<= N1/\ N3<=N1`)
\r
1106 THEN REMOVE_THEN "YEUTHY1"(fun th-> MRESA1_TAC th`N1:num`)
\r
1107 THEN REMOVE_THEN "YEUTHY2"(fun th-> MRESA1_TAC th`N1:num`)
\r
1108 THEN REMOVE_THEN "YEUTHY3"(fun th-> MRESA1_TAC th`N1:num`)
\r
1109 THEN REMOVE_THEN "YEUTHY4"(fun th-> MRESA1_TAC th`N1:num`)
\r
1110 THEN REMOVE_THEN "YEUTHY5"(fun th-> MRESA1_TAC th`N1:num`)
\r
1111 THEN REMOVE_THEN "YEUTHY6"(fun th-> MRESA1_TAC th`N1:num`)
\r
1112 THEN ABBREV_TAC`y'=row i ((v:num-> real^3^M) N1)`
\r
1113 THEN ABBREV_TAC`z'=row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) N1)`
\r
1114 THEN ABBREV_TAC`y1'=row i' ((v:num-> real^3^M) N1)`
\r
1115 THEN ABBREV_TAC`z1'=row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) N1)`
\r
1116 THEN REMOVE_THEN "THY1"(fun th-> MRESA1_TAC th`N1:num`)
\r
1117 THEN REMOVE_ASSUM_TAC
\r
1118 THEN POP_ASSUM MP_TAC
\r
1119 THEN REWRITE_TAC[convex_local_fan;local_fan]
\r
1120 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1122 THEN REMOVE_ASSUM_TAC
\r
1123 THEN REMOVE_ASSUM_TAC
\r
1124 THEN REMOVE_ASSUM_TAC
\r
1125 THEN REMOVE_ASSUM_TAC
\r
1126 THEN POP_ASSUM MP_TAC
\r
1127 THEN REWRITE_TAC[FAN;fan7;fan6]
\r
1129 THEN POP_ASSUM MP_TAC
\r
1130 THEN POP_ASSUM MP_TAC
\r
1131 THEN DISCH_THEN(LABEL_TAC"YEUTHY1")
\r
1132 THEN DISCH_THEN(LABEL_TAC"YEUTHY2")
\r
1133 THEN SUBGOAL_THEN`{y',z'} IN E_SY((v:num->real^3^M) N1)`ASSUME_TAC;
\r
1135 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1136 THEN EXISTS_TAC`i:num`
\r
1137 THEN ASM_REWRITE_TAC[];
\r
1139 SUBGOAL_THEN`{y1',z1'} IN E_SY((v:num->real^3^M) N1)`ASSUME_TAC;
\r
1141 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1142 THEN EXISTS_TAC`i':num`
\r
1143 THEN ASM_REWRITE_TAC[];
\r
1145 REMOVE_THEN "YEUTHY1"(fun th-> MRESAL1_TAC th`{y',z':real^3}`[SET_RULE`{a} UNION {b,c}={a,b,c}`]
\r
1146 THEN MRESAL1_TAC th`{y1',z1':real^3}`[SET_RULE`{a} UNION {b,c}={a,b,c}`])
\r
1147 THEN MRESAL_TAC Planarity.condition_cross_dot_4point[`vec 0:real^3`;`y':real^3`;`z':real^3`;`y1':real^3`;`z1':real^3`][VECTOR_ARITH`A- vec 0=A/\ A+ vec 0=A`]
\r
1148 THEN POP_ASSUM MP_TAC
\r
1149 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1150 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1151 THEN ASM_REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1153 THEN MRESAL_TAC Planarity.condition_cross_dot_4point[`vec 0:real^3`;`z1':real^3`;`y1':real^3`;`y':real^3`;`z':real^3`][VECTOR_ARITH`A- vec 0=A/\ A+ vec 0=A`]
\r
1154 THEN POP_ASSUM MP_TAC
\r
1155 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1156 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1157 THEN ASM_REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1158 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
1159 THEN ASM_REWRITE_TAC[]
\r
1160 THEN ABBREV_TAC`a=(y' cross z')`
\r
1161 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1162 THEN ONCE_REWRITE_TAC[GSYM CROSS_LNEG]
\r
1163 THEN ONCE_REWRITE_TAC[GSYM CROSS_SKEW]
\r
1164 THEN ONCE_REWRITE_TAC[GSYM CROSS_SKEW]
\r
1165 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1167 THEN MP_TAC(SET_RULE`--((y1' cross z1') cross a') IN aff_gt {vec 0} {y1', z1'}
\r
1168 /\ --((y1' cross z1') cross a') IN aff_gt {vec 0} {y', z'}
\r
1169 /\ aff_gt {vec 0} {y', z'} SUBSET aff_ge {vec 0} {y', z'}
\r
1170 /\ aff_gt {vec 0} {y1', z1'} SUBSET aff_ge {vec 0} {y1', z1'}
\r
1171 ==> --((y1' cross z1') cross a') IN aff_ge {vec 0} {y', z'} INTER aff_ge {vec 0} {y1', z1'}`)
\r
1172 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1173 THEN MP_TAC(SET_RULE`~(y' IN {y1',z1'}) /\ ~(z' IN {y1',z1':real^3})==> ({y',z'}INTER{y1',z1'}={})`)
\r
1175 THEN REMOVE_THEN"YEUTHY2"(fun th-> MRESAL_TAC th[`{y',z':real^3}`;`{y1',z1':real^3}`][UNION;IN_ELIM_THM;AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING])
\r
1177 THEN POP_ASSUM(fun th-> ASM_TAC THEN REWRITE_TAC[th] THEN REPEAT STRIP_TAC)
\r
1178 THEN MRESA_TAC Planarity.origin_is_not_aff_gt_fan[`vec 0:real^3`;`y':real^3`;`z':real^3`]
\r
1179 THEN POP_ASSUM MP_TAC
\r
1180 THEN ASM_SIMP_TAC[th3];
\r
1183 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1184 THEN REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1185 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
1187 THEN MRESAL_TAC Planarity.aff_gt_1_2_cross_dotr_4point[`vec 0:real^3`;`v3:real^3`;`y1:real^3`;`y:real^3`;`z:real^3`][VECTOR_ARITH`A- vec 0=A`]
\r
1188 THEN POP_ASSUM MP_TAC
\r
1189 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1191 THEN SUBGOAL_THEN`&0<(z1 cross y1) dot y` ASSUME_TAC;
\r
1194 THEN POP_ASSUM MP_TAC
\r
1195 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y1:real^3`;`z1:real^3`]
\r
1196 THEN POP_ASSUM MP_TAC
\r
1197 THEN ASM_SIMP_TAC[th3]
\r
1199 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y1, z1:real^3}`
\r
1200 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
1202 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;VECTOR_ARITH`t% vec 0 +A=A`]
\r
1203 THEN REWRITE_TAC[DOT_LMUL]
\r
1205 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
1207 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
1208 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
1209 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * ((z1 cross y1) dot y)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
1211 SUBGOAL_THEN`&0< --((z1 cross y1) dot z)` ASSUME_TAC;
\r
1214 THEN POP_ASSUM MP_TAC
\r
1215 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y1:real^3`;`z1:real^3`]
\r
1216 THEN POP_ASSUM MP_TAC
\r
1217 THEN ASM_SIMP_TAC[th3]
\r
1219 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y1, z1:real^3}`
\r
1220 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
1222 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;VECTOR_ARITH`t% vec 0 +A=A`]
\r
1223 THEN REWRITE_TAC[DOT_LMUL;REAL_ARITH`--(A*B)=A*(--B)`]
\r
1225 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
1227 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
1228 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
1229 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * --((z1 cross y1) dot z)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
1231 SUBGOAL_THEN`&0<(z cross y1) dot y` ASSUME_TAC;
\r
1234 THEN REMOVE_ASSUM_TAC
\r
1235 THEN REMOVE_ASSUM_TAC
\r
1236 THEN POP_ASSUM MP_TAC
\r
1237 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1238 THEN POP_ASSUM MP_TAC
\r
1239 THEN ASM_SIMP_TAC[th3]
\r
1241 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y, z:real^3}`
\r
1242 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
1244 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;REAL_ARITH`t* &0 +A=A`;DOT_LADD;DOT_CROSS_SELF;DOT_LMUL]
\r
1246 THEN MP_TAC(REAL_ARITH`&0 < t3==> ~(t3= &0)`)
\r
1248 THEN MRESA1_TAC REAL_LT_INV`t3:real`
\r
1249 THEN MRESA1_TAC REAL_MUL_LINV`t3:real`
\r
1250 THEN MRESAL_TAC REAL_LT_MUL[`inv t3`;`t3 * ((z cross y1) dot y)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`];
\r
1252 MRESAL_TAC Planarity.aff_gt_1_2_cross_dotr_4point[`vec 0:real^3`;`v3:real^3`;`z:real^3`;`y1:real^3`;`z1:real^3`][VECTOR_ARITH`A- vec 0=A`]
\r
1253 THEN POP_ASSUM MP_TAC
\r
1254 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1256 THEN POP_ASSUM MP_TAC
\r
1257 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1258 THEN REWRITE_TAC[DOT_LNEG]
\r
1259 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
1260 THEN ASM_REWRITE_TAC[REAL_ARITH`-- -- A=A`]
\r
1262 THEN SUBGOAL_THEN`&0< --((z cross z1) dot y)` ASSUME_TAC;
\r
1265 THEN MRESA_TAC AFF_GT_1_2[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1266 THEN POP_ASSUM MP_TAC
\r
1267 THEN ASM_SIMP_TAC[th3]
\r
1269 THEN FIND_ASSUM(MP_TAC)`v3 IN aff_gt {vec 0} {y, z:real^3}`
\r
1270 THEN POP_ASSUM(fun th-> REWRITE_TAC[th;IN_ELIM_THM;VECTOR_ARITH`a % vec 0 + b=b`])
\r
1272 THEN REWRITE_TAC[CROSS_LADD;CROSS_LMUL;CROSS_REFL;REAL_ARITH`A+t* &0 =A`;DOT_LADD;DOT_CROSS_SELF;DOT_LMUL;REAL_ARITH`--(A*B)= A*(--B)`]
\r
1274 THEN MP_TAC(REAL_ARITH`&0 < t2==> ~(t2= &0)`)
\r
1276 THEN MRESA1_TAC REAL_LT_INV`t2:real`
\r
1277 THEN MRESA1_TAC REAL_MUL_LINV`t2:real`
\r
1278 THEN MRESAL_TAC REAL_LT_MUL[`inv t2`;`t2 * ((y cross z1) dot z)`][REAL_ARITH`A *B*C=(A*B)*C/\ &1*A=A`]
\r
1279 THEN ONCE_REWRITE_TAC[GSYM CROSS_TRIPLE]
\r
1280 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1281 THEN REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1282 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
1283 THEN ASM_REWRITE_TAC[];
\r
1285 SUBGOAL_THEN`1 <= SUC (i MOD dimindex (:M)) /\
\r
1286 SUC (i MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
1288 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1289 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1290 THEN POP_ASSUM MP_TAC
\r
1293 SUBGOAL_THEN`1 <= SUC (i' MOD dimindex (:M)) /\
\r
1294 SUC (i' MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
1296 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1297 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
1298 THEN POP_ASSUM MP_TAC
\r
1301 REMOVE_THEN "YEU2" (fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num`
\r
1302 THEN MRESA1_TAC th`SUC (i MOD dimindex (:M))` THEN MRESA1_TAC th`SUC (i' MOD dimindex (:M))` THEN MP_TAC th THEN DISCH_THEN(LABEL_TAC"YEU2"))
\r
1304 MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`z1:real^3`;`y1:real^3`;`y:real^3`]
\r
1305 THEN POP_ASSUM MP_TAC
\r
1306 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1307 THEN MP_TAC(REAL_ARITH`&0< (z1 cross y1) dot y==> &0< ((z1 cross y1) dot y)/ &4`)
\r
1310 THEN POP_ASSUM(fun th-> MRESA1_TAC th`((z1 cross y1) dot y)/ &4`)
\r
1311 THEN SUBGOAL_THEN`!n. N <= n
\r
1312 ==> &0< (row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot
\r
1313 row i (v n) ` ASSUME_TAC;
\r
1316 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1317 THEN REPEAT STRIP_TAC
\r
1318 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1319 THEN MRESA_TAC ABS_LT_EPSI[`(row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot row i (v n)`;`(z1 cross y1) dot y`];
\r
1322 THEN DISCH_THEN(LABEL_TAC"YEUTHY1")
\r
1323 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`z:real^3`;`y1:real^3`;`y:real^3`]
\r
1324 THEN POP_ASSUM MP_TAC
\r
1325 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1326 THEN MP_TAC(REAL_ARITH`&0< (z cross y1) dot y==> &0< ((z cross y1) dot y)/ &4`)
\r
1329 THEN POP_ASSUM(fun th-> MRESA1_TAC th`((z cross y1) dot y)/ &4`)
\r
1330 THEN SUBGOAL_THEN`!n. N' <= n
\r
1331 ==> &0< (row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot
\r
1332 row i (v n) ` ASSUME_TAC;
\r
1335 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1336 THEN REPEAT STRIP_TAC
\r
1337 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1338 THEN MRESA_TAC ABS_LT_EPSI[`(row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot row i (v n)`;`(z cross y1) dot y`];
\r
1341 THEN DISCH_THEN(LABEL_TAC"YEUTHY2")
\r
1342 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i' ((v:num->real^3^M) n))`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`z1:real^3`;`y1:real^3`;`z:real^3`]
\r
1343 THEN POP_ASSUM MP_TAC
\r
1344 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1345 THEN MP_TAC(REAL_ARITH`&0< --((z1 cross y1) dot z)==> &0< --((z1 cross y1) dot z)/ &4`)
\r
1348 THEN POP_ASSUM(fun th-> MRESA1_TAC th`--((z1 cross y1) dot z)/ &4`)
\r
1349 THEN SUBGOAL_THEN`!n. N'' <= n
\r
1350 ==> &0< --((row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot
\r
1351 row (SUC (i MOD dimindex (:M))) (v n)) ` ASSUME_TAC;
\r
1354 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1355 THEN REPEAT STRIP_TAC
\r
1356 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1357 THEN MRESA_TAC ABS_LT_EPSI[`--((row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row i' (v n)) dot row (SUC (i MOD dimindex (:M))) (v n))`;`--((z1 cross y1) dot z)`]
\r
1358 THEN POP_ASSUM MATCH_MP_TAC
\r
1359 THEN ASM_SIMP_TAC[REAL_ARITH`-- A - --B= --(A-B)`;REAL_ABS_NEG];
\r
1362 THEN DISCH_THEN(LABEL_TAC"YEUTHY3")
\r
1363 THEN MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`z:real^3`;`z1:real^3`;`y:real^3`]
\r
1364 THEN POP_ASSUM MP_TAC
\r
1365 THEN SIMP_TAC[LIM_SEQUENTIALLY;dist;o_DEF;GSYM LIFT_SUB;NORM_LIFT]
\r
1366 THEN MP_TAC(REAL_ARITH`&0< --((z cross z1) dot y)==> &0< --((z cross z1) dot y)/ &4`)
\r
1369 THEN POP_ASSUM(fun th-> MRESA1_TAC th`--((z cross z1) dot y)/ &4`)
\r
1370 THEN SUBGOAL_THEN`!n. N''' <= n
\r
1371 ==> &0< --((row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row (SUC (i' MOD dimindex (:M))) (v n)) dot
\r
1372 row i (v n)) ` ASSUME_TAC;
\r
1375 THEN DISCH_THEN(LABEL_TAC"CHANGE")
\r
1376 THEN REPEAT STRIP_TAC
\r
1377 THEN REMOVE_THEN"CHANGE"(fun th-> MRESA1_TAC th`n:num`)
\r
1378 THEN MRESA_TAC ABS_LT_EPSI[`--((row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) n) cross row (SUC (i' MOD dimindex (:M))) (v n)) dot row i (v n))`;`--((z cross z1) dot y)`]
\r
1379 THEN POP_ASSUM MATCH_MP_TAC
\r
1380 THEN ASM_SIMP_TAC[REAL_ARITH`-- A - --B= --(A-B)`;REAL_ABS_NEG];
\r
1382 MRESA1_TAC (SET_RULE`!A. ~A\/ A`)`(?N2:num. !n. N2<=n ==> ~( row (SUC (i MOD dimindex (:M))) (v n) IN {row i' ((v:num->real^3^M) n), row (SUC (i' MOD dimindex (:M))) (v n)}))`;
\r
1385 THEN REWRITE_TAC[NOT_EXISTS_THM;NOT_FORALL_THM;SKOLEM_THM;NOT_IMP;]
\r
1387 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y:real^3`;`(\n. row i ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1388 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y1:real^3`;`(\n. row i' ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1389 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z:real^3`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1390 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z1:real^3`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1391 THEN MRESAL_TAC LIM_IN_SET[`(\m:num. row i' ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`y1:real^3`;`z1:real^3`;`z:real^3`][o_DEF]
\r
1392 THEN POP_ASSUM MP_TAC
\r
1393 THEN ASM_SIMP_TAC[]
\r
1395 THEN MP_TAC(SET_RULE`z IN{y1,z1}==> ~({y,z} INTER {y1,z1:real^3}={})`)
\r
1398 MRESA1_TAC (SET_RULE`!A. ~A\/ A`)`(?N3:num. !n. N3<=n ==> ~(row i ((v:num->real^3^M) n) IN {row i' ((v:num->real^3^M) n), row (SUC (i' MOD dimindex (:M))) (v n)}))`;
\r
1401 THEN REWRITE_TAC[NOT_EXISTS_THM;NOT_FORALL_THM;SKOLEM_THM;NOT_IMP;]
\r
1403 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y:real^3`;`(\n. row i ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1404 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`y1:real^3`;`(\n. row i' ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1405 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z:real^3`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1406 THEN MRESAL_TAC (GEN_ALL LIM_SUBSEQUENCE1)[`z1:real^3`;`(\n. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) n))`;`n:num->num`][o_DEF]
\r
1407 THEN MRESAL_TAC LIM_IN_SET[`(\m:num. row i' ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row (SUC (i' MOD dimindex (:M))) ((v:num->real^3^M) m)) o (n:num->num)`;`(\m:num. row i ((v:num->real^3^M) m)) o (n:num->num)`;`y1:real^3`;`z1:real^3`;`y:real^3`][o_DEF]
\r
1408 THEN POP_ASSUM MP_TAC
\r
1409 THEN ASM_SIMP_TAC[]
\r
1411 THEN MP_TAC(SET_RULE`y IN{y1,z1}==> ~({y,z} INTER {y1,z1:real^3}={})`)
\r
1415 THEN POP_ASSUM MP_TAC
\r
1416 THEN POP_ASSUM MP_TAC
\r
1417 THEN DISCH_THEN(LABEL_TAC"YEUTHY4")
\r
1418 THEN DISCH_THEN(LABEL_TAC"YEUTHY5")
\r
1419 THEN DISCH_THEN(LABEL_TAC"YEUTHY6")
\r
1420 THEN ABBREV_TAC`N1=N+N'+N''+N'''+N2+N3:num`
\r
1421 THEN MP_TAC(ARITH_RULE`N+N'+N''+N'''+N2+N3= N1:num ==> N<= N1/\ N'<= N1 /\ N''<= N1/\ N'''<= N1 /\ N2<= N1/\ N3<=N1`)
\r
1423 THEN REMOVE_THEN "YEUTHY1"(fun th-> MRESA1_TAC th`N1:num`)
\r
1424 THEN REMOVE_THEN "YEUTHY2"(fun th-> MRESA1_TAC th`N1:num`)
\r
1425 THEN REMOVE_THEN "YEUTHY3"(fun th-> MRESA1_TAC th`N1:num`)
\r
1426 THEN REMOVE_THEN "YEUTHY4"(fun th-> MRESA1_TAC th`N1:num`)
\r
1427 THEN REMOVE_THEN "YEUTHY5"(fun th-> MRESA1_TAC th`N1:num`)
\r
1428 THEN REMOVE_THEN "YEUTHY6"(fun th-> MRESA1_TAC th`N1:num`)
\r
1429 THEN ABBREV_TAC`y'=row i ((v:num-> real^3^M) N1)`
\r
1430 THEN ABBREV_TAC`z'=row (SUC (i MOD dimindex (:M))) ((v:num-> real^3^M) N1)`
\r
1431 THEN ABBREV_TAC`y1'=row i' ((v:num-> real^3^M) N1)`
\r
1432 THEN ABBREV_TAC`z1'=row (SUC (i' MOD dimindex (:M))) ((v:num-> real^3^M) N1)`
\r
1433 THEN REMOVE_THEN "THY1"(fun th-> MRESA1_TAC th`N1:num`)
\r
1434 THEN REMOVE_ASSUM_TAC
\r
1435 THEN POP_ASSUM MP_TAC
\r
1436 THEN REWRITE_TAC[convex_local_fan;local_fan]
\r
1437 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1439 THEN REMOVE_ASSUM_TAC
\r
1440 THEN REMOVE_ASSUM_TAC
\r
1441 THEN REMOVE_ASSUM_TAC
\r
1442 THEN REMOVE_ASSUM_TAC
\r
1443 THEN POP_ASSUM MP_TAC
\r
1444 THEN REWRITE_TAC[FAN;fan7;fan6]
\r
1446 THEN POP_ASSUM MP_TAC
\r
1447 THEN POP_ASSUM MP_TAC
\r
1448 THEN DISCH_THEN(LABEL_TAC"YEUTHY1")
\r
1449 THEN DISCH_THEN(LABEL_TAC"YEUTHY2")
\r
1450 THEN SUBGOAL_THEN`{y',z'} IN E_SY((v:num->real^3^M) N1)`ASSUME_TAC;
\r
1452 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1453 THEN EXISTS_TAC`i:num`
\r
1454 THEN ASM_REWRITE_TAC[];
\r
1456 SUBGOAL_THEN`{y1',z1'} IN E_SY((v:num->real^3^M) N1)`ASSUME_TAC;
\r
1458 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1459 THEN EXISTS_TAC`i':num`
\r
1460 THEN ASM_REWRITE_TAC[];
\r
1462 REMOVE_THEN "YEUTHY1"(fun th-> MRESAL1_TAC th`{y',z':real^3}`[SET_RULE`{a} UNION {b,c}={a,b,c}`]
\r
1463 THEN MRESAL1_TAC th`{y1',z1':real^3}`[SET_RULE`{a} UNION {b,c}={a,b,c}`])
\r
1464 THEN MRESAL_TAC Planarity.condition_cross_dot_4point[`vec 0:real^3`;`y1':real^3`;`z1':real^3`;`y':real^3`;`z':real^3`][VECTOR_ARITH`A- vec 0=A/\ A+ vec 0=A`]
\r
1465 THEN POP_ASSUM MP_TAC
\r
1466 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1467 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1468 THEN ASM_REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1470 THEN MRESAL_TAC Planarity.condition_cross_dot_4point[`vec 0:real^3`;`z':real^3`;`y':real^3`;`y1':real^3`;`z1':real^3`][VECTOR_ARITH`A- vec 0=A/\ A+ vec 0=A`]
\r
1471 THEN POP_ASSUM MP_TAC
\r
1472 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
1473 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1474 THEN ASM_REWRITE_TAC[DOT_LNEG;REAL_ARITH`-- --A=A`]
\r
1475 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
1476 THEN ASM_REWRITE_TAC[]
\r
1477 THEN ABBREV_TAC`a=(y1' cross z1')`
\r
1478 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1479 THEN ONCE_REWRITE_TAC[GSYM CROSS_LNEG]
\r
1480 THEN ONCE_REWRITE_TAC[GSYM CROSS_SKEW]
\r
1481 THEN ONCE_REWRITE_TAC[GSYM CROSS_SKEW]
\r
1482 THEN ONCE_REWRITE_TAC[CROSS_SKEW]
\r
1484 THEN MP_TAC(SET_RULE`--((y' cross z') cross a') IN aff_gt {vec 0} {y1', z1'}
\r
1485 /\ --((y' cross z') cross a') IN aff_gt {vec 0} {y', z'}
\r
1486 /\ aff_gt {vec 0} {y', z'} SUBSET aff_ge {vec 0} {y', z'}
\r
1487 /\ aff_gt {vec 0} {y1', z1'} SUBSET aff_ge {vec 0} {y1', z1'}
\r
1488 ==> --((y' cross z') cross a') IN aff_ge {vec 0} {y', z'} INTER aff_ge {vec 0} {y1', z1'}`)
\r
1489 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1490 THEN MP_TAC(SET_RULE`~(y' IN {y1',z1'}) /\ ~(z' IN {y1',z1':real^3})==> ({y',z'}INTER{y1',z1'}={})`)
\r
1492 THEN REMOVE_THEN"YEUTHY2"(fun th-> MRESAL_TAC th[`{y',z':real^3}`;`{y1',z1':real^3}`][UNION;IN_ELIM_THM;AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING])
\r
1494 THEN POP_ASSUM(fun th-> ASM_TAC THEN REWRITE_TAC[th] THEN REPEAT STRIP_TAC)
\r
1495 THEN MRESA_TAC Planarity.origin_is_not_aff_gt_fan[`vec 0:real^3`;`y':real^3`;`z':real^3`]
\r
1496 THEN POP_ASSUM MP_TAC
\r
1497 THEN ASM_SIMP_TAC[th3];
\r
1499 ASM_REWRITE_TAC[];
\r
1502 THEN POP_ASSUM MP_TAC
\r
1503 THEN DISCH_THEN(LABEL_TAC"MA1")
\r
1504 THEN DISCH_THEN(LABEL_TAC"MA2")
\r
1505 THEN REWRITE_TAC[UNION;IN_ELIM_THM]
\r
1506 THEN REPEAT STRIP_TAC;
\r
1508 POP_ASSUM(fun th-> POP_ASSUM(fun th1-> MP_TAC th1 THEN
\r
1509 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1510 THEN REPEAT STRIP_TAC THEN ASSUME_TAC th1
\r
1511 )THEN MP_TAC th THEN
\r
1512 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
1513 THEN REPEAT STRIP_TAC THEN ASSUME_TAC th)
\r
1514 THEN ABBREV_TAC`y=row i (vecmats (l:real^(M,3)finite_product))`
\r
1515 THEN ABBREV_TAC`z=row (SUC (i MOD dimindex (:M))) (vecmats
\r
1516 (l:real^(M,3)finite_product))`
\r
1517 THEN ABBREV_TAC`y1=row i' (vecmats (l:real^(M,3)finite_product))`
\r
1518 THEN ABBREV_TAC`z1=row (SUC (i' MOD dimindex (:M))) (vecmats
\r
1519 (l:real^(M,3)finite_product))`
\r
1520 THEN DISJ_CASES_TAC(SET_RULE`{y,z}INTER {y1,z1:real^3}={} \/ {y,z} INTER {y1,z1}={y}
\r
1521 \/ {y,z} INTER {y1,z1}={z}\/ {y,z} INTER {y1,z1}={y,z}`);
\r
1524 THEN REMOVE_THEN"THY6"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MP_TAC(th) THEN DISCH_THEN(LABEL_TAC"THY6"))
\r
1525 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1526 THEN MRESAL_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y1:real^3`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`]
\r
1527 THEN SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1529 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1530 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1531 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1532 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1533 THEN POP_ASSUM MP_TAC
\r
1536 SUBGOAL_THEN`z1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1538 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1539 THEN EXISTS_TAC`SUC (i' MOD dimindex (:M))`
\r
1540 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1541 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1542 THEN POP_ASSUM MP_TAC
\r
1545 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1547 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1548 THEN EXISTS_TAC`i:num`
\r
1549 THEN ASM_REWRITE_TAC[];
\r
1551 SUBGOAL_THEN`y1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1553 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1554 THEN EXISTS_TAC`i':num`
\r
1555 THEN ASM_REWRITE_TAC[];
\r
1557 REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`y1:real^3`] THEN MRESA_TAC th[`y:real^3`;`z1:real^3`] THEN MRESA_TAC th[`z:real^3`;`y1:real^3`] THEN MRESA_TAC th[`z:real^3`;`z1:real^3`])
\r
1558 THEN MP_TAC(SET_RULE`{y, z} INTER {y1, z1} = {} ==> {y} INTER {y1:real^3}={}/\ {y} INTER {z1:real^3}={} /\ {z} INTER {z1:real^3}={} /\ {z} INTER {y1:real^3}={} /\ {y,z} INTER {y1:real^3}={} /\ {y,z} INTER {z1:real^3}={} /\ {z} INTER {y1:real^3,z1}={}/\ {y} INTER {y1:real^3,z1}={}`)
\r
1560 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:real^3->bool`;`y1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e1:real^3->bool`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`y:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`z:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`])
\r
1561 THEN POP_ASSUM MP_TAC
\r
1562 THEN POP_ASSUM MP_TAC
\r
1563 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1566 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1567 THEN REMOVE_THEN"MA2"(fun th-> MRESA_TAC th[`e1:real^3->bool`;`e2:real^3->bool`])
\r
1568 THEN REMOVE_ASSUM_TAC
\r
1569 THEN REMOVE_ASSUM_TAC
\r
1570 THEN REMOVE_ASSUM_TAC
\r
1571 THEN POP_ASSUM MP_TAC
\r
1572 THEN POP_ASSUM MP_TAC
\r
1579 THEN REMOVE_THEN"THY6"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MP_TAC(th) THEN DISCH_THEN(LABEL_TAC"THY6"))
\r
1580 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1581 THEN MRESAL_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y1:real^3`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`];
\r
1583 MP_TAC(SET_RULE`{y, z} INTER {y1, z1} = {y}==> y1=y \/ z1=y:real^3`)
\r
1586 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
1587 THEN DISJ_CASES_TAC(SET_RULE`(?v3. v3 IN aff_gt {vec 0} {y, z} INTER aff_gt {vec 0}
\r
1588 {y, z1}) \/ aff_gt {vec 0} {y, z} INTER aff_gt {vec 0} {y, z1:real^3}={}`);
\r
1592 THEN MRESA_TAC POINT_COM_AFF_GT_INTER[`y:real^3`;`z:real^3`;`z1:real^3`;`v3:real^3`]
\r
1594 SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1596 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1597 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1598 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1599 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1600 THEN POP_ASSUM MP_TAC
\r
1603 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`y:real^3`;`z:real^3`;`z1:real^3`];
\r
1605 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`z:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1606 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1607 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z:real^3`][IN_SING]
\r
1608 THEN MP_TAC(SET_RULE`z IN aff_gt {vec 0} {y, z1} /\ aff_gt {vec 0} {y, z1} SUBSET
\r
1609 aff_ge {vec 0} {y, z1:real^3} /\ aff_ge {vec 0} {y, z1:real^3} INTER aff_ge {vec 0} {z} = aff_ge {vec 0} ({y, z1:real^3} INTER {z}) /\ z IN aff_ge {vec 0} {z}
\r
1610 ==> z IN aff_ge {vec 0} ({y, z1} INTER {z})`)
\r
1611 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1612 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1613 THEN POP_ASSUM MP_TAC
\r
1614 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1616 THEN MP_TAC(SET_RULE`~(y=z) /\ {y, z} INTER {y, z1} = {y} ==> {y, z1} INTER {z:real^3}={}`)
\r
1618 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1620 SUBGOAL_THEN`z1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1622 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1623 THEN EXISTS_TAC`SUC (i' MOD dimindex (:M))`
\r
1624 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1625 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
1626 THEN POP_ASSUM MP_TAC
\r
1629 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`z1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1630 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z1:real^3`]
\r
1631 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z1:real^3`][IN_SING]
\r
1632 THEN MP_TAC(SET_RULE`z1 IN aff_ge {vec 0} {y, z} /\ aff_ge {vec 0} {y, z:real^3} INTER aff_ge {vec 0} {z1} = aff_ge {vec 0} ({y, z:real^3} INTER {z1}) /\ z1 IN aff_ge {vec 0} {z1}
\r
1633 ==> z1 IN aff_ge {vec 0} ({y, z} INTER {z1})`)
\r
1634 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1635 THEN MRESA_TAC th3[`y:real^3`;`z1:real^3`;`vec 0:real^3`;]
\r
1636 THEN POP_ASSUM MP_TAC
\r
1637 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1639 THEN MP_TAC(SET_RULE`~(y=z1) /\ {y, z} INTER {y, z1} = {y} ==> {y, z} INTER {z1:real^3}={}`)
\r
1641 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1643 SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1645 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1646 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1647 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1648 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1649 THEN POP_ASSUM MP_TAC
\r
1652 SUBGOAL_THEN`z1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1654 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1655 THEN EXISTS_TAC`SUC (i' MOD dimindex (:M))`
\r
1656 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1657 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1658 THEN POP_ASSUM MP_TAC
\r
1661 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1663 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1664 THEN EXISTS_TAC`i:num`
\r
1665 THEN ASM_REWRITE_TAC[];
\r
1667 REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`z1:real^3`] THEN MRESA_TAC th[`z:real^3`;`y:real^3`] THEN MRESA_TAC th[`z:real^3`;`z1:real^3`])
\r
1668 THEN MRESA_TAC th3[`y:real^3`;`z1:real^3`;`vec 0:real^3`;]
\r
1669 THEN POP_ASSUM MP_TAC
\r
1670 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1672 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1673 THEN POP_ASSUM MP_TAC
\r
1674 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1676 THEN MP_TAC(SET_RULE`{y, z} INTER {y, z1} = {y} /\ ~(y=z) /\ ~(y=z1) ==> {y} INTER {z1:real^3}={} /\ {z} INTER {z1:real^3}={} /\ {z} INTER {y:real^3}={} /\ {y,z} INTER {z1:real^3}={} /\ {y,z1} INTER {z:real^3}={}`)
\r
1678 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:real^3->bool`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`z:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`])
\r
1679 THEN POP_ASSUM MP_TAC
\r
1680 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1682 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1683 THEN ASM_REWRITE_TAC[]
\r
1684 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`y:real^3`;`z1:real^3`][aff]
\r
1685 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`y:real^3`;`z:real^3`][aff]
\r
1686 THEN MRESA_TAC HALFLINE_SUBSET_AFFINE_HULL[`vec 0:real^3`;`y:real^3`]
\r
1687 THEN MP_TAC(SET_RULE`
\r
1688 affine hull {vec 0, y} INTER aff_gt {vec 0} {y, z1} = {}
\r
1689 /\ affine hull {vec 0, y} INTER aff_gt {vec 0} {y, z} = {}
\r
1690 /\ aff_ge {vec 0} {y} SUBSET affine hull {vec 0, y:real^3}
\r
1691 ==> aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y}={}
\r
1692 /\ aff_ge {vec 0} {y} INTER aff_gt {vec 0} {y, z1}={}`)
\r
1694 THEN ASM_REWRITE_TAC[SET_RULE`{} UNION A=A
\r
1695 /\ aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {z1} UNION
\r
1696 (aff_ge {vec 0} {y} INTER aff_ge {vec 0} {y} UNION aff_ge {vec 0} {}) UNION
\r
1697 aff_ge {vec 0} {}=
\r
1698 (aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {z1} UNION aff_ge {vec 0} {} UNION
\r
1699 aff_ge {vec 0} {}) UNION
\r
1700 (aff_ge {vec 0} {y} INTER aff_ge {vec 0} {y} UNION aff_ge {vec 0} {})
\r
1702 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y:real^3`][IN_SING]
\r
1703 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING]
\r
1704 THEN POP_ASSUM MP_TAC
\r
1707 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
1708 THEN DISJ_CASES_TAC(SET_RULE`(?v3. v3 IN aff_gt {vec 0} {y, z} INTER aff_gt {vec 0}
\r
1709 {y, y1}) \/ aff_gt {vec 0} {y, z} INTER aff_gt {vec 0} {y, y1:real^3}={}`);
\r
1713 THEN MRESA_TAC POINT_COM_AFF_GT_INTER[`y:real^3`;`z:real^3`;`y1:real^3`;`v3:real^3`]
\r
1714 THEN POP_ASSUM MP_TAC
\r
1715 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1718 SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1720 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1721 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1722 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1723 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1724 THEN POP_ASSUM MP_TAC
\r
1727 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`y:real^3`;`z:real^3`;`y1:real^3`]
\r
1728 THEN POP_ASSUM MP_TAC
\r
1729 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1732 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`z:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1733 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1734 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z:real^3`][IN_SING]
\r
1735 THEN MP_TAC(SET_RULE`z IN aff_gt {vec 0} {y1, y} /\ aff_gt {vec 0} {y1, y} SUBSET
\r
1736 aff_ge {vec 0} {y1, y:real^3} /\ aff_ge {vec 0} {y1, y:real^3} INTER aff_ge {vec 0} {z} = aff_ge {vec 0} ({y1, y:real^3} INTER {z}) /\ z IN aff_ge {vec 0} {z}
\r
1737 ==> z IN aff_ge {vec 0} ({y1, y} INTER {z})`)
\r
1738 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1739 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
1740 THEN ASM_REWRITE_TAC[]
\r
1741 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1742 THEN POP_ASSUM MP_TAC
\r
1743 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1745 THEN MP_TAC(SET_RULE`~(y=z) /\ {y, z} INTER {y1, y} = {y} ==> {y, y1} INTER {z:real^3}={}`)
\r
1747 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1749 SUBGOAL_THEN`y1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1751 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1752 THEN EXISTS_TAC`i':num`
\r
1753 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1754 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
1755 THEN POP_ASSUM MP_TAC
\r
1758 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`y1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1759 THEN MRESA_TAC th3[`vec 0:real^3`;`y1:real^3`;`y:real^3`]
\r
1760 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y1:real^3`][IN_SING]
\r
1761 THEN MP_TAC(SET_RULE`y1 IN aff_ge {vec 0} {y, z} /\ aff_ge {vec 0} {y, z:real^3} INTER aff_ge {vec 0} {y1} = aff_ge {vec 0} ({y, z:real^3} INTER {y1}) /\ y1 IN aff_ge {vec 0} {y1}
\r
1762 ==> y1 IN aff_ge {vec 0} ({y, z} INTER {y1})`)
\r
1763 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1764 THEN MRESA_TAC th3[`y1:real^3`;`y:real^3`;`vec 0:real^3`;]
\r
1765 THEN POP_ASSUM MP_TAC
\r
1766 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1768 THEN MP_TAC(SET_RULE`~(y=y1) /\ {y, z} INTER {y1, y} = {y} ==> {y, z} INTER {y1:real^3}={}`)
\r
1770 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1772 SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1774 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1775 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1776 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1777 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1778 THEN POP_ASSUM MP_TAC
\r
1781 SUBGOAL_THEN`y1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1783 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1784 THEN EXISTS_TAC`i':num`
\r
1785 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1786 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1787 THEN POP_ASSUM MP_TAC
\r
1790 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1792 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1793 THEN EXISTS_TAC`i:num`
\r
1794 THEN ASM_REWRITE_TAC[];
\r
1796 REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`y1:real^3`] THEN MRESA_TAC th[`z:real^3`;`y:real^3`] THEN MRESA_TAC th[`z:real^3`;`y1:real^3`])
\r
1797 THEN MRESA_TAC th3[`y1:real^3`;`y:real^3`;`vec 0:real^3`;]
\r
1798 THEN POP_ASSUM MP_TAC
\r
1799 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1801 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1802 THEN POP_ASSUM MP_TAC
\r
1803 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1805 THEN MP_TAC(SET_RULE`{y, z} INTER {y1, y} = {y} /\ ~(y=z) /\ ~(y=y1) ==> {y} INTER {y1:real^3}={} /\ {z} INTER {y1:real^3}={} /\ {z} INTER {y:real^3}={} /\ {y,z} INTER {y1:real^3}={} /\ {y1,y} INTER {z:real^3}={}`)
\r
1807 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:real^3->bool`;`y1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`z:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`])
\r
1808 THEN POP_ASSUM MP_TAC
\r
1809 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1811 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1812 THEN ASM_REWRITE_TAC[]
\r
1813 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`y:real^3`;`y1:real^3`][aff]
\r
1814 THEN POP_ASSUM MP_TAC
\r
1815 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1817 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`y:real^3`;`z:real^3`][aff]
\r
1818 THEN MRESA_TAC HALFLINE_SUBSET_AFFINE_HULL[`vec 0:real^3`;`y:real^3`]
\r
1819 THEN MP_TAC(SET_RULE`
\r
1820 affine hull {vec 0, y} INTER aff_gt {vec 0} {y, y1} = {}
\r
1821 /\ affine hull {vec 0, y} INTER aff_gt {vec 0} {y, z} = {}
\r
1822 /\ aff_ge {vec 0} {y} SUBSET affine hull {vec 0, y:real^3}
\r
1823 ==> aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y}={}
\r
1824 /\ aff_ge {vec 0} {y} INTER aff_gt {vec 0} {y, y1}={}`)
\r
1826 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
1827 THEN ASM_REWRITE_TAC[]
\r
1828 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
1829 THEN ASM_REWRITE_TAC[SET_RULE`A UNION {}=A`;]
\r
1830 THEN SUBGOAL_THEN`aff_gt{vec 0} {y1,y}=aff_gt{vec 0} {y,y1:real^3}` ASSUME_TAC;
\r
1832 ASSUME_TAC(SET_RULE`{y1,y}={y,y1:real^3}`)
\r
1833 THEN POP_ASSUM(fun th-> REWRITE_TAC[th]);
\r
1835 ASM_REWRITE_TAC[SET_RULE`({} UNION aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y1}) UNION
\r
1837 aff_ge {vec 0} {} UNION
\r
1838 aff_ge {vec 0} {y} INTER aff_ge {vec 0} {y}) UNION
\r
1840 =(aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y1} UNION aff_ge {vec 0} {}
\r
1842 aff_ge {vec 0} {}) UNION
\r
1843 aff_ge {vec 0} {y}`]
\r
1844 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y:real^3`][IN_SING]
\r
1845 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING]
\r
1846 THEN POP_ASSUM MP_TAC
\r
1847 THEN POP_ASSUM MP_TAC
\r
1851 THEN REMOVE_THEN"THY6"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MP_TAC(th) THEN DISCH_THEN(LABEL_TAC"THY6"))
\r
1852 THEN MRESA_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1853 THEN MRESAL_TAC Planarity.aff_ge_eq_aff_gt_union_aff_ge[`vec 0:real^3`;`y1:real^3`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`];
\r
1855 MP_TAC(SET_RULE`{y, z} INTER {y1, z1} = {z}==> y1=z \/ z1=z:real^3`)
\r
1858 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
1859 THEN DISJ_CASES_TAC(SET_RULE`(?v3. v3 IN aff_gt {vec 0} {z,y} INTER aff_gt {vec 0}
\r
1860 {z, z1}) \/ aff_gt {vec 0} {z,y} INTER aff_gt {vec 0} {z, z1:real^3}={}`);
\r
1864 THEN MRESA_TAC POINT_COM_AFF_GT_INTER[`z:real^3`;`y:real^3`;`z1:real^3`;`v3:real^3`]
\r
1865 THEN POP_ASSUM MP_TAC
\r
1866 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1869 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1871 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1872 THEN EXISTS_TAC`i:num`
\r
1873 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1874 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1875 THEN POP_ASSUM MP_TAC
\r
1878 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`z:real^3`;`y:real^3`;`z1:real^3`]
\r
1879 THEN POP_ASSUM MP_TAC
\r
1880 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1883 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`y:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1884 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
1885 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y:real^3`][IN_SING]
\r
1886 THEN MP_TAC(SET_RULE`y IN aff_gt {vec 0} {z, z1} /\ aff_gt {vec 0} {z, z1} SUBSET
\r
1887 aff_ge {vec 0} {z, z1:real^3} /\ aff_ge {vec 0} {z, z1:real^3} INTER aff_ge {vec 0} {y} = aff_ge {vec 0} ({z, z1:real^3} INTER {y}) /\ y IN aff_ge {vec 0} {y}
\r
1888 ==> y IN aff_ge {vec 0} ({z, z1} INTER {y})`)
\r
1889 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1890 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1891 THEN POP_ASSUM MP_TAC
\r
1892 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1894 THEN MP_TAC(SET_RULE`~(y=z) /\ {y, z} INTER {z, z1} = {z} ==> {z, z1} INTER {y:real^3}={}`)
\r
1896 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1899 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
1901 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
1902 THEN SUBGOAL_THEN`z1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1904 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1905 THEN EXISTS_TAC`SUC (i' MOD dimindex (:M))`
\r
1906 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1907 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
1908 THEN POP_ASSUM MP_TAC
\r
1911 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`z1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
1912 THEN MRESA_TAC th3[`vec 0:real^3`;`z:real^3`;`z1:real^3`]
\r
1913 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z1:real^3`][IN_SING]
\r
1914 THEN MP_TAC(SET_RULE`z1 IN aff_ge {vec 0} {y, z} /\ aff_ge {vec 0} {y, z:real^3} INTER aff_ge {vec 0} {z1} = aff_ge {vec 0} ({y, z:real^3} INTER {z1}) /\ z1 IN aff_ge {vec 0} {z1}
\r
1915 ==> z1 IN aff_ge {vec 0} ({y, z} INTER {z1})`)
\r
1916 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
1917 THEN MRESA_TAC th3[`z:real^3`;`z1:real^3`;`vec 0:real^3`;]
\r
1918 THEN POP_ASSUM MP_TAC
\r
1919 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1921 THEN MP_TAC(SET_RULE`~(z=z1) /\ {y, z} INTER {z, z1} = {z} ==> {y, z} INTER {z1:real^3}={}`)
\r
1923 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
1926 THEN SUBGOAL_THEN`aff_gt{vec 0} {z,y}=aff_gt{vec 0} {y,z:real^3}` ASSUME_TAC;
\r
1928 ASSUME_TAC(SET_RULE`{z,y}={y,z:real^3}`)
\r
1929 THEN POP_ASSUM(fun th-> REWRITE_TAC[th]);
\r
1932 THEN SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1934 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1935 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
1936 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1937 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1938 THEN POP_ASSUM MP_TAC
\r
1941 SUBGOAL_THEN`z1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1943 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1944 THEN EXISTS_TAC`SUC (i' MOD dimindex (:M))`
\r
1945 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
1946 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
1947 THEN POP_ASSUM MP_TAC
\r
1950 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
1952 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
1953 THEN EXISTS_TAC`i:num`
\r
1954 THEN ASM_REWRITE_TAC[];
\r
1956 REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`z1:real^3`] THEN MRESA_TAC th[`z:real^3`;`y:real^3`] THEN MRESA_TAC th[`z:real^3`;`z1:real^3`])
\r
1957 THEN MRESA_TAC th3[`z:real^3`;`z1:real^3`;`vec 0:real^3`;]
\r
1958 THEN POP_ASSUM MP_TAC
\r
1959 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1961 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
1962 THEN POP_ASSUM MP_TAC
\r
1963 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
1965 THEN MP_TAC(SET_RULE`{y, z} INTER {z, z1} = {z} /\ ~(y=z) /\ ~(z=z1) ==> {y} INTER {z1:real^3}={} /\ {z} INTER {z1:real^3}={} /\ {z} INTER {y:real^3}={} /\ {y,z} INTER {z1:real^3}={} /\ {z,z1} INTER {y:real^3}={}`)
\r
1967 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:real^3->bool`;`z1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`y:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`])
\r
1968 THEN POP_ASSUM MP_TAC
\r
1969 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1971 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
1972 THEN ASM_REWRITE_TAC[]
\r
1973 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`z:real^3`;`z1:real^3`][aff]
\r
1974 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`z:real^3`;`y:real^3`][aff]
\r
1975 THEN POP_ASSUM MP_TAC
\r
1976 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
1978 THEN MRESA_TAC HALFLINE_SUBSET_AFFINE_HULL[`vec 0:real^3`;`z:real^3`]
\r
1979 THEN MP_TAC(SET_RULE`
\r
1980 affine hull {vec 0, z} INTER aff_gt {vec 0} {z, z1} = {}
\r
1981 /\ affine hull {vec 0, z} INTER aff_gt {vec 0} {y, z} = {}
\r
1982 /\ aff_ge {vec 0} {z} SUBSET affine hull {vec 0, z:real^3}
\r
1983 ==> aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {z}={}
\r
1984 /\ aff_ge {vec 0} {z} INTER aff_gt {vec 0} {z, z1}={}`)
\r
1986 THEN ASM_REWRITE_TAC[SET_RULE`({} UNION {} UNION aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {z1}) UNION
\r
1987 aff_ge {vec 0} {} UNION
\r
1989 aff_ge {vec 0} {z} INTER aff_ge {vec 0} {z} UNION
\r
1990 aff_ge {vec 0} {}=
\r
1991 (aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {z1} UNION aff_ge {vec 0} {} UNION
\r
1992 aff_ge {vec 0} {}) UNION
\r
1993 ( aff_ge {vec 0} {z})
\r
1995 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z:real^3`][IN_SING]
\r
1996 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING]
\r
1997 THEN POP_ASSUM MP_TAC
\r
1998 THEN POP_ASSUM MP_TAC
\r
2001 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2002 THEN DISJ_CASES_TAC(SET_RULE`(?v3. v3 IN aff_gt {vec 0} {z, y} INTER aff_gt {vec 0}
\r
2003 {z, y1}) \/ aff_gt {vec 0} {z, y} INTER aff_gt {vec 0} {z, y1:real^3}={}`);
\r
2007 THEN MRESA_TAC POINT_COM_AFF_GT_INTER[`z:real^3`;`y:real^3`;`y1:real^3`;`v3:real^3`]
\r
2008 THEN POP_ASSUM MP_TAC
\r
2009 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2012 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
2014 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
2015 THEN EXISTS_TAC`i:num`
\r
2016 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2017 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
2018 THEN POP_ASSUM MP_TAC
\r
2021 MRESA_TAC Planarity.decomposition_planar_by_angle_fan[`vec 0:real^3`;`z:real^3`;`y:real^3`;`y1:real^3`]
\r
2022 THEN POP_ASSUM MP_TAC
\r
2023 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2027 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2029 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e2:(real^3->bool)`;`y:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
2030 THEN MRESA_TAC th3[`vec 0:real^3`;`y:real^3`;`z:real^3`]
\r
2031 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y:real^3`][IN_SING]
\r
2032 THEN MP_TAC(SET_RULE`y IN aff_gt {vec 0} {y1, z} /\ aff_gt {vec 0} {y1, z} SUBSET
\r
2033 aff_ge {vec 0} {y1, z:real^3} /\ aff_ge {vec 0} {y1, z:real^3} INTER aff_ge {vec 0} {y} = aff_ge {vec 0} ({y1, z:real^3} INTER {y}) /\ y IN aff_ge {vec 0} {y}
\r
2034 ==> y IN aff_ge {vec 0} ({y1, z} INTER {y})`)
\r
2035 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
2036 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
2037 THEN ASM_REWRITE_TAC[]
\r
2038 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
2039 THEN POP_ASSUM MP_TAC
\r
2040 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2042 THEN MP_TAC(SET_RULE`~(y=z) /\ {y, z} INTER {y1, z} = {z} ==> { z,y1} INTER {y:real^3}={}`)
\r
2044 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
2047 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2049 THEN SUBGOAL_THEN`y1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
2051 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
2052 THEN EXISTS_TAC`i':num`
\r
2053 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2054 THEN MRESAL_TAC DIVISION[`i':num`;`k:num`][DIMINDEX_NONZERO]
\r
2055 THEN POP_ASSUM MP_TAC
\r
2058 REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:(real^3->bool)`;`y1:real^3`][AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING])
\r
2059 THEN MRESA_TAC th3[`vec 0:real^3`;`y1:real^3`;`z:real^3`]
\r
2060 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`y1:real^3`][IN_SING]
\r
2061 THEN MP_TAC(SET_RULE`y1 IN aff_ge {vec 0} {y, z} /\ aff_ge {vec 0} {y, z:real^3} INTER aff_ge {vec 0} {y1} = aff_ge {vec 0} ({y, z:real^3} INTER {y1}) /\ y1 IN aff_ge {vec 0} {y1}
\r
2062 ==> y1 IN aff_ge {vec 0} ({y, z} INTER {y1})`)
\r
2063 THEN ASM_SIMP_TAC[AFF_GT_SUBSET_AFF_GE]
\r
2064 THEN MRESA_TAC th3[`y1:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
2065 THEN POP_ASSUM MP_TAC
\r
2066 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2068 THEN MP_TAC(SET_RULE`~(z=y1) /\ {y, z} INTER {y1, z} = {z} ==> {y, z} INTER {y1:real^3}={}`)
\r
2070 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING];
\r
2073 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2075 THEN SUBGOAL_THEN`z IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
2077 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
2078 THEN EXISTS_TAC`SUC (i MOD dimindex (:M))`
\r
2079 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2080 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
2081 THEN POP_ASSUM MP_TAC
\r
2084 SUBGOAL_THEN`y1 IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
2086 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
2087 THEN EXISTS_TAC`i':num`
\r
2088 THEN ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2089 THEN MRESAL_TAC DIVISION[`i:num`;`k:num`][DIMINDEX_NONZERO]
\r
2090 THEN POP_ASSUM MP_TAC
\r
2093 SUBGOAL_THEN`y IN V_SY (vecmats (l:real^(M,3)finite_product))` ASSUME_TAC;
\r
2095 REWRITE_TAC[IN_ELIM_THM;V_SY;rows]
\r
2096 THEN EXISTS_TAC`i:num`
\r
2097 THEN ASM_REWRITE_TAC[];
\r
2099 ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2100 THEN REMOVE_THEN"THY8"(fun th-> MRESA_TAC th[`y:real^3`;`y1:real^3`] THEN MRESA_TAC th[`z:real^3`;`y:real^3`] THEN MRESA_TAC th[`z:real^3`;`y1:real^3`])
\r
2101 THEN MRESA_TAC th3[`y1:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
2102 THEN POP_ASSUM MP_TAC
\r
2103 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2105 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
2106 THEN POP_ASSUM MP_TAC
\r
2107 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2109 THEN MP_TAC(SET_RULE`{y, z} INTER {y1, z} = {z} /\ ~(y=z) /\ ~(z=y1) ==> {y} INTER {y1:real^3}={} /\ {z} INTER {y1:real^3}={} /\ {z} INTER {y:real^3}={} /\ {y,z} INTER {y1:real^3}={} /\ {y1,z} INTER {y:real^3}={}`)
\r
2111 THEN REMOVE_THEN"MA1"(fun th-> MRESAL_TAC th[`e1:real^3->bool`;`y1:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`] THEN MRESAL_TAC th[`e2:real^3->bool`;`y:real^3`][SET_RULE`(A UNION B) INTER C=(A INTER C) UNION (B INTER C)/\ A INTER (B UNION C)=(A INTER B) UNION (A INTER C)`])
\r
2112 THEN POP_ASSUM MP_TAC
\r
2113 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
2115 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B= B INTER A`]
\r
2116 THEN ASM_REWRITE_TAC[]
\r
2117 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`z:real^3`;`y1:real^3`][aff]
\r
2118 THEN POP_ASSUM MP_TAC
\r
2119 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2121 THEN MRESAL_TAC (GEN_ALL AFF_INTER_AFF_GT_EQ_EMPTY)[`vec 0:real^3`;`z:real^3`;`y:real^3`][aff]
\r
2122 THEN POP_ASSUM MP_TAC
\r
2123 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2125 THEN MRESA_TAC HALFLINE_SUBSET_AFFINE_HULL[`vec 0:real^3`;`z:real^3`]
\r
2126 THEN MP_TAC(SET_RULE`
\r
2127 affine hull {vec 0, z} INTER aff_gt {vec 0} {z, y1} = {}
\r
2128 /\ affine hull {vec 0, z} INTER aff_gt {vec 0} {z, y} = {}
\r
2129 /\ aff_ge {vec 0} {z} SUBSET affine hull {vec 0, z:real^3}
\r
2130 ==> aff_gt {vec 0} {z, y} INTER aff_ge {vec 0} {z}={}
\r
2131 /\ aff_ge {vec 0} {z} INTER aff_gt {vec 0} {z, y1}={}`)
\r
2133 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
2134 THEN ASM_REWRITE_TAC[]
\r
2135 THEN ONCE_REWRITE_TAC[SET_RULE`{B,C}={C,B}`]
\r
2136 THEN ASM_REWRITE_TAC[SET_RULE`({} UNION aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y1} UNION {}) UNION
\r
2137 aff_ge {vec 0} {} UNION
\r
2139 aff_ge {vec 0} {} UNION
\r
2140 aff_ge {vec 0} {z} INTER aff_ge {vec 0} {z}
\r
2141 = (aff_gt {vec 0} {y, z} INTER aff_ge {vec 0} {y1} UNION aff_ge {vec 0} {} UNION
\r
2142 aff_ge {vec 0} {}) UNION
\r
2143 aff_ge {vec 0} {z} `;]
\r
2144 THEN MRESA_TAC th3[`vec 0:real^3`;`y1:real^3`;`z:real^3`;]
\r
2145 THEN MRESAL_TAC Planarity.point_in_aff_ge_1_1[`vec 0:real^3`;`z:real^3`][IN_SING]
\r
2146 THEN ASM_SIMP_TAC[AFF_GE_EQ_AFFINE_HULL;AFFINE_HULL_SING;IN_SING]
\r
2147 THEN POP_ASSUM MP_TAC
\r
2148 THEN POP_ASSUM MP_TAC
\r
2152 THEN REMOVE_THEN"THY6"(fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`i':num` THEN MP_TAC(th) THEN DISCH_THEN(LABEL_TAC"THY6"))
\r
2153 THEN MRESA_TAC th3[`y:real^3`;`z:real^3`;`vec 0:real^3`;]
\r
2154 THEN POP_ASSUM MP_TAC
\r
2155 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2157 THEN MRESA_TAC th3[`y1:real^3`;`z1:real^3`;`vec 0:real^3`;]
\r
2158 THEN POP_ASSUM MP_TAC
\r
2159 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={C,A,B}`]
\r
2161 THEN MP_TAC(SET_RULE`~(y1=z1)/\ ~(y=z)/\ {y, z} INTER {y1, z1} = {y, z}==> {y1, z1:real^3} = {y, z}`)
\r
2167 REMOVE_THEN "MA1"(fun th-> MRESA_TAC th[`e2:real^3->bool`;`v':real^3`])
\r
2168 THEN ONCE_REWRITE_TAC[SET_RULE`A INTER B=B INTER A`]
\r
2169 THEN ASM_REWRITE_TAC[];
\r
2175 SUBGOAL_THEN`!i j.
\r
2177 i <= dimindex (:M) /\
\r
2179 j <= dimindex (:M) /\
\r
2180 row i (vecmats l) = row j (vecmats (l:real^(M,3)finite_product))
\r
2181 ==> i = j` ASSUME_TAC;
\r
2184 THEN REMOVE_THEN "THY3"(fun th-> MRESAL_TAC th[`i:num`;`j:num`][VECTOR_ARITH`A-A= vec 0`;NORM_0])
\r
2185 THEN DISJ_CASES_TAC(SET_RULE`~(i=j:num)\/ (i=j)`);
\r
2187 MP_TAC(ARITH_RULE`i <= dimindex (:M)==> i <= dimindex (:M)-1 \/ i = dimindex (:M)`)
\r
2190 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`)
\r
2193 REMOVE_THEN"THYGIANG"MP_TAC
\r
2194 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
2196 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i:num`;`j:num`][ARITH_RULE`0<= i:num`])
\r
2197 THEN POP_ASSUM MP_TAC
\r
2198 THEN REMOVE_ASSUM_TAC
\r
2199 THEN REMOVE_ASSUM_TAC
\r
2200 THEN REMOVE_ASSUM_TAC
\r
2201 THEN REMOVE_ASSUM_TAC
\r
2202 THEN POP_ASSUM MP_TAC
\r
2205 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2206 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2207 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
2208 THEN MP_TAC(ARITH_RULE`1<= i==> ~(i = 0)`)
\r
2211 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i:num`;`0:num`][ARITH_RULE`0<= i:num`])
\r
2212 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2213 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2214 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2215 THEN REWRITE_TAC[constraint_system]
\r
2217 THEN REMOVE_ASSUM_TAC
\r
2218 THEN REMOVE_ASSUM_TAC
\r
2219 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`i:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2220 THEN REMOVE_ASSUM_TAC
\r
2221 THEN POP_ASSUM MP_TAC
\r
2222 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2224 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2225 THEN REMOVE_ASSUM_TAC
\r
2226 THEN REMOVE_ASSUM_TAC
\r
2227 THEN REMOVE_ASSUM_TAC
\r
2228 THEN REMOVE_ASSUM_TAC
\r
2229 THEN REMOVE_ASSUM_TAC
\r
2230 THEN REMOVE_ASSUM_TAC
\r
2231 THEN REMOVE_ASSUM_TAC
\r
2232 THEN POP_ASSUM MP_TAC
\r
2233 THEN REMOVE_ASSUM_TAC
\r
2234 THEN REMOVE_ASSUM_TAC
\r
2235 THEN REMOVE_ASSUM_TAC
\r
2236 THEN REMOVE_ASSUM_TAC
\r
2237 THEN POP_ASSUM MP_TAC
\r
2240 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`)
\r
2244 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2246 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2247 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2248 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2249 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2250 THEN REWRITE_TAC[constraint_system]
\r
2252 THEN REMOVE_ASSUM_TAC
\r
2253 THEN REMOVE_ASSUM_TAC
\r
2254 THEN POP_ASSUM MP_TAC
\r
2255 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A `])
\r
2257 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2258 THEN POP_ASSUM MP_TAC
\r
2259 THEN MP_TAC(ARITH_RULE`1<= j==> ~(j = 0)`)
\r
2261 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2262 THEN ASM_SIMP_TAC[IN_NUMSEG]
\r
2264 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`j:num`;`0:num`][ARITH_RULE`0<= i:num`])
\r
2266 THEN REMOVE_ASSUM_TAC
\r
2267 THEN POP_ASSUM MP_TAC
\r
2268 THEN REMOVE_ASSUM_TAC
\r
2269 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2270 THEN REMOVE_ASSUM_TAC
\r
2271 THEN REMOVE_ASSUM_TAC
\r
2272 THEN REMOVE_ASSUM_TAC
\r
2273 THEN REMOVE_ASSUM_TAC
\r
2274 THEN REMOVE_ASSUM_TAC
\r
2275 THEN REMOVE_ASSUM_TAC
\r
2276 THEN REMOVE_ASSUM_TAC
\r
2277 THEN REMOVE_ASSUM_TAC
\r
2278 THEN REMOVE_ASSUM_TAC
\r
2279 THEN REMOVE_ASSUM_TAC
\r
2280 THEN REMOVE_ASSUM_TAC
\r
2281 THEN REMOVE_ASSUM_TAC
\r
2282 THEN POP_ASSUM MP_TAC
\r
2285 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2286 THEN POP_ASSUM MP_TAC
\r
2287 THEN POP_ASSUM MP_TAC
\r
2292 SUBGOAL_THEN`local_fan (V_SY (vecmats l),E_SY (vecmats l), F_SY(vecmats (l:real^(M,3)finite_product)))` ASSUME_TAC;
\r
2294 ASM_REWRITE_TAC[local_fan]
\r
2295 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2296 THEN REPEAT STRIP_TAC;
\r
2298 EXISTS_TAC`(row 1 (vecmats (l:real^(M,3)finite_product)), row (SUC (1 MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`
\r
2299 THEN MRESA_TAC(GEN_ALL Wrgcvdr_cizmrrh.ELMS_OF_HYPERMAP_HYP)[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`]
\r
2302 SIMP_TAC[darts_of_hyp;ord_pairs;E_SY;]
\r
2303 THEN MATCH_MP_TAC(SET_RULE`A IN B ==> A IN B UNION C`)
\r
2304 THEN REWRITE_TAC[IN_ELIM_THM]
\r
2305 THEN EXISTS_TAC`row 1 (vecmats (l:real^(M,3)finite_product))`
\r
2306 THEN EXISTS_TAC`row (SUC (1 MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`
\r
2307 THEN ASM_REWRITE_TAC[]
\r
2308 THEN EXISTS_TAC`1`
\r
2309 THEN ASM_REWRITE_TAC[ARITH_RULE`1<=1`; DIMINDEX_GE_1];
\r
2311 MATCH_MP_TAC FACE_HYP_FAN_SY
\r
2312 THEN ASM_REWRITE_TAC[]
\r
2316 MRESA1_TAC (GEN_ALL DIH2K_FAN_HYP_SY)`l:real^(M,3)finite_product`
\r
2317 THEN POP_ASSUM MP_TAC
\r
2318 THEN FIND_ASSUM MP_TAC`2<k`
\r
2319 THEN ONCE_REWRITE_TAC[ARITH_RULE`2= SUC 1`]
\r
2320 THEN ASM_REWRITE_TAC[]
\r
2321 THEN REWRITE_TAC[ARITH_RULE`SUC 1=2`]
\r
2324 POP_ASSUM (fun th-> MP_TAC th
\r
2325 THEN ASM_REWRITE_TAC[local_fan]
\r
2326 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2327 THEN DISCH_TAC THEN ASSUME_TAC th)
\r
2328 THEN ASM_REWRITE_TAC[]
\r
2329 THEN SUBGOAL_THEN`!i u v w. 1<= i /\ i<= dimindex (:M)
\r
2330 /\ row i (vecmats l)=u
\r
2331 /\ row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))=v
\r
2332 /\ (row (SUC ((SUC (i MOD dimindex (:M))) MOD dimindex (:M))) (vecmats l))=w
\r
2333 ==> &0<= (v cross w) dot u` ASSUME_TAC;
\r
2336 THEN SUBGOAL_THEN`1 <= SUC (i MOD dimindex (:M)) /\
\r
2337 SUC (i MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
2339 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2340 THEN MRESAL_TAC DIVISION[`i:num`;`dimindex (:M):num`][DIMINDEX_NONZERO]
\r
2341 THEN POP_ASSUM MP_TAC
\r
2344 SUBGOAL_THEN`1 <= SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M)) /\
\r
2345 SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
2347 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2348 THEN MRESAL_TAC DIVISION[`SUC (i MOD dimindex (:M)):num`;`dimindex (:M):num`][DIMINDEX_NONZERO]
\r
2349 THEN POP_ASSUM MP_TAC
\r
2352 REMOVE_THEN "YEU2" (fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`SUC (i MOD dimindex (:M))`
\r
2353 THEN MRESA1_TAC th`(SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M)))` THEN MP_TAC th THEN DISCH_THEN(LABEL_TAC"YEU2"))
\r
2355 MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row i ((v:num->real^3^M) n))`;`v':real^3`;`w:real^3`;`u:real^3`]
\r
2356 THEN SUBGOAL_THEN`eventually
\r
2360 (\n. (row (SUC (i MOD dimindex (:M))) (v n) cross
\r
2361 row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M)))
\r
2363 row i ((v:num->real^3^M) n)))
\r
2365 sequentially` ASSUME_TAC;
\r
2367 REWRITE_TAC[EVENTUALLY_SEQUENTIALLY;o_DEF;LIFT_DROP]
\r
2368 THEN EXISTS_TAC`0`
\r
2369 THEN REPEAT STRIP_TAC
\r
2370 THEN REMOVE_THEN "THY1"(fun th-> MRESA1_TAC th`n:num`)
\r
2371 THEN REMOVE_ASSUM_TAC
\r
2372 THEN POP_ASSUM MP_TAC
\r
2373 THEN REWRITE_TAC[convex_local_fan;]
\r
2374 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2376 THEN POP_ASSUM MP_TAC
\r
2377 THEN POP_ASSUM MP_TAC
\r
2378 THEN POP_ASSUM MP_TAC
\r
2379 THEN DISCH_THEN(LABEL_TAC"THY30")
\r
2381 THEN POP_ASSUM(fun th-> MP_TAC th
\r
2382 THEN REWRITE_TAC[local_fan]
\r
2383 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2385 THEN ASSUME_TAC th)
\r
2386 THEN SUBGOAL_THEN`row (SUC (i MOD dimindex (:M))) (v n),
\r
2387 row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) (v n) IN
\r
2388 F_SY ((v:num->real^3^M) n)`ASSUME_TAC;
\r
2390 REWRITE_TAC[F_SY;IN_ELIM_THM]
\r
2391 THEN EXISTS_TAC`(SUC (i MOD dimindex (:M)))`
\r
2392 THEN ASM_REWRITE_TAC[];
\r
2395 THEN POP_ASSUM(fun th-> MRESA1_TAC th`
\r
2396 row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n),
\r
2397 row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) (v n)`)
\r
2398 THEN REMOVE_ASSUM_TAC
\r
2399 THEN POP_ASSUM MP_TAC
\r
2400 THEN MRESA_TAC (GEN_ALL Local_lemmas.LOFA_DETERMINE_AZIM_IN_FA)[`V_SY (((v:num->real^3^M) n))`;`F_SY (((v:num->real^3^M) n))`;`E_SY ( ((v:num->real^3^M) n))`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n),
\r
2401 row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) (v n)`]
\r
2402 THEN FIND_ASSUM MP_TAC`1<k`
\r
2403 THEN ONCE_REWRITE_TAC[ARITH_RULE`1= SUC 0`]
\r
2404 THEN ASM_REWRITE_TAC[]
\r
2405 THEN REWRITE_TAC[ARITH_RULE`SUC 0=1`]
\r
2407 THEN SUBGOAL_THEN `(!i1 j.
\r
2409 i1 <= dimindex (:M) /\
\r
2411 j <= dimindex (:M) /\
\r
2412 row i1 (v n) = row j ((v:num->real^3^M) n)
\r
2413 ==> i1 = j)` ASSUME_TAC;
\r
2416 THEN REMOVE_THEN "THY30"(fun th-> MRESAL_TAC th[`i1:num`;`j:num`][VECTOR_ARITH`A-A= vec 0`;NORM_0])
\r
2417 THEN DISJ_CASES_TAC(SET_RULE`~(i1=j:num)\/ (i1=j)`);
\r
2419 MP_TAC(ARITH_RULE`i1 <= dimindex (:M)==> i1 <= dimindex (:M)-1 \/ i1 = dimindex (:M)`)
\r
2422 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`)
\r
2425 REMOVE_THEN"THYGIANG"MP_TAC
\r
2426 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`i1:num`]
\r
2427 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j:num`]
\r
2429 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i1:num`;`j:num`][ARITH_RULE`0<= i:num`])
\r
2430 THEN POP_ASSUM MP_TAC
\r
2431 THEN REMOVE_ASSUM_TAC
\r
2432 THEN REMOVE_ASSUM_TAC
\r
2433 THEN REMOVE_ASSUM_TAC
\r
2434 THEN REMOVE_ASSUM_TAC
\r
2435 THEN REMOVE_ASSUM_TAC
\r
2436 THEN REMOVE_ASSUM_TAC
\r
2437 THEN POP_ASSUM MP_TAC
\r
2440 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2441 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2442 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`i1:num`]
\r
2443 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j:num`]
\r
2444 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`0:num`]
\r
2445 THEN MP_TAC(ARITH_RULE`1<= i1==> ~(i1 = 0)`)
\r
2448 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i1:num`;`0:num`][ARITH_RULE`0<= i1:num`])
\r
2449 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2450 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2451 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2452 THEN REWRITE_TAC[constraint_system]
\r
2454 THEN REMOVE_ASSUM_TAC
\r
2455 THEN REMOVE_ASSUM_TAC
\r
2456 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`i1:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2457 THEN REMOVE_ASSUM_TAC
\r
2458 THEN POP_ASSUM MP_TAC
\r
2459 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2461 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2462 THEN REMOVE_ASSUM_TAC
\r
2463 THEN REMOVE_ASSUM_TAC
\r
2464 THEN REMOVE_ASSUM_TAC
\r
2465 THEN REMOVE_ASSUM_TAC
\r
2466 THEN REMOVE_ASSUM_TAC
\r
2467 THEN REMOVE_ASSUM_TAC
\r
2468 THEN REMOVE_ASSUM_TAC
\r
2469 THEN POP_ASSUM MP_TAC
\r
2470 THEN REMOVE_ASSUM_TAC
\r
2471 THEN REMOVE_ASSUM_TAC
\r
2472 THEN REMOVE_ASSUM_TAC
\r
2473 THEN REMOVE_ASSUM_TAC
\r
2474 THEN REMOVE_ASSUM_TAC
\r
2475 THEN REMOVE_ASSUM_TAC
\r
2476 THEN REMOVE_ASSUM_TAC
\r
2477 THEN POP_ASSUM MP_TAC
\r
2480 MP_TAC(ARITH_RULE`j <= dimindex (:M)==> j <= dimindex (:M)-1 \/ j = dimindex (:M)`)
\r
2484 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2486 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2487 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2488 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2489 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2490 THEN REWRITE_TAC[constraint_system]
\r
2492 THEN REMOVE_ASSUM_TAC
\r
2493 THEN REMOVE_ASSUM_TAC
\r
2494 THEN POP_ASSUM MP_TAC
\r
2495 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][ARITH_RULE`0<=a:num/\ A+0=A `])
\r
2497 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j:num`;`k:num`;][ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2498 THEN POP_ASSUM MP_TAC
\r
2499 THEN MP_TAC(ARITH_RULE`1<= j==> ~(j = 0)`)
\r
2501 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2502 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j:num`]
\r
2503 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`0:num`]
\r
2505 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`j:num`;`0:num`][ARITH_RULE`0<= i:num`])
\r
2507 THEN REMOVE_ASSUM_TAC
\r
2508 THEN POP_ASSUM MP_TAC
\r
2509 THEN REMOVE_ASSUM_TAC
\r
2510 THEN REMOVE_ASSUM_TAC
\r
2511 THEN REMOVE_ASSUM_TAC
\r
2512 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2513 THEN REMOVE_ASSUM_TAC
\r
2514 THEN REMOVE_ASSUM_TAC
\r
2515 THEN REMOVE_ASSUM_TAC
\r
2516 THEN REMOVE_ASSUM_TAC
\r
2517 THEN REMOVE_ASSUM_TAC
\r
2518 THEN REMOVE_ASSUM_TAC
\r
2519 THEN REMOVE_ASSUM_TAC
\r
2520 THEN REMOVE_ASSUM_TAC
\r
2521 THEN REMOVE_ASSUM_TAC
\r
2522 THEN REMOVE_ASSUM_TAC
\r
2523 THEN REMOVE_ASSUM_TAC
\r
2524 THEN REMOVE_ASSUM_TAC
\r
2525 THEN POP_ASSUM MP_TAC
\r
2528 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2529 THEN POP_ASSUM MP_TAC
\r
2530 THEN POP_ASSUM MP_TAC
\r
2535 MRESAL_TAC(GEN_ALL AZIM_CYCLE_EQ1)[`i:num`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row (i) ((v:num->real^3^M) n)`;`matvec((v:num-> real^3^M) n)`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`;VECMATS_MATVEC_ID]
\r
2537 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`i:num`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`matvec ((v:num->real^3^M) n)`][VECMATS_MATVEC_ID]
\r
2538 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`(SUC (i MOD dimindex (:M)))`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) ((v:num->real^3^M) n)`;`matvec ((v:num->real^3^M) n)`][VECMATS_MATVEC_ID]
\r
2539 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) ((v:num->real^3^M) n)`]
\r
2540 THEN POP_ASSUM MP_TAC
\r
2541 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2543 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`]
\r
2544 THEN POP_ASSUM MP_TAC
\r
2545 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2547 THEN MRESAL_TAC Planarity.cross_dot_fully_surrounded_ge_fan[`vec 0:real^3`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) ((v:num->real^3^M) n)`][azim;VECTOR_ARITH`A- vec 0=A`]
\r
2548 THEN POP_ASSUM MP_TAC
\r
2549 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2552 MRESAL_TAC LIM_DROP_LBOUND[`sequentially`;`lift o
\r
2553 (\n. (row (SUC (i MOD dimindex (:M))) (v n) cross
\r
2554 row (SUC (SUC (i MOD dimindex (:M)) MOD dimindex (:M))) (v n)) dot
\r
2555 row i ((v:num->real^3^M) n))`;`lift ((v' cross w:real^3) dot u)`;`&0`][TRIVIAL_LIMIT_SEQUENTIALLY;LIFT_DROP];
\r
2558 THEN DISCH_THEN(LABEL_TAC"THY30")
\r
2561 THEN SUBGOAL_THEN`azim_in_fan x' (E_SY (vecmats (l:real^(M,3)finite_product))) <= pi` ASSUME_TAC;
\r
2563 POP_ASSUM(fun th-> MP_TAC th
\r
2564 THEN REWRITE_TAC[F_SY;IN_ELIM_THM]
\r
2566 THEN ASSUME_TAC th)
\r
2567 THEN MRESA_TAC (GEN_ALL Local_lemmas.LOFA_DETERMINE_AZIM_IN_FA)[`V_SY (vecmats (l:real^(M,3)finite_product))`;`F_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`x':real^3#real^3`]
\r
2568 THEN ABBREV_TAC`u1=row i (vecmats (l:real^(M,3)finite_product))`
\r
2569 THEN ABBREV_TAC`v1=row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`
\r
2570 THEN FIND_ASSUM MP_TAC`1<k`
\r
2571 THEN ONCE_REWRITE_TAC[ARITH_RULE`1= SUC 0`]
\r
2572 THEN ASM_REWRITE_TAC[]
\r
2573 THEN REWRITE_TAC[ARITH_RULE`SUC 0=1`]
\r
2575 THEN MP_TAC(ARITH_RULE`1<= i==> i=1 \/ 1<= i-1`)
\r
2578 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2579 THEN MRESAL_TAC MOD_MULT[`dimindex (:M)`;`1`][ARITH_RULE`k*1=k`;ARITH_RULE`SUC 0=1`;DIMINDEX_NONZERO]
\r
2580 THEN MRESAL_TAC(GEN_ALL AZIM_CYCLE_EQ1)[`k:num`;`u1:real^3`;`v1:real^3`;`(row
\r
2581 (dimindex (:M)) (vecmats (l:real^(M,3)finite_product)))`;`l:real^(M,3)finite_product`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2582 THEN REMOVE_THEN"THY30"(fun th-> MRESAL_TAC th [`k:num`;`(row
\r
2583 (dimindex (:M)) (vecmats (l:real^(M,3)finite_product)))`;`u1:real^3`;`v1:real^3`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`])
\r
2584 THEN MP_TAC(REAL_ARITH`&0 <= (u1 cross v1) dot row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))
\r
2585 ==> &0 < (u1 cross v1) dot row (dimindex (:M)) (vecmats l)\/ (u1 cross v1) dot row (dimindex (:M)) (vecmats l)= &0`)
\r
2588 MRESA_TAC (GEN_ALL EDGE_IN_E_SY)[`1:num`;`u1:real^3`;`v1:real^3`;`(l:real^(M,3)finite_product)`]
\r
2589 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`dimindex (:M):num`;`row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`(l:real^(M,3)finite_product)`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2590 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`v1:real^3`;`u1:real^3`]
\r
2591 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))`]
\r
2592 THEN POP_ASSUM MP_TAC
\r
2593 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B}={B,A}`]
\r
2595 THEN REMOVE_ASSUM_TAC
\r
2596 THEN MRESA_TAC (GEN_ALL Local_lemmas.MIXED_PROD_POS_IMP_RANGE_AZIM)[`u1:real^3`;`v1:real^3`;`(row
\r
2597 (dimindex (:M)) (vecmats (l:real^(M,3)finite_product)))`;]
\r
2598 THEN POP_ASSUM MP_TAC
\r
2599 THEN ONCE_REWRITE_TAC[SET_RULE`{C,A,B}={C,B,A}`]
\r
2601 THEN POP_ASSUM MP_TAC
\r
2602 THEN REAL_ARITH_TAC;
\r
2605 THEN REWRITE_TAC[Local_lemmas.CROSS_DOT_COPLANAR]
\r
2606 THEN MRESA_TAC (GEN_ALL EDGE_IN_E_SY)[`1:num`;`u1:real^3`;`v1:real^3`;`(l:real^(M,3)finite_product)`]
\r
2607 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`dimindex (:M):num`;`row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`(l:real^(M,3)finite_product)`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2608 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`v1:real^3`;`u1:real^3`]
\r
2609 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))`]
\r
2610 THEN REMOVE_ASSUM_TAC
\r
2611 THEN REMOVE_ASSUM_TAC
\r
2612 THEN REMOVE_ASSUM_TAC
\r
2613 THEN REMOVE_ASSUM_TAC
\r
2614 THEN REMOVE_ASSUM_TAC
\r
2615 THEN REMOVE_ASSUM_TAC
\r
2616 THEN REMOVE_ASSUM_TAC
\r
2617 THEN REMOVE_ASSUM_TAC
\r
2618 THEN POP_ASSUM MP_TAC
\r
2619 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2621 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2623 THEN MRESAL_TAC AZIM_EQ_0_PI_EQ_COPLANAR[`vec 0:real^3`;`u1:real^3`;`v1:real^3`;`row (dimindex (:M)) (vecmats (l:real^(M,3)finite_product))`][PI_POS_LE;REAL_ARITH`a<=a`];
\r
2625 MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)`)
\r
2627 THEN MRESAL_TAC MOD_LT[`i-1:num`;`dimindex (:M):num`][ARITH_RULE`0<1`]
\r
2628 THEN MRESAL_TAC(GEN_ALL AZIM_CYCLE_EQ1)[`i-1:num`;`u1:real^3`;`v1:real^3`;`(row
\r
2629 (i-1) (vecmats (l:real^(M,3)finite_product)))`;`l:real^(M,3)finite_product`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2630 THEN POP_ASSUM MP_TAC
\r
2631 THEN REMOVE_THEN"THY30"(fun th-> MRESAL_TAC th [`i-1:num`;`(row
\r
2632 (i-1) (vecmats (l:real^(M,3)finite_product)))`;`u1:real^3`;`v1:real^3`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`])
\r
2633 THEN POP_ASSUM MP_TAC
\r
2634 THEN MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)/\ SUC (i-1)=i`)
\r
2636 THEN POP_ASSUM(fun th-> ONCE_REWRITE_TAC[th])
\r
2639 THEN MP_TAC(REAL_ARITH`&0 <= (u1 cross v1) dot row (i-1) (vecmats (l:real^(M,3)finite_product))
\r
2640 ==> &0 < (u1 cross v1) dot row (i-1) (vecmats l)\/ (u1 cross v1) dot row (i-1) (vecmats l)= &0`)
\r
2643 MRESA_TAC (GEN_ALL EDGE_IN_E_SY)[`i:num`;`u1:real^3`;`v1:real^3`;`(l:real^(M,3)finite_product)`]
\r
2644 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`i-1:num`;`row (i-1) (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`(l:real^(M,3)finite_product)`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2645 THEN POP_ASSUM MP_TAC
\r
2646 THEN MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)/\ SUC (i-1)=i`)
\r
2648 THEN POP_ASSUM(fun th-> ONCE_REWRITE_TAC[th])
\r
2650 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`v1:real^3`;`u1:real^3`]
\r
2651 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`row (i-1) (vecmats (l:real^(M,3)finite_product))`]
\r
2652 THEN REMOVE_ASSUM_TAC
\r
2653 THEN MRESA_TAC (GEN_ALL Local_lemmas.MIXED_PROD_POS_IMP_RANGE_AZIM)[`u1:real^3`;`v1:real^3`;`(row
\r
2654 (i-1) (vecmats (l:real^(M,3)finite_product)))`;]
\r
2655 THEN POP_ASSUM MP_TAC
\r
2656 THEN ONCE_REWRITE_TAC[SET_RULE`{C,A,B}={C,B,A}`]
\r
2658 THEN POP_ASSUM MP_TAC
\r
2659 THEN REAL_ARITH_TAC;
\r
2662 THEN REWRITE_TAC[Local_lemmas.CROSS_DOT_COPLANAR]
\r
2663 THEN MRESA_TAC (GEN_ALL EDGE_IN_E_SY)[`i:num`;`u1:real^3`;`v1:real^3`;`(l:real^(M,3)finite_product)`]
\r
2664 THEN MRESAL_TAC (GEN_ALL EDGE_IN_E_SY)[`i-1:num`;`row (i-1) (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`(l:real^(M,3)finite_product)`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
2665 THEN POP_ASSUM MP_TAC
\r
2666 THEN MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)/\ SUC (i-1)=i`)
\r
2668 THEN POP_ASSUM(fun th-> ONCE_REWRITE_TAC[th])
\r
2670 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`v1:real^3`;`u1:real^3`]
\r
2671 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`u1:real^3`;`row (i-1) (vecmats (l:real^(M,3)finite_product))`]
\r
2672 THEN REMOVE_ASSUM_TAC
\r
2673 THEN REMOVE_ASSUM_TAC
\r
2674 THEN REMOVE_ASSUM_TAC
\r
2675 THEN REMOVE_ASSUM_TAC
\r
2676 THEN REMOVE_ASSUM_TAC
\r
2677 THEN REMOVE_ASSUM_TAC
\r
2678 THEN REMOVE_ASSUM_TAC
\r
2679 THEN REMOVE_ASSUM_TAC
\r
2680 THEN POP_ASSUM MP_TAC
\r
2681 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2683 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2685 THEN MRESAL_TAC AZIM_EQ_0_PI_EQ_COPLANAR[`vec 0:real^3`;`u1:real^3`;`v1:real^3`;`row (i-1) (vecmats (l:real^(M,3)finite_product))`][PI_POS_LE;REAL_ARITH`a<=a`];
\r
2687 SUBGOAL_THEN`!i j u v w. 1<= i /\ i<= dimindex (:M)
\r
2688 /\ 1<= j /\ j<= dimindex (:M)
\r
2689 /\ row i (vecmats l)=u
\r
2690 /\ row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))=v
\r
2691 /\ row j (vecmats l)=w
\r
2692 ==> &0<= (u cross v) dot w` ASSUME_TAC;
\r
2695 THEN SUBGOAL_THEN`1 <= SUC (i MOD dimindex (:M)) /\
\r
2696 SUC (i MOD dimindex (:M)) <= dimindex (:M)` ASSUME_TAC;
\r
2698 ASM_REWRITE_TAC[ARITH_RULE`1<= SUC a`]
\r
2699 THEN MRESAL_TAC DIVISION[`i:num`;`dimindex (:M):num`][DIMINDEX_NONZERO]
\r
2700 THEN POP_ASSUM MP_TAC
\r
2703 REMOVE_THEN "YEU2" (fun th-> MRESA1_TAC th`i:num` THEN MRESA1_TAC th`SUC (i MOD dimindex (:M))`
\r
2704 THEN MRESA1_TAC th`j:num` THEN MP_TAC th THEN DISCH_THEN(LABEL_TAC"YEU2"))
\r
2706 MRESA_TAC (GEN_ALL CROSS_DOT_SEQUENTIALLY)[`(\n. row i ((v:num->real^3^M) n))`;`(\n. row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`(\n. row j ((v:num->real^3^M) n))`;`u:real^3`;`v':real^3`;`w:real^3`]
\r
2707 THEN SUBGOAL_THEN`eventually
\r
2711 (\n. (row i (v n) cross
\r
2712 row (SUC (i MOD dimindex (:M)))
\r
2714 row j ((v:num->real^3^M) n)))
\r
2716 sequentially` ASSUME_TAC;
\r
2718 REWRITE_TAC[EVENTUALLY_SEQUENTIALLY;o_DEF;LIFT_DROP]
\r
2719 THEN EXISTS_TAC`0`
\r
2720 THEN REPEAT STRIP_TAC
\r
2721 THEN REMOVE_THEN "THY1"(fun th-> MRESA1_TAC th`n:num`)
\r
2722 THEN REMOVE_ASSUM_TAC
\r
2723 THEN POP_ASSUM MP_TAC
\r
2724 THEN REWRITE_TAC[convex_local_fan;]
\r
2725 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2727 THEN POP_ASSUM MP_TAC
\r
2728 THEN POP_ASSUM MP_TAC
\r
2729 THEN POP_ASSUM MP_TAC
\r
2730 THEN DISCH_THEN(LABEL_TAC"THY31")
\r
2732 THEN POP_ASSUM(fun th-> MP_TAC th
\r
2733 THEN REWRITE_TAC[local_fan]
\r
2734 THEN CONV_TAC(TOP_DEPTH_CONV let_CONV)
\r
2736 THEN ASSUME_TAC th)
\r
2737 THEN SUBGOAL_THEN`row i (v n),
\r
2738 row (SUC (i MOD dimindex (:M))) (v n) IN
\r
2739 F_SY ((v:num->real^3^M) n)`ASSUME_TAC;
\r
2741 REWRITE_TAC[F_SY;IN_ELIM_THM]
\r
2742 THEN EXISTS_TAC`i:num`
\r
2743 THEN ASM_REWRITE_TAC[];
\r
2745 SUBGOAL_THEN`row j ((v:num->real^3^M) n) IN V_SY((v:num->real^3^M) n)` ASSUME_TAC;
\r
2747 REWRITE_TAC[V_SY;rows;IN_ELIM_THM]
\r
2748 THEN EXISTS_TAC`j:num`
\r
2749 THEN ASM_REWRITE_TAC[];
\r
2752 THEN POP_ASSUM(fun th-> MRESAL1_TAC th`
\r
2753 row i ((v:num->real^3^M) n),
\r
2754 row (SUC (i MOD dimindex (:M))) (v n)`[SUBSET;IN_ELIM_THM])
\r
2755 THEN POP_ASSUM(fun th-> MRESAL1_TAC th`
\r
2756 row j ((v:num->real^3^M) n)`[SUBSET;IN_ELIM_THM])
\r
2757 THEN POP_ASSUM MP_TAC
\r
2758 THEN POP_ASSUM MP_TAC
\r
2759 THEN MRESA_TAC (GEN_ALL Local_lemmas.LOFA_DETERMINE_AZIM_IN_FA)[`V_SY (((v:num->real^3^M) n))`;`F_SY (((v:num->real^3^M) n))`;`E_SY ( ((v:num->real^3^M) n))`;`row i ((v:num->real^3^M) n),
\r
2760 row (SUC (i MOD dimindex (:M))) (v n)`]
\r
2761 THEN MRESA_TAC (GEN_ALL Local_lemmas.DETERMINE_WEDGE_IN_FAN)[`V_SY (((v:num->real^3^M) n))`;`F_SY (((v:num->real^3^M) n))`;`E_SY ( ((v:num->real^3^M) n))`;`row i ((v:num->real^3^M) n),
\r
2762 row (SUC (i MOD dimindex (:M))) (v n)`]
\r
2763 THEN FIND_ASSUM MP_TAC`1<k`
\r
2764 THEN ONCE_REWRITE_TAC[ARITH_RULE`1= SUC 0`]
\r
2765 THEN ASM_REWRITE_TAC[]
\r
2766 THEN REWRITE_TAC[ARITH_RULE`SUC 0=1`]
\r
2768 THEN SUBGOAL_THEN `(!i1 j1.
\r
2770 i1 <= dimindex (:M) /\
\r
2772 j1 <= dimindex (:M) /\
\r
2773 row i1 (v n) = row j1 ((v:num->real^3^M) n)
\r
2774 ==> i1 = j1)` ASSUME_TAC;
\r
2777 THEN REMOVE_THEN "THY31"(fun th-> MRESAL_TAC th[`i1:num`;`j1:num`][VECTOR_ARITH`A-A= vec 0`;NORM_0])
\r
2778 THEN DISJ_CASES_TAC(SET_RULE`~(i1=j1:num)\/ (i1=j1)`);
\r
2780 MP_TAC(ARITH_RULE`i1 <= dimindex (:M)==> i1 <= dimindex (:M)-1 \/ i1 = dimindex (:M)`)
\r
2783 MP_TAC(ARITH_RULE`j1 <= dimindex (:M)==> j1 <= dimindex (:M)-1 \/ j1 = dimindex (:M)`)
\r
2786 REMOVE_THEN"THYGIANG"MP_TAC
\r
2787 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`i1:num`]
\r
2788 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j1:num`]
\r
2790 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i1:num`;`j1:num`][ARITH_RULE`0<= i:num`])
\r
2791 THEN POP_ASSUM MP_TAC
\r
2792 THEN REMOVE_ASSUM_TAC
\r
2793 THEN REMOVE_ASSUM_TAC
\r
2794 THEN REMOVE_ASSUM_TAC
\r
2795 THEN REMOVE_ASSUM_TAC
\r
2796 THEN REMOVE_ASSUM_TAC
\r
2797 THEN REMOVE_ASSUM_TAC
\r
2798 THEN POP_ASSUM MP_TAC
\r
2799 THEN REAL_ARITH_TAC;
\r
2801 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2802 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2803 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`i1:num`]
\r
2804 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j1:num`]
\r
2805 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`0:num`]
\r
2806 THEN MP_TAC(ARITH_RULE`1<= i1==> ~(i1 = 0)`)
\r
2809 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`i1:num`;`0:num`][ARITH_RULE`0<= i1:num`])
\r
2810 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2811 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2812 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2813 THEN REWRITE_TAC[constraint_system]
\r
2815 THEN REMOVE_ASSUM_TAC
\r
2816 THEN REMOVE_ASSUM_TAC
\r
2817 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`i1:num`;`k:num`;][IN_NUMSEG;ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2818 THEN REMOVE_ASSUM_TAC
\r
2819 THEN POP_ASSUM MP_TAC
\r
2820 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2822 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2823 THEN REMOVE_ASSUM_TAC
\r
2824 THEN REMOVE_ASSUM_TAC
\r
2825 THEN REMOVE_ASSUM_TAC
\r
2826 THEN REMOVE_ASSUM_TAC
\r
2827 THEN REMOVE_ASSUM_TAC
\r
2828 THEN REMOVE_ASSUM_TAC
\r
2829 THEN REMOVE_ASSUM_TAC
\r
2830 THEN POP_ASSUM MP_TAC
\r
2831 THEN REMOVE_ASSUM_TAC
\r
2832 THEN REMOVE_ASSUM_TAC
\r
2833 THEN REMOVE_ASSUM_TAC
\r
2834 THEN REMOVE_ASSUM_TAC
\r
2835 THEN REMOVE_ASSUM_TAC
\r
2836 THEN REMOVE_ASSUM_TAC
\r
2837 THEN REMOVE_ASSUM_TAC
\r
2838 THEN POP_ASSUM MP_TAC
\r
2841 MP_TAC(ARITH_RULE`j1 <= dimindex (:M)==> j1 <= dimindex (:M)-1 \/ j1 = dimindex (:M)`)
\r
2845 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2847 THEN MRESAL_TAC MOD_MULT[`k:num`;`1`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A`]
\r
2848 THEN MRESA_TAC (GEN_ALL POWER_MOD_FUN)[`k:num`;`k:num`;`k:num`]
\r
2849 THEN MRESAL_TAC MOD_MULT[`k:num`;`2`][DIMINDEX_NONZERO;ARITH_RULE`A*1=A/\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`]
\r
2850 THEN REMOVE_THEN "THYGIANG2" MP_TAC
\r
2851 THEN REWRITE_TAC[constraint_system]
\r
2853 THEN REMOVE_ASSUM_TAC
\r
2854 THEN REMOVE_ASSUM_TAC
\r
2855 THEN POP_ASSUM MP_TAC
\r
2856 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j1:num`;`k:num`;][ARITH_RULE`0<=a:num/\ A+0=A `])
\r
2858 THEN POP_ASSUM(fun th-> MRESAL_TAC th[`j1:num`;`k:num`;][ARITH_RULE`0<=a:num/\ A+0=A /\ dimindex (:M) + dimindex (:M)= dimindex (:M) *2`])
\r
2859 THEN POP_ASSUM MP_TAC
\r
2860 THEN MP_TAC(ARITH_RULE`1<= j1==> ~(j1 = 0)`)
\r
2862 THEN REMOVE_THEN"THYGIANG"MP_TAC
\r
2863 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`j1:num`]
\r
2864 THEN MRESA_TAC IN_NUMSEG[`0`;`k-1:num`;`0:num`]
\r
2866 THEN POP_ASSUM (fun th-> MRESAL_TAC th[`j1:num`;`0:num`][ARITH_RULE`0<= i:num`])
\r
2868 THEN REMOVE_ASSUM_TAC
\r
2869 THEN POP_ASSUM MP_TAC
\r
2870 THEN REMOVE_ASSUM_TAC
\r
2871 THEN REMOVE_ASSUM_TAC
\r
2872 THEN REMOVE_ASSUM_TAC
\r
2873 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2874 THEN REMOVE_ASSUM_TAC
\r
2875 THEN REMOVE_ASSUM_TAC
\r
2876 THEN REMOVE_ASSUM_TAC
\r
2877 THEN REMOVE_ASSUM_TAC
\r
2878 THEN REMOVE_ASSUM_TAC
\r
2879 THEN REMOVE_ASSUM_TAC
\r
2880 THEN REMOVE_ASSUM_TAC
\r
2881 THEN REMOVE_ASSUM_TAC
\r
2882 THEN REMOVE_ASSUM_TAC
\r
2883 THEN REMOVE_ASSUM_TAC
\r
2884 THEN REMOVE_ASSUM_TAC
\r
2885 THEN REMOVE_ASSUM_TAC
\r
2886 THEN POP_ASSUM MP_TAC
\r
2889 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
2890 THEN POP_ASSUM MP_TAC
\r
2891 THEN POP_ASSUM MP_TAC
\r
2897 THEN DISCH_THEN(LABEL_TAC"THY32")
\r
2898 THEN REWRITE_TAC[REAL_ARITH`A<=B <=> A=B\/ A< B`]
\r
2901 MRESAL_TAC(GEN_ALL Local_lemmas.AZIM_PI_WEDGE_GE_CROSS_DOT)[`(azim_cycle (EE (row i (v n)) (E_SY (v n))) (vec 0) (row i (v n))
\r
2902 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)))`;`(row i ((v:num->real^3^M) n))`;`(row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`vec 0:real^3`][IN_ELIM_THM;REAL_ARITH`A=B\/ A< B<=> A<=B`;VECTOR_ARITH`A- vec 0=A`]
\r
2903 THEN REAL_ARITH_TAC;
\r
2906 THEN SUBGOAL_THEN`{row i (v n),
\r
2907 row (SUC (i MOD dimindex (:M))) (v n)} IN
\r
2908 E_SY ((v:num->real^3^M) n)`ASSUME_TAC;
\r
2910 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
2911 THEN EXISTS_TAC`i:num`
\r
2912 THEN ASM_REWRITE_TAC[];
\r
2914 MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`]
\r
2915 THEN MRESA_TAC(GEN_ALL Wrgcvdr_cizmrrh.AZIM_CYCLE_EQ_SIGMA_FAN)[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;]
\r
2916 THEN MRESA_TAC(sigma_fan_in_set_of_edge)[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;]
\r
2917 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2918 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`row i ((v:num->real^3^M) n)`]
\r
2919 THEN POP_ASSUM MP_TAC
\r
2922 THEN MRESA_TAC(GEN_ALL Local_lemmas.WEDGE_GE_EQ_AFF_GE)[`vec 0:real^3`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2923 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`]
\r
2924 THEN MP_TAC(REAL_ARITH`&0<= azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2925 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2926 (row (SUC (i MOD dimindex (:M))) (v n)))
\r
2927 ==> azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2928 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2929 (row (SUC (i MOD dimindex (:M))) (v n))) = &0 \/
\r
2930 &0< azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2931 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2932 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)))`)
\r
2933 THEN REWRITE_TAC[azim]
\r
2936 MRESA_TAC Fan.UNIQUE_AZIM_0_POINT_FAN[`vec 0:real^3`;`V_SY ((v:num->real^3^M) n)`;`E_SY ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2937 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`]
\r
2938 THEN POP_ASSUM(fun th-> REWRITE_TAC[SYM th; SET_RULE`{A,A}={A}`])
\r
2940 THEN MRESAL_TAC AFF_GE_SUBSET_AFFINE_HULL[`{vec 0,row i ((v:num->real^3^M) n)}`;`{(row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))}`][GSYM aff]
\r
2941 THEN MP_TAC(SET_RULE`row j (v n) IN
\r
2942 aff_ge {vec 0, row i (v n)} {row (SUC (i MOD dimindex (:M))) (v n)}
\r
2943 /\ aff_ge {vec 0, row i (v n)} {row (SUC (i MOD dimindex (:M))) (v n)} SUBSET
\r
2945 ({vec 0, row i (v n)} UNION {row (SUC (i MOD dimindex (:M))) (v n)})
\r
2946 ==> row j ((v:num->real^3^M) n) IN
\r
2948 ({vec 0, row i (v n)} UNION {row (SUC (i MOD dimindex (:M))) (v n)})`)
\r
2949 THEN ASM_REWRITE_TAC[SET_RULE` {A,B}UNION{C}={A,B,C}`]
\r
2950 THEN MRESAL_TAC Conforming.aff_3_rep_cross_dot[`vec 0:real^3`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`]
\r
2951 [IN_ELIM_THM;VECTOR_ARITH`A- vec 0=A`]
\r
2954 MP_TAC(REAL_ARITH`
\r
2955 &0<azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2956 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2957 (row (SUC (i MOD dimindex (:M))) (v n))) /\
\r
2958 azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2959 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2960 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))) <
\r
2962 ==> ~(azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2963 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2964 (row (SUC (i MOD dimindex (:M))) (v n))) =
\r
2966 azim (vec 0) (row i (v n)) (row (SUC (i MOD dimindex (:M))) (v n))
\r
2967 (sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2968 (row (SUC (i MOD dimindex (:M))) (v n))) =
\r
2971 THEN MRESA_TAC AZIM_EQ_0_PI_EQ_COPLANAR[`vec 0:real^3`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2972 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`]
\r
2973 THEN POP_ASSUM MP_TAC
\r
2974 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C,D}={A,C,B,D}`]
\r
2976 THEN MRESA_TAC( GEN_ALL Nkezbfc_local.inter_aff_ge_3_1_is_aff_ge_2_2)[`vec 0:real^3`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`row i ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2977 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`]
\r
2978 THEN POP_ASSUM(fun th-> REWRITE_TAC[SYM th;INTER;IN_ELIM_THM])
\r
2980 THEN REMOVE_ASSUM_TAC
\r
2981 THEN POP_ASSUM MP_TAC
\r
2982 THEN MRESAL_TAC Planarity.cross_dot_fully_surrounded_fan[`vec 0:real^3`;`row i ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2983 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`][VECTOR_ARITH`A- vec 0=A`]
\r
2984 THEN MRESAL_TAC Nkezbfc_local.aff_ge_3_1_rep_cross_dot [`vec 0:real^3`;`row i ((v:num->real^3^M) n)`;`row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n)`;`sigma_fan (vec 0) (V_SY (v n)) (E_SY (v n)) (row i (v n))
\r
2985 (row (SUC (i MOD dimindex (:M))) ((v:num->real^3^M) n))`][VECTOR_ARITH`A- vec 0=A`]
\r
2986 THEN POP_ASSUM MP_TAC
\r
2987 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C,D}={A,C,B,D}`]
\r
2989 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
2990 THEN ASM_REWRITE_TAC[IN_ELIM_THM]
\r
2991 THEN REAL_ARITH_TAC;
\r
2993 MRESAL_TAC LIM_DROP_LBOUND[`sequentially`;`lift o
\r
2994 (\n. (row i (v n) cross
\r
2995 row (SUC (i MOD dimindex (:M))) (v n))dot
\r
2996 row j ((v:num->real^3^M) n))`;`lift ((u cross v':real^3) dot w)`;`&0`][TRIVIAL_LIMIT_SEQUENTIALLY;LIFT_DROP];
\r
2999 THEN POP_ASSUM MP_TAC
\r
3000 THEN POP_ASSUM MP_TAC
\r
3001 THEN POP_ASSUM(fun th-> MP_TAC th
\r
3002 THEN REWRITE_TAC[F_SY;IN_ELIM_THM]
\r
3004 THEN ASSUME_TAC th)
\r
3005 THEN MRESA_TAC (GEN_ALL Local_lemmas.LOFA_DETERMINE_AZIM_IN_FA)[`V_SY (vecmats (l:real^(M,3)finite_product))`;`F_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`x':real^3#real^3`]
\r
3006 THEN MRESA_TAC(GEN_ALL Local_lemmas.DETERMINE_WEDGE_IN_FAN)
\r
3007 [`V_SY (vecmats (l:real^(M,3)finite_product))`;`F_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`x':real^3#real^3`]
\r
3008 THEN REWRITE_TAC[SUBSET;IN_ELIM_THM]
\r
3009 THEN REWRITE_TAC[REAL_ARITH`A<=B <=> A=B\/ A< B`]
\r
3012 DISCH_THEN(LABEL_TAC"THY31")
\r
3015 THEN POP_ASSUM(fun th-> MP_TAC th
\r
3016 THEN REWRITE_TAC[V_SY;IN_ELIM_THM;rows]
\r
3018 THEN ASSUME_TAC th)
\r
3019 THEN MRESAL_TAC(GEN_ALL Local_lemmas.AZIM_PI_WEDGE_GE_CROSS_DOT)[`(azim_cycle (EE (row i (vecmats (l:real^(M,3)finite_product))) (E_SY (vecmats (l:real^(M,3)finite_product)))) (vec 0) (row i (vecmats l))
\r
3020 (row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))))`;`(row i (vecmats (l:real^(M,3)finite_product)))`;`(row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`;`vec 0:real^3`][IN_ELIM_THM;REAL_ARITH`A=B\/ A< B<=> A<=B`;VECTOR_ARITH`A- vec 0=A`]
\r
3021 THEN REMOVE_THEN"THY31"(fun th-> MRESA_TAC th[`i:num`;`i':num`;`(row i (vecmats (l:real^(M,3)finite_product)))`;`(row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`;`(row i' (vecmats (l:real^(M,3)finite_product)))`])
\r
3022 THEN POP_ASSUM MP_TAC
\r
3023 THEN REAL_ARITH_TAC;
\r
3026 THEN DISCH_THEN(LABEL_TAC"THY32")
\r
3027 THEN DISCH_THEN(LABEL_TAC"THY31")
\r
3030 THEN POP_ASSUM(fun th-> MP_TAC th
\r
3031 THEN REWRITE_TAC[V_SY;IN_ELIM_THM;rows]
\r
3033 THEN ASSUME_TAC th)
\r
3034 THEN SUBGOAL_THEN`{row i (vecmats (l:real^(M,3)finite_product)),
\r
3035 row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))} IN
\r
3036 E_SY (vecmats (l:real^(M,3)finite_product))`ASSUME_TAC;
\r
3038 REWRITE_TAC[E_SY;IN_ELIM_THM]
\r
3039 THEN EXISTS_TAC`i:num`
\r
3040 THEN ASM_REWRITE_TAC[];
\r
3042 MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`;`row i (vecmats (l:real^(M,3)finite_product))`]
\r
3043 THEN MRESA_TAC(GEN_ALL Wrgcvdr_cizmrrh.AZIM_CYCLE_EQ_SIGMA_FAN)[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`row i (vecmats (l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`;]
\r
3044 THEN MRESA_TAC(sigma_fan_in_set_of_edge)[`vec 0:real^3`;`V_SY (vecmats (l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`row i (vecmats (l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product))`;]
\r
3045 THEN MRESA_TAC remark1_fan[`vec 0:real^3`;`V_SY (vecmats(l:real^(M,3)finite_product))`;`E_SY (vecmats (l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats (l:real^(M,3)finite_product))) (E_SY (vecmats (l:real^(M,3)finite_product))) (row i (vecmats (l:real^(M,3)finite_product)))
\r
3046 (row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`;`row i (vecmats(l:real^(M,3)finite_product))`]
\r
3047 THEN POP_ASSUM MP_TAC
\r
3049 THEN REMOVE_THEN "THY32" MP_TAC
\r
3051 THEN MRESA_TAC(GEN_ALL Local_lemmas.WEDGE_GE_EQ_AFF_GE)[`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3052 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`]
\r
3053 THEN MP_TAC(REAL_ARITH`&0<= azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3054 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3055 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))))
\r
3056 ==> azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3057 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3058 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))) = &0 \/
\r
3059 &0< azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3060 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3061 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))))`)
\r
3062 THEN REWRITE_TAC[azim]
\r
3065 MRESA_TAC Fan.UNIQUE_AZIM_0_POINT_FAN[`vec 0:real^3`;`V_SY (vecmats(l:real^(M,3)finite_product))`;`E_SY (vecmats(l:real^(M,3)finite_product))`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3066 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`]
\r
3067 THEN MRESA_TAC(GEN_ALL Wrgcvdr_cizmrrh.FAN_IMP_EE_EQ_SET_OF_EDGE)[`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`V_SY (vecmats(l:real^(M,3)finite_product))`;`E_SY (vecmats(l:real^(M,3)finite_product))`]
\r
3068 THEN MRESA_TAC (GEN_ALL Local_lemmas.LOFA_CARD_EE_V_1)[`F_SY (vecmats(l:real^(M,3)finite_product))`;`V_SY (vecmats(l:real^(M,3)finite_product))`;`row i (vecmats(l:real^(M,3)finite_product))`;`E_SY (vecmats(l:real^(M,3)finite_product))`]
\r
3069 THEN POP_ASSUM MP_TAC
\r
3070 THEN DISJ_CASES_TAC(SET_RULE`set_of_edge (row i (vecmats l)) (V_SY (vecmats l)) (E_SY (vecmats l)) ={row (SUC (i MOD dimindex (:M))) (vecmats l)}
\r
3071 \/ ~(set_of_edge (row i (vecmats l)) (V_SY (vecmats l)) (E_SY (vecmats l)) ={(row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))})`);
\r
3074 THEN SIMP_TAC[HAS_SIZE; CARD_CLAUSES; FINITE_INSERT; FINITE_EMPTY; IN_INSERT; NOT_IN_EMPTY]
\r
3077 MRESA_TAC SIGMA_FAN[`vec 0:real^3`;`V_SY (vecmats(l:real^(M,3)finite_product))`;`E_SY (vecmats(l:real^(M,3)finite_product))`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`]
\r
3078 THEN REMOVE_ASSUM_TAC
\r
3079 THEN POP_ASSUM MP_TAC
\r
3080 THEN ONCE_REWRITE_TAC[SET_RULE`A=B<=>B=A`]
\r
3081 THEN REMOVE_ASSUM_TAC
\r
3082 THEN REMOVE_ASSUM_TAC
\r
3083 THEN POP_ASSUM (fun th-> REWRITE_TAC[SYM th]);
\r
3085 MP_TAC(REAL_ARITH`
\r
3086 &0<azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3087 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3088 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))) /\
\r
3089 azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3090 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3091 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))) <
\r
3093 ==> ~(azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3094 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3095 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))) =
\r
3097 azim (vec 0) (row i (vecmats(l:real^(M,3)finite_product))) (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))
\r
3098 (sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3099 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))) =
\r
3102 THEN MRESA_TAC AZIM_EQ_0_PI_EQ_COPLANAR[`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3103 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`]
\r
3104 THEN POP_ASSUM MP_TAC
\r
3105 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C,D}={A,C,B,D}`]
\r
3107 THEN MRESA_TAC( GEN_ALL Nkezbfc_local.inter_aff_ge_3_1_is_aff_ge_2_2)[`vec 0:real^3`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;`row i (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3108 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`]
\r
3109 THEN POP_ASSUM(fun th-> REWRITE_TAC[SYM th;INTER;IN_ELIM_THM])
\r
3112 MRESAL_TAC Planarity.cross_dot_fully_surrounded_fan[`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3113 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`][VECTOR_ARITH`A- vec 0=A`]
\r
3114 THEN MRESAL_TAC Nkezbfc_local.aff_ge_3_1_rep_cross_dot [`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3115 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`][VECTOR_ARITH`A- vec 0=A`]
\r
3116 THEN POP_ASSUM MP_TAC
\r
3117 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C,D}={A,C,B,D}`]
\r
3119 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
3120 THEN ASM_REWRITE_TAC[IN_ELIM_THM]
\r
3121 THEN REMOVE_THEN"THY31"(fun th-> MRESA_TAC th[`i:num`;`i':num`;`(row i (vecmats (l:real^(M,3)finite_product)))`;`(row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`;`(row i' (vecmats (l:real^(M,3)finite_product)))`])
\r
3122 THEN POP_ASSUM MP_TAC
\r
3123 THEN REAL_ARITH_TAC;
\r
3125 MRESAL_TAC Planarity.cross_dot_fully_surrounded_fan[`vec 0:real^3`;`row i (vecmats(l:real^(M,3)finite_product))`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3126 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`][VECTOR_ARITH`A- vec 0=A`]
\r
3127 THEN MRESAL_TAC Nkezbfc_local.aff_ge_3_1_rep_cross_dot [`vec 0:real^3`;`sigma_fan (vec 0) (V_SY (vecmats(l:real^(M,3)finite_product))) (E_SY (vecmats(l:real^(M,3)finite_product))) (row i (vecmats(l:real^(M,3)finite_product)))
\r
3128 (row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product)))`;`row i (vecmats(l:real^(M,3)finite_product))`;`row (SUC (i MOD dimindex (:M))) (vecmats(l:real^(M,3)finite_product))`;][VECTOR_ARITH`A- vec 0=A`]
\r
3129 THEN POP_ASSUM MP_TAC
\r
3130 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C,D}={A,D,C,B}`]
\r
3131 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
3133 THEN ONCE_REWRITE_TAC[SET_RULE`{A,B,C}={A,C,B}`]
\r
3134 THEN ASM_REWRITE_TAC[IN_ELIM_THM]
\r
3135 THEN FIND_ASSUM MP_TAC`1<k`
\r
3136 THEN ONCE_REWRITE_TAC[ARITH_RULE`1= SUC 0`]
\r
3137 THEN ASM_REWRITE_TAC[]
\r
3138 THEN REWRITE_TAC[ARITH_RULE`SUC 0=1`]
\r
3140 THEN MP_TAC(ARITH_RULE`1<= i==> i=1 \/ 1<= i-1`)
\r
3143 POP_ASSUM (fun th-> SUBST_ALL_TAC(th))
\r
3144 THEN MRESAL_TAC MOD_MULT[`dimindex (:M)`;`1`][ARITH_RULE`k*1=k`;ARITH_RULE`SUC 0=1`;DIMINDEX_NONZERO]
\r
3145 THEN MRESA_TAC MOD_LT[`1:num`;`dimindex (:M)`]
\r
3146 THEN POP_ASSUM (fun th-> SUBST_ALL_TAC(th) THEN ASSUME_TAC th)
\r
3147 THEN MRESAL_TAC(GEN_ALL AZIM_CYCLE_EQ1)[`k:num`;`row 1 (vecmats (l:real^(M,3)finite_product))`;`row (SUC 1) (vecmats (l:real^(M,3)finite_product))`;`(row
\r
3148 (dimindex (:M)) (vecmats (l:real^(M,3)finite_product)))`;`l:real^(M,3)finite_product`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
3149 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
3150 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
3151 THEN REMOVE_THEN"THY31"(fun th-> MRESAL_TAC th[`k:num`;`i':num`;`row (dimindex (:M)) (vecmats(l:real^(M,3)finite_product))`;`(row 1 (vecmats (l:real^(M,3)finite_product)))`;`(row i' (vecmats (l:real^(M,3)finite_product)))`][ARITH_RULE`dimindex (:M) <= dimindex (:M) /\ SUC 0=1`])
\r
3152 THEN POP_ASSUM MP_TAC
\r
3153 THEN REAL_ARITH_TAC;
\r
3155 MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)`)
\r
3157 THEN MRESAL_TAC MOD_LT[`i-1:num`;`dimindex (:M):num`][ARITH_RULE`0<1`]
\r
3159 MRESAL_TAC(GEN_ALL AZIM_CYCLE_EQ1)[`i-1:num`;`(row i (vecmats (l:real^(M,3)finite_product)))`;`(row (SUC (i MOD dimindex (:M))) (vecmats (l:real^(M,3)finite_product)))`;`(row
\r
3160 (i-1) (vecmats (l:real^(M,3)finite_product)))`;`l:real^(M,3)finite_product`][ARITH_RULE`SUC 0=1/\ dimindex (:M) <= dimindex (:M)`]
\r
3161 THEN POP_ASSUM MP_TAC
\r
3162 THEN MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)/\ SUC (i-1)=i`)
\r
3164 THEN POP_ASSUM(fun th-> ONCE_REWRITE_TAC[th])
\r
3166 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
3167 THEN ONCE_REWRITE_TAC[CROSS_TRIPLE]
\r
3168 THEN REMOVE_THEN"THY31"(fun th-> MRESA_TAC th[`i-1:num`;`i':num`;`row (i - 1) (vecmats(l:real^(M,3)finite_product))`;`(row i (vecmats (l:real^(M,3)finite_product)))`;`(row i' (vecmats (l:real^(M,3)finite_product)))`])
\r
3169 THEN POP_ASSUM MP_TAC
\r
3170 THEN MP_TAC(ARITH_RULE`1<= i /\ i<= dimindex (:M) ==> i-1 < dimindex (:M)/\ i-1 <= dimindex (:M)/\ SUC (i-1)=i`)
\r
3172 THEN POP_ASSUM(fun th-> ONCE_REWRITE_TAC[th])
\r
3173 THEN REAL_ARITH_TAC
\r
3179 let BOUNDED_SY=prove(`
\r
3180 stable_system k d (0..k-1) a b J (\i. ((1+i):num MOD k)) /\k= dimindex(:M)
\r
3183 bounded {matvec(v:real^3^M) | (!i. 1<=i /\ i <= dimindex(:M)==> row i v IN ball_annulus) /\ CONDITION1_SY a b v /\ CONDITION2_SY v }`,
\r
3185 THEN MATCH_MP_TAC BOUNDED_SUBSET
\r
3186 THEN EXISTS_TAC`{matvec(v:real^3^M) | (!i. 1<=i /\ i <= dimindex(:M)==> row i v IN ball_annulus) }`
\r
3187 THEN MP_TAC COMPACT_BALL_ANNULUS_MATVEC
\r
3188 THEN SIMP_TAC[COMPACT_EQ_BOUNDED_CLOSED]
\r
3190 THEN REWRITE_TAC[SUBSET;IN_ELIM_THM]
\r
3194 let WJSCPRO= prove (`
\r
3195 stable_system k (d:real) (0..k-1) a b J (\i. ((1+i):num MOD k)) /\k= dimindex(:M)
\r
3198 compact {matvec(v:real^3^M) | (!i. 1<=i /\ i <= dimindex(:M)==> row i v IN ball_annulus) /\ CONDITION1_SY a b v /\ CONDITION2_SY v }`,
\r
3199 SIMP_TAC[COMPACT_EQ_BOUNDED_CLOSED; BOUNDED_SY; CLOSED_SY;]
\r
3200 THEN REPEAT STRIP_TAC
\r
3201 THEN MP_TAC(ARITH_RULE`2<k ==> 1<k`)
\r
3203 THENL[ MRESA_TAC (GEN_ALL BOUNDED_SY)[`d:real`;`J:(num->bool)->bool`;`k:num`;`a:num#num->real`;`b:num#num->real`;];
\r
3204 MRESA_TAC (GEN_ALL CLOSED_SY)[`d:real`;`J:(num->bool)->bool`;`k:num`;`a:num#num->real`;`b:num#num->real`;]]);;
\r