(* ========================================================================== *)
(* FLYSPECK - BOOK FORMALIZATION                                              *)
(*                                                                            *)
(* Chapter: Packing                                                           *)
(* Lemma: TSKAJXY                                                             *)
(* Author: Vu Khac Ky                                                         *)
(* Date: 2012-11                                                              *)
(* ========================================================================== *)


module Tskajxy_lemmas = struct

open Sphere;;
open Euler_main_theorem;;
open Pack_defs;;
open Pack_concl;; 
open Pack1;;
open Pack2;;
open Packing3;;
open Rogers;; 
open Vukhacky_tactics;;
open Marchal_cells;;
open Emnwuus;;
(* open Marchal_cells_2;; *)
open Marchal_cells_2_new;;
open Urrphbz1;;
open Lepjbdj;;
open Hdtfnfz;;
open Rvfxzbu;;
open Sltstlo;;
open Urrphbz2;;
open Urrphbz3;;
open Ynhyjit;;
open Njiutiu;;
open Tezffsk;;
open Qzksykg;;
open Ddzuphj;;
open Ajripqn;;
open Qzyzmjc;;
open Upfzbzm_support_lemmas;;
open Marchal_cells_3;;
open Grutoti;;
open Kizhltl;;
open Sum_gammax_lmfun_estimate;; 
open Upfzbzm;;
open Rdwkarc;;
open Ineq;;
open Merge_ineq;;
open Hales_tactic;;
open Collect_geom;;

(* ------------------------------------------------------------------------ *)
(*                     Changed by Vu Khac Ky - 15 Nov 2012                  *)
(*   The tactic SET_TAC has been changed collect_geom.hl, therefore         *)
(*   other files cannot be processed. It causes some troubles,              *)
(*    so I change it back to the original one here.                         *)
(* ------------------------------------------------------------------------ *)

let SET_TAC =
  let PRESET_TAC =
    POP_ASSUM_LIST(K ALL_TAC) THEN REPEAT COND_CASES_TAC THEN
    REWRITE_TAC[EXTENSION; SUBSET; PSUBSET; DISJOINT; SING] THEN
    REWRITE_TAC[NOT_IN_EMPTY; IN_UNIV; IN_UNION; IN_INTER; IN_DIFF; IN_INSERT;
                IN_DELETE; IN_REST; IN_INTERS; IN_UNIONS; IN_IMAGE;
                IN_ELIM_THM; IN] in
  fun ths ->
    (if ths = [] then ALL_TAC else MP_TAC(end_itlist CONJ ths)) THEN
    PRESET_TAC THEN
    MESON_TAC[];;

let SET_RULE tm = prove(tm,SET_TAC[]);;

(* ------------------------------------------------------------------------ *)

