(* ========================================================================== *)
(* FLYSPECK - BOOK FORMALIZATION *)
(* *)
(* Chapter: Local Fan *)
(* Author: Hoang Le Truong *)
(* Date: 2012-04-01 *)
(* ========================================================================= *)
(*
remaining conclusions from appendix to Local Fan chapter
*)
module Otmtotj = struct
open Polyhedron;;
open Sphere;;
open Topology;;
open Fan_misc;;
open Planarity;;
open Conforming;;
open Hypermap;;
open Fan;;
open Topology;;
open Wrgcvdr_cizmrrh;;
open Local_lemmas;;
open Collect_geom;;
open Dih2k_hypermap;;
open Wjscpro;;
open Tecoxbm;;
open Hdplygy;;
open Nkezbfc_local;;
open Flyspeck_constants;;
open Gbycpxs;;
open Pcrttid;;
open Local_lemmas1;;
open Pack_defs;;
open Hales_tactic;;
open Appendix;;
open Hypermap;;
open Fan;;
open Wrgcvdr_cizmrrh;;
open Local_lemmas;;
open Flyspeck_constants;;
open Pack_defs;;
open Hales_tactic;;
open Appendix;;
open Zithlqn;;
open Xwitccn;;
open Ayqjtmd;;
open Jkqewgv;;
open Mtuwlun;;
open Uxckfpe;;
open Sgtrnaf;;
open Yxionxl;;
open Qknvmlb;;
open Odxlstcv2;;
open Yxionxl2;;
open Eyypqdw;;
open Ocbicby;;
open Imjxphr;;
open Nuxcoea;;
open Fektyiy;;
open Hexagons;;
let SCSE_TAC= ASM_REWRITE_TAC[scs_basic;is_scs_v39;mk_unadorned_v39;scs_v39_explicit;CS_ADJ;d_tame;REAL_ARITH`#0.712 < #0.9`;periodic;SET_RULE`{} j <=> {} i`;periodic2;scs_basic;unadorned_v39;scs_prop_equ_v39;LET_DEF;LET_END_DEF;scs_stab_diag_v39;scs_half_slice_v39;
Uxckfpe.ARITH_3_TAC;Uxckfpe.ARITH_6_TAC;Uxckfpe.ARITH_4_TAC;Uxckfpe.ARITH_5_TAC;
scs_5M1;scs_3M1;scs_6I1;scs_3T1;scs_4M2;scs_6M1;scs_6T1;scs_5I1;scs_5I2;scs_5I3;scs_5M2;
Terminal.FUNLIST_EXPLICIT;Yrtafyh.PSORT_PERIODIC;PSORT_5_EXPLICIT;
ARITH_RULE`SUC 0=1/\ SUC 1=2/\ SUC 2=3/\ SUC 3=4/\ SUC 4=5/\ SUC 5=6/\ SUC 6=7/\ SUC 7=8`];;
let DIAG_5_EQU_PSORT=prove(`~(i MOD 5 = j MOD 5) /\
~(SUC i MOD 5 = j MOD 5) /\
~(i MOD 5 = SUC j MOD 5)
<=> psort 5 (i,j) = 0,2\/ psort 5 (i,j) = 0,3\/ psort 5 (i,j) = 1,3
\/ psort 5 (i,j) = 1,4\/ psort 5 (i,j) = 2,4`,
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[
PSORT_5_EXPLICIT;
PAIR_EQ]
THEN ARITH_TAC);;
let BB_5I1_IS_BB_5M2=prove_by_refinement(`
BBs_v39 scs_5I1 v/\ (!i j.
scs_diag 5 i j ==> cstab <=
dist(v i,v j)) ==>
BBs_v39 scs_5M2 v`,
[
REWRITE_TAC[
scs_basic;
LET_DEF;
LET_END_DEF;
BBs_v39;
scs_stab_diag_v39;scs_v39_explicit;
mk_unadorned_v39;
scs_5I1;
scs_5M2;
CS_ADJ;
scs_diag;ARITH_RULE`~(5<=3)`]
THEN REPEAT RESA_TAC
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i MOD 5= j MOD 5\/ ~(i MOD 5= j MOD 5)`)
THEN RESA_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 2
THEN DICH_TAC 2
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 2
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 2
THEN DICH_TAC 2
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN DICH_TAC 1
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 2
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN DICH_TAC 1
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC
THEN THAYTHE_TAC(8-2)[`i`;`j`]]);;
let BB_5I2_IS_BB_5M2=prove_by_refinement(`
BBs_v39 scs_5I2 v/\ (!i j.
scs_diag 5 i j ==> cstab <=
dist(v i,v j)) ==>
BBs_v39 scs_5M2 v`,
[
REWRITE_TAC[
scs_basic;
LET_DEF;
LET_END_DEF;
BBs_v39;
scs_stab_diag_v39;scs_v39_explicit;
mk_unadorned_v39;
scs_5I2;
scs_5M2;
CS_ADJ;
scs_diag;ARITH_RULE`~(5<=3)`]
THEN REPEAT RESA_TAC
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i MOD 5= j MOD 5\/ ~(i MOD 5= j MOD 5)`)
THEN RESA_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 2
THEN DICH_TAC 2
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 2
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 2
THEN DICH_TAC 2
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN DICH_TAC 1
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 2
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN DICH_TAC 1
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC
THEN THAYTHE_TAC(8-2)[`i`;`j`]]);;
let BB_5I3_IS_BB_5M2=prove_by_refinement(`
BBs_v39 scs_5I3 v/\ (!i j.
scs_diag 5 i j ==> cstab <=
dist(v i,v j)) ==>
BBs_v39 scs_5M2 v`,
[
REWRITE_TAC[
scs_basic;
LET_DEF;
LET_END_DEF;
BBs_v39;
scs_stab_diag_v39;scs_v39_explicit;
mk_unadorned_v39;
scs_5I3;
scs_5M2;
CS_ADJ;
scs_diag;ARITH_RULE`~(5<=3)`]
THEN SCS_TAC
THEN REPEAT RESA_TAC
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i MOD 5= j MOD 5\/ ~(i MOD 5= j MOD 5)`)
THEN RESA_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 0
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN MP_TAC
sqrt8_LE_CSTAB
THEN REAL_ARITH_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 0
THEN DICH_TAC 1
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN MP_TAC
sqrt8_LE_CSTAB
THEN REAL_ARITH_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC
THEN THAYTHE_TAC(8-2)[`i`;`j`]
THEN DICH_TAC 0
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC]);;
let BB_5M1_IS_BB_5M2=prove_by_refinement(`
BBs_v39 scs_5M1 v/\ (!i j.
scs_diag 5 i j ==> cstab <=
dist(v i,v j)) ==>
BBs_v39 scs_5M2 v`,
[
REWRITE_TAC[
scs_basic;
LET_DEF;
LET_END_DEF;
BBs_v39;
scs_stab_diag_v39;scs_v39_explicit;
mk_unadorned_v39;
scs_5M1;
scs_5M2;
CS_ADJ;
scs_diag;ARITH_RULE`~(5<=3)`]
THEN SCS_TAC
THEN REPEAT RESA_TAC
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i MOD 5= j MOD 5\/ ~(i MOD 5= j MOD 5)`)
THEN RESA_TAC;
THAYTHE_TAC (5-2)[`i`;`j`];
MP_TAC(SET_RULE`SUC i MOD 5= j MOD 5\/ ~(SUC i MOD 5= j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (7-2)[`i`;`j`]
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN STRIP_TAC
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`i`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5=0\/ i MOD 5=1\/ i MOD 5=2\/ i MOD 5=3\/i MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC(SET_RULE`i MOD 5= SUC j MOD 5\/ ~(i MOD 5= SUC j MOD 5)`)
THEN RESA_TAC;
MRESAL_TAC Hexagons.PSORT_MOD[`5`;`i`;`j`][ARITH_RULE`~(5=0)`]
THEN THAYTHE_TAC (8-2)[`i`;`j`]
THEN DICH_TAC 1
THEN DICH_TAC 1
THEN STRIP_TAC
THEN SYM_ASSUM_TAC
THEN MRESAL_TAC Yxionxl2.MOD_SUC_MOD[`j`;`5`][ARITH_RULE`1<5`]
THEN SYM_ASSUM_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5=0\/ j MOD 5=1\/ j MOD 5=2\/ j MOD 5=3\/j MOD 5=4`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN SCS_TAC
THEN REWRITE_TAC[h0;cstab]
THEN REAL_ARITH_TAC;
MP_TAC
DIAG_5_EQU_PSORT
THEN RESA_TAC
THEN REWRITE_TAC[
PAIR_EQ]
THEN SCS_TAC]);;
(***********DIST<= cstab*************)
(*****************)
(**********************)
let DIAG_EQ_ADD5=prove(`
scs_diag 5 (i MOD 5) (j MOD 5)<=>
((i MOD 5= (j MOD 5+ 2) MOD 5)\/
(j MOD 5=(i MOD 5+2) MOD 5))`,
REWRITE_TAC[
scs_diag]
THEN MP_TAC(ARITH_RULE`i MOD 5<5==> i MOD 5= 0 \/ i MOD 5= 1 \/i MOD 5= 2 \/
i MOD 5= 3 \/i MOD 5= 4 `)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN MP_TAC(ARITH_RULE`j MOD 5<5==> j MOD 5= 0 \/ j MOD 5= 1 \/j MOD 5= 2 \/
j MOD 5= 3 \/j MOD 5= 4
`)
THEN ASM_SIMP_TAC[
DIVISION;ARITH_RULE`~(5=0)`]
THEN RESA_TAC
THEN ARITH_TAC);;
let EQ_DIAG_STAB_5I1_02=prove(`
scs_arrow_v39
{
scs_stab_diag_v39 scs_5I1 (i + 2) i }
{
scs_stab_diag_v39 scs_5I1 0 2}`,
MRESA_TAC
STAB_SYM[`
scs_5I1`;`2`;`0`]
THEN MP_TAC (GEN_ALL Wkeidft.WKEIDFT)
THEN REWRITE_TAC[
LET_DEF;
LET_END_DEF]
THEN STRIP_TAC
THEN MATCH_DICH_TAC 0
THEN ASM_SIMP_TAC[ARITH_RULE`2 + i = (i + 2) + 0/\ 3<6/\ i+1= SUC i`;
K_SCS_5I1;
h0_LT_B_SCS_5I1;
h0_EQ_B_SCS_5I1;
SCS_5I1_IS_SCS;
SCS_5I1_BASIC]
THEN SCS_TAC
THEN ASM_SIMP_TAC[ARITH_RULE`1<5`;Qknvmlb.SUC_MOD_NOT_EQ;]
THEN EXISTS_TAC`&0`
THEN EXISTS_TAC`&2`
THEN EXISTS_TAC`&2 *h0`
THEN EXISTS_TAC`&2 *h0`
THEN EXISTS_TAC`&6`
THEN ASM_SIMP_TAC[
scs_diag;ARITH_RULE`SUC (i + 2)= i+3/\ SUC i= i+1/\ 2+1=3`;ARITH_RULE`1<5/\ ~(5=0)`;Qknvmlb.SUC_MOD_NOT_EQ;Ocbicby.MOD_EQ_MOD_SHIFT]
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i= i+0==> i MOD 5= (i+0) MOD 5`)
THEN GEN_REWRITE_TAC(LAND_CONV o LAND_CONV o DEPTH_CONV)[ARITH_RULE`x+0=x`]
THEN RESA_TAC
THEN ASM_SIMP_TAC[Ocbicby.MOD_EQ_MOD_SHIFT;ARITH_RULE`1<5/\ ~(5=0)/\ 3<5`]
THEN SCS_TAC);;
let EQ_DIAG_STAB_5I2_02=prove(`
scs_arrow_v39
{
scs_stab_diag_v39 scs_5I2 (i + 2) i }
{
scs_stab_diag_v39 scs_5I2 0 2}`,
MRESA_TAC
STAB_SYM[`
scs_5I2`;`2`;`0`]
THEN MP_TAC (GEN_ALL Wkeidft.WKEIDFT)
THEN REWRITE_TAC[
LET_DEF;
LET_END_DEF]
THEN STRIP_TAC
THEN MATCH_DICH_TAC 0
THEN ASM_SIMP_TAC[ARITH_RULE`2 + i = (i + 2) + 0/\ 3<6/\ i+1= SUC i`;
K_SCS_5I2;
h0_LT_B_SCS_5I2;
h0_EQ_B_SCS_5I2;
SCS_5I2_IS_SCS;
SCS_5I2_BASIC]
THEN SCS_TAC
THEN ASM_SIMP_TAC[ARITH_RULE`1<5`;Qknvmlb.SUC_MOD_NOT_EQ;]
THEN EXISTS_TAC`&0`
THEN EXISTS_TAC`&2`
THEN EXISTS_TAC`&2 *h0`
THEN EXISTS_TAC`sqrt8`
THEN EXISTS_TAC`&6`
THEN ASM_SIMP_TAC[
scs_diag;ARITH_RULE`SUC (i + 2)= i+3/\ SUC i= i+1/\ 2+1=3`;ARITH_RULE`1<5/\ ~(5=0)`;Qknvmlb.SUC_MOD_NOT_EQ;Ocbicby.MOD_EQ_MOD_SHIFT]
THEN SCS_TAC
THEN MP_TAC(SET_RULE`i= i+0==> i MOD 5= (i+0) MOD 5`)
THEN GEN_REWRITE_TAC(LAND_CONV o LAND_CONV o DEPTH_CONV)[ARITH_RULE`x+0=x`]
THEN RESA_TAC
THEN ASM_SIMP_TAC[Ocbicby.MOD_EQ_MOD_SHIFT;ARITH_RULE`1<5/\ ~(5=0)/\ 3<5`]
THEN SCS_TAC);;
(*******************)
(*************************)
(***********SCS_BAISC************)
(*****************)
end;;
(*
let check_completeness_claimA_concl =
Ineq.mk_tplate `\x. scs_arrow_v13 (set_of_list x)
*)