[(REWRITE_TAC[
mcell_set; SET_RULE `~(s = {}) <=> (?x. x
IN s)`;
IN;
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(ASM_CASES_TAC `!i ul. 1 <= i /\ i <= 4 /\ barV V 3 ul /\
truncate_simplex 0 ul = [v] ==>
negligible (mcell i V ul)`);
(NEW_GOAL `!vl. barV V 3 vl /\
truncate_simplex 0 vl = [v] ==>
negligible (rogers V vl
INTER ball (v,
sqrt (&2)))`);
(REPEAT STRIP_TAC);
(NEW_GOAL `vol (rogers V vl) <=
vol (
UNIONS {x | ?i. i <= 4 /\ x = mcell i V vl})`);
(MATCH_MP_TAC
MEASURE_SUBSET);
(STRIP_TAC);
(MATCH_MP_TAC
MEASURABLE_ROGERS);
(ASM_REWRITE_TAC[]);
(STRIP_TAC);
(MATCH_MP_TAC
MEASURABLE_UNIONS);
(STRIP_TAC);
(REWRITE_TAC[GSYM
IN_NUMSEG_0]);
(MATCH_MP_TAC
FINITE_IMAGE_EXPAND);
(REWRITE_TAC[
FINITE_NUMSEG]);
(REWRITE_TAC[
IN;
IN_ELIM_THM] THEN REPEAT STRIP_TAC);
(ASM_REWRITE_TAC[] THEN MATCH_MP_TAC
MEASURABLE_MCELL);
(ASM_REWRITE_TAC[]);
(REWRITE_TAC[
SUBSET]);
(REPEAT STRIP_TAC);
(REWRITE_TAC[
IN_UNIONS;
IN;
IN_ELIM_THM]);
(NEW_GOAL `?i. i <= 4 /\ x
IN mcell i V vl`);
(MATCH_MP_TAC
SLTSTLO1);
(ASM_REWRITE_TAC[]);
(UP_ASM_TAC THEN STRIP_TAC);
(EXISTS_TAC `mcell i V vl`);
(STRIP_TAC);
(EXISTS_TAC `i:num`);
(ASM_REWRITE_TAC[]);
(UP_ASM_TAC THEN REWRITE_TAC[
IN]);
(UP_ASM_TAC THEN REWRITE_WITH
`
UNIONS {x | ?i. i <= 4 /\ x = mcell i V vl} =
UNIONS {x | ?i. 1 <= i /\ i <= 4 /\ x = mcell i V vl}
UNION (mcell 0 V vl)`);
(ONCE_REWRITE_TAC[SET_EQ_LEMMA] THEN REWRITE_TAC[
SUBSET;
IN;
IN_ELIM_THM;
IN_UNIONS;
IN_UNION]);
(REPEAT STRIP_TAC);
(ASM_CASES_TAC `i = 0`);
(DISJ2_TAC);
(ASM_SET_TAC[]);
(DISJ1_TAC);
(EXISTS_TAC `t:real^3->bool`);
(ASM_REWRITE_TAC[]);
(EXISTS_TAC `i:num` THEN ASM_REWRITE_TAC[]);
(ASM_ARITH_TAC);
(EXISTS_TAC `t:real^3->bool`);
(ASM_REWRITE_TAC[]);
(EXISTS_TAC `i:num` THEN ASM_REWRITE_TAC[]);
(EXISTS_TAC `mcell 0 V vl`);
(ASM_REWRITE_TAC[]);
(EXISTS_TAC `0` THEN ASM_REWRITE_TAC[]);
(ARITH_TAC);
(ABBREV_TAC `S1 =
UNIONS {x | ?i. 1 <= i /\ i <= 4 /\ x = mcell i V vl}`);
(REWRITE_WITH `vol (S1
UNION mcell 0 V vl) =
vol (S1) + vol (mcell 0 V vl) - vol (S1
INTER mcell 0 V vl)`);
(MATCH_MP_TAC
MEASURE_UNION);
(STRIP_TAC);
(EXPAND_TAC "S1" THEN MATCH_MP_TAC
MEASURABLE_UNIONS);
(STRIP_TAC);
(REWRITE_TAC[SET_RULE `A /\ B /\ C <=> (A /\ B) /\ C`]);
(REWRITE_TAC[GSYM
IN_NUMSEG]);
(MATCH_MP_TAC
FINITE_IMAGE_EXPAND);
(REWRITE_TAC[
FINITE_NUMSEG]);
(REWRITE_TAC[
IN;
IN_ELIM_THM] THEN REPEAT STRIP_TAC);
(ASM_REWRITE_TAC[] THEN MATCH_MP_TAC
MEASURABLE_MCELL);
(ASM_REWRITE_TAC[]);
(MATCH_MP_TAC
MEASURABLE_MCELL);
(ASM_REWRITE_TAC[]);
(NEW_GOAL `vol S1 = &0`);
(MATCH_MP_TAC
MEASURE_EQ_0);
(EXPAND_TAC "S1" THEN MATCH_MP_TAC
NEGLIGIBLE_UNIONS);
(STRIP_TAC);
(REWRITE_TAC[SET_RULE `A /\ B /\ C <=> (A /\ B) /\ C`]);
(REWRITE_TAC[GSYM
IN_NUMSEG]);
(MATCH_MP_TAC
FINITE_IMAGE_EXPAND);
(REWRITE_TAC[
FINITE_NUMSEG]);
(REWRITE_TAC[
IN;
IN_ELIM_THM] THEN REPEAT STRIP_TAC);
(ASM_REWRITE_TAC[]);
(FIRST_ASSUM MATCH_MP_TAC);
(ASM_REWRITE_TAC[]);
(NEW_GOAL `vol (S1
INTER mcell 0 V vl) = &0`);
(MATCH_MP_TAC
MEASURE_EQ_0);
(MATCH_MP_TAC
NEGLIGIBLE_INTER);
(DISJ1_TAC);
(REWRITE_WITH `
NULLSET S1 <=> vol S1 = &0`);
(ONCE_REWRITE_TAC[
EQ_SYM_EQ]);
(MATCH_MP_TAC
MEASURABLE_MEASURE_EQ_0);
(EXPAND_TAC "S1" THEN MATCH_MP_TAC
MEASURABLE_UNIONS);
(STRIP_TAC);
(REWRITE_TAC[SET_RULE `A /\ B /\ C <=> (A /\ B) /\ C`]);
(REWRITE_TAC[GSYM
IN_NUMSEG]);
(MATCH_MP_TAC
FINITE_IMAGE_EXPAND);
(REWRITE_TAC[
FINITE_NUMSEG]);
(REWRITE_TAC[
IN;
IN_ELIM_THM] THEN REPEAT STRIP_TAC);
(ASM_REWRITE_TAC[] THEN MATCH_MP_TAC
MEASURABLE_MCELL);
(ASM_REWRITE_TAC[]);
(ASM_REWRITE_TAC[]);
(ASM_REWRITE_TAC[REAL_ARITH `&0 + a - &0 = a`]);
(ABBREV_TAC `S2 = rogers V vl
INTER ball (v,
sqrt (&2))`);
(ABBREV_TAC `S3 = rogers V vl
DIFF ball (v,
sqrt (&2))`);
(REWRITE_WITH `mcell 0 V vl = S3`);
(REWRITE_TAC[mcell0;
MCELL_EXPLICIT]);
(EXPAND_TAC "S3");
(REWRITE_WITH `
HD vl = v:real^3`);
(REWRITE_WITH `
HD (vl:(real^3)list) =
HD (truncate_simplex 0 vl)`);
(ONCE_REWRITE_TAC[
EQ_SYM_EQ]);
(MATCH_MP_TAC Packing3.HD_TRUNCATE_SIMPLEX);
(NEW_GOAL `?u0 u1 u2 u3. vl = [u0;u1;u2;u3:real^3]`);
(MATCH_MP_TAC
BARV_3_EXPLICIT);
(EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]);
(UP_ASM_TAC THEN STRIP_TAC);
(ASM_REWRITE_TAC[
LENGTH] THEN ARITH_TAC);
(ASM_REWRITE_TAC[
HD]);
(REWRITE_WITH `rogers V vl = S2
UNION S3`);
(ASM_SET_TAC[]);
(REWRITE_WITH `vol (S2
UNION S3) = vol (S2) + vol (S3) - vol (S2
INTER S3)`);
(MATCH_MP_TAC
MEASURE_UNION);
(EXPAND_TAC "S2" THEN EXPAND_TAC "S3");
(STRIP_TAC);
(MATCH_MP_TAC
MEASURABLE_INTER);
(REWRITE_TAC[
MEASURABLE_BALL]);
(MATCH_MP_TAC
MEASURABLE_ROGERS);
(ASM_REWRITE_TAC[]);
(MATCH_MP_TAC
MEASURABLE_DIFF);
(REWRITE_TAC[
MEASURABLE_BALL]);
(MATCH_MP_TAC
MEASURABLE_ROGERS);
(ASM_REWRITE_TAC[]);
(REWRITE_WITH `S2
INTER S3 = {}:real^3->bool`);
(ASM_SET_TAC[]);
(REWRITE_TAC[
MEASURE_EMPTY; REAL_ARITH `a + b - &0 <= b <=> a <= &0`]);
(NEW_GOAL `&0 <= vol S2`);
(MATCH_MP_TAC
MEASURE_POS_LE);
(EXPAND_TAC "S2" THEN MATCH_MP_TAC
MEASURABLE_INTER);
(REWRITE_TAC[
MEASURABLE_BALL]);
(MATCH_MP_TAC
MEASURABLE_ROGERS THEN ASM_REWRITE_TAC[]);
(STRIP_TAC);
(REWRITE_WITH `
NULLSET S2 <=> vol S2 = &0`);
(ONCE_REWRITE_TAC[
EQ_SYM_EQ] THEN MATCH_MP_TAC
MEASURABLE_MEASURE_EQ_0);
(EXPAND_TAC "S2" THEN MATCH_MP_TAC
MEASURABLE_INTER);
(REWRITE_TAC[
MEASURABLE_BALL]);
(MATCH_MP_TAC
MEASURABLE_ROGERS THEN ASM_REWRITE_TAC[]);
(ASM_REAL_ARITH_TAC);
(NEW_GOAL `
voronoi_closed V v =
UNIONS {y| ?vl. vl
IN barV V 3 /\
y = rogers V vl /\
truncate_simplex 0 vl = [v:real^3]}`);
(ONCE_REWRITE_TAC[SET_RULE `s = t <=> (!x. x
IN s <=> x
IN t)`]);
(REWRITE_WITH `!x. x
IN voronoi_closed V v <=>
(?vl. vl
IN barV V 3 /\
x
IN rogers V vl /\
truncate_simplex 0 vl = [v])`);
(GEN_TAC THEN MATCH_MP_TAC
GLTVHUM);
(ASM_REWRITE_TAC[]);
(ASM_SET_TAC[]);
(REWRITE_TAC[
IN_UNIONS;
IN;
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(EQ_TAC);
(REPEAT STRIP_TAC);
(EXISTS_TAC `rogers V vl` THEN ASM_REWRITE_TAC[]);
(EXISTS_TAC `vl:(real^3)list` THEN ASM_REWRITE_TAC[]);
(REPEAT STRIP_TAC);
(EXISTS_TAC `vl:(real^3)list` THEN ASM_REWRITE_TAC[]);
(ASM_SET_TAC[]);
(NEW_GOAL `
voronoi_closed V v
INTER ball (v,
sqrt (&2)) =
UNIONS
{y | ?vl. vl
IN barV V 3 /\
y = rogers V vl
INTER ball (v,
sqrt (&2)) /\
truncate_simplex 0 vl = [v]}`);
(ASM_REWRITE_TAC[]);
(ONCE_REWRITE_TAC[SET_EQ_LEMMA]);
(REWRITE_TAC[
IN_INTER;
IN_UNIONS]);
(ONCE_REWRITE_TAC[
IN]);
(REWRITE_TAC[
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(EXISTS_TAC `rogers V vl
INTER ball (v,
sqrt (&2))`);
(STRIP_TAC);
(EXISTS_TAC `vl:(real^3)list`);
(ASM_REWRITE_TAC[]);
(REWRITE_TAC[MESON[
IN] `(a
INTER b) x <=> x
IN (a
INTER b)`]);
(ASM_SIMP_TAC[
IN_INTER]);
(ASM_SET_TAC[]);
(EXISTS_TAC `rogers V vl`);
(STRIP_TAC);
(EXISTS_TAC `vl:(real^3)list`);
(ASM_REWRITE_TAC[]);
(ASM_SET_TAC[]);
(ASM_SET_TAC[]);
(NEW_GOAL `
NULLSET (
voronoi_closed V v
INTER ball (v,
sqrt (&2)))`);
(ASM_REWRITE_TAC[]);
(MATCH_MP_TAC
NEGLIGIBLE_UNIONS);
(REWRITE_TAC[
IN;
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(ABBREV_TAC `s2 = V
INTER ball (v:real^3, &4)`);
(ABBREV_TAC `s3 = {ul | ?u0 u1 u2 u3.
u0
IN s2 /\
u1
IN s2 /\
u2
IN s2 /\
u3
IN s2 /\
ul = [u0; u1; u2; u3:real^3]}`);
(ABBREV_TAC `f = (\t. rogers V t
INTER ball (v:real^3,
sqrt (&2)))`);
(MATCH_MP_TAC
FINITE_SUBSET);
(EXISTS_TAC `{y | ?vl. vl
IN s3 /\y = (f:((real^3)list)->real^3->bool) vl}`);
(REPEAT STRIP_TAC);
(MATCH_MP_TAC
FINITE_IMAGE_EXPAND);
(EXPAND_TAC "s3");
(MATCH_MP_TAC
FINITE_SET_LIST_LEMMA);
(EXPAND_TAC "s2");
(MATCH_MP_TAC Pack1.KIUMVTC);
(ASM_REWRITE_TAC[] THEN REAL_ARITH_TAC);
(EXPAND_TAC "f" THEN EXPAND_TAC "s3");
(REWRITE_TAC[
SUBSET] THEN ONCE_REWRITE_TAC[
IN] THEN REWRITE_TAC[
IN_ELIM_THM] THEN REPEAT STRIP_TAC);
(NEW_GOAL `?u0 u1 u2 u3. vl = [u0;u1;u2;u3:real^3]`);
(MATCH_MP_TAC
BARV_3_EXPLICIT);
(EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]);
(UP_ASM_TAC THEN STRIP_TAC);
(EXISTS_TAC `vl:(real^3)list`);
(ASM_REWRITE_TAC[]);
(EXISTS_TAC `u0:real^3` THEN EXISTS_TAC `u1:real^3`);
(EXISTS_TAC `u2:real^3` THEN EXISTS_TAC `u3:real^3`);
(ASM_REWRITE_TAC[]);
(NEW_GOAL `!s:real^3. s
IN set_of_list vl ==> s
IN s2`);
(REPEAT STRIP_TAC THEN EXPAND_TAC "s2");
(NEW_GOAL `
set_of_list vl
SUBSET (V
INTER ball (v:real^3, &4))`);
(REWRITE_TAC[
SUBSET_INTER]);
(STRIP_TAC);
(MATCH_MP_TAC Packing3.BARV_SUBSET);
(EXISTS_TAC `3` THEN ASM_REWRITE_TAC[]);
(MATCH_MP_TAC
BARV_3_IMP_FINITE_lemma2);
(EXISTS_TAC `V:real^3->bool`);
(ASM_REWRITE_TAC[]);
(NEW_GOAL `v =
HD [v:real^3]`);
(REWRITE_TAC[
HD]);
(ONCE_REWRITE_TAC[ASSUME `v =
HD [v:real^3]`]);
(REWRITE_TAC[GSYM (ASSUME `truncate_simplex 0 vl = [v:real^3]`)]);
(REWRITE_TAC[ASSUME `vl = [u0; u1; u2; u3:real^3]`]);
(REWRITE_TAC[
TRUNCATE_SIMPLEX_EXPLICIT_0;
HD;
set_of_list]);
(SET_TAC[]);
(UP_ASM_TAC THEN UP_ASM_TAC THEN SET_TAC[]);
(REPEAT STRIP_TAC);
(FIRST_ASSUM MATCH_MP_TAC THEN ASM_REWRITE_TAC[
set_of_list] THEN SET_TAC[]);
(FIRST_ASSUM MATCH_MP_TAC THEN ASM_REWRITE_TAC[
set_of_list] THEN SET_TAC[]);
(FIRST_ASSUM MATCH_MP_TAC THEN ASM_REWRITE_TAC[
set_of_list] THEN SET_TAC[]);
(FIRST_ASSUM MATCH_MP_TAC THEN ASM_REWRITE_TAC[
set_of_list] THEN SET_TAC[]);
(ASM_REWRITE_TAC[]);
(ASM_SIMP_TAC[]);
(NEW_GOAL `
NULLSET (
ball (v, &1))`);
(MATCH_MP_TAC
NEGLIGIBLE_SUBSET);
(EXISTS_TAC `
voronoi_closed V v
INTER ball (v:real^3,
sqrt (&2))`);
(STRIP_TAC);
(ASM_REWRITE_TAC[]);
(REWRITE_TAC[
SUBSET;
IN_INTER;
IN_BALL;
voronoi_closed]);
(REWRITE_TAC[
IN;
IN_ELIM_THM]);
(REPEAT STRIP_TAC);
(ASM_CASES_TAC `w = v:real^3`);
(ASM_REWRITE_TAC[] THEN REAL_ARITH_TAC);
(NEW_GOAL `
dist (v,w) <=
dist (v, x) +
dist (x, w:real^3)`);
(REWRITE_TAC[
DIST_TRIANGLE]);
(NEW_GOAL `&2 <=
dist (v,w:real^3)`);
(UNDISCH_TAC `packing (V:real^3->bool)`);
(REWRITE_TAC[packing] THEN STRIP_TAC THEN FIRST_ASSUM MATCH_MP_TAC);
(ASM_SET_TAC[]);
(REWRITE_WITH `
dist (x,v) =
dist (v,x:real^3)`);
(REWRITE_TAC[
DIST_SYM]);
(ASM_REAL_ARITH_TAC);
(NEW_GOAL `&1 <
sqrt (&2)`);
(REWRITE_WITH `&1 <
sqrt (&2) <=> &1 pow 2 <
sqrt (&2) pow 2`);
(MATCH_MP_TAC Pack1.bp_bdt);
(ASM_SIMP_TAC[
SQRT_POS_LE; REAL_ARITH `&0 <= &1 /\ &0 <= &2`]);
(ASM_SIMP_TAC[
SQRT_POW_2; REAL_ARITH `&0 <= &2`]);
(REAL_ARITH_TAC);
(ASM_REAL_ARITH_TAC);
(NEW_GOAL `F`);
(NEW_GOAL `vol (
ball (v, &1)) = &4 / &3 *
pi * (&1) pow 3`);
(ASM_SIMP_TAC[REAL_ARITH `&0 <= &1`;
VOLUME_BALL]);
(NEW_GOAL `vol (
ball (v, &1)) > &0`);
(ASM_REWRITE_TAC[REAL_ARITH `&4 / &3 *
pi * &1 pow 3 > &0 <=>
&0 < &4 / &3 *
pi`]);
(MATCH_MP_TAC
REAL_LT_MUL);
(STRIP_TAC);
(MATCH_MP_TAC
REAL_LT_DIV THEN REAL_ARITH_TAC);
(REWRITE_TAC[
PI_POS]);
(NEW_GOAL `vol (
ball (v,&1)) = &0`);
(REWRITE_WITH `vol (
ball (v,&1)) = &0 <=>
NULLSET (
ball (v,&1))`);
(MATCH_MP_TAC
MEASURABLE_MEASURE_EQ_0);
(REWRITE_TAC[
MEASURABLE_BALL]);
(ASM_REWRITE_TAC[]);
(ASM_REAL_ARITH_TAC);
(ASM_MESON_TAC[]);
(UP_ASM_TAC THEN REWRITE_TAC[SET_RULE
`~(!i ul. 1 <= i /\ i <= 4 /\ barV V 3 ul /\ truncate_simplex 0 ul = [v]
==>
NULLSET (mcell i V ul)) <=>
(?i ul. 1 <= i /\ i <= 4 /\ barV V 3 ul /\ truncate_simplex 0 ul = [v] /\
~NULLSET (mcell i V ul))`]);
(REPEAT STRIP_TAC);
(EXISTS_TAC `mcell i V ul`);
(REPEAT STRIP_TAC);
(EXISTS_TAC `i:num` THEN EXISTS_TAC `ul:(real^3)list`);
(ASM_REWRITE_TAC[]);
(ASM_MESON_TAC[]);
(NEW_GOAL `V
INTER mcell i V ul =
set_of_list (truncate_simplex (i - 1) ul)`);
(MATCH_MP_TAC
LEPJBDJ);
(ASM_REWRITE_TAC[]);
(STRIP_TAC);
(UNDISCH_TAC `~NULLSET (mcell i V ul) ` THEN
ASM_REWRITE_TAC[
NEGLIGIBLE_EMPTY]);
(ASM_REWRITE_TAC[]);
(NEW_GOAL `?u0 u1 u2 u3. ul = [u0;u1;u2;u3:real^3]`);
(MATCH_MP_TAC
BARV_3_EXPLICIT);
(EXISTS_TAC `V:real^3->bool` THEN ASM_REWRITE_TAC[]);
(UP_ASM_TAC THEN STRIP_TAC);
(NEW_GOAL `
set_of_list (truncate_simplex 0 ul)
SUBSET
set_of_list (truncate_simplex (i-1) (ul:(real^3)list))`);
(MATCH_MP_TAC Rogers.TRUNCATE_SIMPLEX_SUBSET);
(ASM_REWRITE_TAC[
LENGTH] THEN ASM_ARITH_TAC);
(UP_ASM_TAC THEN ASM_REWRITE_TAC[
TRUNCATE_SIMPLEX_EXPLICIT_0;
set_of_list]);
(SET_TAC[])]);;