let AFF_GE_1_3 = 
prove(`!x u v w. DISJOINT {x} {u, v, w} ==> aff_ge {x} {u, v, w} = {y | ?t1 t2 t3 t4. &0 <= t2 /\ &0 <= t3 /\ &0 <= t4 /\ t1 + t2 + t3 + t4 = &1 /\ y = t1 % x + t2 % u + t3 % v + t4 % w}`,
AFF_TAC);;
(* ------------------------------------------------------------------------ *)
let KY_COPLANAR_3 = 
prove ( `!a b c:real^3. coplanar {a,b,c}`,
REPEAT GEN_TAC THEN REWRITE_TAC[coplanar] THEN EXISTS_TAC `a:real^3` THEN EXISTS_TAC `b:real^3` THEN EXISTS_TAC `c:real^3` THEN REWRITE_TAC[Qzksykg.SET_SUBSET_AFFINE_HULL]);;
(* ------------------------------------------------------------------------ *)
let NEGLIGIBLE_MEASURE_UNION_klema = 
prove_by_refinement ( `!s t. measurable s /\ measurable t /\ negligible t ==> vol (s UNION t) = vol s`,
[(REPEAT STRIP_TAC); (REWRITE_WITH `vol (s UNION t) = vol s + vol t - vol (s INTER t)`); (ASM_SIMP_TAC[MEASURE_UNION]); (REWRITE_WITH `vol t = &0`); (ASM_SIMP_TAC[MEASURE_EQ_0]); (REWRITE_WITH `vol (s INTER t) = &0`); (MATCH_MP_TAC MEASURE_EQ_0); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `t:real^3->bool` THEN ASM_REWRITE_TAC[] THEN SET_TAC[]); (REAL_ARITH_TAC)]);;
(* ------------------------------------------------------------------------ *)
let SOL_SOLID_TRIANGLE = 
prove_by_refinement ( `!v0 v1 v2 v3 a123 a231 a312. ~coplanar {v0, v1, v2, v3} /\ a = dihV v0 v1 v2 v3 /\ b = dihV v0 v2 v3 v1 /\ c = dihV v0 v3 v1 v2 ==> sol v0 (convex hull {v0,v1,v2,v3}) = a + b + c - pi`,
[(REPEAT STRIP_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} = 4`); (MATCH_MP_TAC Collect_geom2.NOT_COPLANAR_IMP_CARD4); (ASM_REWRITE_TAC[coplanar_alt; GSYM Trigonometry2.coplanar1]); (NEW_GOAL `~(v0 = v1:real^3) /\ ~(v0 = v2) /\ ~(v0 = v3) /\ ~(v1 = v2) /\ ~(v1 = v3) /\ ~(v2 = v3)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v0 = v1:real^3`; SET_RULE `{v1, v1, v2, v3} = {v1,v2,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v0 = v2:real^3`; SET_RULE `{v2, v1, v2, v3} = {v1,v2,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v0 = v3:real^3`; SET_RULE `{v3, v1, v2, v3} = {v1,v2,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v1 = v2:real^3`; SET_RULE `{v0, v2, v2, v3} = {v0,v2,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v1 = v3:real^3`; SET_RULE `{v0, v3, v2, v3} = {v0,v2,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {v0, v1, v2, v3:real^3} <= 3`); (REWRITE_TAC[ASSUME `v2 = v3:real^3`; SET_RULE `{v0, v1, v3, v3} = {v0,v1,v3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (REWRITE_TAC[sol]); (ABBREV_TAC `s = closest_point (convex hull {v1,v2,v3:real^3}) v0`); (NEW_GOAL `s IN convex hull {v1,v2,v3:real^3} /\ (!y. y IN convex hull {v1,v2,v3} ==> dist (v0,s) <= dist (v0,y))`); (EXPAND_TAC "s"); (MATCH_MP_TAC CLOSEST_POINT_EXISTS); (STRIP_TAC); (MATCH_MP_TAC Marchal_cells_2_new.CLOSED_CONVEX_HULL_FINITE); (REWRITE_TAC[Geomdetail.FINITE6]); (REWRITE_TAC[CONVEX_HULL_EQ_EMPTY] THEN SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (ABBREV_TAC `r = dist (v0, s:real^3)`); (ABBREV_TAC `C = convex hull {v0,v1,v2,v3:real^3}`); (NEW_GOAL `r > &0 /\ measurable (C INTER normball (v0:real^3) r) /\ radial_norm r v0 (C INTER normball v0 r)`); (NEW_GOAL `r > &0`); (EXPAND_TAC "r"); (REWRITE_TAC[NORM_ARITH `dist (x,y) > &0 <=> ~(x = y)`]); (STRIP_TAC); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (REWRITE_TAC[coplanar]); (EXISTS_TAC `v1:real^3` THEN EXISTS_TAC `v2:real^3` THEN EXISTS_TAC `v3:real^3`); (REWRITE_TAC[SUBSET; SET_RULE `a IN {x,y,z,t} <=> a=x\/a=y\/a=z\/a=t`]); (REPEAT STRIP_TAC); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC (SET_RULE `(?s. a IN s /\ s SUBSET t) ==> a IN t`)); (EXISTS_TAC `convex hull {v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[CONVEX_HULL_SUBSET_AFFINE_HULL]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC (SET_RULE `(?s. a IN s /\ s SUBSET t) ==> a IN t`)); (EXISTS_TAC `{v1,v2,v3:real^3}`); (REWRITE_TAC[Qzksykg.SET_SUBSET_AFFINE_HULL]); (SET_TAC[]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC (SET_RULE `(?s. a IN s /\ s SUBSET t) ==> a IN t`)); (EXISTS_TAC `{v1,v2,v3:real^3}`); (REWRITE_TAC[Qzksykg.SET_SUBSET_AFFINE_HULL]); (SET_TAC[]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC (SET_RULE `(?s. a IN s /\ s SUBSET t) ==> a IN t`)); (EXISTS_TAC `{v1,v2,v3:real^3}`); (REWRITE_TAC[Qzksykg.SET_SUBSET_AFFINE_HULL]); (SET_TAC[]); (ASM_REWRITE_TAC[]); (NEW_GOAL `measurable (C INTER normball (v0:real^3) r)`); (MATCH_MP_TAC MEASURABLE_INTER); (REWRITE_TAC[NORMBALL_BALL; MEASURABLE_BALL]); (EXPAND_TAC "C"); (MATCH_MP_TAC MEASURABLE_CONVEX_HULL); (MATCH_MP_TAC FINITE_IMP_BOUNDED); (REWRITE_TAC[Geomdetail.FINITE6]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM Marchal_cells_2_new.RADIAL_VS_RADIAL_NORM; radial]); (REWRITE_TAC[NORMBALL_BALL; SET_RULE `a INTER s SUBSET s`]); (REWRITE_TAC[IN_INTER]); (EXPAND_TAC "C"); (REWRITE_TAC[Marchal_cells_2_new.CONVEX_HULL_4; IN; IN_ELIM_THM]); (REPEAT STRIP_TAC); (EXISTS_TAC `&1 - t * (v + w + z)`); (EXISTS_TAC `t*v` THEN EXISTS_TAC `t*w` THEN EXISTS_TAC `t*z`); (NEW_GOAL `&0 <= t`); (ASM_REAL_ARITH_TAC); (ASM_SIMP_TAC[REAL_LE_MUL]); (REWRITE_TAC[REAL_ARITH `&1 - t * (v + w + z) + t * v + t * w + t * z = &1`]); (STRIP_TAC); (REWRITE_TAC[REAL_ARITH `&0 <= a - b <=> ~(a < b)`]); (STRIP_TAC); (ABBREV_TAC `t' = &1 / (v + w + z)`); (NEW_GOAL `v0 + t' % u IN convex hull {v1,v2,v3:real^3}`); (REWRITE_TAC[IN; CONVEX_HULL_3; IN_ELIM_THM]); (EXISTS_TAC `v/(v+w+z)` THEN EXISTS_TAC `w/(v+w+z)` THEN EXISTS_TAC `z/(v+w+z)`); (REPEAT STRIP_TAC); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (REWRITE_TAC[REAL_ARITH `a/x+b/x+c/x = (a+b+c)/x`]); (MATCH_MP_TAC REAL_DIV_REFL); (STRIP_TAC); (UNDISCH_TAC `&1 < t * (v + w + z)` THEN ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (REWRITE_TAC[VECTOR_ARITH `v / (v + w + z) % v1 + w / (v + w + z) % v2 + z / (v + w + z) % v3 = (&1/(v+w+z)) % (v%v1+w%v2+z%v3)`]); (REWRITE_WITH `v%v1+w%v2+z%v3 = (v0:real^3) + u - u' % v0`); (UNDISCH_TAC `v0 + u = u' % v0 + v % v1 + w % v2 + z % (v3:real^3)`); (VECTOR_ARITH_TAC); (MATCH_MP_TAC Trigonometry2.VECTOR_MUL_R_TO_L); (STRIP_TAC); (STRIP_TAC); (UNDISCH_TAC `&1 < t * (v + w + z)` THEN ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (REWRITE_TAC[VECTOR_ARITH `(v + w + z) % (v0 + t' % u) = v0 + u - u' % v0 <=> (u' + v + w + z) % v0 + ((v + w + z) * t') % u = v0 + u`]); (EXPAND_TAC "t'" THEN REWRITE_TAC[ASSUME `u' + v + w + z = &1`; ARITH_RULE `x * &1 / x = x / x`; VECTOR_ARITH `&1 % x + y = x + z <=> y = z`]); (REWRITE_WITH `(v + w + z) / (v + w + z) = &1`); (MATCH_MP_TAC REAL_DIV_REFL); (STRIP_TAC); (UNDISCH_TAC `&1 < t * (v + w + z)` THEN ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (VECTOR_ARITH_TAC); (NEW_GOAL `r <= dist(v0:real^3, v0 + t' % u)`); (ASM_SIMP_TAC[]); (NEW_GOAL `t' < t:real`); (REWRITE_TAC[REAL_ARITH `a < b <=> ~(b <= a)`] THEN STRIP_TAC); (NEW_GOAL `t' * (v+ w + z) = &1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (REWRITE_WITH `&1 = t' * (v + w + z) <=> &1/(v+w+z) = t'`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC REAL_EQ_LDIV_EQ); (NEW_GOAL `&0 <= v + w + z`); (ASM_SIMP_TAC[REAL_LE_ADD]); (NEW_GOAL `~(v + w + z = &0)`); (STRIP_TAC); (UNDISCH_TAC `&1 < t * (v + w + z)` THEN ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (ASM_REAL_ARITH_TAC); (ASM_REWRITE_TAC[]); (NEW_GOAL `t * (v + w + z) <= t' * (v + w + z)`); (REWRITE_TAC[REAL_ARITH `a * x <= b * x <=> &0 <= (b - a) * x`]); (MATCH_MP_TAC REAL_LE_MUL); (ASM_SIMP_TAC[REAL_LE_ADD]); (ASM_REAL_ARITH_TAC); (ASM_REAL_ARITH_TAC); (NEW_GOAL `v0 + t' % u IN ball (v0:real^3, r)`); (REWRITE_TAC[IN_BALL; dist; VECTOR_ARITH `v0 - (v0 + t' % u) = --t' % u`]); (REWRITE_TAC[NORM_MUL; REAL_ARITH `abs (-- t) = abs (t)`]); (REWRITE_WITH `abs (t') = t'`); (REWRITE_TAC[REAL_ABS_REFL]); (EXPAND_TAC "t'" THEN MATCH_MP_TAC REAL_LE_DIV THEN ASM_SIMP_TAC[REAL_LE_ADD]); (REAL_ARITH_TAC); (NEW_GOAL `t' * norm u <= t * norm (u:real^3)`); (REWRITE_TAC[REAL_ARITH `a * x <= b * x <=> &0 <= (b - a) * x`]); (MATCH_MP_TAC REAL_LE_MUL); (ASM_SIMP_TAC[NORM_POS_LE]); (ASM_REAL_ARITH_TAC); (ASM_REAL_ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[IN_BALL]); (ASM_REAL_ARITH_TAC); (REWRITE_TAC[VECTOR_ARITH `v0 + t % u = (&1 - t * (v + w + z)) % v0 + (t * v) % v1 + (t * w) % v2 + (t * z) % v3 <=> t % u = t % (v % v1 + w % v2 + z % v3 - (v+w+z) % v0)`]); (AP_TERM_TAC); (REWRITE_TAC[VECTOR_ARITH `u = v % v1 + w % v2 + z % v3 - (v + w + z) % v0 <=> (u'+v+w+z) % v0 + u = u' % v0 + v % v1 + w % v2 + z % v3 `]); (ASM_REWRITE_TAC[VECTOR_ARITH `&1 % a = a`]); (REWRITE_TAC[MESON[IN] `(V:real^3->bool) x <=> x IN V`]); (REWRITE_TAC[IN_BALL; dist; VECTOR_ARITH `v0 - (v0 + t' % u) = --t' % u`]); (REWRITE_TAC[NORM_MUL; REAL_ARITH `abs (-- t) = abs (t)`]); (REWRITE_WITH `abs (t) = t`); (REWRITE_TAC[REAL_ABS_REFL]); (ASM_REAL_ARITH_TAC); (ASM_REWRITE_TAC[]); (ASM_SIMP_TAC[sol]); (NEW_GOAL `C INTER normball v0 r = aff_ge {v0:real^3} {v1,v2,v3} INTER normball v0 r`); (MATCH_MP_TAC (SET_RULE `A SUBSET B /\ B SUBSET A ==> A = B`)); (STRIP_TAC); (MATCH_MP_TAC (SET_RULE `A SUBSET B ==> A INTER C SUBSET B INTER C`)); (EXPAND_TAC "C"); (NEW_GOAL `DISJOINT {v0} {v1,v2,v3:real^3}`); (REWRITE_TAC[DISJOINT; SET_RULE `{v0} INTER {v1, v2, v3} = {} <=> ~(v0 = v1 \/ v0 = v2 \/ v0 = v3)`]); (REPEAT STRIP_TAC); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{a,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{c,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{d,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (ASM_SIMP_TAC[AFF_GE_1_3]); (EXPAND_TAC "C" THEN REWRITE_TAC[SUBSET; CONVEX_HULL_4; IN; IN_ELIM_THM]); (REPEAT STRIP_TAC); (EXISTS_TAC `u:real` THEN EXISTS_TAC `v:real` THEN EXISTS_TAC `w:real` THEN EXISTS_TAC `z:real` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[SUBSET; IN_INTER]); (NEW_GOAL `DISJOINT {v0} {v1,v2,v3:real^3}`); (REWRITE_TAC[DISJOINT; SET_RULE `{v0} INTER {v1, v2, v3} = {} <=> ~(v0 = v1 \/ v0 = v2 \/ v0 = v3)`]); (REPEAT STRIP_TAC); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{a,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{c,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{d,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (ASM_SIMP_TAC[AFF_GE_1_3]); (EXPAND_TAC "C" THEN REWRITE_TAC[SUBSET; CONVEX_HULL_4; IN; IN_ELIM_THM]); (REPEAT STRIP_TAC); (EXISTS_TAC `t1:real` THEN EXISTS_TAC `t2:real` THEN EXISTS_TAC `t3:real` THEN EXISTS_TAC `t4:real` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `&0 <= s <=> ~(s < &0)`] THEN STRIP_TAC); (NEW_GOAL `&1 < t2 + t3 + t4`); (ASM_REAL_ARITH_TAC); (ABBREV_TAC `u = &1 / (t2 + t3 + t4)`); (NEW_GOAL `v0 + u % (x - v0) IN convex hull {v1,v2,v3:real^3}`); (REWRITE_TAC[IN; CONVEX_HULL_3; IN_ELIM_THM]); (EXISTS_TAC `t2/(t2+t3+t4)` THEN EXISTS_TAC `t3/(t2+t3+t4)` THEN EXISTS_TAC `t4/(t2+t3+t4)`); (REPEAT STRIP_TAC); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (MATCH_MP_TAC REAL_LE_DIV); (ASM_SIMP_TAC[REAL_LE_ADD]); (REWRITE_TAC[REAL_ARITH `a/x+b/x+c/x = (a+b+c)/x`]); (MATCH_MP_TAC REAL_DIV_REFL); (ASM_REAL_ARITH_TAC); (REWRITE_TAC[VECTOR_ARITH `v / (v + w + z) % v1 + w / (v + w + z) % v2 + z / (v + w + z) % v3 = (&1/(v+w+z)) % (v%v1+w%v2+z%v3)`]); (REWRITE_WITH `t2 % v1 + t3 % v2 + t4 % v3 = (x - v0:real^3) + (&1 - t1) % v0`); (UNDISCH_TAC `x = t1 % v0 + t2 % v1 + t3 % v2 + t4 % (v3:real^3)`); (VECTOR_ARITH_TAC); (MATCH_MP_TAC Trigonometry2.VECTOR_MUL_R_TO_L); (STRIP_TAC); (ASM_REAL_ARITH_TAC); (REWRITE_TAC[VECTOR_ARITH `(t2 + t3 + t4) % (v0 + u % (x - v0)) = x - v0 + (&1 - t1) % v0 <=> (t1 + t2 + t3 + t4) % v0 + ((t2 + t3 + t4) * u) % (x - v0) = v0 + (x - v0)`]); (EXPAND_TAC "u" THEN REWRITE_TAC[ASSUME `t1 + t2 + t3 + t4 = &1`; ARITH_RULE `x * &1 / x = x / x`; VECTOR_ARITH `&1 % x + y = x + z <=> y = z`]); (REWRITE_WITH `(t2 + t3 + t4) / (t2 + t3 + t4) = &1`); (MATCH_MP_TAC REAL_DIV_REFL); (ASM_REAL_ARITH_TAC); (VECTOR_ARITH_TAC); (NEW_GOAL `r <= dist(v0:real^3, v0 + u % (x - v0))`); (ASM_SIMP_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[dist; VECTOR_ARITH `v0 - (v0 + u % (x - v0)) = --u % (x - v0)`; NORM_MUL; REAL_ARITH `abs (-- t) = abs (t)`]); (REWRITE_WITH `abs (u) = u`); (REWRITE_TAC[REAL_ABS_REFL]); (EXPAND_TAC "u"); (MATCH_MP_TAC REAL_LE_DIV); (ASM_REAL_ARITH_TAC); (REWRITE_TAC[GSYM dist]); (REWRITE_TAC[REAL_ARITH `a < b <=> ~(b <= a)`] THEN STRIP_TAC); (NEW_GOAL `u * dist (x,v0:real^3) <= dist (x,v0:real^3)`); (REWRITE_TAC[REAL_ARITH `a * b <= b <=> &0 <= (&1 - a) * b`]); (MATCH_MP_TAC REAL_LE_MUL); (REWRITE_TAC[DIST_POS_LE; REAL_ARITH `&0 <= a - b <=> b <= a`]); (EXPAND_TAC "u"); (REWRITE_WITH `&1 / (t2 + t3 + t4) <= &1 <=> &1 <= (t2 + t3 + t4)`); (MATCH_MP_TAC Packing3.REAL_DIV_LE_1); (ASM_REAL_ARITH_TAC); (ASM_REAL_ARITH_TAC); (NEW_GOAL `r <= dist (v0, x:real^3)`); (ONCE_REWRITE_TAC[DIST_SYM] THEN ASM_REAL_ARITH_TAC); (UNDISCH_TAC `normball (v0:real^3) r x` THEN REWRITE_TAC[NORMBALL_BALL]); (REWRITE_TAC[MESON[IN] `(V:real^3->bool) x <=> x IN V`; IN_BALL]); (ASM_REAL_ARITH_TAC); (ASM_REWRITE_TAC[]); (REWRITE_WITH `vol (aff_ge {v0} {v1, v2, v3} INTER normball v0 r) = vol (ball (v0,r) INTER aff_gt {v0} {v1, v2, v3})`); (REWRITE_TAC[SET_RULE `a INTER normball v0 r = normball v0 r INTER a`]); (REWRITE_TAC[NORMBALL_BALL]); (REWRITE_WITH `aff_ge {v0} {v1, v2, v3:real^3} = aff_gt {v0} {v1, v2, v3} UNION UNIONS {aff_ge {v0} ({v1, v2, v3} DELETE a) | a | a IN {v1, v2, v3}}`); (MATCH_MP_TAC AFF_GE_AFF_GT_DECOMP); (REWRITE_TAC[Geomdetail.FINITE6]); (REWRITE_TAC[DISJOINT; SET_RULE `{v0} INTER {v1, v2, v3} = {} <=> ~(v0 = v1 \/ v0 = v2 \/ v0 = v3)`]); (REPEAT STRIP_TAC); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{a,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{c,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (UNDISCH_TAC `~coplanar {v0,v1,v2,v3:real^3}`); (ASM_REWRITE_TAC[SET_RULE `{d,a,c,d} = {a,c,d}`; KY_COPLANAR_3]); (REWRITE_TAC[SET_RULE `A INTER (B UNION C) = (A INTER B) UNION (A INTER C)`]); (MATCH_MP_TAC NEGLIGIBLE_MEASURE_UNION_klema); (REWRITE_TAC[MEASURABLE_BALL_AFF_GT]); (STRIP_TAC); (REWRITE_WITH `ball (v0:real^3,r) INTER UNIONS {aff_ge {v0} ({v1, v2, v3} DELETE a) | a | a IN {v1, v2, v3}} = UNIONS {ball (v0,r) INTER aff_ge {v0} ({v1, v2, v3} DELETE a) | a | a IN {v1, v2, v3}}`); (REWRITE_TAC[SET_EQ_LEMMA; IN_INTER; IN_UNIONS] THEN REPEAT STRIP_TAC); (EXISTS_TAC `ball (v0:real^3, r) INTER t`); (STRIP_TAC); (DEL_TAC THEN UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN DEL_TAC THEN UP_ASM_TAC THEN SET_TAC[]); (NEW_GOAL `(t:real^3->bool) SUBSET ball(v0:real^3, r)`); (DEL_TAC THEN UP_ASM_TAC THEN REWRITE_TAC[IN; IN_ELIM_THM] THEN STRIP_TAC); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN UP_ASM_TAC THEN SET_TAC[]); (SWITCH_TAC THEN UP_ASM_TAC THEN ONCE_REWRITE_TAC[IN] THEN REWRITE_TAC[IN_ELIM_THM] THEN STRIP_TAC); (EXISTS_TAC `aff_ge {v0:real^3} ({v1, v2, v3} DELETE a')`); (ONCE_REWRITE_TAC[MESON[IN] `(V:real^3->bool) x <=> x IN V`]); (STRIP_TAC); (EXISTS_TAC `a':real^3`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN DEL_TAC THEN UP_ASM_TAC THEN SET_TAC[]); (MATCH_MP_TAC MEASURABLE_UNIONS); (REPEAT STRIP_TAC); (ABBREV_TAC `fun = (\a:real^3. ball (v0,r) INTER aff_ge {v0} ({v1, v2, v3} DELETE a))`); (REWRITE_WITH `{ball (v0,r) INTER aff_ge {v0} ({v1, v2, v3} DELETE a) | a | a IN {v1, v2, v3}} = {fun a | a | a IN {v1,v2,v3:real^3}}`); (EXPAND_TAC "fun" THEN REWRITE_TAC[]); (REWRITE_WITH `{(fun:real^3->real^3->bool) a | a IN {v1, v2, v3:real^3}} = {y | ?a. a IN {v1,v2,v3} /\ y = fun a}`); (ONCE_REWRITE_TAC[SET_EQ_LEMMA]); (ONCE_REWRITE_TAC[IN]); (REWRITE_TAC[IN_ELIM_THM]); (MATCH_MP_TAC FINITE_IMAGE_EXPAND); (REWRITE_TAC[Geomdetail.FINITE6]); (UP_ASM_TAC THEN REWRITE_TAC[IN; IN_ELIM_THM] THEN REPEAT STRIP_TAC); (ASM_REWRITE_TAC[MEASURABLE_BALL_AFF_GE]); (MATCH_MP_TAC NEGLIGIBLE_INTER); (DISJ2_TAC); (MATCH_MP_TAC NEGLIGIBLE_UNIONS); (STRIP_TAC); (ABBREV_TAC `fun = (\a:real^3. aff_ge {v0} ({v1, v2, v3} DELETE a))`); (REWRITE_WITH `{aff_ge {v0} ({v1, v2, v3} DELETE a) | a | a IN {v1, v2, v3}} = {fun a | a | a IN {v1,v2,v3:real^3}}`); (EXPAND_TAC "fun" THEN REWRITE_TAC[]); (REWRITE_WITH `{(fun:real^3->real^3->bool) a | a IN {v1, v2, v3:real^3}} = {y | ?a. a IN {v1,v2,v3} /\ y = fun a}`); (ONCE_REWRITE_TAC[SET_EQ_LEMMA]); (ONCE_REWRITE_TAC[IN]); (REWRITE_TAC[IN_ELIM_THM]); (MATCH_MP_TAC FINITE_IMAGE_EXPAND); (REWRITE_TAC[Geomdetail.FINITE6]); (ONCE_REWRITE_TAC[IN] THEN REWRITE_TAC[SET_RULE `a IN {x,y,z} <=> a = x \/ a = y \/ a = z`; IN_ELIM_THM] THEN REPEAT STRIP_TAC); (ASM_REWRITE_TAC[]); (REWRITE_WITH `{v1, v2, v3} DELETE v1 = {v2,v3:real^3}`); (UNDISCH_TAC `~(v0 = v1:real^3) /\ ~(v0 = v2) /\ ~(v0 = v3) /\ ~(v1 = v2) /\ ~(v1 = v3) /\ ~(v2 = v3)`); (SET_TAC[]); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0,v2,v3:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (REWRITE_TAC[SET_RULE `{a,b,c} = {a} UNION {b,c}`]); (REWRITE_TAC[AFF_GE_SUBSET_AFFINE_HULL]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `{v1, v2, v3} DELETE v2 = {v1,v3:real^3}`); (UNDISCH_TAC `~(v0 = v1:real^3) /\ ~(v0 = v2) /\ ~(v0 = v3) /\ ~(v1 = v2) /\ ~(v1 = v3) /\ ~(v2 = v3)`); (SET_TAC[]); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0,v1,v3:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (REWRITE_TAC[SET_RULE `{a,b,c} = {a} UNION {b,c}`]); (REWRITE_TAC[AFF_GE_SUBSET_AFFINE_HULL]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `{v1, v2, v3} DELETE v3 = {v1,v2:real^3}`); (UNDISCH_TAC `~(v0 = v1:real^3) /\ ~(v0 = v2) /\ ~(v0 = v3) /\ ~(v1 = v2) /\ ~(v1 = v3) /\ ~(v2 = v3)`); (SET_TAC[]); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0,v1,v2:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (REWRITE_TAC[SET_RULE `{a,b,c} = {a} UNION {b,c}`]); (REWRITE_TAC[AFF_GE_SUBSET_AFFINE_HULL]); (REWRITE_WITH `vol (ball (v0,r) INTER aff_gt {v0} {v1, v2, v3}) = (let a123 = dihV v0 v1 v2 v3 in let a231 = dihV v0 v2 v3 v1 in let a312 = dihV v0 v3 v1 v2 in (a123 + a231 + a312 - pi) * r pow 3 / &3)`); (MATCH_MP_TAC VOLUME_SOLID_TRIANGLE); (ASM_REWRITE_TAC[]); (ASM_REAL_ARITH_TAC); (REPEAT LET_TAC); (REWRITE_TAC[REAL_ARITH `&3 * (x * r pow 3 / &3) / r pow 3 = x * (r pow 3 / r pow 3)`]); (REWRITE_WITH `r pow 3 / r pow 3 = &1`); (MATCH_MP_TAC REAL_DIV_REFL); (REWRITE_TAC[REAL_POW_EQ_0; ARITH_RULE `~(3 = 0)`]); (ASM_REAL_ARITH_TAC); (REAL_ARITH_TAC)]);;
(* ---------------------------------------------------------------------- *)
let DIHX_DIH_Y_lemma = 
prove_by_refinement ( `!V X ul u0 u1 u2 u3 i y1 y2 y3 y4 y5 y6. saturated V /\ packing V /\ barV V 3 ul /\ i >= 4 /\ X = mcell i V ul /\ ~NULLSET X /\ ul = [u0; u1; u2; u3] /\ dist (u0,u1) = y1 /\ dist (u0,u2) = y2 /\ dist (u0,u3) = y3 /\ dist (u2,u3) = y4 /\ dist (u1,u3) = y5 /\ dist (u1,u2) = y6 ==> dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`,
[(REPEAT GEN_TAC THEN STRIP_TAC); (NEW_GOAL `~(X:real^3->bool = {})`); (STRIP_TAC THEN UNDISCH_TAC `~NULLSET X` THEN REWRITE_TAC[ASSUME `X:real^3->bool = {}`; NEGLIGIBLE_EMPTY]); (NEW_GOAL `X = mcell4 V ul`); (ASM_REWRITE_TAC[]); (ASM_SIMP_TAC[MCELL_EXPLICIT]); (UP_ASM_TAC THEN REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REWRITE_TAC[ASSUME `ul = [u0; u1; u2; u3:real^3]`; set_of_list]); (STRIP_TAC); (NEW_GOAL `VX V X = {u0,u1,u2,u3}`); (REWRITE_WITH `VX V X = V INTER X`); (MATCH_MP_TAC Hdtfnfz.HDTFNFZ); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 4 V ul`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_WITH `V INTER mcell 4 V ul = set_of_list (truncate_simplex (4 - 1) ul)`); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH ` mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; TRUNCATE_SIMPLEX_EXPLICIT_3; set_of_list]); (* ---------------------------------------------------------------- *) (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} = 4`); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`; GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (NEW_GOAL `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u1:real^3`; SET_RULE `{u1, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u2:real^3`; SET_RULE `{u2, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u3:real^3`; SET_RULE `{u3, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u2:real^3`; SET_RULE `{u0, u2, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u3:real^3`; SET_RULE `{u0, u3, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u2 = u3:real^3`; SET_RULE `{u0, u1, u3, u3} = {u0,u1,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `edgeX V X = {{u0,u1:real^3}, {u0,u2}, {u0,u3}, {u1,u2}, {u1,u3}, {u2,u3}}`); (REWRITE_TAC[edgeX]); (ONCE_REWRITE_TAC[SET_EQ_LEMMA]); (REWRITE_TAC[IN_ELIM_THM]); (REPEAT STRIP_TAC); (UNDISCH_TAC `VX V X u` THEN UNDISCH_TAC `VX V X v`); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (ASM_REWRITE_TAC[SET_RULE `v IN {u0, u1, u2, u3} <=> v = u0 \/ v = u1 \/ v = u2 \/ v = u3`]); (REPEAT STRIP_TAC); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[SET_RULE `x IN {a,b,c,d,e,f} <=> x = a \/ x = b \/ x = c \/ x = d \/ x = e \/ x = f`]); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (ASM_REWRITE_TAC[SET_RULE `v IN {u0, u1, u2, u3} <=> v = u0 \/ v = u1 \/ v = u2 \/ v = u3`]); (REPEAT STRIP_TAC); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u1:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u2:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (* ==================================== *) (REPEAT STRIP_TAC); (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u0; u1] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (EXISTS_TAC `(4, ul:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (REWRITE_TAC[INITIAL_SUBLIST]); (EXISTS_TAC `[u2;u3:real^3]` THEN REWRITE_TAC[APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u0 = v0:real^3`); (NEW_GOAL`u0 = HD [u0;u1:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u0 = HD[u0;u1:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u0;u1:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u1:real^3] = truncate_simplex (LENGTH [u0;u1] - 1) ul' /\ LENGTH [u0;u1] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u1 = v1:real^3`); (NEW_GOAL`u1 = EL 1 [u0;u1:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u1 = EL 1 [u0;u1:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u0;u1:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u1:real^3] = truncate_simplex (LENGTH [u0;u1] - 1) ul' /\ LENGTH [u0;u1] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u2 /\ v3 = u3:real^3) \/ (v2 = u3 /\ v3 = u2)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u1 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REFL_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u1 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym; DIST_SYM]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u0; u2] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u0;u2;u1;u3:real^3]`); (* Need to list properties of wl at this point *) (NEW_GOAL `?p. p permutes 0..3 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_3_EXISTS); (STRIP_TAC); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `4` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(4, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (REWRITE_WITH `mcell i V [u0; u1; u2; u3] = mcell 4 V [u0; u1; u2; u3]`); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u0; u2; u1; u3] = APPEND [u0; u2] [u1; u3:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u0 = v0:real^3`); (NEW_GOAL`u0 = HD [u0;u2:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u0 = HD[u0;u2:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u0;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u2:real^3] = truncate_simplex (LENGTH [u0;u2] - 1) ul' /\ LENGTH [u0;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u2 = v1:real^3`); (NEW_GOAL`u2 = EL 1 [u0;u2:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u2 = EL 1 [u0;u2:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u0;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u2:real^3] = truncate_simplex (LENGTH [u0;u2] - 1) ul' /\ LENGTH [u0;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u1 /\ v3 = u3:real^3) \/ (v2 = u3 /\ v3 = u1)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym; DIST_SYM]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u0; u3] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u0;u3;u1;u2:real^3]`); (* Need to list properties of wl at this point *) (NEW_GOAL `?p. p permutes 0..3 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_3_EXISTS); (STRIP_TAC); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `4` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(4, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (REWRITE_WITH `mcell i V [u0; u1; u2; u3] = mcell 4 V [u0; u1; u2; u3]`); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u0; u3; u1; u2] = APPEND [u0; u3] [u1; u2:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u0 = v0:real^3`); (NEW_GOAL`u0 = HD [u0;u3:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u0 = HD[u0;u3:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u0;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u3:real^3] = truncate_simplex (LENGTH [u0;u3] - 1) ul' /\ LENGTH [u0;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u3 = v1:real^3`); (NEW_GOAL`u3 = EL 1 [u0;u3:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u3 = EL 1 [u0;u3:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u0;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u3:real^3] = truncate_simplex (LENGTH [u0;u3] - 1) ul' /\ LENGTH [u0;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u1 /\ v3 = u2:real^3) \/ (v2 = u2 /\ v3 = u1)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym; Nonlinear_lemma.dih_y_sym2; DIST_SYM]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym; Nonlinear_lemma.dih_y_sym2; DIST_SYM]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u2; u3] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u2;u3;u0;u1:real^3]`); (* Need to list properties of wl at this point *) (NEW_GOAL `?p. p permutes 0..3 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_3_EXISTS); (STRIP_TAC); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `4` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(4, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (REWRITE_WITH `mcell i V [u0; u1; u2; u3] = mcell 4 V [u0; u1; u2; u3]`); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u2; u3; u0; u1] = APPEND [u2; u3] [u0; u1:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u2 = v0:real^3`); (NEW_GOAL`u2 = HD [u2;u3:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u2 = HD[u2;u3:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u2;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u2;u3:real^3] = truncate_simplex (LENGTH [u2;u3] - 1) ul' /\ LENGTH [u2;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u3 = v1:real^3`); (NEW_GOAL`u3 = EL 1 [u2;u3:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u3 = EL 1 [u2;u3:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u2;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u2;u3:real^3] = truncate_simplex (LENGTH [u2;u3] - 1) ul' /\ LENGTH [u2;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u0 /\ v3 = u1:real^3) \/ (v2 = u1 /\ v3 = u0)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u2 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (REWRITE_WITH `dih_y (dist (u2,u3)) (dist (u0,u2)) (dist (u1,u2)) (dist (u0,u1)) (dist (u1,u3:real^3)) (dist (u0,u3)) = dih_y (dist (u2,u3)) (dist (u1,u2)) (dist (u0,u2)) (dist (u0,u1)) (dist (u0,u3)) (dist (u1,u3:real^3))`); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym]); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym2]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u2 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (REWRITE_WITH `dih_y (dist (u2,u3)) (dist (u0,u2)) (dist (u1,u2)) (dist (u0,u1)) (dist (u1,u3)) (dist (u0,u3:real^3)) = dih_y (dist (u2,u3)) (dist (u1,u2)) (dist (u0,u2)) (dist (u0,u1)) (dist (u0,u3)) (dist (u1,u3))`); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym]); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym2]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u1; u3] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u1;u3;u0;u2:real^3]`); (* Need to list properties of wl at this point *) (NEW_GOAL `?p. p permutes 0..3 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_3_EXISTS); (STRIP_TAC); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `4` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(4, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (REWRITE_WITH `mcell i V [u0; u1; u2; u3] = mcell 4 V [u0; u1; u2; u3]`); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u1; u3; u0; u2] = APPEND [u1; u3] [u0; u2:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u1 = v0:real^3`); (NEW_GOAL`u1 = HD [u1;u3:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u1 = HD[u1;u3:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u1;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u3:real^3] = truncate_simplex (LENGTH [u1;u3] - 1) ul' /\ LENGTH [u1;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u3 = v1:real^3`); (NEW_GOAL`u3 = EL 1 [u1;u3:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u3 = EL 1 [u1;u3:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u1;u3:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u3:real^3] = truncate_simplex (LENGTH [u1;u3] - 1) ul' /\ LENGTH [u1;u3] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u0 /\ v3 = u2:real^3) \/ (v2 = u2 /\ v3 = u0)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u1 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u1 = v0:real^3`); GSYM (ASSUME `u3 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u1; u2] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u1;u2;u0;u3:real^3]`); (* Need to list properties of wl at this point *) (NEW_GOAL `?p. p permutes 0..3 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_3_EXISTS); (STRIP_TAC); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `4` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(4, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `4 <= 4`]); (STRIP_TAC); (REWRITE_WITH `mcell i V [u0; u1; u2; u3] = mcell 4 V [u0; u1; u2; u3]`); (MESON_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; ARITH_RULE `4 >= 4`]); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `4 IN {0,1,2,3,4}`; ARITH_RULE `4 - 1 = 3`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u1; u2; u0; u3] = APPEND [u1; u2] [u0; u3:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 4`); (NEW_GOAL `4 = k /\ (!t. 4 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 4 V ul = X`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (MESON_TAC[MCELL_EXPLICIT; ARITH_RULE `4 >= 4`; ASSUME `i >= 4`]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (REWRITE_TAC[dihu4]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u1 = v0:real^3`); (NEW_GOAL`u1 = HD [u1;u2:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u1 = HD[u1;u2:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u1;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u2:real^3] = truncate_simplex (LENGTH [u1;u2] - 1) ul' /\ LENGTH [u1;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u2 = v1:real^3`); (NEW_GOAL`u2 = EL 1 [u1;u2:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u2 = EL 1 [u1;u2:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u1;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u2:real^3] = truncate_simplex (LENGTH [u1;u2] - 1) ul' /\ LENGTH [u1;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3}`); (NEW_GOAL `{u0,u1,u2,u3:real^3} = {v0,v1,v2,v3} <=> convex hull {u0,u1,u2,u3:real^3} = convex hull {v0,v1,v2,v3}`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Packing3.CONVEX_HULL_EQ_EQ_SET_EQ); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (STRIP_TAC); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC Rogers.BARV_AFFINE_INDEPENDENT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[ASSUME `{u0, u1, u2, u3:real^3} = {v0, v1, v2, v3} <=> convex hull {u0, u1, u2, u3} = convex hull {v0, v1, v2, v3}`]); (REWRITE_TAC[GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`); GSYM (ASSUME `ul' = [v0;v1;v2;v3:real^3]`)]); (REWRITE_WITH `convex hull set_of_list ul= X:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REFL_TAC); (NEW_GOAL `F`); (NEW_GOAL `X:real^3->bool = {}`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 4`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REFL_TAC); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `3 = SUC 2 /\ 2 = SUC 1 /\ 1 = SUC 0`]); (NEW_GOAL `(v2 = u0 /\ v3 = u3:real^3) \/ (v2 = u3 /\ v3 = u0)`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u1 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v3:real^3`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `v2:real^3`); (ONCE_REWRITE_TAC[SET_RULE ` {v0, v1, v3, v2} = {v0, v1, v2, v3}`]); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {v0, v1, v2, v3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {v0, v1, v2,v3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `k = 4`; ASSUME `X = mcell k V ul'`]); (REWRITE_WITH `mcell 4 V ul' = mcell4 V ul'`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `u1 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`)]); (EXPAND_TAC "y1" THEN EXPAND_TAC "y2" THEN EXPAND_TAC "y3"); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_TAC[DIST_SYM]); (REWRITE_TAC[Nonlinear_lemma.dih_y_sym]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (4 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell 4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH `mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_3]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (STRIP_TAC); (NEW_GOAL `CARD (set_of_list [(HD ul'):real^3]) = CARD (set_of_list (ul:(real^3)list))`); (AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_WITH `CARD (set_of_list (ul:(real^3)list)) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[set_of_list; Geomdetail.CARD_SING] THEN ARITH_TAC); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2,u3:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (STRIP_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[])]);;
(* ---------------------------------------------------------------------- *)
let SOL_SOL_Y_EXPLICIT = 
prove_by_refinement ( `!V X ul u0 u1 u2 u3 i y1 y2 y3 y4 y5 y6. saturated V /\ packing V /\ barV V 3 ul /\ i >= 4 /\ X = mcell i V ul /\ ~NULLSET X /\ ul = [u0; u1; u2; u3] /\ dist (u0,u1) = y1 /\ dist (u0,u2) = y2 /\ dist (u0,u3) = y3 /\ dist (u2,u3) = y4 /\ dist (u1,u3) = y5 /\ dist (u1,u2) = y6 ==> sol u0 X = sol_y y1 y2 y3 y4 y5 y6 /\ sol u1 X = sol_y y1 y5 y6 y4 y2 y3 /\ sol u2 X = sol_y y4 y2 y6 y1 y5 y3 /\ sol u3 X = sol_y y4 y5 y3 y1 y2 y6`,
[(REPEAT GEN_TAC THEN STRIP_TAC); (NEW_GOAL `~(X:real^3->bool = {})`); (STRIP_TAC THEN UNDISCH_TAC `~NULLSET X` THEN REWRITE_TAC[ASSUME `X:real^3->bool = {}`; NEGLIGIBLE_EMPTY]); (NEW_GOAL `X = mcell4 V ul`); (ASM_REWRITE_TAC[]); (ASM_SIMP_TAC[MCELL_EXPLICIT]); (UP_ASM_TAC THEN REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REWRITE_TAC[ASSUME `ul = [u0; u1; u2; u3:real^3]`; set_of_list]); (STRIP_TAC); (NEW_GOAL `VX V X = {u0,u1,u2,u3}`); (REWRITE_WITH `VX V X = V INTER X`); (MATCH_MP_TAC Hdtfnfz.HDTFNFZ); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 4 V ul`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_WITH `V INTER mcell 4 V ul = set_of_list (truncate_simplex (4 - 1) ul)`); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH ` mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; TRUNCATE_SIMPLEX_EXPLICIT_3; set_of_list]); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} = 4`); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`; GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (NEW_GOAL `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u1:real^3`; SET_RULE `{u1, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u2:real^3`; SET_RULE `{u2, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u3:real^3`; SET_RULE `{u3, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u2:real^3`; SET_RULE `{u0, u2, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u3:real^3`; SET_RULE `{u0, u3, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u2 = u3:real^3`; SET_RULE `{u0, u1, u3, u3} = {u0,u1,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `~(coplanar {u0,u1,u2,u3:real^3})`); (REWRITE_TAC[coplanar] THEN STRIP_TAC); (NEW_GOAL `affine hull {u0, u1, u2, u3:real^3} SUBSET affine hull (affine hull {u, v, w})`); (ASM_SIMP_TAC[Marchal_cells_2_new.AFFINE_SUBSET_KY_LEMMA]); (UP_ASM_TAC THEN REWRITE_WITH `affine hull (affine hull {u, v, w}) = affine hull {u:real^3, v, w}`); (REWRITE_TAC[AFFINE_HULL_EQ; AFFINE_AFFINE_HULL]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u0, u1, u2, u3:real^3}`); (STRIP_TAC); (MATCH_MP_TAC NEGLIGIBLE_SUBSET); (EXISTS_TAC `affine hull {u,v,w:real^3}`); (REWRITE_TAC[NEGLIGIBLE_AFFINE_HULL_3]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell i V ul`]); (REWRITE_WITH `mcell i V ul = mcell4 V ul`); (MESON_TAC[ARITH_RULE `4 >= 4`; MCELL_EXPLICIT; ASSUME `i >= 4`]); (REWRITE_TAC[mcell4]); (COND_CASES_TAC); (ASM_REWRITE_TAC[set_of_list; CONVEX_HULL_SUBSET_AFFINE_HULL]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REPEAT STRIP_TAC); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y1 y2 y3 y4 y5 y6 = dihV (u0:real^3) u1 u2 u3`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u1,u3,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y2 y3 y1 y5 y6 y4 = dihV (u0:real^3) u2 u3 u1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u2:real^3)) (dist (u0,u3)) (dist (u0,u1)) (dist (u1,u3)) (dist (u1,u2)) (dist (u2,u3)) = dih_y (dist (u0,u2)) (dist (u0,u3)) (dist (u0,u1)) (dist (u3,u1)) (dist (u2,u1)) (dist (u2,u3))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,u3,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,u1,u3} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y3 y1 y2 y6 y4 y5 = dihV (u0:real^3) u3 u1 u2`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u3)) (dist (u0,u1)) (dist (u0,u2)) (dist (u1,u2)) (dist (u2,u3:real^3)) (dist (u1,u3)) = dih_y (dist (u0,u3)) (dist (u0,u1)) (dist (u0,u2)) (dist (u1,u2)) (dist (u3,u2)) (dist (u3,u1))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u0,u3,u1,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u3, u2,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = convex hull {u0,u1,u2,u3:real^3}`); (ASM_SIMP_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; mcell4; set_of_list]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ASM_REWRITE_TAC[]); (* ----- *) (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y1 y5 y6 y4 y2 y3 = dihV (u1:real^3) u0 u3 u2`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u1)) (dist (u1,u3)) (dist (u1,u2)) (dist (u2,u3)) (dist (u0,u2:real^3)) (dist (u0,u3)) = dih_y (dist (u1,u0)) (dist (u1,u3)) (dist (u1,u2)) (dist (u3,u2)) (dist (u0,u2)) (dist (u0,u3))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,u3,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,u2,u3} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y5 y6 y1 y2 y3 y4 = dihV (u1:real^3) u3 u2 u0`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u3)) (dist (u1,u2)) (dist (u0,u1)) (dist (u0,u2)) (dist (u0,u3:real^3)) (dist (u2,u3)) = dih_y (dist (u1,u3)) (dist (u1,u2)) (dist (u1,u0)) (dist (u2,u0)) (dist (u3,u0)) (dist (u3,u2))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u1,u3,u2,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u3,u0,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y6 y1 y5 y3 y4 y2 = dihV (u1:real^3) u2 u0 u3`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u2)) (dist (u0,u1)) (dist (u1,u3)) (dist (u0,u3)) (dist (u2,u3:real^3)) (dist (u0,u2)) = dih_y (dist (u1,u2)) (dist (u1,u0)) (dist (u1,u3)) (dist (u0,u3)) (dist (u2,u3)) (dist (u2,u0))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u2,u0,u3} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u2, u3,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = convex hull {u0,u1,u2,u3:real^3}`); (ASM_SIMP_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; mcell4; set_of_list]); (ONCE_REWRITE_TAC[SET_RULE `{u0,u1,u2,u3} = {u1,u2,u0,u3}`]); (ONCE_REWRITE_TAC[REAL_ARITH `a + b + c - s = c + a + b - s`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ONCE_REWRITE_TAC[GSYM (SET_RULE `{u0,u1,u2,u3} = {u1,u2,u0,u3}`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y4 y2 y6 y1 y5 y3 = dihV (u2:real^3) u3 u0 u1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u2,u3)) (dist (u0,u2)) (dist (u1,u2)) (dist (u0,u1)) (dist (u1,u3:real^3)) (dist (u0,u3)) = dih_y (dist (u2,u3)) (dist (u2,u0)) (dist (u2,u1)) (dist (u0,u1)) (dist (u3,u1)) (dist (u3,u0))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u2,u3,u0,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u3,u1,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y2 y6 y4 y5 y3 y1 = dihV (u2:real^3) u0 u1 u3`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u2)) (dist (u1,u2)) (dist (u2,u3)) (dist (u1,u3)) (dist (u0,u3:real^3)) (dist (u0,u1)) = dih_y (dist (u2,u0)) (dist (u2,u1)) (dist (u2,u3)) (dist (u1,u3)) (dist (u0,u3)) (dist (u0,u1))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u0,u1,u3} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2, u0, u3,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y6 y4 y2 y3 y1 y5 = dihV (u2:real^3) u1 u3 u0`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u2)) (dist (u2,u3)) (dist (u0,u2)) (dist (u0,u3)) (dist (u0,u1:real^3)) (dist (u1,u3)) = dih_y (dist (u2,u1)) (dist (u2,u3)) (dist (u2,u0)) (dist (u3,u0)) (dist (u1,u0)) (dist (u1,u3))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,u3,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u3:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,u0,u3} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = convex hull {u0,u1,u2,u3:real^3}`); (ASM_SIMP_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; mcell4; set_of_list]); (ONCE_REWRITE_TAC[SET_RULE `{u0,u1,u2,u3} = {u2,u3,u0,u1}`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ONCE_REWRITE_TAC[SET_RULE `{u2,u3,u0,u1} = {u0, u1, u2, u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y4 y5 y3 y1 y2 y6 = dihV (u3:real^3) u2 u1 u0`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u2,u3)) (dist (u1,u3)) (dist (u0,u3)) (dist (u0,u1)) (dist (u0,u2)) (dist (u1,u2)) = dih_y (dist (u3,u2)) (dist (u3,u1)) (dist (u3,u0)) (dist (u1,u0)) (dist (u2,u0:real^3)) (dist (u2,u1))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u3,u2,u1,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u3,u2,u0,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y5 y3 y4 y2 y6 y1 = dihV (u3:real^3) u1 u0 u2`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u3)) (dist (u0,u3)) (dist (u2,u3)) (dist (u0,u2)) (dist (u1,u2:real^3)) (dist (u0,u1)) = dih_y (dist (u3,u1)) (dist (u3,u0)) (dist (u3,u2)) (dist (u0,u2)) (dist (u1,u2)) (dist (u1,u0))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{u3,u1,u0,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u3, u1, u2,u0} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y3 y4 y5 y6 y1 y2 = dihV (u3:real^3) u0 u2 u1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y1"); (EXPAND_TAC "y2"); (EXPAND_TAC "y3"); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u3)) (dist (u2,u3)) (dist (u1,u3)) (dist (u1,u2)) (dist (u0,u1:real^3)) (dist (u0,u2)) = dih_y (dist (u3,u0)) (dist (u3,u2)) (dist (u3,u1)) (dist (u2,u1)) (dist (u0,u1)) (dist (u0,u2:real^3))`); (REWRITE_TAC[DIST_SYM]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u3,u0,u2,u1} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u3,u0,u1,u2} = {u0,u1,u2,u3}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = convex hull {u0,u1,u2,u3:real^3}`); (ASM_SIMP_TAC[MCELL_EXPLICIT; ASSUME `i >= 4`; mcell4; set_of_list]); (ONCE_REWRITE_TAC[SET_RULE `{u0,u1,u2,u3} = {u3,u0,u2,u1}`]); (ONCE_REWRITE_TAC[REAL_ARITH `a + b + c - s = c + a + b - s`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ONCE_REWRITE_TAC[GSYM (SET_RULE `{u0,u1,u2,u3} = {u3, u0, u2, u1}`)]); (ASM_REWRITE_TAC[]); (STRIP_TAC THEN NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[])]);;
(* ---------------------------------------------------------------------- *)
let gammaX_gamm4fgcy = 
prove_by_refinement ( `!V X ul u0 u1 u2 u3 i y1 y2 y3 y4 y5 y6. saturated V /\ packing V /\ barV V 3 ul /\ i >= 4 /\ X = mcell i V ul /\ ~NULLSET X /\ ul = [u0; u1; u2; u3] /\ dist (u0,u1) = y1 /\ dist (u0,u2) = y2 /\ dist (u0,u3) = y3 /\ dist (u2,u3) = y4 /\ dist (u1,u3) = y5 /\ dist (u1,u2) = y6 ==> vol X = vol_y y1 y2 y3 y4 y5 y6 /\ gammaX V X lmfun = gamma4fgcy y1 y2 y3 y4 y5 y6 lmfun`,
[(REPEAT GEN_TAC THEN STRIP_TAC); (NEW_GOAL `~(X:real^3->bool = {})`); (STRIP_TAC THEN UNDISCH_TAC `~NULLSET X` THEN REWRITE_TAC[ASSUME `X:real^3->bool = {}`; NEGLIGIBLE_EMPTY]); (NEW_GOAL `X = mcell4 V ul`); (ASM_REWRITE_TAC[]); (ASM_SIMP_TAC[MCELL_EXPLICIT]); (UP_ASM_TAC THEN REWRITE_TAC[mcell4]); (COND_CASES_TAC); (REWRITE_TAC[ASSUME `ul = [u0; u1; u2; u3:real^3]`; set_of_list]); (STRIP_TAC); (NEW_GOAL `VX V X = {u0,u1,u2,u3}`); (REWRITE_WITH `VX V X = V INTER X`); (MATCH_MP_TAC Hdtfnfz.HDTFNFZ); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 4 V ul`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (REWRITE_WITH `V INTER mcell 4 V ul = set_of_list (truncate_simplex (4 - 1) ul)`); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 4 /\ 4 <= 4`]); (REWRITE_WITH ` mcell 4 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (MESON_TAC[ARITH_RULE `4 >= 4`; ASSUME `i >= 4`; MCELL_EXPLICIT]); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `4 - 1 = 3`; TRUNCATE_SIMPLEX_EXPLICIT_3; set_of_list]); (REWRITE_TAC[gammaX; gamma4fgcy;gamma4f]); (REWRITE_WITH `vol X = vol_y y1 y2 y3 y4 y5 y6`); (REWRITE_TAC[vol_y; y_of_x; vol_x; ASSUME `X = convex hull {u0, u1, u2, u3:real^3}`; VOLUME_OF_CLOSED_TETRAHEDRON; REAL_POW_2]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[REAL_ARITH `a - b + c = a - d <=> d = b - c`; vol4f]); (* ---------------------------------------------------------------- *) (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} = 4`); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`; GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (NEW_GOAL `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u1:real^3`; SET_RULE `{u1, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u2:real^3`; SET_RULE `{u2, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u3:real^3`; SET_RULE `{u3, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u2:real^3`; SET_RULE `{u0, u2, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u3:real^3`; SET_RULE `{u0, u3, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u2 = u3:real^3`; SET_RULE `{u0, u1, u3, u3} = {u0,u1,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `edgeX V X = {{u0,u1:real^3}, {u0,u2}, {u0,u3}, {u1,u2}, {u1,u3}, {u2,u3}}`); (REWRITE_TAC[edgeX]); (ONCE_REWRITE_TAC[SET_EQ_LEMMA]); (REWRITE_TAC[IN_ELIM_THM]); (REPEAT STRIP_TAC); (UNDISCH_TAC `VX V X u` THEN UNDISCH_TAC `VX V X v`); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (ASM_REWRITE_TAC[SET_RULE `v IN {u0, u1, u2, u3} <=> v = u0 \/ v = u1 \/ v = u2 \/ v = u3`]); (REPEAT STRIP_TAC); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[SET_RULE `x IN {a,b,c,d,e,f} <=> x = a \/ x = b \/ x = c \/ x = d \/ x = e \/ x = f`]); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (ASM_REWRITE_TAC[SET_RULE `v IN {u0, u1, u2, u3} <=> v = u0 \/ v = u1 \/ v = u2 \/ v = u3`]); (REPEAT STRIP_TAC); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u1:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u2:real^3` THEN EXISTS_TAC `u3:real^3` THEN ASM_REWRITE_TAC[]); (ABBREV_TAC `f = (\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (MATCH_MP_TAC (REAL_ARITH `y = b /\ x = a ==> a - b = x - y`)); (STRIP_TAC); (AP_TERM_TAC); (ASM_REWRITE_TAC[]); (ABBREV_TAC `S5 = {{u0, u2}, {u0, u3}, {u1, u2}, {u1, u3}, {u2, u3:real^3}}`); (REWRITE_WITH `sum ({u0,u1:real^3} INSERT S5) f = (if {u0,u1} IN S5 then sum S5 f else f {u0,u1} + sum S5 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S5"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S5"); (REWRITE_TAC[SET_RULE `x IN {a,b,c,d,e} <=> x=a\/x=b\/x=c\/x=d\/x=e`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S5"); (ABBREV_TAC `S4 = {{u0, u3}, {u1, u2}, {u1, u3}, {u2, u3:real^3}}`); (REWRITE_WITH `sum ({u0,u2:real^3} INSERT S4) f = (if {u0,u2} IN S4 then sum S4 f else f {u0,u2} + sum S4 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S4"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S4"); (REWRITE_TAC[SET_RULE `x IN {a,b,c,d} <=> x=a\/x=b\/x=c\/x=d`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S4"); (ABBREV_TAC `S3 = {{u1, u2}, {u1, u3}, {u2, u3:real^3}}`); (REWRITE_WITH `sum ({u0,u3:real^3} INSERT S3) f = (if {u0,u3} IN S3 then sum S3 f else f {u0,u3} + sum S3 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S3"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S3"); (REWRITE_TAC[SET_RULE `x IN {a,b,c} <=> x=a\/x=b\/x=c`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S3"); (ABBREV_TAC `S2 = {{u1, u3}, {u2, u3:real^3}}`); (REWRITE_WITH `sum ({u1,u2:real^3} INSERT S2) f = (if {u1,u2} IN S2 then sum S2 f else f {u1,u2} + sum S2 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S2"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S2"); (REWRITE_TAC[SET_RULE `x IN {a,b} <=> x=a\/x=b`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S2"); (ABBREV_TAC `S1 = {{u2, u3:real^3}}`); (REWRITE_WITH `sum ({u1,u3:real^3} INSERT S1) f = (if {u1,u3} IN S1 then sum S1 f else f {u1,u3} + sum S1 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S1"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S1"); (REWRITE_TAC[SET_RULE `x IN {a} <=> x=a`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S1" THEN REWRITE_TAC[SUM_SING]); (* ========================================================================= *) (REWRITE_WITH `f {u0, u1:real^3} = lmfun (y1 / &2) * dih_y y1 y2 y3 y4 y5 y6`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u0, u1} = (g u0 u1):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y1" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u0,u1:real^3) = y1`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ========================================================================= *) (REWRITE_WITH `f {u0, u2:real^3} = lmfun (y2 / &2) * dih_y y2 y3 y1 y5 y6 y4`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u0, u2} = (g u0 u2):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y2" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u0,u2:real^3) = y2`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S5" THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ========================================================================= *) (REWRITE_WITH `f {u0, u3:real^3} = lmfun (y3 / &2) * dih_y y3 y1 y2 y6 y4 y5`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u0, u3} = (g u0 u3):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y3" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u0,u3:real^3) = y3`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S5" THEN EXPAND_TAC "S4" THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ========================================================================= *) (REWRITE_WITH `f {u2, u3:real^3} = lmfun (y4 / &2) * dih_y y4 y3 y5 y1 y6 y2`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u2, u3} = (g u2 u3):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y4" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u2,u3:real^3) = y4`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S5" THEN EXPAND_TAC "S4" THEN EXPAND_TAC "S3" THEN EXPAND_TAC "S2" THEN EXPAND_TAC "S1"THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ========================================================================= *) (REWRITE_WITH `f {u1, u3:real^3} = lmfun (y5 / &2) * dih_y y5 y1 y6 y2 y4 y3`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u1, u3} = (g u1 u3):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y5" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u1,u3:real^3) = y5`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S5" THEN EXPAND_TAC "S4" THEN EXPAND_TAC "S3" THEN EXPAND_TAC "S2" THEN EXPAND_TAC "S1"THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ========================================================================= *) (REWRITE_WITH `f {u1, u2:real^3} = lmfun (y6 / &2) * dih_y y6 y1 y5 y3 y4 y2`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u1, u2} = (g u1 u2):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y6" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u1,u2:real^3) = y6`]); (REWRITE_WITH `dihX V X (u0,u1) = dih_y y1 y2 y3 y4 y5 y6 /\ dihX V X (u0,u2) = dih_y y2 y3 y1 y5 y6 y4 /\ dihX V X (u0,u3) = dih_y y3 y1 y2 y6 y4 y5 /\ dihX V X (u2,u3) = dih_y y4 y3 y5 y1 y6 y2 /\ dihX V X (u1,u3) = dih_y y5 y1 y6 y2 y4 y3 /\ dihX V X (u1,u2) = dih_y y6 y1 y5 y3 y4 y2`); (MATCH_MP_TAC DIHX_DIH_Y_lemma); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S5" THEN EXPAND_TAC "S4" THEN EXPAND_TAC "S3" THEN EXPAND_TAC "S2" THEN EXPAND_TAC "S1"THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (* ==================================== *) (REAL_ARITH_TAC); (AP_TERM_TAC); (REWRITE_TAC[total_solid]); (REWRITE_TAC[ASSUME `VX V X = {u0,u1,u2,u3}`]); (ABBREV_TAC `h = (\x. sol x X)`); (ABBREV_TAC `S3 = {u1,u2,u3:real^3}`); (REWRITE_WITH `sum (u0:real^3 INSERT S3) h = (if u0 IN S3 then sum S3 h else h u0 + sum S3 h)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S3"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S3"); (REWRITE_TAC[SET_RULE `x IN {a,b,c} <=> x=a\/x=b\/x=c`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S3"); (ABBREV_TAC `S2 = {u2,u3:real^3}`); (REWRITE_WITH `sum (u1:real^3 INSERT S2) h = (if u1 IN S2 then sum S2 h else h u1 + sum S2 h)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S2"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S2"); (REWRITE_TAC[SET_RULE `x IN {a,b} <=> x = a \/ x = b`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S2"); (ABBREV_TAC `S1 = {u3:real^3}`); (REWRITE_WITH `sum (u2:real^3 INSERT S1) h = (if u2 IN S1 then sum S1 h else h u2 + sum S1 h)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S1"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S1"); (REWRITE_TAC[SET_RULE `x IN {a} <=> x = a`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S1" THEN REWRITE_TAC[SUM_SING]); (EXPAND_TAC "h" THEN REWRITE_TAC[BETA_THM]); (REWRITE_WITH `sol u0 X = sol_y y1 y2 y3 y4 y5 y6 /\ sol u1 X = sol_y y1 y5 y6 y4 y2 y3 /\ sol u2 X = sol_y y4 y2 y6 y1 y5 y3 /\ sol u3 X = sol_y y4 y5 y3 y1 y2 y6`); (MATCH_MP_TAC SOL_SOL_Y_EXPLICIT); (EXISTS_TAC `V:real^3->bool` THEN EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `i:num`); (ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (STRIP_TAC THEN NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[])]);;
(* ---------------------------------------------------------------------- *) (* ====================================================================== *)
let gammaX_gamma3f = 
prove_by_refinement ( `!V X ul u0 u1 u2 u3 y4 y5 y6. saturated V /\ packing V /\ barV V 3 ul /\ X = mcell 3 V ul /\ ~NULLSET X /\ ul = [u0; u1; u2; u3] /\ dist (u1, u2) = y4 /\ dist (u0, u2) = y5 /\ dist (u0, u1) = y6 ==> vol X = vol_y sqrt2 sqrt2 sqrt2 y4 y5 y6 /\ sol u0 X = sol_y y5 y6 sqrt2 sqrt2 sqrt2 y4 /\ sol u1 X = sol_y y6 y4 sqrt2 sqrt2 sqrt2 y5 /\ sol u2 X = sol_y y4 y5 sqrt2 sqrt2 sqrt2 y6 /\ dihX V X (u0,u1) = dih_y y6 y4 sqrt2 sqrt2 sqrt2 y5 /\ dihX V X (u0,u2) = dih_y y5 y6 sqrt2 sqrt2 sqrt2 y4 /\ dihX V X (u1,u2) = dih_y y4 y5 sqrt2 sqrt2 sqrt2 y6 /\ gammaX V X lmfun = gamma3f y4 y5 y6 sqrt2 lmfun`,
[(REPEAT GEN_TAC THEN STRIP_TAC); (NEW_GOAL `~(X:real^3->bool = {})`); (STRIP_TAC THEN UNDISCH_TAC `~NULLSET X` THEN REWRITE_TAC[ASSUME `X:real^3->bool = {}`; NEGLIGIBLE_EMPTY]); (NEW_GOAL `X = mcell3 V ul`); (ASM_REWRITE_TAC[]); (ASM_SIMP_TAC[MCELL_EXPLICIT]); (UP_ASM_TAC THEN REWRITE_TAC[mcell3]); (COND_CASES_TAC); (STRIP_TAC); (NEW_GOAL `(?s. between s (omega_list_n V ul 2,omega_list_n V ul 3) /\ dist (u0,s) = sqrt (&2) /\ mxi V ul = s)`); (MATCH_MP_TAC MXI_EXPLICIT); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u2:real^3` THEN EXISTS_TAC `u3:real^3`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (ABBREV_TAC `s2 = omega_list_n V ul 2`); (ABBREV_TAC `s3 = omega_list_n V ul 3`); (ABBREV_TAC `vl = truncate_simplex 2 (ul:(real^3)list)`); (NEW_GOAL `s2 IN voronoi_list V vl`); (EXPAND_TAC "s2" THEN EXPAND_TAC "vl"); (MATCH_MP_TAC Rogers.OMEGA_LIST_N_IN_VORONOI_LIST_GEN); (EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `s3 IN voronoi_list V vl`); (EXPAND_TAC "s3" THEN EXPAND_TAC "vl"); (MATCH_MP_TAC Rogers.OMEGA_LIST_N_IN_VORONOI_LIST_GEN); (EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `s IN voronoi_list V vl`); (MATCH_MP_TAC (SET_RULE `(?x. s IN x /\ x SUBSET t)==> s IN t`)); (EXISTS_TAC `convex hull {s2,s3:real^3}`); (STRIP_TAC); (ASM_REWRITE_TAC[GSYM BETWEEN_IN_CONVEX_HULL]); (NEW_GOAL `voronoi_list V vl = convex hull (voronoi_list V vl)`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (REWRITE_TAC[CONVEX_HULL_EQ; Packing3.CONVEX_VORONOI_LIST]); (ONCE_REWRITE_TAC[ASSUME `voronoi_list V vl = convex hull voronoi_list V vl`]); (MATCH_MP_TAC Marchal_cells.CONVEX_HULL_SUBSET); (ASM_SET_TAC[]); (MP_TAC (ASSUME `s IN voronoi_list V vl`)); (EXPAND_TAC "vl" THEN REWRITE_TAC[ASSUME `ul = [u0;u1;u2;u3:real^3]`; TRUNCATE_SIMPLEX_EXPLICIT_2; VORONOI_LIST; VORONOI_SET; set_of_list; SET_RULE `x IN {a,b,c} <=> x=a\/x=b\/x=c`; IN_INTERS]); (STRIP_TAC); (NEW_GOAL `s IN voronoi_closed V u0 /\ s IN voronoi_closed V u1 /\ s IN voronoi_closed V (u2:real^3)`); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[voronoi_closed; IN; IN_ELIM_THM] THEN STRIP_TAC); (NEW_GOAL `u0 IN V /\ u1 IN V /\ u2 IN V /\ (u3:real^3) IN V`); (REWRITE_TAC[SET_RULE `u0 IN V /\ u1 IN V /\ u2 IN V /\ (u3:real^3) IN V <=> {u0,u1,u2,u3} SUBSET V`; GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (MATCH_MP_TAC BARV_SUBSET); (EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]); (FIRST_ASSUM MP_TAC THEN REWRITE_TAC[IN] THEN STRIP_TAC); (NEW_GOAL `dist (s,u1:real^3) = sqrt(&2)`); (REWRITE_TAC[GSYM (ASSUME `dist (u0:real^3, s) = sqrt (&2)`)]); (REWRITE_WITH `dist (u0,s:real^3) = dist (s,u0)`); (NORM_ARITH_TAC); (REWRITE_TAC[REAL_ARITH `a = b <=> a <= b /\ b <= a`]); (ASM_SIMP_TAC[]); (NEW_GOAL `dist (s,u2:real^3) = sqrt(&2)`); (REWRITE_TAC[GSYM (ASSUME `dist (u0:real^3, s) = sqrt (&2)`)]); (REWRITE_WITH `dist (u0,s:real^3) = dist (s,u0)`); (NORM_ARITH_TAC); (REWRITE_TAC[REAL_ARITH `a = b <=> a <= b /\ b <= a`]); (ASM_SIMP_TAC[]); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} = 4`); (REWRITE_TAC[ARITH_RULE `4 = 3 + 1`; GSYM set_of_list; GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (MATCH_MP_TAC Marchal_cells_3.BARV_CARD_LEMMA); (EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]); (NEW_GOAL `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u1:real^3`; SET_RULE `{u1, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u2:real^3`; SET_RULE `{u2, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = u3:real^3`; SET_RULE `{u3, u1, u2, u3} = {u1,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u2:real^3`; SET_RULE `{u0, u2, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = u3:real^3`; SET_RULE `{u0, u3, u2, u3} = {u0,u2,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, u3:real^3} <= 3`); (REWRITE_TAC[ASSUME `u2 = u3:real^3`; SET_RULE `{u0, u1, u3, u3} = {u0,u1,u3}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `VX V X = {u0,u1,u2}`); (REWRITE_WITH `VX V X = V INTER X`); (MATCH_MP_TAC Hdtfnfz.HDTFNFZ); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `3`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 3 V ul`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `V INTER mcell 3 V ul = set_of_list (truncate_simplex (3 - 1) ul)`); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH ` mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list]); (UNDISCH_TAC `X = convex hull (set_of_list vl UNION {mxi V ul})`); (EXPAND_TAC "vl" THEN REWRITE_TAC[set_of_list; TRUNCATE_SIMPLEX_EXPLICIT_2; ASSUME `ul = [u0;u1;u2;u3:real^3]`; SET_RULE `{a,b,c} UNION {d} = {a,b,c,d}`]); (REWRITE_WITH `mxi V [u0; u1; u2; u3] = s`); (EXPAND_TAC "s" THEN AP_TERM_TAC THEN ASM_REWRITE_TAC[]); (STRIP_TAC); (NEW_GOAL `~coplanar {u0,u1,u2,s:real^3}`); (ONCE_REWRITE_TAC[GSYM COPLANAR_AFFINE_HULL_COPLANAR]); (STRIP_TAC); (NEW_GOAL `NULLSET X`); (MATCH_MP_TAC COPLANAR_IMP_NEGLIGIBLE); (REWRITE_TAC[ASSUME `X = convex hull {u0, u1, u2, s:real^3}`]); (MATCH_MP_TAC COPLANAR_SUBSET); (EXISTS_TAC `affine hull {u0, u1, u2, s:real^3}`); (ASM_REWRITE_TAC[CONVEX_HULL_SUBSET_AFFINE_HULL]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (NEW_GOAL `CARD {u0, u1, u2, s:real^3} = 4`); (NEW_GOAL `CARD {u0, u1, u2, s:real^3} <= 4`); (REWRITE_TAC[Geomdetail.CARD4]); (ASM_CASES_TAC `CARD {u0, u1, u2, s:real^3} <= 3`); (NEW_GOAL `F`); (UNDISCH_TAC `~coplanar {u0, u1, u2, s:real^3}`); (REWRITE_TAC[] THEN MATCH_MP_TAC COPLANAR_SMALL); (ASM_REWRITE_TAC[Geomdetail.FINITE6]); (UP_ASM_TAC THEN MESON_TAC[]); (ASM_ARITH_TAC); (NEW_GOAL `~(u0 = s:real^3) /\ ~(u1 = s) /\ ~(u2 = s)`); (REPEAT STRIP_TAC); (NEW_GOAL `CARD {u0, u1, u2,s:real^3} <= 3`); (REWRITE_TAC[ASSUME `u0 = s:real^3`; SET_RULE `{s, u1, u2, s} = {s,u1,u2}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, s:real^3} <= 3`); (REWRITE_TAC[ASSUME `u1 = s:real^3`; SET_RULE `{u0, s, u2, s} = {u0,u2,s}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (NEW_GOAL `CARD {u0, u1, u2, s:real^3} <= 3`); (REWRITE_TAC[ASSUME `u2 = s:real^3`; SET_RULE `{u0, u1, s, s} = {u0,u1,s}`;Geomdetail.CARD3 ]); (ASM_ARITH_TAC); (* ========================================================================= *) (NEW_GOAL `vol X = vol_y sqrt2 sqrt2 sqrt2 y4 y5 y6`); (REWRITE_TAC[vol_y; y_of_x; vol_x; ASSUME `X = convex hull {u0, u1, u2, s:real^3}`]); (ONCE_REWRITE_TAC[SET_RULE `{u0, u1, u2,s} = {s, u0,u1, u2}`]); (REWRITE_TAC[VOLUME_OF_CLOSED_TETRAHEDRON; REAL_POW_2]); (ASM_REWRITE_TAC[]); (ONCE_REWRITE_TAC[DIST_SYM] THEN ASM_REWRITE_TAC[sqrt2]); (REWRITE_TAC[gamma3f; gammaX; vol3r;vol3f]); (REWRITE_TAC[ASSUME `vol X = vol_y sqrt2 sqrt2 sqrt2 y4 y5 y6`]); (* ========================================================================= *) (REWRITE_TAC[total_solid; ASSUME `VX V X = {u0,u1,u2:real^3}`]); (ABBREV_TAC `h = (\x. sol x X)`); (ABBREV_TAC `S2 = {u1,u2:real^3}`); (REWRITE_WITH `sum (u0:real^3 INSERT S2) h = (if u0 IN S2 then sum S2 h else h u0 + sum S2 h)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S2"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S2"); (REWRITE_TAC[SET_RULE `x IN {a,b} <=> x = a \/ x = b`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S2"); (ABBREV_TAC `S1 = {u2:real^3}`); (REWRITE_WITH `sum (u1:real^3 INSERT S1) h = (if u1 IN S1 then sum S1 h else h u1 + sum S1 h)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "S1"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "S1"); (REWRITE_TAC[SET_RULE `x IN {a} <=> x = a`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "S1" THEN REWRITE_TAC[SUM_SING]); (EXPAND_TAC "h" THEN REWRITE_TAC[BETA_THM]); (* ======================================================================== *) (REWRITE_WITH `sol u0 X = sol_y y5 y6 sqrt2 sqrt2 sqrt2 y4`); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y5 y6 sqrt2 sqrt2 sqrt2 y4 = dihV (u0:real^3) u2 u1 s`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u2)) (dist (u0,u1)) sqrt2 sqrt2 sqrt2 (dist (u1,u2)) = dih_y (dist (u0,u2)) (dist (u0,u1)) (dist (u0,s)) (dist (u1,s)) (dist (u2,s)) (dist (u2,u1:real^3))`); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,u1,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,s,u1} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y6 sqrt2 y5 sqrt2 y4 sqrt2 = dihV (u0:real^3) u1 s u2`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u1)) sqrt2 (dist (u0,u2)) sqrt2 (dist (u1,u2)) sqrt2 = dih_y (dist (u0,u1)) (dist (u0,s)) (dist (u0,u2)) (dist (s,u2)) (dist (u1,u2)) (dist (u1,s:real^3))`); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u1,s,u2} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y sqrt2 y5 y6 y4 sqrt2 sqrt2 = dihV (u0:real^3) s u2 u1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y sqrt2 (dist (u0,u2)) (dist (u0,u1)) (dist (u1,u2)) sqrt2 sqrt2 = dih_y (dist (u0,s)) (dist (u0,u2)) (dist (u0,u1)) (dist (u2,u1)) (dist (s,u1)) (dist (s,u2:real^3))`); (ASM_REWRITE_TAC[DIST_SYM;sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,s,u2,u1} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,s, u1,u2} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = convex hull {u0,u1,u2,s:real^3}`]); (ONCE_REWRITE_TAC[REAL_ARITH `a + b + c = b + a + c`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ASM_REWRITE_TAC[DIHV_SYM_2]); (* ======================================================================== *) (REWRITE_WITH `sol u1 X = sol_y y6 y4 sqrt2 sqrt2 sqrt2 y5`); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y6 y4 sqrt2 sqrt2 sqrt2 y5 = dihV (u1:real^3) u0 u2 s`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u1)) (dist (u1,u2)) sqrt2 sqrt2 sqrt2 (dist (u0,u2)) = dih_y (dist (u1,u0)) (dist (u1,u2)) (dist (u1,s)) (dist (u2,s)) (dist (u0,s)) (dist (u0,u2:real^3))`); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,u2,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,s,u2} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y4 sqrt2 y6 sqrt2 y5 sqrt2 = dihV (u1:real^3) u2 s u0`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u2)) sqrt2 (dist (u0,u1)) sqrt2 (dist (u0,u2)) sqrt2 = dih_y (dist (u1,u2)) (dist (u1,s)) (dist (u1,u0)) (dist (s,u0)) (dist (u2,u0)) (dist (u2,s:real^3))`); (REWRITE_WITH `dist (s,u0:real^3) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u2,s,u0} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u2,u0,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y sqrt2 y6 y4 y5 sqrt2 sqrt2 = dihV (u1:real^3) s u0 u2`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y sqrt2 (dist (u0,u1)) (dist (u1,u2)) (dist (u0,u2)) sqrt2 sqrt2 = dih_y (dist (u1,s)) (dist (u1,u0)) (dist (u1,u2)) (dist (u0,u2)) (dist (s,u2)) (dist (s,u0:real^3))`); (REWRITE_WITH `dist (s,u0:real^3) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM;sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,s,u0,u2} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,s, u2,u0} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = convex hull {u0,u1,u2,s:real^3}`]); (ONCE_REWRITE_TAC[SET_RULE `{u0, u1, u2, s} = {u1,u0,u2,s}`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ONCE_REWRITE_TAC[GSYM (SET_RULE `{u0, u1, u2, s} = {u1,u0,u2,s}`)]); (ASM_REWRITE_TAC[]); (* ======================================================================== *) (REWRITE_WITH `sol u2 X = sol_y y4 y5 sqrt2 sqrt2 sqrt2 y6`); (REWRITE_TAC[sol_y]); (REWRITE_WITH `dih_y y4 y5 sqrt2 sqrt2 sqrt2 y6 = dihV (u2:real^3) u1 u0 s`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u1,u2)) (dist (u0,u2)) sqrt2 sqrt2 sqrt2 (dist (u0,u1)) = dih_y (dist (u2,u1)) (dist (u2,u0)) (dist (u2,s)) (dist (u0,s)) (dist (u1,s)) (dist (u1,u0:real^3))`); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,u0,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,s,u0} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y y5 sqrt2 y4 sqrt2 y6 sqrt2 = dihV (u2:real^3) u0 s u1`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y (dist (u0,u2)) sqrt2 (dist (u1,u2)) sqrt2 (dist (u0,u1)) sqrt2 = dih_y (dist (u2,u0)) (dist (u2,s)) (dist (u2,u1)) (dist (s,u1)) (dist (u0,u1)) (dist (u0,s:real^3))`); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u0,s,u1} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u0,u1,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_WITH `dih_y sqrt2 y4 y5 y6 sqrt2 sqrt2 = dihV (u2:real^3) s u1 u0`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MP_TAC Merge_ineq.DIHV_EQ_DIH_Y); (REWRITE_TAC[LET_DEF; LET_END_DEF]); (EXPAND_TAC "y4"); (EXPAND_TAC "y5"); (EXPAND_TAC "y6"); (STRIP_TAC); (REWRITE_WITH `dih_y sqrt2 (dist (u1,u2)) (dist (u0,u2)) (dist (u0,u1)) sqrt2 sqrt2 = dih_y (dist (u2,s)) (dist (u2,u1)) (dist (u2,u0)) (dist (u1,u0)) (dist (s,u0)) (dist (s,u1:real^3))`); (REWRITE_WITH `dist (s,u0:real^3) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM;sqrt2]); (FIRST_ASSUM MATCH_MP_TAC); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,s,u1,u0} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,s, u0,u1} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = convex hull {u0,u1,u2,s:real^3}`]); (ONCE_REWRITE_TAC[SET_RULE `{u0, u1, u2, s} = {u2,u1,u0,s}`]); (MATCH_MP_TAC SOL_SOLID_TRIANGLE); (ONCE_REWRITE_TAC[SET_RULE `{u2, u1, u0, s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (* ===================================================================== *) (NEW_GOAL `dihX V X (u0,u1) = dih_y y6 y4 sqrt2 sqrt2 sqrt2 y5`); (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u0; u1] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (EXISTS_TAC `(3, ul:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `3 <= 4`]); (REWRITE_TAC[INITIAL_SUBLIST]); (EXISTS_TAC `[u2;u3:real^3]` THEN REWRITE_TAC[APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 3`); (NEW_GOAL `3 = k /\ (!t. 3 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (* This part is harder than the previous *) (REWRITE_TAC[dihu3]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u0 = v0:real^3`); (NEW_GOAL`u0 = HD [u0;u1:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u0 = HD[u0;u1:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u0;u1:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u1:real^3] = truncate_simplex (LENGTH [u0;u1] - 1) ul' /\ LENGTH [u0;u1] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u1 = v1:real^3`); (NEW_GOAL`u1 = EL 1 [u0;u1:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u1 = EL 1 [u0;u1:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u0;u1:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u1:real^3] = truncate_simplex (LENGTH [u0;u1] - 1) ul' /\ LENGTH [u0;u1] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2:real^3} = {v0,v1,v2}`); (REWRITE_TAC[GSYM set_of_list]); (REWRITE_WITH `[u0; u1; u2:real^3] = truncate_simplex (3 - 1) ul`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (REWRITE_WITH `set_of_list (truncate_simplex (3 - 1) ul) = V INTER (mcell 3 V ul)`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 3 V ul'`); (ASM_MESON_TAC[]); (REWRITE_WITH `[v0; v1; v2:real^3] = truncate_simplex (3 - 1) ul'`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (NEW_GOAL `u2:real^3 = v2`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)` THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S1" THEN REWRITE_TAC[]); (SET_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `2 = SUC 1 /\ 1 = SUC 0`]); (REWRITE_WITH `mxi V [v0; v1; v2; v3] = s`); (EXPAND_TAC "s"); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_MXI_2); (EXISTS_TAC `3` THEN EXISTS_TAC `3`); (REWRITE_TAC[GSYM (ASSUME `ul' = [v0; v1; v2; v3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[SET_RULE `3 IN {2,3}`]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u1 = v1:real^3`); GSYM (ASSUME `u2 = v2:real^3`)]); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (ONCE_REWRITE_TAC[DIHV_SYM]); (REWRITE_WITH `dih_y (dist (u0,u1)) (dist (u1,u2)) sqrt2 sqrt2 sqrt2 (dist (u0,u2)) = dih_y (dist (u1,u0)) (dist (u1,u2)) (dist (u1,s)) (dist (u2,s)) (dist (u0,s)) (dist (u0,u2:real^3))`); (REWRITE_WITH `dist (u1,s) = dist (s,u1:real^3) /\ dist (u2,s) = dist (s,u2) /\ dist (s,u0) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,u2,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u2:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u1,u0,s,u2} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (3 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell 3 V ul`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list; HD]); (UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ======================================================================= *) (NEW_GOAL `dihX V X (u0,u2) = dih_y y5 y6 sqrt2 sqrt2 sqrt2 y4`); (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u0; u2] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u0;u2;u1;u3:real^3]`); (NEW_GOAL `?p. p permutes 0..2 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_2_EXISTS); (STRIP_TAC); (ASM_REWRITE_TAC[]); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `3` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `3 IN {0,1,2,3,4}`; ARITH_RULE `3 - 1 = 2`]); (REWRITE_WITH `mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(3, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `3 <= 4`]); (STRIP_TAC); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `3 IN {0,1,2,3,4}`; ARITH_RULE `3 - 1 = 2`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u0; u2; u1; u3] = APPEND [u0; u2] [u1; u3:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 3`); (NEW_GOAL `3 = k /\ (!t. 3 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (* This part is harder than the previous *) (REWRITE_TAC[dihu3]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u0 = v0:real^3`); (NEW_GOAL`u0 = HD [u0;u2:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u0 = HD[u0;u2:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u0;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u2:real^3] = truncate_simplex (LENGTH [u0;u2] - 1) ul' /\ LENGTH [u0;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u2 = v1:real^3`); (NEW_GOAL`u2 = EL 1 [u0;u2:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u2 = EL 1 [u0;u2:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u0;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u0;u2:real^3] = truncate_simplex (LENGTH [u0;u2] - 1) ul' /\ LENGTH [u0;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2:real^3} = {v0,v1,v2}`); (REWRITE_TAC[GSYM set_of_list]); (REWRITE_WITH `[u0; u1; u2:real^3] = truncate_simplex (3 - 1) ul`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (REWRITE_WITH `set_of_list (truncate_simplex (3 - 1) ul) = V INTER (mcell 3 V ul)`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 3 V ul'`); (ASM_MESON_TAC[]); (REWRITE_WITH `[v0; v1; v2:real^3] = truncate_simplex (3 - 1) ul'`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (NEW_GOAL `u1:real^3 = v2`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)` THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `2 = SUC 1 /\ 1 = SUC 0`]); (REWRITE_WITH `mxi V [v0; v1; v2; v3] = s`); (EXPAND_TAC "s"); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_MXI_2); (EXISTS_TAC `3` THEN EXISTS_TAC `3`); (REWRITE_TAC[GSYM (ASSUME `ul' = [v0; v1; v2; v3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[SET_RULE `3 IN {2,3}`]); (REWRITE_TAC[GSYM (ASSUME `u0 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`); GSYM (ASSUME `u1 = v2:real^3`)]); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (REWRITE_WITH `dih_y (dist (u0,u2)) (dist (u0,u1)) sqrt2 sqrt2 sqrt2 (dist (u1,u2)) = dih_y (dist (u0,u2)) (dist (u0,u1)) (dist (u0,s)) (dist (u1,s)) (dist (u2,s)) (dist (u2,u1:real^3))`); (REWRITE_WITH `dist (u1,s) = dist (s,u1:real^3) /\ dist (u2,s) = dist (s,u2) /\ dist (s,u0) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,u1,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u1:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u0,u2,s,u1} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (3 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell 3 V ul`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list; HD]); (UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (* ========================================================================= *) (NEW_GOAL `dihX V X (u1,u2) = dih_y y4 y5 sqrt2 sqrt2 sqrt2 y6`); (REWRITE_TAC[dihX]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (LET_TAC); (UP_ASM_TAC THEN REWRITE_TAC[cell_params_d]); (ABBREV_TAC `P = (\(k, ul). k <= 4 /\ ul IN barV V 3 /\ X = mcell k V ul /\ initial_sublist [u1; u2] ul)`); (STRIP_TAC); (NEW_GOAL `(P:num#(real^3)list->bool) ((@) P)`); (MATCH_MP_TAC SELECT_AX); (ABBREV_TAC `wl = [u1;u2;u0;u3:real^3]`); (NEW_GOAL `?p. p permutes 0..2 /\ wl:(real^3)list = left_action_list p ul`); (ASM_REWRITE_TAC[] THEN EXPAND_TAC "wl"); (MATCH_MP_TAC Marchal_cells_3.LEFT_ACTION_LIST_2_EXISTS); (ASM_REWRITE_TAC[]); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `barV V 3 wl`); (MATCH_MP_TAC Qzksykg.QZKSYKG1); (EXISTS_TAC `ul:(real^3)list` THEN EXISTS_TAC `3` THEN EXISTS_TAC `p:num->num`); (ASM_REWRITE_TAC[SET_RULE `3 IN {0,1,2,3,4}`; ARITH_RULE `3 - 1 = 2`]); (REWRITE_WITH `mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (EXISTS_TAC `(3, wl:(real^3)list)`); (EXPAND_TAC "P"); (REWRITE_TAC[BETA_THM]); (ASM_REWRITE_TAC[IN; ARITH_RULE `3 <= 4`]); (STRIP_TAC); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Rvfxzbu.RVFXZBU); (ASM_REWRITE_TAC[SET_RULE `3 IN {0,1,2,3,4}`; ARITH_RULE `3 - 1 = 2`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0; u1; u2; u3:real^3]`)]); (REWRITE_TAC[GSYM (ASSUME `wl:(real^3)list = left_action_list p ul`)]); (EXPAND_TAC "wl"); (REWRITE_WITH `[u1; u2; u0; u3] = APPEND [u1; u2] [u0; u3:real^3]`); (REWRITE_TAC[APPEND]); (REWRITE_TAC[Packing3.INITIAL_SUBLIST_APPEND]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "P" THEN REWRITE_TAC[IN]); (REPEAT STRIP_TAC); (ASM_CASES_TAC `2 <= k`); (NEW_GOAL `k = 3`); (NEW_GOAL `3 = k /\ (!t. 3 - 1 <= t /\ t <= 3 ==> omega_list_n V ul t = omega_list_n V ul' t)`); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_OMEGA_LIST_N); (ASM_REWRITE_TAC[SET_RULE `x IN {2,3,4} <=> x=2\/x=3\/x=4`]); (REWRITE_TAC[GSYM (ASSUME `ul = [u0;u1;u2;u3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `~NULLSET X`]); (ASM_ARITH_TAC); (ASM_REWRITE_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (* This part is harder than the previous *) (REWRITE_TAC[dihu3]); (NEW_GOAL `?v0 v1 v2 v3. ul' = [v0;v1;v2;v3:real^3]`); (MATCH_MP_TAC Marchal_cells.BARV_3_EXPLICIT); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN STRIP_TAC); (NEW_GOAL `u1 = v0:real^3`); (NEW_GOAL`u1 = HD [u1;u2:real^3]`); (REWRITE_TAC[HD]); (ONCE_REWRITE_TAC[ASSUME `u1 = HD[u1;u2:real^3]`]); (REWRITE_WITH `v0:real^3 = HD ul'`); (ASM_REWRITE_TAC[HD]); (REWRITE_WITH `[u1;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u2:real^3] = truncate_simplex (LENGTH [u1;u2] - 1) ul' /\ LENGTH [u1;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `u2 = v1:real^3`); (NEW_GOAL`u2 = EL 1 [u1;u2:real^3]`); (REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (ONCE_REWRITE_TAC[ASSUME `u2 = EL 1 [u1;u2:real^3]`]); (REWRITE_WITH `v1:real^3 = EL 1 ul'`); (ASM_REWRITE_TAC[EL; ARITH_RULE `1 = SUC 0`; TL; HD]); (REWRITE_WITH `[u1;u2:real^3] = truncate_simplex 1 ul'`); (NEW_GOAL `[u1;u2:real^3] = truncate_simplex (LENGTH [u1;u2] - 1) ul' /\ LENGTH [u1;u2] <= LENGTH ul'`); (MATCH_MP_TAC Packing3.INITIAL_SUBLIST_IMP_TRUNCATE_SIMPLEX); (ASM_REWRITE_TAC[LENGTH]); (ARITH_TAC); (UP_ASM_TAC THEN REWRITE_TAC[LENGTH; ARITH_RULE `SUC(SUC(0)) - 1 = 1`]); (MESON_TAC[]); (MATCH_MP_TAC Packing3.EL_TRUNCATE_SIMPLEX); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (NEW_GOAL `{u0,u1,u2:real^3} = {v0,v1,v2}`); (REWRITE_TAC[GSYM set_of_list]); (REWRITE_WITH `[u0; u1; u2:real^3] = truncate_simplex (3 - 1) ul`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (REWRITE_WITH `set_of_list (truncate_simplex (3 - 1) ul) = V INTER (mcell 3 V ul)`); (ONCE_REWRITE_TAC[EQ_SYM_EQ]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V ul = X`); (ASM_REWRITE_TAC[]); (REWRITE_WITH `X = mcell 3 V ul'`); (ASM_MESON_TAC[]); (REWRITE_WITH `[v0; v1; v2:real^3] = truncate_simplex (3 - 1) ul'`); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (NEW_GOAL `u0:real^3 = v2`); (UP_ASM_TAC THEN UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)` THEN ASM_REWRITE_TAC[]); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (ASM_REWRITE_TAC[EL;HD;TL; ARITH_RULE `2 = SUC 1 /\ 1 = SUC 0`]); (REWRITE_WITH `mxi V [v0; v1; v2; v3] = s`); (EXPAND_TAC "s"); (MATCH_MP_TAC Marchal_cells_3.MCELL_ID_MXI_2); (EXISTS_TAC `3` THEN EXISTS_TAC `3`); (REWRITE_TAC[GSYM (ASSUME `ul' = [v0; v1; v2; v3:real^3]`)]); (REWRITE_WITH `mcell 3 V ul' = X`); (ASM_MESON_TAC[]); (ASM_REWRITE_TAC[SET_RULE `3 IN {2,3}`]); (REWRITE_TAC[GSYM (ASSUME `u1 = v0:real^3`); GSYM (ASSUME `u2 = v1:real^3`); GSYM (ASSUME `u0 = v2:real^3`)]); (EXPAND_TAC "y4" THEN EXPAND_TAC "y5" THEN EXPAND_TAC "y6"); (ONCE_REWRITE_TAC[DIHV_SYM]); (REWRITE_WITH `dih_y (dist (u1,u2)) (dist (u0,u2)) sqrt2 sqrt2 sqrt2 (dist (u0,u1)) = dih_y (dist (u2,u1)) (dist (u2,u0)) (dist (u2,s)) (dist (u0,s)) (dist (u1,s)) (dist (u1,u0:real^3))`); (REWRITE_WITH `dist (u1,s) = dist (s,u1:real^3) /\ dist (u2,s) = dist (s,u2) /\ dist (s,u0) = dist (u0,s)`); (REWRITE_TAC[DIST_SYM]); (ASM_REWRITE_TAC[DIST_SYM; sqrt2]); (GMATCH_SIMP_TAC (REWRITE_RULE[LET_DEF;LET_END_DEF] DIHV_EQ_DIH_Y)); (STRIP_TAC); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `s:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,u0,s} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (MATCH_MP_TAC NOT_COPLANAR_NOT_COLLINEAR); (EXISTS_TAC `u0:real^3`); (ONCE_REWRITE_TAC[SET_RULE `{u2,u1,s,u0} = {u0,u1,u2,s}`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (ASM_ARITH_TAC); (UP_ASM_TAC THEN MESON_TAC[]); (NEW_GOAL `F`); (NEW_GOAL `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (3 - 1) ul)`); (REWRITE_TAC[ASSUME `X = mcell 3 V ul`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 3 /\ 3 <= 4`]); (REWRITE_WITH `mcell 3 V [u0; u1; u2; u3] = X`); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[]); (ASM_CASES_TAC `k = 1`); (REWRITE_WITH `V INTER (X:real^3->bool) = set_of_list (truncate_simplex (k - 1) ul')`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ); (ASM_REWRITE_TAC[ARITH_RULE `1 <= 1 /\ 1 <= 4`]); (REWRITE_WITH `mcell 1 V ul' = X`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 1`]); (ASM_REWRITE_TAC[]); (REWRITE_TAC[ARITH_RULE `1 - 1 = 0`; ASSUME `k = 1`]); (REWRITE_WITH `truncate_simplex 0 (ul':(real^3)list) = [HD ul']`); (MATCH_MP_TAC Packing3.TRUNCATE_0_EQ_HEAD); (REWRITE_WITH `LENGTH (ul':(real^3)list) = 3 + 1`); (MATCH_MP_TAC Marchal_cells_3.BARV_LENGTH_LEMMA); (EXISTS_TAC `V:real^3->bool`); (ASM_REWRITE_TAC[]); (ARITH_TAC); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list; HD]); (UNDISCH_TAC `~(u0 = u1) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3:real^3)`); (EXPAND_TAC "S2" THEN EXPAND_TAC "S1" THEN SET_TAC[]); (NEW_GOAL `k = 0`); (ASM_ARITH_TAC); (REWRITE_WITH `V INTER X = {}:real^3->bool`); (REWRITE_TAC[ASSUME `X = mcell k V ul'`; ASSUME `k = 0`]); (MATCH_MP_TAC Lepjbdj.LEPJBDJ_0); (ASM_REWRITE_TAC[]); (ASM_REWRITE_TAC[ARITH_RULE `3 - 1 = 2`; TRUNCATE_SIMPLEX_EXPLICIT_2; set_of_list]); (NEW_GOAL `u0 IN {u0,u1,u2:real^3}`); (SET_TAC[]); (UP_ASM_TAC THEN SET_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REWRITE_TAC[ASSUME `dihX V X (u0,u1) = dih_y y6 y4 sqrt2 sqrt2 sqrt2 y5`]); (REWRITE_TAC[ASSUME `dihX V X (u0,u2) = dih_y y5 y6 sqrt2 sqrt2 sqrt2 y4`]); (REWRITE_TAC[ASSUME `dihX V X (u1,u2) = dih_y y4 y5 sqrt2 sqrt2 sqrt2 y6`]); (* ======================================================================== *) (MATCH_MP_TAC ( REAL_ARITH `(a:real) = x /\ b = y /\ c = z ==> (a - b + c = x - (y - z))`)); (REPEAT STRIP_TAC); (REFL_TAC); (AP_TERM_TAC); (REAL_ARITH_TAC); (AP_TERM_TAC); (NEW_GOAL `edgeX V X = {{u0,u1:real^3}, {u0,u2}, {u1,u2}}`); (REWRITE_TAC[edgeX]); (ONCE_REWRITE_TAC[SET_EQ_LEMMA]); (REWRITE_TAC[IN_ELIM_THM]); (REPEAT STRIP_TAC); (UNDISCH_TAC `VX V X u` THEN UNDISCH_TAC `VX V X v`); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (REWRITE_TAC[ASSUME `VX V X = {u0,u1,u2}`; SET_RULE `v IN {u0, u1, u2} <=> v=u0 \/ v = u1 \/ v = u2`]); (REPEAT STRIP_TAC); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (ASM_REWRITE_TAC[] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (REWRITE_TAC[ASSUME `x = {u, v:real^3}`; ASSUME `u = u2:real^3`; ASSUME `v = u0:real^3`] THEN SET_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (REWRITE_TAC[ASSUME `x = {u, v:real^3}`; ASSUME `u = u0:real^3`; ASSUME `v = u1:real^3`] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (REWRITE_WITH `{u,v} = {v,u:real^3}`); (SET_TAC[]); (REWRITE_TAC[ASSUME `x = {u, v:real^3}`; ASSUME `u = u2:real^3`; ASSUME `v = u1:real^3`] THEN SET_TAC[]); (REWRITE_TAC[ASSUME `x = {u, v:real^3}`; ASSUME `u = u0:real^3`; ASSUME `v = u2:real^3`] THEN SET_TAC[]); (REWRITE_TAC[ASSUME `x = {u, v:real^3}`; ASSUME `u = u1:real^3`; ASSUME `v = u2:real^3`] THEN SET_TAC[]); (NEW_GOAL `F`); (ASM_MESON_TAC[]); (ASM_MESON_TAC[]); (UP_ASM_TAC THEN REWRITE_TAC[SET_RULE `x IN {a,b,c} <=> x=a\/x=b\/x=c`]); (REWRITE_TAC[MESON[IN] `VX V X s <=> s IN VX V X`]); (REWRITE_TAC[ASSUME `VX V X = {u0,u1,u2:real^3}`; SET_RULE `v IN {u0, u1, u2} <=> v = u0 \/ v = u1 \/ v = u2`]); (REPEAT STRIP_TAC); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u1:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (EXISTS_TAC `u1:real^3` THEN EXISTS_TAC `u2:real^3` THEN ASM_REWRITE_TAC[]); (ABBREV_TAC `f = (\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_TAC[ASSUME `edgeX V X = {{u0, u1}, {u0, u2}, {u1, u2}}`]); (ABBREV_TAC `H2 = {{u0, u2}, {u1, u2:real^3}}`); (REWRITE_WITH `sum ({u0,u1:real^3} INSERT H2) f = (if {u0,u1} IN H2 then sum H2 f else f {u0,u1} + sum H2 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "H2"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "H2"); (REWRITE_TAC[SET_RULE `x IN {a,b} <=> x=a\/x=b`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "H2"); (ABBREV_TAC `H1 = {{u1, u2:real^3}}`); (REWRITE_WITH `sum ({u0,u2:real^3} INSERT H1) f = (if {u0,u2} IN H1 then sum H1 f else f {u0,u2} + sum H1 f)`); (MATCH_MP_TAC Marchal_cells_2_new.SUM_CLAUSES_alt); (EXPAND_TAC "H1"); (REWRITE_TAC[Geomdetail.FINITE6]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN EXPAND_TAC "H1"); (REWRITE_TAC[SET_RULE `x IN {a} <=> x=a`]); (SET_TAC[ASSUME `~(u0 = u1:real^3) /\ ~(u0 = u2) /\ ~(u0 = u3) /\ ~(u1 = u2) /\ ~(u1 = u3) /\ ~(u2 = u3)`]); (UP_ASM_TAC THEN MESON_TAC[]); (EXPAND_TAC "H1" THEN REWRITE_TAC[SUM_SING]); (REWRITE_WITH `f {u0, u1:real^3} = lmfun (y6 / &2) * dih_y y6 y4 sqrt2 sqrt2 sqrt2 y5`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u0, u1} = (g u0 u1):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `3:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y6" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u0,u1:real^3) = y6`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_WITH `f {u0, u2:real^3} = lmfun (y5 / &2) * dih_y y5 y6 sqrt2 sqrt2 sqrt2 y4`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u0, u2} = (g u0 u2):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `3:num` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y5" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u0,u2:real^3) = y5`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[ASSUME `edgeX V X = {u0, u1} INSERT H2`]); (EXPAND_TAC "H2" THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REWRITE_WITH `f {u1, u2:real^3} = lmfun (y4 / &2) * dih_y y4 y5 sqrt2 sqrt2 sqrt2 y6`); (EXPAND_TAC "f"); (ABBREV_TAC `g = (\u v. if {u, v:real^3} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0)`); (REWRITE_WITH `(\({u, v}). if {u, v} IN edgeX V X then dihX V X (u,v) * lmfun (hl [u; v]) else &0) = (\({u, v:real^3}). g u v)`); (EXPAND_TAC "g" THEN REWRITE_TAC[]); (REWRITE_WITH `(\({u, v:real^3}). g u v) {u1, u2} = (g u1 u2):real`); (MATCH_MP_TAC BETA_PAIR_THM); (REPEAT STRIP_TAC THEN EXPAND_TAC "g" ); (COND_CASES_TAC); (COND_CASES_TAC); (REWRITE_WITH `dihX V X (u,v) = dihX V X (v,u)`); (MATCH_MP_TAC Marchal_cells_3.DIHX_SYM); (REWRITE_TAC[mcell_set; IN_ELIM_THM]); (ASM_REWRITE_TAC[IN]); (EXISTS_TAC `3` THEN EXISTS_TAC `ul:(real^3)list` THEN ASM_REWRITE_TAC[]); (REWRITE_TAC[HL; set_of_list; SET_RULE `{a,b} = {b,a}`]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (COND_CASES_TAC); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[]); (ONCE_REWRITE_TAC[SET_RULE `{a,b} = {b,a}`]); (ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN MESON_TAC[]); (REFL_TAC); (EXPAND_TAC "g"); (COND_CASES_TAC); (REWRITE_TAC[HL_2; REAL_ARITH `inv(&2) * a = a / &2`]); (REWRITE_TAC[REAL_ARITH ` t * lmfun(s) = lmfun(s) * t`]); (EXPAND_TAC "y4" THEN AP_TERM_TAC); (REWRITE_TAC[ASSUME `dist (u1,u2:real^3) = y4`]); (ASM_REWRITE_TAC[]); (NEW_GOAL `F`); (UP_ASM_TAC THEN REWRITE_TAC[ASSUME `edgeX V X = {u0, u1} INSERT H2`]); (EXPAND_TAC "H2" THEN EXPAND_TAC "H1" THEN SET_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (REAL_ARITH_TAC); (STRIP_TAC THEN NEW_GOAL `F`); (UP_ASM_TAC THEN ASM_REWRITE_TAC[]); (UP_ASM_TAC THEN ASM_REWRITE_TAC[])]);;
(* ======================================================================= *) (* From Thomas Hales *) (* ======================================================================= *)
let HJKDESR1a_1cell = 
prove_by_refinement( `&0 < &8 * pi * sqrt2 / &3 - &8 * mm1 `,
(* {{{ proof *) [ REWRITE_TAC[ arith `&8 * pi * sqrt2 / &3 = (&8 / &3) * (pi * sqrt2)`]; MATCH_MP_TAC (arith `&3 * mm1 < z ==> &0 < (&8/ &3) * z - &8 * mm1`); MATCH_MP_TAC REAL_LT_TRANS; EXISTS_TAC (`&3 * #1.3`); GMATCH_SIMP_TAC REAL_LT_LMUL_EQ; GMATCH_SIMP_TAC REAL_LT_MUL2; MP_TAC Flyspeck_constants.bounds; BY(REAL_ARITH_TAC) ]);;
end;;