==> (!V. packing V /\ V
==> (?W phi.
V W /\ (!v. v
v)) /\
(!w. w
[
DISCH_TAC;
GEN_TAC;
STRIP_TAC;
(ABBREV_TAC
`S = {(U:real^3->bool)| FINITE U /\ packing U /\
(?phi.
BIJ phi (V:real^3->bool) U /\
(! v. v
IN V ==>
norm v =
norm (
phi v)))}`);
(ABBREV_TAC
`(f:(real^3 ->bool)->num) =
(\U.
CARD (
set_of_iso U))`);
(* subgoal 1 *)
(SUBGOAL_THEN `FINITE (V:real^3->bool)` (LABEL_TAC "finite_v"));
(ASM_SIMP_TAC[
lemma1]);
(* subgoal 2 *)
(SUBGOAL_THEN `! (U:real^3 ->bool). U
IN S ==> FINITE U` (LABEL_TAC "finite_u"));
(EXPAND_TAC "S");
(SIMP_TAC[
IN_ELIM_THM]);
(* subgoal 3 *)
(SUBGOAL_THEN
`~ ((S:(real^3->bool)->bool) = {}) /\
(?m. !U. U
IN S ==> (f:(real^3->bool)->num) U <= m)` (LABEL_TAC "asm1"));
CONJ_TAC;
(* subgoal 3.1 *)
(PURE_REWRITE_TAC[GSYM
MEMBER_NOT_EMPTY]);
(EXISTS_TAC `V:real^3->bool`);
(EXPAND_TAC "S");
(ASM_SIMP_TAC[
IN_ELIM_THM]);
(EXISTS_TAC `(I:real^3->real^3)`);
CONJ_TAC;
(* subgoal 3.1.1 *)
(SIMP_TAC[
BIJ;
INJ;
SURJ;
I_THM]);
(SET_TAC[]);
(* subgoal 3.1.2 *)
(SIMP_TAC[
I_THM]);
(* subgoal 3.2 *)
(EXISTS_TAC `
CARD (V:real^3->bool)`);
(GEN_TAC);
(* subgoal 3.2.1 *)
(SUBGOAL_THEN `! (U:real^3->bool). U
IN S ==>
CARD U =
CARD (V:real^3->bool)` MP_TAC);
(GEN_TAC);
(EXPAND_TAC "S");
(PURE_REWRITE_TAC[
IN_ELIM_THM]);
STRIP_TAC;
(MATCH_MP_TAC
BIJ_CARD_EQ);
(EXISTS_TAC `phi:real^3->real^3`);
(ASM_SIMP_TAC[]);
(DISCH_THEN (MP_TAC o (fun
thm -> (SPEC `U:real^3 ->bool`
thm))));
(MATCH_MP_TAC (TAUT ` (p ==> (q ==> r)) ==> ((p ==> q) ==> (p ==> r))`));
(REPEAT STRIP_TAC);
(* subgoal 3.2.2 *)
(SUBGOAL_THEN `(f:(real^3->bool) -> num) U <=
CARD U` ASSUME_TAC);
(EXPAND_TAC "f");
(MATCH_MP_TAC
CARD_SUBSET);
CONJ_TAC;
(* subgoal 3.2.2.1 *)
(SET_TAC[
set_of_iso]);
(* subgoal 3.2.2.2 *)
(UNDISCH_TAC `(U:real^3->bool)
IN (S:(real^3->bool)->bool)`);
(ASM_SIMP_TAC[]);
ASM_ARITH_TAC;
(REMOVE_THEN "asm1" (ASSUME_TAC o (MATCH_MP
bdd_num_func_attain_max)));
(FIRST_X_ASSUM CHOOSE_TAC);
(EXISTS_TAC `U:real^3->bool`);
(FIRST_X_ASSUM MP_TAC);
(STRIP_TAC);
(UNDISCH_TAC `U:real^3 -> bool
IN S`);
(EXPAND_TAC "S");
(SIMP_TAC[
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(EXISTS_TAC `phi:real^3 ->real^3`);
(ASM_SIMP_TAC[]);
(REPEAT STRIP_TAC);
(* subgoal 4 *)
(SUBGOAL_THEN `! v:real^3. v
IN U ==>
norm v <= &2 * h0 /\ ~(
norm v < &2)`
(LABEL_TAC "norm_bdd"));
GEN_TAC;
(UNDISCH_TAC `
BIJ phi (V:real^3->bool) (U:real^3->bool)`);
(PURE_REWRITE_TAC[
BIJ;
SURJ]);
( STRIP_TAC);
(STRIP_TAC);
(FIRST_ASSUM (fun
thm -> MP_TAC (SPEC `v:real^3`
thm)));
(FIRST_ASSUM (fun
thm -> SIMP_TAC[
thm]));
STRIP_TAC;
(UNDISCH_TAC `! v:real^3. v
IN V ==>
norm v =
norm ((phi:real^3 -> real^3) v)`);
(DISCH_THEN (fun
thm -> MP_TAC (SPEC `y:real^3`
thm)));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (ARITH_RULE
`a <= &2 * h0 /\ ~(a < &2) ==> a = b ==> b <= &2 * h0 /\ ~(b < &2)`));
(* subgoal 4.1 *)
(SUBGOAL_THEN `y:real^3
IN ball_annulus` MP_TAC);
(MATCH_MP_TAC (SET_RULE `y:real^3
IN V /\ V
SUBSET ball_annulus ==> y
IN ball_annulus`));
(ASM_SIMP_TAC[]);
(PURE_REWRITE_TAC[
IN_ELIM_THM;
ball_annulus;
DIFF;
cball;
ball]);
(SIMP_TAC[
DIST_0]);
(* subgoal 5 *)
(SUBGOAL_THEN `(U:real^3 -> bool)
SUBSET ball_annulus` (LABEL_TAC "u_annu"));
(PURE_REWRITE_TAC[
SUBSET]);
GEN_TAC;
STRIP_TAC;
(PURE_REWRITE_TAC[
IN_ELIM_THM;
ball_annulus;
DIFF;
cball;
ball]);
(SIMP_TAC[
DIST_0]);
(ASM_SIMP_TAC[]);
(* subgoal 6 *)
(SUBGOAL_THEN `! v:real^3. v
IN U ==> ~(v =
vec 0)` (LABEL_TAC "not_0"));
(GEN_TAC);
STRIP_TAC;
(ONCE_REWRITE_TAC[GSYM
NORM_POS_LT]);
(MATCH_MP_TAC (ARITH_RULE `~(
norm (v:real^3) < &2) ==> &0 <
norm v`));
(ASM_SIMP_TAC[]);
(* subgoal 7 *)
(SUBGOAL_THEN `!v:real^3. v
IN set_of_edge w U (
ECTC U)
==> ~(
collinear {
vec 0, w, v})` (LABEL_TAC "not_li"));
(GEN_TAC);
(MP_TAC (SPECL [`w:real^3`;`U:real^3->bool`] lemma8));
(ASM_SIMP_TAC[]);
(SIMP_TAC[
IN_ELIM_THM;
ECTC]);
(MATCH_MP_TAC (TAUT `(B ==> C) ==> (A ==> B ==> C)`));
STRIP_TAC;
(ONCE_REWRITE_TAC[
COLLINEAR_BETWEEN_CASES]);
(ONCE_REWRITE_TAC[TAUT `~(A \/ B \/ C) <=> ~A /\ ~B /\ ~C`]);
(ONCE_REWRITE_TAC[
between]);
(ONCE_REWRITE_TAC[
DIST_0]);
(CONV_TAC (PAT_CONV `\x. A /\ ~(
_ = x +
_ ) /\ ~(
_ =
_ + x)`
(ONCE_REWRITE_CONV[
DIST_SYM])));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (ARITH_RULE
`(a <= &2 * #1.26) /\ ~(a < &2) /\ (b <= &2 * #1.26) /\ ~(b < &2)
==> ~(&2 = a + b) /\ ~(b = &2 + a) /\ ~(a = b + &2)`));
(ONCE_REWRITE_TAC[GSYM h0]);
(ASM_SIMP_TAC[]);
(ASM_CASES_TAC `~(
set_of_edge (w:real^3) (U:real^3->bool) (
ECTC U) = {}) /\
~(
surrounded_node (U,
ECTC U) w)`);
(ABBREV_TAC `result:bool = (
set_of_edge w U (
ECTC U) = {} \/
surrounded_node (U,
ECTC U) w)`);
(MP_TAC (SPECL [`U:real^3 -> bool`;`w:real^3`]
lemma2));
(ASM_SIMP_TAC[]);
(STRIP_TAC);
(MP_TAC (SPECL[`w:real^3`;`U:real^3->bool`]
lemma3));
(ASM_SIMP_TAC[]);
(STRIP_TAC);
(Q_ABBREV_TAC `e1:real^3 =
normalize w` "e1");
(Q_ABBREV_TAC `y:real^3 = w
cross u` "y_axis");
(Q_ABBREV_TAC `e2:real^3 =
normalize y` "e2");
(Q_ABBREV_TAC `e3:real^3 = e1
cross e2` "e3");
(* subgoal 8 *)
(SUBGOAL_THEN `
orthonormal (e1:real^3) e2 e3` ASSUME_TAC);
(PURE_REWRITE_TAC[
orthonormal]);
(ONCE_REWRITE_TAC[GSYM
NORM_EQ_1]);
(* subgoal 8.1 *)
(SUBGOAL_THEN `
norm (e1:real^3) = &1` ASSUME_TAC);
(Q_EXPAND_TAC "e1");
(MATCH_MP_TAC
norm_normalize);
(ASM_SIMP_TAC[]);
(* subgoal 8.2 *)
(SUBGOAL_THEN `
norm (e2:real^3) = &1` ASSUME_TAC);
(Q_EXPAND_TAC "e2");
(MATCH_MP_TAC
norm_normalize);
(Q_EXPAND_TAC "y_axis");
(ONCE_REWRITE_TAC[
CROSS_EQ_0]);
(ASM_SIMP_TAC[]);
(* subgoal 8.3 *)
(SUBGOAL_THEN `(e1:real^3)
dot e2 = &0` ASSUME_TAC);
(Q_EXPAND_TAC "e1");
(ONCE_REWRITE_TAC[GSYM
dot_eq_0]);
(Q_EXPAND_TAC "e2");
(ONCE_REWRITE_TAC[
DOT_SYM]);
(ONCE_REWRITE_TAC[GSYM
dot_eq_0]);
(Q_EXPAND_TAC "y_axis");
(SIMP_TAC[
DOT_CROSS_SELF]);
(* subgoal 8.4 *)
(SUBGOAL_THEN `(e1:real^3)
dot e3 = &0 /\ e2
dot e3 = &0` ASSUME_TAC);
(Q_EXPAND_TAC "e3");
(SIMP_TAC[
DOT_CROSS_SELF]);
(* subgoal 8.5 *)
(SUBGOAL_THEN `
norm (e3:real^3) = &1` ASSUME_TAC);
(Q_EXPAND_TAC "e3");
(MP_TAC(ISPECL [`e1:real^3`;`e2:real^3`]
NORM_CROSS_DOT));
(ASM_SIMP_TAC[REAL_POW_2;
REAL_MUL_RZERO;
REAL_ADD_RID;
REAL_MUL_RID]);
(ONCE_REWRITE_TAC[GSYM REAL_POW_2]);
(STRIP_TAC);
(MP_TAC(SPECL [`
norm (e3:real^3)`;`2`]
REAL_POW_EQ_1_IMP));
(ASM_SIMP_TAC[ARITH_RULE `~(2 = 0)`]);
(STRIP_TAC);
(MATCH_MP_TAC (ARITH_RULE `abs x = &1 /\ &0 <= x ==> x = &1`));
(ASM_SIMP_TAC[
NORM_POS_LE]);
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC[
DOT_SQUARE_NORM]);
(ASM_SIMP_TAC[REAL_POW_2]);
ARITH_TAC;
(* subgoal 9 *)
(SUBGOAL_THEN `!v:real^3. v
IN set_of_edge w U (
ECTC U)
==> v
dot e2 <= &0` ASSUME_TAC);
(GEN_TAC);
(STRIP_TAC);
(ONCE_REWRITE_TAC[
DOT_SYM]);
(ONCE_REWRITE_TAC[ARITH_RULE `a <= &0 <=> &0 < --a \/ a = &0`]);
(ONCE_REWRITE_TAC[VECTOR_ARITH `--((e2:real^3)
dot v) = (--v)
dot e2`]);
(Q_EXPAND_TAC "e2");
(ONCE_REWRITE_TAC[GSYM
dot_gt_0]);
(ONCE_REWRITE_TAC[GSYM
dot_eq_0]);
(ONCE_REWRITE_TAC[VECTOR_ARITH ` --(v:real^3)
dot y = -- (y
dot v)`]);
(ONCE_REWRITE_TAC[ARITH_RULE ` (&0 < --a \/ a = &0 )<=> a <= &0`]);
(Q_EXPAND_TAC "y_axis");
(ASM_CASES_TAC `v:real^3 = u`);
(* subgoal 9.1 *)
(FIRST_ASSUM(fun
thm -> SIMP_TAC[
thm;
DOT_CROSS_SELF]));
ARITH_TAC;
(* subgoal 9.2 *)
(MP_TAC (SPECL [`w:real^3`;`u:real^3`;`v:real^3`]
lemma4));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `A ==> (A ==>B) ==> B`));
(MP_TAC (SPEC `U:real^3 -> bool` UBHDEUU2_quasi));
(ASM_SIMP_TAC[]);
(DISCH_TAC);
(MP_TAC (SPECL [`U:real^3->bool`;`(
ECTC U):(real^3->bool)->bool`;`w:real^3`;
`u:real^3`;`v:real^3`]
azim_ge_azim_dart));
(ASM_SIMP_TAC[]);
(* subgoal 9.2.1 *)
(SUBGOAL_THEN `~(w:real^3 = u)` ASSUME_TAC);
(UNDISCH_TAC `u:real^3
IN set_of_edge w U (
ECTC U)`);
(MP_TAC(SPECL [`w:real^3`;`U:real^3->bool`] lemma8));
(ASM_SIMP_TAC[
IN_ELIM_THM]);
(STRIP_TAC);
(STRIP_TAC);
(ONCE_REWRITE_TAC[GSYM
DIST_EQ_0]);
(ASM_ARITH_TAC);
(ASM_SIMP_TAC[]);
(ASM_ARITH_TAC);
(* subgoal 10 *)
(SUBGOAL_THEN `?(a:real). &0 < a /\ a <
pi /\
(&2 - &2 *
cos a ) * (
norm (w:real^3) pow 2) < epsilon pow 2` ASSUME_TAC);
(MP_TAC (SPEC `&0`
REAL_CONTINUOUS_AT_COS));
(ONCE_REWRITE_TAC[
real_continuous_atreal]);
(DISCH_THEN (MP_TAC o (SPEC
`epsilon pow 2 / (&2 *
norm(w:real^3) pow 2)`)));
(* subgoal 10.1 *)
(SUBGOAL_THEN
`&0 < epsilon pow 2/ (&2 *
norm (w:real^3) pow 2)` ASSUME_TAC);
(MATCH_MP_TAC
REAL_LT_DIV);
(CONJ_TAC);
(* subgoal 10.1.1 *)
(MATCH_MP_TAC
REAL_POW_LT);
(ASM_SIMP_TAC[ARITH_RULE `&0 < a <=> a > &0`]);
(* subgoal 10.1.2 *)
(MATCH_MP_TAC (ARITH_RULE ` &0 < a ==> &0 < &2 * a`));
(MATCH_MP_TAC
REAL_POW_LT);
(ASM_SIMP_TAC[
NORM_POS_LT]);
(ASM_SIMP_TAC[
COS_0;
REAL_MUL_RID;
REAL_SUB_RZERO]);
(DISCH_THEN CHOOSE_TAC);
(FIRST_X_ASSUM MP_TAC);
STRIP_TAC;
(Q_ABBREV_TAC `m:real = min (d / &2) (
pi / &2)` "phi");
(EXISTS_TAC `m:real`);
(* subgoal 10.2 *)
(SUBGOAL_THEN `&0 < m:real` ASSUME_TAC);
(Q_EXPAND_TAC "phi");
(SIMP_TAC[
REAL_LT_MIN;
PI2_BOUNDS]);
(MATCH_MP_TAC
REAL_LT_DIV);
(ASM_ARITH_TAC);
(* subgoal 10.3 *)
(SUBGOAL_THEN `m <
pi` ASSUME_TAC);
(Q_EXPAND_TAC "phi");
(ONCE_REWRITE_TAC[
REAL_MIN_LT]);
(DISJ2_TAC);
(MATCH_MP_TAC (REAL_ARITH `&0 < a ==> a / &2 < a`));
(SIMP_TAC[
PI_POS]);
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC [REAL_ARITH `(&2 - &2 * a) * b = (&1 - a) * (&2 * b)`]);
(MP_TAC (SPECL [`&1 -
cos (m:real)`;`epsilon:real pow 2`;
`&2 *
norm (w:real^3) pow 2`]
REAL_LT_RDIV_EQ));
(* subgoal 10.4 *)
(SUBGOAL_THEN `&0 < &2 *
norm (w:real^3) pow 2` ASSUME_TAC);
(ONCE_REWRITE_TAC[ARITH_RULE `&0 < &2 * a <=> &0 < a`]);
(MATCH_MP_TAC
REAL_POW_LT);
(ASM_SIMP_TAC[
NORM_POS_LT]);
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `A ==> (A <=> B ) ==> B`));
(MATCH_MP_TAC (REAL_ARITH `abs a < b ==> a < b`));
(ONCE_REWRITE_TAC[REAL_ARITH `abs (a - b) = abs (b - a)`]);
(FIRST_ASSUM (fun
thm -> MATCH_MP_TAC
thm));
(* subgoal 10.5 *)
(SUBGOAL_THEN `abs (m:real) = m` ASSUME_TAC);
(ONCE_REWRITE_TAC[
REAL_ABS_REFL]);
(ASM_ARITH_TAC);
(ASM_SIMP_TAC[]);
(Q_EXPAND_TAC "phi");
(ONCE_REWRITE_TAC[
REAL_MIN_LT]);
(DISJ1_TAC);
ASM_ARITH_TAC;
(FIRST_X_ASSUM CHOOSE_TAC);
(Q_ABBREV_TAC `s:real^3 =
(
cos a *
norm (w:real^3)) % e1 + (
sin a *
norm w) % e2` "subs_point");
(Q_ABBREV_TAC `U':real^3 -> bool = s
INSERT (U
DELETE w)` "new_set");
(* subgoal 11 *)
(SUBGOAL_THEN `!(v:real^3). v
IN U /\ ~(v = w) ==> &2 <
dist (s,v)`
(LABEL_TAC "dist_gt_2"));
(GEN_TAC);
(STRIP_TAC);
(ASM_CASES_TAC `(v:real^3)
IN set_of_edge w U (
ECTC U)`);
(* subgoal 11.1 *)
(SUBGOAL_THEN `
dist ((w:real^3),v) = &2` ASSUME_TAC);
(FIRST_X_ASSUM MP_TAC);
(MP_TAC (SPECL [`w:real^3`;`U:real^3->bool`] lemma8));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `B ==> (A ==> B)`));
(SIMP_TAC[
IN_ELIM_THM]);
(FIRST_X_ASSUM (fun
thm -> ONCE_REWRITE_TAC[GSYM
thm]));
(MP_TAC (SPECL [`w:real^3`;`s:real^3`;`a:real`;
`e1:real^3`;`e2:real^3`;`e3:real^3`] lemma7));
(ASM_SIMP_TAC[
NORM_POS_LT]);
(DISCH_THEN (fun
thm -> MATCH_MP_TAC (SPEC `v:real^3`
thm)));
(ASM_SIMP_TAC[]);
(Q_EXPAND_TAC "e1");
(ONCE_REWRITE_TAC[GSYM
dot_gt_0]);
(ONCE_REWRITE_TAC[ARITH_RULE `&0 < a <=> a > &0`]);
(ONCE_REWRITE_TAC[
DOT_SYM]);
(MP_TAC (SPECL [`U:real^3->bool`;`w:real^3`]
lemma5));
(ASM_SIMP_TAC[]);
(* subgoal 11.2 *)
(ONCE_REWRITE_TAC[
DIST_SYM]);
(MATCH_MP_TAC (REAL_ARITH `&2 <
dist (v:real^3,w) -
dist (s,w) /\
dist (v,w) -
dist (s,w) <= a ==> &2 < a`));
(SIMP_TAC[Pack1.real_sub_norm]);
(MATCH_MP_TAC (REAL_ARITH
`a > &2 + (epsilon:real) /\ b < epsilon ==> &2 < a - b`));
(ONCE_REWRITE_TAC[
DIST_SYM]);
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC[
DIST_SYM]);
(PURE_REWRITE_TAC[
dist]);
(ONCE_REWRITE_TAC[
NORM_LT_SQUARE]);
(ASM_SIMP_TAC[ARITH_RULE `&0 < a <=> a > &0`]);
(* subgoal 11.2.1 *)
(SUBGOAL_THEN `s:real^3 - w = ((
cos (a:real) - &1) *
norm (w:real^3)) % e1 +
(
sin a *
norm w) % e2 + &0 % e3` ASSUME_TAC);
(* subgoal 11.2.1.1 *)
(SUBGOAL_THEN `w:real^3 =
norm w % e1` ASSUME_TAC);
(Q_EXPAND_TAC "e1");
(SIMP_TAC[
norm_mul_normalize]);
(FIRST_X_ASSUM(fun
thm -> CONV_TAC(PAT_CONV `\x. s - x = A`
(ONCE_REWRITE_CONV[
thm]))));
(Q_EXPAND_TAC "subs_point");
(SIMP_TAC[
VECTOR_MUL_LZERO;
VECTOR_ADD_RID]);
(ONCE_REWRITE_TAC[VECTOR_ARITH
`(a % (e1:real^3) + b % e2) - c % e1 = (a - c) % e1 + b % e2`]);
(SIMP_TAC[ARITH_RULE `a * b - b = (a - &1) * b`]);
(MP_TAC (SPECL
[`s:real^3 - w`;`s:real^3 - w`;`e1:real^3`;`e2:real^3`;`e3:real^3`;
`(
cos a - &1) *
norm (w:real^3)`;`
sin a *
norm (w:real^3)`;`&0`;
`(
cos a - &1) *
norm (w:real^3)`;`
sin a *
norm (w:real^3)`;`&0`]
dot_coordinates_2));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `B ==> A ==> B`));
(ONCE_REWRITE_TAC [REAL_ARITH
`(a * b) * a * b + (c * b) * c * b + &0 * &0 = (a * a + c * c) * b pow 2`]);
(ONCE_REWRITE_TAC [REAL_ARITH
`(a - &1) * (a - &1) + b * b = &1 - &2 * a + b pow 2 + a pow 2`]);
(SIMP_TAC[
SIN_CIRCLE]);
(ASM_SIMP_TAC[REAL_ARITH `&1 - b + &1 = &2 - b`]);
(* subgoal 12 *)
(SUBGOAL_THEN `!(v:real^3). v
IN U' /\ ~(v = s) ==> &2 <
dist (s,v)`
(LABEL_TAC "iso"));
(GEN_TAC);
(Q_EXPAND_TAC "new_set");
(SIMP_TAC[
IN_INSERT; TAUT ` ((A \/ B) /\ ~A) <=> (~A /\ B)`]);
(SIMP_TAC[
IN_DELETE]);
(ASM_SIMP_TAC[]);
(* subgoal 13 *)
(SUBGOAL_THEN `~(s:real^3
IN U)` ASSUME_TAC);
(ONCE_REWRITE_TAC[SET_RULE `~(x
IN S) <=> (!y. y
IN S ==> ~(x = y))`]);
GEN_TAC;
STRIP_TAC;
(ASM_CASES_TAC `y':real^3 = w`);
(* subgoal 13.1 *)
(ASM_SIMP_TAC[]);
(* subgoal 13.1.1 *)
(SUBGOAL_THEN `w:real^3 =
norm w % e1 + &0 % e2 + &0 % e3` ASSUME_TAC);
(SIMP_TAC[ VECTOR_ARITH `a % e1 + &0 % e2 + &0 % e3 = a % e1`]);
(Q_EXPAND_TAC "e1");
(SIMP_TAC[
norm_mul_normalize]);
(FIRST_X_ASSUM (fun
thm -> ONCE_REWRITE_TAC[
thm]));
(USE_THEN "subs_point" (fun
thm -> ONCE_REWRITE_TAC[GSYM
thm]));
(CONV_TAC(PAT_CONV `\x. ~(x = A)` (ONCE_REWRITE_CONV[
VECTOR_ARITH `a % e1 + b % e2 = a % e1 + b % e2 + &0 % e3`])));
(MP_TAC ( SPECL [`e1:real^3`;`e2:real^3`;`e3:real^3`;
`
cos a *
norm (w:real^3)`;`
sin a *
norm (w:real^3)`;`&0`;
`
norm (w:real^3)`;`&0`;`&0`]
ORTHONORMAL_IMP_INDEPENDENT_EXPLICIT ));
(MATCH_MP_TAC(TAUT `(A /\ ~C) ==> ((A ==> ( B <=> C)) ==> ~B) `));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `~B ==> ~ (A /\ B)`));
(SIMP_TAC[
REAL_ENTIRE]);
(SIMP_TAC[TAUT `~(A \/ B) <=> ~A /\ ~B`]);
CONJ_TAC;
(* subgoal 13.1.2 *)
(ASM_SIMP_TAC[
PI_WORKS]);
(* subgoal 13.1.3 *)
(MATCH_MP_TAC(ARITH_RULE `&0 < x ==> ~(x = &0)`));
(ASM_SIMP_TAC[
NORM_POS_LT]);
(* subgoal 13.2 *)
(ONCE_REWRITE_TAC[
DIST_NZ]);
(MATCH_MP_TAC (ARITH_RULE `&2 < a ==> &0 < a`));
(USE_THEN "dist_gt_2" (fun
thm -> MATCH_MP_TAC
thm));
(ASM_SIMP_TAC[]);
(* subgoal 14 *)
(SUBGOAL_THEN `U':real^3 -> bool
IN S` ASSUME_TAC);
(EXPAND_TAC "S");
(SIMP_TAC[
IN_ELIM_THM]);
(* subgoal 14.1 *)
(SUBGOAL_THEN `
norm (s:real^3) =
norm (w:real^3)` ASSUME_TAC);
(MP_TAC (SPECL [`w:real^3`;`s:real^3`;`a:real`;
`e1:real^3`;`e2:real^3`;`e3:real^3`] lemma6));
(ASM_SIMP_TAC[]);
(* subgoal 14.2 *)
(SUBGOAL_THEN `FINITE (U':real^3->bool)` ASSUME_TAC);
(Q_EXPAND_TAC "new_set");
(ONCE_REWRITE_TAC[
FINITE_INSERT]);
(ASM_SIMP_TAC[
FINITE_DELETE]);
(* subgoal 14.3 *)
(SUBGOAL_THEN `packing (U':real^3 -> bool)` ASSUME_TAC);
(PURE_REWRITE_TAC[packing]);
(REPEAT GEN_TAC);
(CONV_TAC(PAT_CONV `\x. x /\ x /\ A ==> B`
(ONCE_REWRITE_CONV[GSYM
IN])));
(STRIP_TAC);
(ASM_CASES_TAC `u':real^3 = s`);
(* subgoal 14.3.1 *)
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (ARITH_RULE `&2 < a ==> &2 <= a`));
(FIRST_ASSUM (fun
thm -> MATCH_MP_TAC
thm));
(ASM_SIMP_TAC[]);
(FIRST_X_ASSUM(fun thm-> ONCE_REWRITE_TAC[GSYM
thm]));
(ASM_SIMP_TAC[
EQ_SYM_EQ]);
(ASM_CASES_TAC `v:real^3 = s`);
(* subgoal 14.3.2.1 *)
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC[
DIST_SYM]);
(MATCH_MP_TAC (ARITH_RULE `&2 < a ==> &2 <= a`));
(FIRST_ASSUM (fun
thm -> MATCH_MP_TAC
thm));
(ASM_SIMP_TAC[]);
(* subgoal 14.3.2.2 *)
(UNDISCH_TAC `u':real^3
IN U'`);
(Q_EXPAND_TAC "new_set");
(ASM_SIMP_TAC[
IN_INSERT;
IN_DELETE]);
(STRIP_TAC);
(UNDISCH_TAC `v:real^3
IN U'`);
(Q_EXPAND_TAC "new_set");
(ASM_SIMP_TAC[
IN_INSERT;
IN_DELETE]);
(STRIP_TAC);
(UNDISCH_TAC `packing (U:real^3->bool)`);
(PURE_REWRITE_TAC[packing]);
(DISCH_THEN (fun
thm -> MATCH_MP_TAC (SPECL [`u':real^3`;`v:real^3`]
thm)));
(CONV_TAC(PAT_CONV `\x. x /\ x /\ A` (ONCE_REWRITE_CONV[GSYM
IN])));
(ASM_SIMP_TAC[]);
(ASM_SIMP_TAC[]);
(Q_ABBREV_TAC `(h:real^3->real^3) = (\v. if v = w then s else v)` "h");
(EXISTS_TAC `(h:real^3->real^3) o (phi:real^3->real^3)`);
(CONJ_TAC);
(* subgoal 14.4 *)
(MATCH_MP_TAC Hypermap.COMPOSE_BIJ);
(EXISTS_TAC `U:real^3->bool`);
(ASM_SIMP_TAC[]);
(* subgoal 14.4.1 *)
(SUBGOAL_THEN `!v:real^3. v
IN U ==> (h:real^3->real^3) v
IN U'` ASSUME_TAC);
(REPEAT STRIP_TAC);
(Q_EXPAND_TAC "h");
(SIMP_TAC[
BETA_THM]);
(COND_CASES_TAC);
(* subgoal 14.4.1.1 *)
(Q_EXPAND_TAC "new_set");
(SET_TAC[]);
(* subgoal 14.5.1.2 *)
(Q_EXPAND_TAC "new_set");
(SIMP_TAC[
IN_INSERT]);
(DISJ2_TAC);
(ASM_SIMP_TAC[
IN_DELETE]);
(ASM_SIMP_TAC[
BIJ;
INJ;
SURJ]);
(CONJ_TAC);
(* subgoal 14.5.2 *)
(REPEAT STRIP_TAC);
(UNDISCH_TAC `(h:real^3->real^3) x = h y'`);
(Q_EXPAND_TAC "h");
(SIMP_TAC[
BETA_THM]);
(COND_CASES_TAC);
(* subgoal 14.5.2.1 *)
(COND_CASES_TAC);
(* subgoal 14.5.2.1.1 *)
(ASM_SIMP_TAC[]);
(* subgoal 14.5.2.1.2 *)
(ASM_MESON_TAC[]);
(* subgoal 14.5.2.2 *)
(COND_CASES_TAC);
(* subgoal 14.5.2.2.1 *)
(ASM_MESON_TAC[]);
(* subgoal 14.5.2.2.2 *)
(SIMP_TAC []);
(* subgoal 14.5.3 *)
(REPEAT STRIP_TAC);
(ASM_CASES_TAC `x:real^3 = s`);
(* subgoal 14.5.3.1 *)
(EXISTS_TAC `w:real^3`);
(ASM_SIMP_TAC[]);
(Q_EXPAND_TAC "h");
(SIMP_TAC[
BETA_THM]);
(* subgoal 14.5.3.2 *)
(EXISTS_TAC `x:real^3`);
(UNDISCH_TAC `x:real^3
IN U'`);
(Q_EXPAND_TAC "new_set");
(ASM_SIMP_TAC[
IN_INSERT;
IN_DELETE]);
(STRIP_TAC);
(Q_EXPAND_TAC "h");
(ASM_SIMP_TAC[
BETA_THM]);
(REPEAT STRIP_TAC);
(SIMP_TAC[
o_THM]);
(* subgoal 14.6 *)
(SUBGOAL_THEN `! x:real^3. x
IN U ==>
norm x =
norm ((h:real^3->real^3) x)` MATCH_MP_TAC);
(REPEAT STRIP_TAC);
(Q_EXPAND_TAC "h");
(SIMP_TAC[
BETA_THM]);
(COND_CASES_TAC);
(* subgoal 14.6.1 *)
(ASM_SIMP_TAC[]);
(* subgoal 14.6.2 *)
(SIMP_TAC[]);
(UNDISCH_TAC `
BIJ (phi:real^3->real^3) V U`);
(SIMP_TAC[
BIJ]);
(DISCH_THEN (fun
thm -> MP_TAC (CONJUNCT1
thm)));
(SIMP_TAC[
INJ]);
(DISCH_THEN (fun
thm -> MATCH_MP_TAC (CONJUNCT1
thm)));
(ASM_SIMP_TAC[]);
(* subgoal 15 *)
(SUBGOAL_THEN `~((f:(real^3->bool)->num) U' <= f U)` ASSUME_TAC);
(ONCE_REWRITE_TAC[ ARITH_RULE `~((a:num) <= b) <=> (b < a)`]);
(EXPAND_TAC "f");
(MATCH_MP_TAC
CARD_PSUBSET);
(CONJ_TAC);
(* subgoal 15.1 *)
(ONCE_REWRITE_TAC[
PSUBSET_ALT]);
(CONJ_TAC);
(* subgoal 15.1.1 *)
(ONCE_REWRITE_TAC[
SUBSET]);
GEN_TAC;
(ONCE_REWRITE_TAC[
set_of_iso]);
(SIMP_TAC[
IN_ELIM_THM]);
(STRIP_TAC);
(* subgoal 15.1.1.1 *)
(SUBGOAL_THEN `x:real^3
IN U'` ASSUME_TAC);
(Q_EXPAND_TAC "new_set");
(SIMP_TAC[
IN_INSERT]);
DISJ2_TAC;
(SIMP_TAC[
IN_DELETE]);
(ASM_SIMP_TAC[]);
(ASM_MESON_TAC[]);
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC[GSYM
SUBSET_EMPTY]);
(UNDISCH_TAC `
set_of_edge x U (
ECTC U) = {}`);
(DISCH_THEN(fun
thm -> ONCE_REWRITE_TAC[GSYM
thm]));
(MP_TAC (SPECL [`x:real^3`;`U:real^3->bool`] lemma8));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `B ==> (A ==> B)`));
(MP_TAC (SPECL [`x:real^3`;`U':real^3->bool`] lemma8));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT `B ==> (A ==> B)`));
(SIMP_TAC[
SUBSET;
IN_ELIM_THM]);
GEN_TAC;
(Q_EXPAND_TAC "new_set");
(SIMP_TAC[
IN_INSERT;
IN_DELETE]);
(MATCH_MP_TAC (TAUT `(D ==> ~A) ==> (A \/ B /\ C) /\ D ==> B`));
(MATCH_MP_TAC (TAUT `(B ==> ~A) ==> (A ==> ~B)`));
STRIP_TAC;
(ASM_SIMP_TAC[]);
(ONCE_REWRITE_TAC[
DIST_SYM]);
(MATCH_MP_TAC (ARITH_RULE `&2 < a ==> ~(a = &2)`));
(USE_THEN "dist_gt_2" (fun
thm -> MATCH_MP_TAC
thm));
(ASM_SIMP_TAC[]);
(ASM_SET_TAC[]);
(* subgoal 15.2 *)
(EXISTS_TAC `s:real^3`);
(CONJ_TAC);
(* subgoal 15.2.1 *)
(SIMP_TAC[
set_of_iso;
IN_ELIM_THM]);
(* subgoal 15.2.1.1 *)
(SUBGOAL_THEN `s:real^3
IN U'` ASSUME_TAC);
(Q_EXPAND_TAC "new_set");
(SET_TAC[]);
(ASM_SIMP_TAC[]);
(MP_TAC (SPECL [`s:real^3`;`U':real^3->bool`] lemma8));
(ASM_SIMP_TAC[]);
(MATCH_MP_TAC (TAUT ` B ==> A ==> B`));
(ONCE_REWRITE_TAC[SET_RULE `{x| P x} = {} <=> !x. ~(P x)`]);
(GEN_TAC);
(MATCH_MP_TAC (TAUT ` (A ==> ~B) ==> ~(A /\ B)`));
(STRIP_TAC);
(ASM_CASES_TAC `v:real^3 = s`);
(* subgoal 15.2.1.2 *)
(ASM_SIMP_TAC[
DIST_REFL]);
ARITH_TAC;
(* subgoal 15.2.1.3 *)
(MATCH_MP_TAC (ARITH_RULE `&2 < a ==> ~ (a = &2)`));
(USE_THEN "iso" (fun
thm -> MATCH_MP_TAC
thm));
(ASM_SIMP_TAC[]);
(* subgoal 15.2.2 *)
(ASM_SIMP_TAC[
set_of_iso;
IN_ELIM_THM]);
(MATCH_MP_TAC ( ISPECL [`
set_of_iso (U':real^3->bool)`;
`U':real^3->bool`]
FINITE_SUBSET));
(ASM_SIMP_TAC[
set_of_iso]);
(SET_TAC[]);
(ASM_MESON_TAC[]);
(ASM_MESON_TAC[]);
]);;