needs "../formal_lp/hypermap/ssreflect/list_hypermap_iso-compiled.hl";;
needs "../formal_lp/hypermap/ineqs/lp_ineqs_defs.hl";;
needs "../formal_lp/ineqs/constants_approx.hl";;
needs "tame/ssreflect/tame_lemmas-compiled.hl";;
(* Module Lp_ineqs_proofs*)
module Lp_ineqs_proofs = struct
open Ssrbool;;
open Ssrnat;;
open Seq;;
open Seq2;;
open Sphere;;
open Fan_defs;;
open Hypermap;;
open Hypermap_and_fan;;
open Pack_defs;;
open Tame_defs;;
open Hypermap_iso;;
open Add_triangle;;
open List_hypermap;;
open List_hypermap_iso;;
open Tame_general;;
open Tame_lemmas;;
open Constants_approx;;
open Lp_ineqs_def;;
(* Lemma const1_gt0 *)
let const1_gt0 = Sections.section_proof []
`&0 < const1`
[
(((((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("real_div", [real_div]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LT_MUL", [REAL_LT_MUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_POS", [sol0_POS]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LT_INV", [REAL_LT_INV]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("PI_POS", [PI_POS]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma const1_ge0 *)
let const1_ge0 = Sections.section_proof []
`&0 <= const1`
[
(((((use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_gt0", [const1_gt0]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma tau_fan_eq_tauVEF *)
let tau_fan_eq_tauVEF = Sections.section_proof ["V";"E";"f"]
`lp_tau (V,E) /\ f IN face_set (hypermap_of_fan (V,E))
==> tau_fan (V,E) f = tauVEF (V,E,f)`
[
(((((use_arg_then2 ("lp_tau", [lp_tau]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["tau_h"]))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("tau_h", [])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC));
(((((use_arg_then2 ("tau_fan", [tau_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ABS_REFL", [REAL_ABS_REFL]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma face_map_in_darts_k *)
let face_map_in_darts_k = Sections.section_proof ["H";"k";"d"]
`d IN darts_k k H
==> face_map H d IN darts_k k H /\ inverse (face_map H) d IN darts_k k H`
[
(((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] []))))))));
((((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("lemma_dart_inveriant_under_inverse_maps", [lemma_dart_inveriant_under_inverse_maps]))(thm_tac (new_rewrite [] [])))) THEN ((simp_tac THEN TRY done_tac)));
((split_tac) THEN (congr_tac (`CARD _`)) THEN (((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))) THEN ((use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (thm_tac apply_tac)));
(((((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_in_face", [lemma_in_face]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_power_inverse_in_face", [lemma_power_inverse_in_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("face_refl", [face_refl]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_in_darts_k *)
let f_fan_pair_ext_in_darts_k = Sections.section_proof ["V";"E";"k";"d"]
`FAN (vec 0,V,E)
/\ d IN darts_k k (hypermap_of_fan (V,E))
==> f_fan_pair_ext (V,E) d IN darts_k k (hypermap_of_fan (V,E))
/\ inverse (f_fan_pair_ext (V,E)) d IN darts_k k (hypermap_of_fan (V,E))`
[
(BETA_TAC THEN (case THEN ((move ["fanV"]) THEN (move ["d_in"]))));
(((((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("face_map_in_darts_k", [face_map_in_darts_k]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Section FunctionPair *)
Sections.begin_section "FunctionPair";;
(* Lemma res_inv_subset *)
let res_inv_subset = Sections.section_proof ["f";"s";"s'";"t";"x"]
`s' SUBSET s /\ BIJ f s t /\ x IN IMAGE f s'
==> res_inv f s' x = res_inv f s x`
[
(((((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_IMAGE", [IN_IMAGE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["s'_sub"])) THEN (case THEN (move ["bij_f"])) THEN (case THEN (move ["y"])) THEN (case THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (move ["y_in"]));
((((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("s'_sub", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((fun arg_tac -> (use_arg_then2 ("res_inv_left", [res_inv_left])) (fun fst_arg -> (use_arg_then2 ("y_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (move ["a"]) THEN (move ["b"]) THEN (move ["h"]));
((((use_arg_then2 ("bij_f", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("BIJ", [BIJ]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INJ", [INJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ALL_TAC) THEN (case THEN ((move ["_"]) THEN (move ["f_inj"]))) THEN (move ["_"])));
((((use_arg_then2 ("f_inj", [])) (disch_tac [])) THEN (clear_assumption "f_inj") THEN (DISCH_THEN apply_tac)) THEN ((((use_arg_then2 ("h", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("s'_sub", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(Sections.add_section_var (mk_var ("h1", (`:A->B`))));;
(Sections.add_section_var (mk_var ("h2", (`:C->D`))));;
(Sections.add_section_var (mk_var ("g", (`:A#C -> B#D`))));;
(Sections.add_section_hyp "g_eq" (`!x. g x = h1 (FST x), h2 (SND x)`));;
(* Lemma INJ_pair *)
let INJ_pair = Sections.section_proof ["s1";"t1";"s2";"t2"]
`INJ h1 s1 t1 /\ INJ h2 s2 t2
==> INJ g (s1 CROSS s2) (t1 CROSS t2)`
[
((repeat_tactic 1 9 (((use_arg_then2 ("INJ", [INJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (case THEN ((move ["h1_in"]) THEN (move ["h1_inj"])))) THEN (case THEN ((move ["h2_in"]) THEN (move ["h2_inj"]))));
(((THENL) (split_tac) [(case THEN ((move ["a"]) THEN (move ["b"]))); ((case THEN ((move ["a"]) THEN (move ["b"]))) THEN (case THEN ((move ["c"]) THEN (move ["d"]))))]) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] [])))))));
((BETA_TAC THEN (move ["ab_in"])) THEN ((((use_arg_then2 ("h1_in", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("h2_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((BETA_TAC THEN (case THEN (move ["ab_in"])) THEN (case THEN (move ["cd_in"])) THEN (case THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("h1_inj", [])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("h2_inj", [])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma SURJ_pair *)
let SURJ_pair = Sections.section_proof ["s1";"t1";"s2";"t2"]
`SURJ h1 s1 t1 /\ SURJ h2 s2 t2
==> SURJ g (s1 CROSS s2) (t1 CROSS t2)`
[
((repeat_tactic 1 9 (((use_arg_then2 ("SURJ", [SURJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (case THEN ((move ["h1_in"]) THEN (move ["h1_surj"])))) THEN (case THEN ((move ["h2_in"]) THEN (move ["h2_surj"]))));
(((split_tac) THEN ALL_TAC THEN (case THEN ((move ["a"]) THEN (move ["b"])))) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] [])))))));
((BETA_TAC THEN (move ["ab_in"])) THEN ((((use_arg_then2 ("h1_in", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("h2_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(BETA_TAC THEN (case THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("h1_surj", [])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (case THEN (move ["y1"])) THEN (move ["y1_eq"]) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("h2_surj", [])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (case THEN (move ["y2"])) THEN (move ["y2_eq"]));
(((fun arg_tac -> arg_tac (Arg_term (`y1,y2`))) (term_tac exists_tac)) THEN ((((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y1_eq", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y2_eq", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma BIJ_pair *)
let BIJ_pair = Sections.section_proof ["s1";"t1";"s2";"t2"]
`BIJ h1 s1 t1 /\ BIJ h2 s2 t2
==> BIJ g (s1 CROSS s2) (t1 CROSS t2)`
[
(((repeat_tactic 1 9 (((use_arg_then2 ("BIJ", [BIJ]))(thm_tac (new_rewrite [] []))))) THEN (move ["h"])) THEN ((((use_arg_then2 ("INJ_pair", [INJ_pair]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("SURJ_pair", [SURJ_pair]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma res_inv_pair *)
let res_inv_pair = Sections.section_proof ["s1";"t1";"s2";"t2"]
`BIJ h1 s1 t1 /\ BIJ h2 s2 t2
==> (!a b. a IN t1 /\ b IN t2
==> res_inv g (s1 CROSS s2) (a,b) = res_inv h1 s1 a, res_inv h2 s2 b)`
[
(BETA_TAC THEN (case THEN ((move ["bij_h1"]) THEN (move ["bij_h2"]))) THEN (move ["a"]) THEN (move ["b"]) THEN (case THEN ((move ["a_in"]) THEN (move ["b_in"]))));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("BIJ_pair", [BIJ_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h2", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["bij_g"])));
((((use_arg_then2 ("bij_g", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("BIJ", [BIJ]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INJ", [INJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ALL_TAC) THEN (case THEN ((move ["g_in"]) THEN (move ["g_inj"]))) THEN (move ["_"])));
(((use_arg_then2 ("g_inj", [])) (disch_tac [])) THEN (clear_assumption "g_inj") THEN (DISCH_THEN apply_tac));
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h2", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Finalization of the section FunctionPair *)
let res_inv_subset = Sections.finalize_theorem res_inv_subset;;
let INJ_pair = Sections.finalize_theorem INJ_pair;;
let SURJ_pair = Sections.finalize_theorem SURJ_pair;;
let BIJ_pair = Sections.finalize_theorem BIJ_pair;;
let res_inv_pair = Sections.finalize_theorem res_inv_pair;;
Sections.end_section "FunctionPair";;
(* Lemma darts_of_list_subset *)
let darts_of_list_subset = Sections.section_proof ["L";"v";"w"]
`v,w IN darts_of_list L ==> v IN elements_of_list L /\ w IN elements_of_list L`
[
((((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("elements_of_list", [elements_of_list]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("mem_list_of_darts", [mem_list_of_darts]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["l"])) THEN (case THEN (move ["mem_l"])) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("mem_list_pairs", [mem_list_pairs])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["mem_vw"]));
((repeat_tactic 1 9 (((use_arg_then2 ("list_of_elements", [list_of_elements]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("mem_undup", [mem_undup]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("mem_flatten", [mem_flatten]))(thm_tac (new_rewrite [] []))))));
((split_tac) THEN ((use_arg_then2 ("l", [])) (term_tac exists_tac)) THEN (done_tac));
];;
(* Section Lp_cond *)
Sections.begin_section "Lp_cond";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_var (mk_var ("L", (`:((A)list)list`))));;
(* Lemma lp_cond_lemma *)
let lp_cond_lemma = Sections.section_proof ["f"]
`lp_fan (V,E) /\ good_list L /\ good_list_nodes L
/\ hyp_iso f (hypermap_of_fan (V,E), hypermap_of_list L)
==> ?g h. lp_cond (L, g, h) (V,E)
/\ (!x. h x = if x IN elements_of_list L then
res_inv (fan_list_nodes_iso (f,V,E)) V x else vec 0)`
[
(((((use_arg_then2 ("lp_cond", [lp_cond]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ALL_TAC) THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (case THEN (move ["diag_dist"])) THEN (case THEN ((move ["subV"]) THEN (move ["packV"]))) THEN (case THEN (move ["goodL"])) THEN (case THEN (move ["good_nodes"])) THEN (move ["iso_f"]));
((((use_arg_then2 ("fanV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_surr", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("subV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("packV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("goodL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("good_nodes", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))));
((fun arg_tac -> arg_tac (Arg_term (`fan_list_iso (f, V, E)`))) (term_tac (set_tac "f'")));
((fun arg_tac -> arg_tac (Arg_term (`fan_list_nodes_iso (f, V, E)`))) (term_tac (set_tac "h'")));
((fun arg_tac -> arg_tac (Arg_term (`f' d = h' (FST d), h' (SND d)`))) (term_tac (have_gen_tac ["d"](move ["f'_eq"]))));
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"])) THEN ((((use_arg_then2 ("f'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fan_list_iso", [fan_list_iso]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartV"]) THEN (move ["_"])))));
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (move ["_"])))));
((fun arg_tac -> arg_tac (Arg_term (`hyp_iso f' (hypermap_of_fan (V,E), hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["iso_f'"]))));
((((fun arg_tac -> (use_arg_then2 ("hyp_iso_ext", [hyp_iso_ext])) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac)) THEN ((((use_arg_then2 ("dartV", []))(thm_tac (new_rewrite [] [])))) THEN (move ["d"]) THEN (move ["d_in"])));
(((((use_arg_then2 ("f'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_eq_fan_list_iso", [hyp_iso_eq_fan_list_iso])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`BIJ h' V (elements_of_list L)`))) (term_tac (have_gen_tac [](move ["bij_h'"]))));
(((((use_arg_then2 ("h'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_list_nodes_iso_BIJ", [fan_list_nodes_iso_BIJ])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`\x. if x IN elements_of_list L then res_inv h' V x else vec 0`))) (term_tac (set_tac "h")));
((fun arg_tac -> arg_tac (Arg_term (`\d. h (FST d), h (SND d)`))) (term_tac (set_tac "g")));
(((use_arg_then2 ("g", [])) (term_tac exists_tac)) THEN ((use_arg_then2 ("h", [])) (term_tac exists_tac)));
((THENL_LAST) (split_tac) ((BETA_TAC THEN (move ["x"])) THEN ((((use_arg_then2 ("h_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (done_tac)));
((THENL_FIRST) (split_tac) (((((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))) THEN (move ["v"]) THEN (move ["w"]) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("diag_dist", [])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac)));
((THENL_ROT (-1)) (split_tac));
(((((use_arg_then2 ("g_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (split_tac));
((((fun arg_tac -> (use_arg_then2 ("bij_ext", [bij_ext])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("bij_res_inv", [bij_res_inv])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac) THEN (move ["x"]) THEN (move ["x_in"])) THEN ((((use_arg_then2 ("h_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("x_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((use_arg_then2 ("h_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (move ["x"]));
((THENL_FIRST) (((fun arg_tac -> arg_tac (Arg_term (`x IN _`))) (disch_eq_tac "x_in" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)) ((((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((((use_arg_then2 ("subV", [])) (disch_tac [])) THEN (clear_assumption "subV") THEN ((use_arg_then2 ("contraL", [contraL])) (disch_tac [])) THEN (clear_assumption "contraL") THEN (DISCH_THEN apply_tac)) THEN (((((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("NOT_FORALL_THM", [NOT_FORALL_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("NOT_IMP", [NOT_IMP]))(thm_tac (new_rewrite [] []))))) THEN (move ["v0"])));
(((fun arg_tac -> arg_tac (Arg_term (`vec 0`))) (term_tac exists_tac)) THEN ((((use_arg_then2 ("Ckqowsa_3_points.in_ball_annulus", [Ckqowsa_3_points.in_ball_annulus]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("negb_and", [negb_and]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("negbK", [negbK]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((fun arg_tac -> (use_arg_then2 ("hyp_iso_ext", [hyp_iso_ext])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_inv", [hyp_iso_inv])) (fun fst_arg -> (use_arg_then2 ("iso_f'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("g_def", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ALL_TAC THEN (case THEN ((move ["v"]) THEN (move ["w"]))) THEN (move ["vw_in"]) THEN (simp_tac));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("BIJ_pair", [BIJ_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f'_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["bij_f'"])));
((THENL_ROT (-1)) (((fun arg_tac -> (use_arg_then2 ("res_inv_subset", [res_inv_subset])) (fun fst_arg -> (use_arg_then2 ("bij_f'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((fun arg_tac -> (use_arg_then2 ("darts_of_list_subset", [darts_of_list_subset])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["vw_in2"])));
(((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("res_inv_pair", [res_inv_pair])) (fun fst_arg -> (use_arg_then2 ("f'_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("h_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("vw_in2", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("iso_dart", [iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso_f'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] [])))));
((BETA_TAC THEN (case THEN ((move ["a"]) THEN (move ["b"]))) THEN (DISCH_THEN (fun snd_th -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma lp_fan_trans1 *)
let lp_fan_trans1 = Sections.section_proof ["d"]
`lp_fan (V,E) ==> lp_fan (V, add_diag (V,E) d)`
[
((repeat_tactic 1 9 (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (case THEN (move ["diag"])) THEN (case THEN (move ["subV"])) THEN (move ["packV"]));
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]));
((THENL_LAST) (((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart1_of_fan (V,E)`))) (disch_eq_tac "vw_in1" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)) (((((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((((use_arg_then2 ("packV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("subV", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] []))))));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["dart1_eq"])));
((fun arg_tac -> arg_tac (Arg_term (`V, add_diag (V,E) (v,w) = split_fan_face (V,E) (v,w)`))) (term_tac (have_gen_tac [](move ["add_eq"]))));
(((((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("vw_in1", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in"])));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["fan2"]) THEN (case THEN (move ["_"])) THEN (move ["f_surr2"])))));
((((use_arg_then2 ("add_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fan2", [fan2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_surr2", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))));
(BETA_TAC THEN (move ["a"]) THEN (move ["b"]));
(((((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("negb_or", [negb_or]))(thm_tac (new_rewrite [] []))))) THEN (move ["cond"]));
((((use_arg_then2 ("diag", [])) (disch_tac [])) THEN (clear_assumption "diag") THEN (DISCH_THEN apply_tac)) THEN (done_tac));
];;
(* Lemma lp_cond_trans1 *)
let lp_cond_trans1 = Sections.section_proof ["g";"h";"d"]
`lp_cond (L,g,h) (V,E)
==> lp_cond (split_list_hyp L d,g,h) (V, add_diag (V,E) (g d))`
[
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]));
((repeat_tactic 1 9 (((use_arg_then2 ("lp_cond", [lp_cond]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["fan_cond"])) THEN (case THEN (move ["goodL"])) THEN (case THEN (move ["good_nodes"])) THEN (case THEN (move ["iso_g"])) THEN (case THEN (move ["bij_h"])) THEN (case THEN (move ["g_eq"])) THEN (move ["h_cond"]));
((((use_arg_then2 ("lp_fan_trans1", [lp_fan_trans1]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("fan_cond", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (case THEN (move ["diag_dist"])) THEN (case THEN ((move ["subV"]) THEN (move ["packV"])))));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["dart1_eq"])));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartV"]) THEN (move ["_"])))));
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (move ["_"])))));
((THENL_ROT (-1)) (((fun arg_tac -> arg_tac (Arg_term (`v,w IN darts_of_list L`))) (disch_eq_tac "vw_in" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)));
((((use_arg_then2 ("d_not_in_dart_split_eq", [d_not_in_dart_split_eq]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("darts_of_list", [darts_of_list]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`add_diag (V,E) (g (v,w)) = E`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((ALL_TAC) THEN (done_tac)));
((((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`~(h v, h w IN dart_of_fan (V,E))`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((ALL_TAC) THEN (done_tac)));
(((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN (clear_assumption "vw_in") THEN ((use_arg_then2 ("contra", [contra])) (disch_tac [])) THEN (clear_assumption "contra") THEN (DISCH_THEN apply_tac) THEN (move ["hvw_in"]));
(((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`res_inv g (darts_of_list L) (h v, h w) = v,w`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] [])))))))));
(((fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_inv", [hyp_iso_inv])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC);
((((((use_arg_then2 ("dartV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("hvw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["hvw_inV"])));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v IN elements_of_list L /\ w IN elements_of_list L`))) (term_tac (have_gen_tac [](move ["vw_in"])))) ((repeat_tactic 1 9 (((use_arg_then2 ("h_cond", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("BIJ_pair", [BIJ_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("g_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["bij_g"])));
((THENL_ROT (-1)) (((fun arg_tac -> (use_arg_then2 ("res_inv_subset", [res_inv_subset])) (fun fst_arg -> (use_arg_then2 ("bij_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
(((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("res_inv_pair", [res_inv_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("g_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [2] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("iso_dart", [iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("hvw_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] [])))));
((BETA_TAC THEN (case THEN ((move ["a"]) THEN (move ["b"]))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("darts_of_list_subset", [darts_of_list_subset])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`elements_of_list (split_list_hyp L (v,w)) = elements_of_list L`))) (term_tac (have_gen_tac [](move ["els_eq"]))));
(((repeat_tactic 1 9 (((use_arg_then2 ("elements_of_list", [elements_of_list]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] []))))) THEN ((use_arg_then2 ("perm_eq_set_of_list_eq", [perm_eq_set_of_list_eq])) (thm_tac apply_tac)));
((((use_arg_then2 ("list_of_elements_split", [list_of_elements_split]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((fun arg_tac -> (use_arg_then2 ("hyp_iso_inv", [hyp_iso_inv])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["iso_inv_g"])));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("iso_imp_good_list_split", [iso_imp_good_list_split])) (fun fst_arg -> (use_arg_then2 ("iso_inv_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("good_nodes", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["good_split"])));
((((use_arg_then2 ("good_split", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("iso_imp_good_list_nodes_split", [iso_imp_good_list_nodes_split])) (fun fst_arg -> (use_arg_then2 ("iso_inv_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("els_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_cond", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("bij_h", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("g_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`g (v,w) = h v, h w`))) (term_tac (have_gen_tac [](move ["hvw_eq"])))) ((ALL_TAC) THEN (done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`h v, h w IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["hvw_in"]))));
(((((use_arg_then2 ("hvw_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartV", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`V, add_diag (V,E) (h v,h w) = split_fan_face (V,E) (h v,h w)`))) (term_tac (have_gen_tac [](move ["add_eq"]))));
(((((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("hvw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((use_arg_then2 ("add_eq", []))(thm_tac (new_rewrite [] []))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("hvw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["fan2"]) THEN (case THEN (move ["_"])) THEN (move ["f_surr2"])))));
((fun arg_tac -> arg_tac (Arg_term (`fan_list_iso (res_inv g (dart (hypermap_of_list L)), V, E)`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`hyp_iso f (hypermap_of_fan (V,E), hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["iso_f"]))));
(((fun arg_tac -> (use_arg_then2 ("hyp_iso_ext", [hyp_iso_ext])) (fun fst_arg -> (use_arg_then2 ("iso_inv_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac) THEN (move ["d"]) THEN (move ["d_in"]));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("hyp_iso_eq_fan_list_iso", [hyp_iso_eq_fan_list_iso]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dartV", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`fan_list_nodes_iso (res_inv g (dart (hypermap_of_list L)),V,E)`))) (term_tac (set_tac "h'")));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("BIJ_pair", [BIJ_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("g_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["bij_g"])));
((fun arg_tac -> arg_tac (Arg_term (`x IN elements_of_list L ==> h' (h x) = x`))) (term_tac (have_gen_tac ["x"](move ["h'_eq"]))));
(((((use_arg_then2 ("h_cond", []))(thm_tac (new_rewrite [] [])))) THEN (move ["x_in"])) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("DART_EXISTS", [DART_EXISTS])) (fun fst_arg -> (use_arg_then2 ("x_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("E", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC THEN (case THEN (move ["hy"])) THEN (move ["hxy_in"])));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_eq_fan_list_iso", [hyp_iso_eq_fan_list_iso])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_inv_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("hxy_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("fan_list_iso", [fan_list_iso]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("res_inv_subset", [res_inv_subset])) (fun fst_arg -> (use_arg_then2 ("bij_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("iso_dart", [iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("hxy_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))));
((case THEN (move ["a"]) THEN (move ["b"]) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("darts_of_list_subset", [darts_of_list_subset])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("res_inv_pair", [res_inv_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("g_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("hxy_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`f (h v, h w) = v,w`))) (term_tac (have_gen_tac [](move ["fh_eq"]))));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fan_list_iso", [fan_list_iso]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("h'_eq", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("darts_of_list_subset", [darts_of_list_subset])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("split_list_hyp_iso", [split_list_hyp_iso])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("good_nodes", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("hvw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("fan_list_iso_invariant", [fan_list_iso_invariant]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fh_eq", []))(thm_tac (new_rewrite [] []))))) THEN (move ["iso2_f"]));
(((fun arg_tac -> (use_arg_then2 ("hyp_iso_ext", [hyp_iso_ext])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_inv", [hyp_iso_inv])) (fun fst_arg -> (use_arg_then2 ("iso2_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac) THEN (case THEN ((move ["a"]) THEN (move ["b"]))) THEN (move ["ab_in"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_list_nodes_iso_BIJ", [fan_list_nodes_iso_BIJ])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_inv_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("good_nodes", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] [])))) THEN (move ["bij_h'"]));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("BIJ_pair", [BIJ_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC));
((case THEN (move ["x"]) THEN (move ["y"])) THEN ((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fan_list_iso", [fan_list_iso]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((BETA_TAC THEN (move ["bij_f'"])) THEN (((fun arg_tac -> (use_arg_then2 ("res_inv_subset", [res_inv_subset])) (fun fst_arg -> (use_arg_then2 ("bij_f'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
(((((fun arg_tac -> (use_arg_then2 ("iso_dart", [iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso2_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ab_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["x"]) THEN (move ["y"]))));
((in_tac ["fan2"] true (((use_arg_then2 ("add_eq", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("IN_CROSS", [IN_CROSS]))(thm_tac (new_rewrite [] []))))));
(((DISCH_THEN (fun snd_th -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (done_tac));
((((use_arg_then2 ("ab_in", [])) (disch_tac [])) THEN (clear_assumption "ab_in") THEN BETA_TAC) THEN (((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("good_split", [])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`v,w`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
(((DISCH_THEN (fun snd_th -> (use_arg_then2 ("darts_of_list_subset", [darts_of_list_subset])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN ((((use_arg_then2 ("els_eq", []))(thm_tac (new_rewrite [] [])))) THEN (move ["ab_in2"])));
(((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("res_inv_pair", [res_inv_pair])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))));
(((repeat_tactic 1 9 (((use_arg_then2 ("ab_in2", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))))) THEN (case THEN (move ["x"]) THEN (move ["y"])) THEN ((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fan_list_iso", [fan_list_iso]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h'_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`h a IN V /\ h b IN V`))) (term_tac (have_gen_tac [](move ["hab_inV"]))));
((((use_arg_then2 ("bij_h", [])) (disch_tac [])) THEN (clear_assumption "bij_h") THEN BETA_TAC) THEN (((((use_arg_then2 ("BIJ", [BIJ]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INJ", [INJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ALL_TAC) THEN (case THEN (move ["h_in"])) THEN (move ["_"]) THEN (move ["_"])) THEN (repeat_tactic 1 9 (((use_arg_then2 ("h_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((fun arg_tac -> (use_arg_then2 ("h'_eq", [])) (fun fst_arg -> (use_arg_then2 ("a", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("h'_eq", [])) (fun fst_arg -> (use_arg_then2 ("b", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("res_inv_bij", [res_inv_bij])) (fun fst_arg -> (use_arg_then2 ("bij_h'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Finalization of the section Lp_cond *)
let lp_cond_lemma = Sections.finalize_theorem lp_cond_lemma;;
let lp_fan_trans1 = Sections.finalize_theorem lp_fan_trans1;;
let lp_cond_trans1 = Sections.finalize_theorem lp_cond_trans1;;
Sections.end_section "Lp_cond";;
(* Lemma lp_cond_trans *)
let lp_cond_trans = Sections.section_proof ["L";"V";"E";"g";"h";"ds"]
`lp_cond (L,g,h) (V,E)
==> lp_cond (split_list_list L ds, g, h) (V, add_diag_list (g,V,E) ds)`
[
(BETA_TAC THEN (move ["cond"]));
(((THENL) (((use_arg_then2 ("ds", [])) (disch_tac [])) THEN (clear_assumption "ds") THEN elim) [ALL_TAC; ((move ["h"]) THEN (move ["t"]) THEN (move ["Ih"]))]) THEN ((((use_arg_then2 ("split_list_list", [split_list_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("add_diag_list", [add_diag_list]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("foldr", [foldr]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))));
(((((use_arg_then2 ("split_list_list", [split_list_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("add_diag_list", [add_diag_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("lp_cond_trans1", [lp_cond_trans1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma bij_in *)
let bij_in = Sections.section_proof ["f";"s";"t"]
`BIJ f s t ==> (!x. x IN s ==> f x IN t)`
[
((((((use_arg_then2 ("BIJ", [BIJ]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INJ", [INJ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ALL_TAC) THEN (case THEN (move ["bij_in"])) THEN (move ["_"]) THEN (move ["_"]) THEN (move ["x"]) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("bij_in", [])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac));
];;
(* Lemma list_sum_neg *)
let list_sum_neg = Sections.section_proof ["s";"f"]
`list_sum s (\x. --(f x)) = --(list_sum s f)`
[
(((((use_arg_then2 ("REAL_NEG_MINUS1", [REAL_NEG_MINUS1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_sum_lmul", [list_sum_lmul]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_NEG_MINUS1", [REAL_NEG_MINUS1]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma list_sum_sub *)
let list_sum_sub = Sections.section_proof ["s";"f1";"f2"]
`list_sum s (\x. f1 x - f2 x) = list_sum s f1 - list_sum s f2`
[
(((repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("list_sum_add", [list_sum_add]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_sum_neg", [list_sum_neg]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma list_sum_filter *)
let list_sum_filter = Sections.section_proof ["s";"a";"f"]
`list_sum (filter a s) f = list_sum s (\x. if a x then f x else &0)`
[
(((THENL) (((use_arg_then2 ("s", [])) (disch_tac [])) THEN (clear_assumption "s") THEN elim) [ALL_TAC; ((move ["h"]) THEN (move ["t"]) THEN (move ["Ih"]))]) THEN ((((use_arg_then2 ("filter", [filter]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("list_sum_nil", [list_sum_nil]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))));
((((use_arg_then2 ("list_sum_cons", [list_sum_cons]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("Ih", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((THENL_FIRST) (((fun arg_tac -> arg_tac (Arg_term (`a h`))) (disch_eq_tac "ah" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)) ((((use_arg_then2 ("list_sum_cons", [list_sum_cons]))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((((use_arg_then2 ("REAL_ADD_LID", [REAL_ADD_LID]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Section Contravening *)
Sections.begin_section "Contravening";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_hyp "cV" (`contravening V`));;
(* Let fanV *)
Sections.add_section_lemma "fanV" (Sections.section_proof []
`FAN (vec 0,V,ESTD V)`
[
((((use_arg_then2 ("CONTRAVENING_FAN", [CONTRAVENING_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Lemma contravening_lp_fan *)
let contravening_lp_fan = Sections.section_proof []
`lp_fan (V,ESTD V)`
[
((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fanV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("CONTRAVENING_IMP_FULLY_SURROUNDED", [CONTRAVENING_IMP_FULLY_SURROUNDED]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((in_tac ["cV"] false (((use_arg_then2 ("contravening", [contravening]))(thm_tac (new_rewrite [] []))))) THEN (((repeat_tactic 1 9 (((use_arg_then2 ("cV", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (move ["v"]) THEN (move ["w"]) THEN (case THEN (move ["vV"])) THEN (case THEN (move ["wV"])) THEN (case THEN (move ["vw_neq"]))));
((((use_arg_then2 ("contraR", [contraR])) (disch_tac [])) THEN (clear_assumption "contraR") THEN (DISCH_THEN apply_tac)) THEN ((((use_arg_then2 ("IN_ESTD", [IN_ESTD]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("wV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_neq", []))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma contravening_lp_cond *)
let contravening_lp_cond = Sections.section_proof ["L";"f"]
`good_list L /\ good_list_nodes L
/\ hyp_iso f (hypermap_of_fan (V,ESTD V), hypermap_of_list L)
==> ?g h. lp_cond (L, g, h) (V, ESTD V)`
[
(BETA_TAC THEN (case THEN (move ["goodL"])) THEN (case THEN (move ["good_nodes"])) THEN (move ["iso_f"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("lp_cond_lemma", [lp_cond_lemma])) (fun fst_arg -> (use_arg_then2 ("contravening_lp_fan", [contravening_lp_fan])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("good_nodes", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["g"]) THEN (case THEN (move ["h"])) THEN (case THEN (move ["cond"])) THEN (move ["_"])))));
((((use_arg_then2 ("g", [])) (term_tac exists_tac)) THEN ((use_arg_then2 ("h", [])) (term_tac exists_tac))) THEN (done_tac));
];;
(* Lemma contravening_lp_cond_alt *)
let contravening_lp_cond_alt = Sections.section_proof ["L"]
`good_list L
/\ 2 * (sizel (list_of_elements L) + sizel (list_of_faces L)) = sizel (list_of_darts L) + 4
/\ (iso) (hypermap_of_fan (V,ESTD V)) (hypermap_of_list L)
==> ?g h. lp_cond (L, g, h) (V, ESTD V)`
[
(BETA_TAC THEN (case THEN (move ["goodL"])) THEN (case THEN (move ["eq"])) THEN (move ["iso"]));
((fun arg_tac -> (use_arg_then2 ("iso_imp_hyp_iso", [iso_imp_hyp_iso])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["f"]) THEN (move ["iso_f"])))));
(((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("contravening_lp_cond", [contravening_lp_cond])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("iso_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((((fun arg_tac -> (use_arg_then2 ("good_list_nodes_size_condition", [good_list_nodes_size_condition])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("iso_planar", [iso_planar])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("iso_connected", [iso_connected])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("iso_edge_nondegenerate", [iso_edge_nondegenerate])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("Jgtdebu.JGTDEBU5", [Jgtdebu.JGTDEBU5]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("Jgtdebu.JGTDEBU3", [Jgtdebu.JGTDEBU3]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("Jgtdebu.JGTDEBU1", [Jgtdebu.JGTDEBU1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Bij *)
Sections.begin_section "Bij";;
(Sections.add_section_var (mk_var ("h", (`:num->real^3`))));;
(Sections.add_section_var (mk_var ("L", (`:((num)list)list`))));;
(Sections.add_section_hyp "bij_h" (`BIJ h (elements_of_list L) V`));;
(* Lemma lnsum_ineq *)
let lnsum_ineq = Sections.section_proof []
`&12 <= list_sum (list_of_elements L) (ln_list h)`
[
((((use_arg_then2 ("cV", [])) (disch_tac [])) THEN (clear_assumption "cV") THEN BETA_TAC) THEN ((((use_arg_then2 ("contravening", [contravening]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (case THEN (move ["ineq"])) THEN (move ["_"])));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`list_sum (list_of_elements L) (ln_list h) = scriptL V`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((((use_arg_then2 ("ineq", [ineq])) (disch_tac [])) THEN (clear_assumption "ineq") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("list_sum_set_of_list", [list_sum_set_of_list]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("uniq_list_of_elements", [uniq_list_of_elements]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("elements_of_list", [elements_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("scriptL", [scriptL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("Basics.BIJ_SUM", [Basics.BIJ_SUM])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("SUM_EQ", [SUM_EQ])) (thm_tac apply_tac)) THEN (move ["v"]) THEN (move ["vV"]) THEN (simp_tac)) THEN ((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Let cardV_eq *)
Sections.add_section_lemma "cardV_eq" (Sections.section_proof []
`CARD V = LENGTH (list_of_elements L)`
[
((((use_arg_then2 ("Seq.size", [Seq.size]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("card_set_of_list_uniq", [card_set_of_list_uniq]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("uniq_list_of_elements", [uniq_list_of_elements]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("elements_of_list", [elements_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((fun arg_tac -> (use_arg_then2 ("bij_card_eq", [bij_card_eq])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("elements_of_list", [elements_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("FINITE_SET_OF_LIST", [FINITE_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let y_ineqs *)
Sections.add_section_lemma "y_ineqs" (Sections.section_proof ["y"]
`MEM y (list_of_elements L) ==> &2 <= norm (h y) /\ norm (h y) <= &2 * h0`
[
(((((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("elements_of_list", [elements_of_list]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (move ["y_in"]));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`h y IN ball_annulus`))) (term_tac (have_gen_tac []ALL_TAC)))) (((((use_arg_then2 ("Fnjlbxs.in_ball_annulus", [Fnjlbxs.in_ball_annulus]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN ((((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) THEN (done_tac)));
((((use_arg_then2 ("cV", [])) (disch_tac [])) THEN (clear_assumption "cV") THEN BETA_TAC) THEN (((((use_arg_then2 ("contravening", [contravening]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("bij_in", [bij_in])) (fun fst_arg -> (use_arg_then2 ("bij_h", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Lemma lnsum13_ineq *)
let lnsum13_ineq = Sections.section_proof []
`sizel (list_of_elements L) = 13 ==>
list_sum (list_of_elements L) (\y. yn_list h y - &2) <= #0.52`
[
((((use_arg_then2 ("cV", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("contravening", [contravening]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["_"])) THEN (case THEN (move ["in_ba"])) THEN (move ["_"]) THEN (move ["size_eq"])));
((fun arg_tac -> arg_tac (Arg_term (`list_sum (list_of_elements L) (ln_list h)
= inv (h0 - &1) * list_sum (list_of_elements L) (\y. h0 - yn_list h y / &2)`))) (term_tac (have_gen_tac [](move ["eq"]))));
((((use_arg_then2 ("list_sum_lmul", [list_sum_lmul]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_MUL_SYM", [REAL_MUL_SYM]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("real_div", [real_div]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lfun", [lfun]))(gsym_then (thm_tac (new_rewrite [] []))))));
(((use_arg_then2 ("list_sum_eq", [list_sum_eq])) (thm_tac apply_tac)) THEN (move ["y"]) THEN (move ["mem_y"]));
(((repeat_tactic 1 9 (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("Nonlinear_lemma.lmfun_lfun", [Nonlinear_lemma.lmfun_lfun]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("y_ineqs", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((((use_arg_then2 ("lnsum_ineq", [lnsum_ineq])) (disch_tac [])) THEN (clear_assumption "lnsum_ineq") THEN BETA_TAC) THEN ((((use_arg_then2 ("eq", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("list_sum_sub", [list_sum_sub]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("real_div", [real_div]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_sum_rmul", [list_sum_rmul]))(thm_tac (new_rewrite [] []))))));
((((fun arg_tac -> (use_arg_then2 ("list_sum_const", [list_sum_const])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`h0`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("list_sum_const", [list_sum_const])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`&2`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("size_eq", []))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma lnsum13_high_strict *)
let lnsum13_high_strict = Sections.section_proof ["i"]
`MEM i (list_of_elements L)
/\ sizel (list_of_elements L) = 13 /\ #2.36 <= yn_list h i
==> !j. MEM j (list_of_elements L) /\ ~(j = i) ==> yn_list h j < #2.18`
[
(BETA_TAC THEN (case THEN (move ["mem_i"])) THEN (case THEN (move ["size13"])) THEN (move ["ineq"]) THEN (move ["j"]) THEN (case THEN (move ["mem_j"])) THEN (move ["j_neq_i"]));
((fun arg_tac -> arg_tac (Arg_term (`delete1 i (delete1 j (list_of_elements L))`))) (term_tac (set_tac "s")));
((fun arg_tac -> arg_tac (Arg_term (`list_sum s (\y. yn_list h y - &2)
= list_sum (list_of_elements L) (\y. yn_list h y - &2) - (yn_list h i + yn_list h j - &4)`))) (term_tac (have_gen_tac []ALL_TAC)));
((((use_arg_then2 ("s_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("list_sum_delete1", [list_sum_delete1]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("mem_j", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("mem_delete1_uniq", [mem_delete1_uniq]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("uniq_list_of_elements", [uniq_list_of_elements]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("j_neq_i", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("mem_i", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)) THEN (arith_tac) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`&0 <= list_sum s (\y. yn_list h y - &2)`))) (term_tac (have_gen_tac []ALL_TAC)));
(((((use_arg_then2 ("list_sum_ge0", [list_sum_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (move ["x"]) THEN (move ["mem_x"]) THEN (simp_tac));
(((((use_arg_then2 ("REAL_SUB_LE", [REAL_SUB_LE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y_ineqs", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("mem_delete1", [mem_delete1])) (fun fst_arg -> (use_arg_then2 ("j", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("mem_delete1", [mem_delete1])) (fun fst_arg -> (use_arg_then2 ("i", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("s_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("ineq", [ineq])) (disch_tac [])) THEN (clear_assumption "ineq") THEN ((fun arg_tac -> (use_arg_then2 ("lnsum13_ineq", [lnsum13_ineq])) (fun fst_arg -> (use_arg_then2 ("size13", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma lnsum13_high *)
let lnsum13_high = Sections.section_proof ["i"]
`MEM i (list_of_elements L)
/\ sizel (list_of_elements L) = 13 /\ #2.36 <= yn_list h i
==> ALL (\j. ~(j = i) ==> yn_list h j <= #2.18) (list_of_elements L)`
[
((((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["mem_i"])) THEN (case THEN (move ["size13"])) THEN (move ["ineq"]) THEN (move ["j"]) THEN (simp_tac) THEN (move ["mem_j"]) THEN (move ["j_neq_i"]));
(((((use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("lnsum13_high_strict", [lnsum13_high_strict])) (fun fst_arg -> (use_arg_then2 ("mem_i", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma lnsum13_mid *)
let lnsum13_mid = Sections.section_proof ["i";"j"]
`MEM i (list_of_elements L) /\ MEM j (list_of_elements L) /\ ~(i = j)
/\ sizel (list_of_elements L) = 13
/\ #2.18 <= yn_list h i /\ #2.18 <= yn_list h j
==> ALL (\k. ~(k = i) /\ ~(k = j) ==> yn_list h k <= #2.18) (list_of_elements L)
/\ yn_list h i <= #2.36 /\ yn_list h j <= #2.36`
[
((THENL_ROT (-1)) (((((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["mem_i"])) THEN (case THEN (move ["mem_j"])) THEN (case THEN (move ["i_neq_j"])) THEN (case THEN (move ["size13"])) THEN (move ["ineqs"]) THEN (simp_tac)) THEN (split_tac)));
((((use_arg_then2 ("i_neq_j", [])) (disch_tac [])) THEN (clear_assumption "i_neq_j") THEN ((use_arg_then2 ("contraR", [contraR])) (disch_tac [])) THEN (clear_assumption "contraR") THEN (DISCH_THEN apply_tac)) THEN (((use_arg_then2 ("negb_and", [negb_and]))(thm_tac (new_rewrite [] [])))));
((repeat_tactic 1 9 (((use_arg_then2 ("REAL_NOT_LE", [REAL_NOT_LE]))(thm_tac (new_rewrite [] []))))) THEN (case THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lnsum13_high_strict", [lnsum13_high_strict])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN ((ANTS_TAC) THEN ((TRY done_tac))));
((BETA_TAC THEN ((fun arg_tac -> (conv_thm_tac DISCH_THEN) (fun fst_arg -> (use_arg_then2 ("mem_j", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac MP_TAC))) THEN (((use_arg_then2 ("ineqs", [])) (disch_tac [])) THEN (clear_assumption "ineqs") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((BETA_TAC THEN ((fun arg_tac -> (conv_thm_tac DISCH_THEN) (fun fst_arg -> (use_arg_then2 ("mem_i", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac MP_TAC))) THEN (((use_arg_then2 ("ineqs", [])) (disch_tac [])) THEN (clear_assumption "ineqs") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
(BETA_TAC THEN (move ["k"]) THEN (move ["mem_k"]) THEN (move ["k_neq"]));
((fun arg_tac -> arg_tac (Arg_term (`delete1 k (delete1 i (delete1 j (list_of_elements L)))`))) (term_tac (set_tac "s")));
((fun arg_tac -> arg_tac (Arg_term (`list_sum s (\y. yn_list h y - &2)
= list_sum (list_of_elements L) (\y. yn_list h y - &2)
- (yn_list h k + yn_list h i + yn_list h j - &6)`))) (term_tac (have_gen_tac []ALL_TAC)));
((((use_arg_then2 ("s_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("list_sum_delete1", [list_sum_delete1]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("mem_j", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((repeat_tactic 1 9 (((use_arg_then2 ("mem_delete1_uniq", [mem_delete1_uniq]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("uniq_delete1", [uniq_delete1]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("uniq_list_of_elements", [uniq_list_of_elements]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("i_neq_j", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("mem_i", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("k_neq", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("mem_k", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)) THEN (arith_tac) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`&0 <= list_sum s (\y. yn_list h y - &2)`))) (term_tac (have_gen_tac []ALL_TAC)));
(((((use_arg_then2 ("list_sum_ge0", [list_sum_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (move ["x"]) THEN (move ["mem_x"]) THEN (simp_tac));
(((((use_arg_then2 ("REAL_SUB_LE", [REAL_SUB_LE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y_ineqs", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("mem_delete1", [mem_delete1])) (fun fst_arg -> (use_arg_then2 ("j", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("mem_delete1", [mem_delete1])) (fun fst_arg -> (use_arg_then2 ("i", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("mem_delete1", [mem_delete1])) (fun fst_arg -> (use_arg_then2 ("k", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("s_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("ineqs", [])) (disch_tac [])) THEN (clear_assumption "ineqs") THEN ((fun arg_tac -> (use_arg_then2 ("lnsum13_ineq", [lnsum13_ineq])) (fun fst_arg -> (use_arg_then2 ("size13", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section Bij *)
let lnsum_ineq = Sections.finalize_theorem lnsum_ineq;;
let lnsum13_ineq = Sections.finalize_theorem lnsum13_ineq;;
let lnsum13_high_strict = Sections.finalize_theorem lnsum13_high_strict;;
let lnsum13_high = Sections.finalize_theorem lnsum13_high;;
let lnsum13_mid = Sections.finalize_theorem lnsum13_mid;;
Sections.end_section "Bij";;
(* Finalization of the section Contravening *)
let contravening_lp_fan = Sections.finalize_theorem contravening_lp_fan;;
let contravening_lp_cond = Sections.finalize_theorem contravening_lp_cond;;
let contravening_lp_cond_alt = Sections.finalize_theorem contravening_lp_cond_alt;;
let lnsum_ineq = Sections.finalize_theorem lnsum_ineq;;
let lnsum13_ineq = Sections.finalize_theorem lnsum13_ineq;;
let lnsum13_high_strict = Sections.finalize_theorem lnsum13_high_strict;;
let lnsum13_high = Sections.finalize_theorem lnsum13_high;;
let lnsum13_mid = Sections.finalize_theorem lnsum13_mid;;
Sections.end_section "Contravening";;
(* Lemma hyp_iso_comm_power *)
let hyp_iso_comm_power = Sections.section_proof ["H";"G";"g";"d"]
`hyp_iso g (G, H) /\ d IN dart G
==> (!k. (face_map H POWER k) (g d) = g ((face_map G POWER k) d))`
[
(BETA_TAC THEN (case THEN ((move ["iso_g"]) THEN (move ["d_in"]))));
((THENL_FIRST) ((THENL) elim [ALL_TAC; ((move ["k"]) THEN (move ["Ih"]))]) (((repeat_tactic 1 9 (((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("COM_POWER", [COM_POWER]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("Ih", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_comm", [hyp_iso_comm])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("lemma_dart_invariant_power_face", [lemma_dart_invariant_power_face]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section ExtraDefs *)
Sections.begin_section "ExtraDefs";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_var (mk_var ("L", (`:((num)list)list`))));;
(Sections.add_section_var (mk_var ("g", (`:(num#num -> real^3#real^3)`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(Sections.add_section_hyp "goodL" (`good_list L`));;
(Sections.add_section_hyp "iso_g" (`hyp_iso g (hypermap_of_list L, hypermap_of_fan (V,E))`));;
(* Lemma y8_list_def *)
let y8_list_def = Sections.section_proof []
`ALL (\d. y8_list (g,V,E) d
= ye_list g (inverse (f_list_ext L) (inverse (f_list_ext L) d))) (list_of_darts L)`
[
(((((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (move ["d"]) THEN (move ["mem_d"]));
((repeat_tactic 1 9 (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))));
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
((((use_arg_then2 ("mem_d", [])) (disch_tac [])) THEN (clear_assumption "mem_d") THEN BETA_TAC) THEN (((((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (move ["d_in"])));
((((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("hyp_iso_inverse_comm", [hyp_iso_inverse_comm])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_dart_inveriant_under_inverse_maps", [lemma_dart_inveriant_under_inverse_maps]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(Sections.add_section_var (mk_var ("h", (`:num -> real^3`))));;
(Sections.add_section_hyp "g_eq" (`!x. g x = h (FST x), h (SND x)`));;
(* Lemma y4'_list_def *)
let y4'_list_def = Sections.section_proof []
`ALL (\d. y4'_list (g,V,E) d
= ye_list g (SND d, FST (inverse (f_list_ext L) d))) (list_of_darts L)`
[
(((((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (move ["d"]) THEN (move ["mem_d"]));
((((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (use_arg_then2 ("d", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [3] [])))) THEN (((use_arg_then2 ("pair_expand", [pair_expand]))(gsym_then (thm_tac (new_rewrite [] []))))));
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceH"])))));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart (hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((repeat_tactic 1 9 (((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("g_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("faceH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_inverse_comm", [hyp_iso_inverse_comm])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4'_list_f_def *)
let y4'_list_f_def = Sections.section_proof []
`ALL (\d. y4'_list (g,V,E) (f_list_ext L d)
= ye_list g (SND (f_list_ext L d), FST d)) (list_of_darts L)`
[
(((use_arg_then2 ("y4'_list_def", [y4'_list_def])) (disch_tac [])) THEN (clear_assumption "y4'_list_def") THEN BETA_TAC);
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
(((repeat_tactic 1 9 (((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (simp_tac)) THEN (move ["eq1"]) THEN (move ["d"]) THEN (move ["mem_d"]));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart (hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((use_arg_then2 ("eq1", []))(thm_tac (new_rewrite [] []))));
(((((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`darts_of_list L`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("hypermap_lemma", [hypermap_lemma]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4'_list_inv_f_def *)
let y4'_list_inv_f_def = Sections.section_proof []
`ALL (\d. y4'_list (g,V,E) (inverse (f_list_ext L) d)
= ye_list g (FST d, FST ((inverse (f_list_ext L) POWER 2) d))) (list_of_darts L)`
[
(((use_arg_then2 ("y4'_list_def", [y4'_list_def])) (disch_tac [])) THEN (clear_assumption "y4'_list_def") THEN BETA_TAC);
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
(((repeat_tactic 1 9 (((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (simp_tac)) THEN (move ["eq1"]) THEN (move ["d"]) THEN (move ["mem_d"]));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart (hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((use_arg_then2 ("eq1", []))(thm_tac (new_rewrite [] []))));
(((((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_inveriant_under_inverse_maps", [lemma_dart_inveriant_under_inverse_maps]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("goodL", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("good_list", [good_list]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["uniqL"])) THEN (move ["_"])));
(((((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN ((congr_tac (`ye_list g (_1, _2)`)) THEN ((TRY done_tac))));
((((use_arg_then2 ("f_list_ext_inverse", [f_list_ext_inverse]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("d_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("mem_d", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart_in_face", [dart_in_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("find_face_alt", [find_face_alt]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (use_arg_then2 ("d", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))));
(((DISCH_THEN (fun snd_th -> (use_arg_then2 ("prev_el_list_pairs_general", [prev_el_list_pairs_general])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (case THEN (move ["z"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4'_list_ff_def *)
let y4'_list_ff_def = Sections.section_proof []
`ALL (\d. y4'_list (g,V,E) ((f_list_ext L POWER 2) d)
= ye_list g (SND ((f_list_ext L POWER 2) d), SND d)) (list_of_darts L)`
[
((((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["d"]) THEN (move ["mem_d"]) THEN (simp_tac));
((repeat_tactic 1 9 (((use_arg_then2 ("list_defs_th", [list_defs_th]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))));
((fun arg_tac -> arg_tac (Arg_term (`g (SND ((f_list_ext L POWER 2) d), SND d) = SND (g ((f_list_ext L POWER 2) d)), SND (g d)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
((repeat_tactic 1 9 (((use_arg_then2 ("g_eq", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceH"])))));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart (hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_comm_power", [hyp_iso_comm_power])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("faceH", []))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN ((congr_tac (`dist (_1, _2)`)) THEN ((TRY done_tac))));
((((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse _`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("o_ASSOC", [o_ASSOC]))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES_o", [PERMUTES_INVERSES_o])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] [])))));
(((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] []))));
(((fun arg_tac -> arg_tac (Arg_term (`g d IN _`))) (disch_eq_tac "gd_in1" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac));
(((((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`g d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [1] [])))) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso_g", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart_of_fan_eq", [dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("gd_in1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("orFb", [orFb]))(thm_tac (new_rewrite [] []))))));
((((((use_arg_then2 ("IN_ELIM_THM", [IN_ELIM_THM]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`g d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [1] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["v"])) THEN (case THEN (move ["_"])) THEN (case THEN ((((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) THEN (done_tac));
];;
(* Lemma y4'_list_fff_def *)
let y4'_list_fff_def = Sections.section_proof []
`ALL (\d. y4'_list (g,V,E) ((f_list_ext L POWER 3) d)
= ye_list g (SND ((f_list_ext L POWER 3) d), SND (f_list_ext L d))) (list_of_darts L)`
[
(((use_arg_then2 ("y4'_list_ff_def", [y4'_list_ff_def])) (disch_tac [])) THEN (clear_assumption "y4'_list_ff_def") THEN BETA_TAC);
((fun arg_tac -> (use_arg_then2 ("components_hypermap_of_list", [components_hypermap_of_list])) (fun fst_arg -> (use_arg_then2 ("goodL", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartL"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["faceL"])))));
(((repeat_tactic 1 9 (((use_arg_then2 ("ALL_MEM", [ALL_MEM]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (simp_tac)) THEN (move ["eq1"]) THEN (move ["d"]) THEN (move ["mem_d"]));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart (hypermap_of_list L)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartL", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("THREE", [THREE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq1", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("IN_SET_OF_LIST", [IN_SET_OF_LIST]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("darts_of_list", [darts_of_list]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("faceL", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section ExtraDefs *)
let y8_list_def = Sections.finalize_theorem y8_list_def;;
let y4'_list_def = Sections.finalize_theorem y4'_list_def;;
let y4'_list_f_def = Sections.finalize_theorem y4'_list_f_def;;
let y4'_list_inv_f_def = Sections.finalize_theorem y4'_list_inv_f_def;;
let y4'_list_ff_def = Sections.finalize_theorem y4'_list_ff_def;;
let y4'_list_fff_def = Sections.finalize_theorem y4'_list_fff_def;;
Sections.end_section "ExtraDefs";;
(* Section ExtraFan *)
Sections.begin_section "ExtraFan";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(* Let dartH *)
Sections.add_section_lemma "dartH" (Sections.section_proof []
`dart (hypermap_of_fan (V,E)) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Lemma f_fan_pair_ext_power_inverse *)
let f_fan_pair_ext_power_inverse = Sections.section_proof ["k";"d"]
`d IN dart_of_fan (V,E)
/\ k < CARD (face (hypermap_of_fan (V,E)) d)
==> (f_fan_pair_ext (V,E) POWER k) d
= (inverse (f_fan_pair_ext (V,E)) POWER (CARD (face (hypermap_of_fan (V,E)) d) - k)) d`
[
(BETA_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["k_lt"]))));
((fun arg_tac -> arg_tac (Arg_term (`CARD _`))) (term_tac (set_tac "n")));
(((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))));
(((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("FINITE_ORBIT_MAP_INVERSE", [FINITE_ORBIT_MAP_INVERSE])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`dart_of_fan (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("n", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))));
(((((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("face_map_and_darts", [face_map_and_darts]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("face", [face]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("n_def", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("k_lt", [])) (disch_tac [])) THEN (clear_assumption "k_lt") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`n - (n - k) = k:num`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((ALL_TAC) THEN (done_tac)));
((((use_arg_then2 ("k_lt", [])) (disch_tac [])) THEN (clear_assumption "k_lt") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_power_in_dart *)
let f_fan_pair_ext_power_in_dart = Sections.section_proof ["k";"d"]
`d IN dart_of_fan (V,E)
==> (f_fan_pair_ext (V,E) POWER k) d IN dart_of_fan (V,E)`
[
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (move ["d_in"]));
((((use_arg_then2 ("lemma_dart_invariant_power_face", [lemma_dart_invariant_power_face]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_power_inj *)
let f_fan_pair_ext_power_inj = Sections.section_proof ["k1";"k2";"d"]
`d IN dart_of_fan (V,E)
/\ k1 < CARD (face (hypermap_of_fan (V,E)) d) /\ k2 < CARD (face (hypermap_of_fan (V,E)) d)
==> ((f_fan_pair_ext (V,E) POWER k1) d = (f_fan_pair_ext (V,E) POWER k2) d
<=> k1 = k2)`
[
((fun arg_tac -> arg_tac (Arg_term (`CARD _`))) (term_tac (set_tac "n")));
(BETA_TAC THEN (case THEN (move ["d_in"])) THEN (case THEN (move ["k1_lt"])) THEN (move ["k2_lt"]));
((THENL_LAST) (split_tac) ((BETA_TAC THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
(((DISCH_THEN (fun snd_th -> (fun arg_tac -> (use_arg_then2 ("ORBIT_MAP_INJ", [ORBIT_MAP_INJ])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (DISCH_THEN apply_tac) THEN ((use_arg_then2 ("n", [])) (term_tac exists_tac)));
(((((fun arg_tac -> (use_arg_then2 ("FINITE_DART_OF_FAN", [FINITE_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("face", [face]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_in_dart1 *)
let f_fan_pair_ext_in_dart1 = Sections.section_proof ["d"]
`d IN dart1_of_fan (V,E) ==>
f_fan_pair_ext (V,E) d IN dart1_of_fan (V,E)`
[
((BETA_TAC THEN (move ["d_in"])) THEN ((((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("d_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("E_N_F_IN_DART1_OF_FAN", [E_N_F_IN_DART1_OF_FAN]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_power_in_dart1 *)
let f_fan_pair_ext_power_in_dart1 = Sections.section_proof ["k";"d"]
`d IN dart1_of_fan (V,E)
==> (f_fan_pair_ext (V,E) POWER k) d IN dart1_of_fan (V,E)`
[
(BETA_TAC THEN (move ["d_in"]));
((THENL_FIRST) ((THENL) (((use_arg_then2 ("k", [])) (disch_tac [])) THEN (clear_assumption "k") THEN elim) [ALL_TAC; ((move ["k"]) THEN (move ["Ih"]))]) (((((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
(((((use_arg_then2 ("COM_POWER", [COM_POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_dart1", [f_fan_pair_ext_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_in_dart *)
let f_fan_pair_ext_in_dart = Sections.section_proof ["d"]
`d IN dart_of_fan (V,E)
==> f_fan_pair_ext (V,E) d IN dart_of_fan (V,E)`
[
((BETA_TAC THEN (move ["d_in"])) THEN ((((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext_power_in_dart", [f_fan_pair_ext_power_in_dart]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma inv_f_fan_pair_ext_power_in_dart1 *)
let inv_f_fan_pair_ext_power_in_dart1 = Sections.section_proof ["k";"d"]
`d IN dart1_of_fan (V,E)
==> (inverse (f_fan_pair_ext (V,E)) POWER k) d IN dart1_of_fan (V,E)`
[
(BETA_TAC THEN (move ["d_in"]));
((THENL_FIRST) ((THENL) (((use_arg_then2 ("k", [])) (disch_tac [])) THEN (clear_assumption "k") THEN elim) [ALL_TAC; ((move ["k"]) THEN (move ["Ih"]))]) (((((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
(((((use_arg_then2 ("COM_POWER", [COM_POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INVERSE_F_IN_DART1_OF_FAN", [INVERSE_F_IN_DART1_OF_FAN]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma face_eq_power *)
let face_eq_power = Sections.section_proof ["k";"d"]
`d IN darts_k k (hypermap_of_fan (V,E))
==> face (hypermap_of_fan (V,E)) d = {(f_fan_pair_ext (V,E) POWER i) d | i < k}`
[
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["hypV"])));
(((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("face", [face]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("hypV", []))(thm_tac (new_rewrite [] [])))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["card_f"]));
(((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("FINITE_ORBIT_MAP", [FINITE_ORBIT_MAP])) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART1_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART1_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("finite_dart1", [finite_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma face4_eq *)
let face4_eq = Sections.section_proof ["v";"w"]
`let w' = sigma_fan (vec 0) V E v w in
let u = sigma_fan (vec 0) V E w' v in
v,w IN darts_k 4 (hypermap_of_fan (V,E))
==> (f_fan_pair_ext (V,E) (v,w) = (w,u)
/\ (f_fan_pair_ext (V,E) POWER 2) (v,w) = (u,w')
/\ (f_fan_pair_ext (V,E) POWER 3) (v,w) = (w',v)
/\ f_fan_pair_ext (V,E) (w,u) = (u,w')
/\ f_fan_pair_ext (V,E) (u,w') = (w',v)
/\ f_fan_pair_ext (V,E) (w',v) = (v,w))
/\ (v,w IN dart1_of_fan (V,E) /\ w,u IN dart1_of_fan (V,E)
/\ u,w' IN dart1_of_fan (V,E) /\ w',v IN dart1_of_fan (V,E))
/\ face (hypermap_of_fan (V,E)) (v,w) = {(v,w), (w,u), (u,w'), (w',v)}`
[
(repeat_tactic 1 9 ((CONV_TAC let_CONV)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E w' v`))) (term_tac (set_tac "u")));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["hypV"])));
((BETA_TAC THEN (move ["vw_in4"])) THEN (((use_arg_then2 ("vw_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("hypV", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["vw_in"])) THEN (move ["card_f"])));
((fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (move ["inv_eq"]));
((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart1_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["vw_in1"]))));
(((((use_arg_then2 ("CARD_FACE_GT_1", [CARD_FACE_GT_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fanV", []))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`w',v IN dart1_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["w'v_in1"]))));
(((((use_arg_then2 ("dart1_switch", [dart1_switch]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("w'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("sigma_in_dart1", [sigma_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E)`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`(inverse f POWER 2) (v,w) = (u,w')`))) (term_tac (have_gen_tac [](move ["eq0"]))));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("w'v_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("u_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`2 < 4 /\ 4 - 2 = 2 /\ 3 < 4 /\ 4 - 3 = 1`))) (term_tac (have_gen_tac [](move ["ineqs"])))) ((arith_tac) THEN (done_tac)));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`(f POWER 2) (v,w) = u,w'`))) (term_tac (have_gen_tac [](move ["eq2"])))) ((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`f (v,w) = w,u`))) (term_tac (have_gen_tac [](move ["eq1"]))));
((((use_arg_then2 ("pair_expand", [pair_expand]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("FST", [FST]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("eq2", [])) (disch_tac [])) THEN (clear_assumption "eq2") THEN BETA_TAC) THEN ((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_dart1", [f_fan_pair_ext_in_dart1]))(thm_tac (new_rewrite [] [])))) THEN ((simp_tac THEN TRY done_tac))));
((((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [1] [])))) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`(f POWER 3) (v,w) = w',v`))) (term_tac (have_gen_tac [](move ["eq3"]))));
((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineqs", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("eq1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq3", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("eq1", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq2", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq3", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("THREE", [THREE]))(thm_tac (new_rewrite [1] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [1] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineqs", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1; 2] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (use_arg_then2 ("f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_dart1", [f_fan_pair_ext_in_dart1]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair_ext_power_in_dart1", [f_fan_pair_ext_power_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((fun arg_tac -> (use_arg_then2 ("face_eq_power", [face_eq_power])) (fun fst_arg -> (use_arg_then2 ("vw_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (gen_FINITE_SET 4)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma face5_eq *)
let face5_eq = Sections.section_proof ["v";"w"]
`let w' = sigma_fan (vec 0) V E v w in
let u = sigma_fan (vec 0) V E w' v in
let z = sigma_fan (vec 0) V E u w' in
v,w IN darts_k 5 (hypermap_of_fan (V,E))
==> (f_fan_pair_ext (V,E) (v,w) = (w,z)
/\ (f_fan_pair_ext (V,E) POWER 2) (v,w) = (z,u)
/\ (f_fan_pair_ext (V,E) POWER 3) (v,w) = (u,w')
/\ (f_fan_pair_ext (V,E) POWER 4) (v,w) = (w',v)
/\ f_fan_pair_ext (V,E) (w,z) = (z,u)
/\ f_fan_pair_ext (V,E) (z,u) = (u,w')
/\ f_fan_pair_ext (V,E) (u,w') = (w',v)
/\ f_fan_pair_ext (V,E) (w',v) = (v,w)
/\ inverse (f_fan_pair_ext (V,E)) (v,w) = (w',v))
/\ (v,w IN dart1_of_fan (V,E) /\ w,z IN dart1_of_fan (V,E) /\ z,u IN dart1_of_fan (V,E)
/\ u,w' IN dart1_of_fan (V,E) /\ w',v IN dart1_of_fan (V,E))
/\ face (hypermap_of_fan (V,E)) (v,w) = {(v,w), (w,z), (z,u), (u,w'), (w',v)}`
[
(repeat_tactic 1 9 ((CONV_TAC let_CONV)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E w' v`))) (term_tac (set_tac "u")));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E u w'`))) (term_tac (set_tac "z")));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["hypV"])));
((BETA_TAC THEN (move ["vw_in5"])) THEN (((use_arg_then2 ("vw_in5", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("hypV", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["vw_in"])) THEN (move ["card_f"])));
((fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (move ["inv_eq"]));
((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart1_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["vw_in1"]))));
(((((use_arg_then2 ("CARD_FACE_GT_1", [CARD_FACE_GT_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fanV", []))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E)`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`(inverse f) (v,w) = (w',v)`))) (term_tac (have_gen_tac [](move ["eq_inv1"]))));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`(inverse f POWER 2) (v,w) = (u,w')`))) (term_tac (have_gen_tac [](move ["eq_inv2"]))));
((((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq_inv1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq_inv1", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("INVERSE_F_IN_DART1_OF_FAN", [INVERSE_F_IN_DART1_OF_FAN]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`(inverse f POWER 3) (v,w) = (z,u)`))) (term_tac (have_gen_tac [](move ["eq_inv3"]))));
((((use_arg_then2 ("THREE", [THREE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("COM_POWER", [COM_POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq_inv2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq_inv2", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("inv_f_fan_pair_ext_power_in_dart1", [inv_f_fan_pair_ext_power_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`2 < 5 /\ 5 - 2 = 3 /\ 3 < 5 /\ 5 - 3 = 2 /\ 4 < 5 /\ 5 - 4 = 1`))) (term_tac (have_gen_tac [](move ["ineqs"])))) ((arith_tac) THEN (done_tac)));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`(f POWER 2) (v,w) = z,u`))) (term_tac (have_gen_tac [](move ["eq2"])))) ((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`(f POWER 3) (v,w) = u,w'`))) (term_tac (have_gen_tac [](move ["eq3"])))) ((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`(f POWER 4) (v,w) = w',v`))) (term_tac (have_gen_tac [](move ["eq4"])))) (((((use_arg_then2 ("inv_eq", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineqs", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`f (v,w) = w,z`))) (term_tac (have_gen_tac [](move ["eq1"]))));
((((use_arg_then2 ("pair_expand", [pair_expand]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("FST", [FST]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("eq2", [])) (disch_tac [])) THEN (clear_assumption "eq2") THEN BETA_TAC) THEN ((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_dart1", [f_fan_pair_ext_in_dart1]))(thm_tac (new_rewrite [] [])))) THEN ((simp_tac THEN TRY done_tac))));
((((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [1] [])))) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((use_arg_then2 ("eq1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq3", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq4", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("eq_inv1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)) THEN (split_tac));
((((use_arg_then2 ("eq1", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq2", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq3", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq4", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("THREE", [THREE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`4 = SUC 3`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("THREE", [THREE]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
(((((use_arg_then2 ("eq_inv1", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("eq1", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq2", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq3", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq4", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_dart1", [f_fan_pair_ext_in_dart1]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair_ext_power_in_dart1", [f_fan_pair_ext_power_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))));
(((((fun arg_tac -> (use_arg_then2 ("face_eq_power", [face_eq_power])) (fun fst_arg -> (use_arg_then2 ("vw_in5", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (gen_FINITE_SET 5)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma face_last_dart *)
let face_last_dart = Sections.section_proof ["v";"w"]
`v,w IN dart1_of_fan (V,E)
==> (f_fan_pair_ext (V,E) POWER (CARD (face (hypermap_of_fan (V,E)) (v,w)) - 1)) (v,w)
= sigma_fan (vec 0) V E v w, v`
[
(BETA_TAC THEN (move ["vw_in1"]));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["vw_in"])))) (((((use_arg_then2 ("dart_of_fan_eq", [dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("FACE_NOT_EMPTY", [FACE_NOT_EMPTY])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`hypermap_of_fan (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`v,w`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["ineq"])));
((THENL_FIRST) (((fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) ((((use_arg_then2 ("ineq", [ineq])) (disch_tac [])) THEN (clear_assumption "ineq") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("subKn", [subKn]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section ExtraFan *)
let f_fan_pair_ext_power_inverse = Sections.finalize_theorem f_fan_pair_ext_power_inverse;;
let f_fan_pair_ext_power_in_dart = Sections.finalize_theorem f_fan_pair_ext_power_in_dart;;
let f_fan_pair_ext_power_inj = Sections.finalize_theorem f_fan_pair_ext_power_inj;;
let f_fan_pair_ext_in_dart1 = Sections.finalize_theorem f_fan_pair_ext_in_dart1;;
let f_fan_pair_ext_power_in_dart1 = Sections.finalize_theorem f_fan_pair_ext_power_in_dart1;;
let f_fan_pair_ext_in_dart = Sections.finalize_theorem f_fan_pair_ext_in_dart;;
let inv_f_fan_pair_ext_power_in_dart1 = Sections.finalize_theorem inv_f_fan_pair_ext_power_in_dart1;;
let face_eq_power = Sections.finalize_theorem face_eq_power;;
let face4_eq = Sections.finalize_theorem face4_eq;;
let face5_eq = Sections.finalize_theorem face5_eq;;
let face_last_dart = Sections.finalize_theorem face_last_dart;;
Sections.end_section "ExtraFan";;
(* Section FanAddDiag *)
Sections.begin_section "FanAddDiag";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(* Let dartH *)
Sections.add_section_lemma "dartH" (Sections.section_proof []
`dart (hypermap_of_fan (V,E)) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let in_dart_inV *)
Sections.add_section_lemma "in_dart_inV" (Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) ==> FST d IN V /\ SND d IN V`
[
(((((use_arg_then2 ("pair_expand", [pair_expand]))(thm_tac (new_rewrite [1] [])))) THEN (DISCH_THEN (fun snd_th -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac));
]);;
(* Lemma add_diag_eq_E *)
let add_diag_eq_E = Sections.section_proof ["d"]
`CARD (face (hypermap_of_fan (V,E)) d) = 3
==> add_diag (V,E) d = E`
[
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["card_eq"])) THEN (((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))));
(((fun arg_tac -> arg_tac (Arg_term (`v,w IN _`))) (disch_eq_tac "vw_in1" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["vw_in"])))) (((((use_arg_then2 ("dart_of_fan_eq", [dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("split_fan_face_eq", [split_fan_face_eq])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_eq", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["_"]))) THEN (done_tac));
];;
(* Finalization of the section FanAddDiag *)
let add_diag_eq_E = Sections.finalize_theorem add_diag_eq_E;;
Sections.end_section "FanAddDiag";;
(* Section FullySurroundedAddDiag *)
Sections.begin_section "FullySurroundedAddDiag";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(* Let dartH *)
Sections.add_section_lemma "dartH" (Sections.section_proof []
`dart (hypermap_of_fan (V,E)) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(Sections.add_section_hyp "f_surr" (`fully_surrounded (V,E)`));;
(* Let dart1_eq *)
Sections.add_section_lemma "dart1_eq" (Sections.section_proof []
`dart1_of_fan (V,E) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Lemma pack_dist *)
let pack_dist = Sections.section_proof ["x"]
`packing V /\ x IN dart_of_fan (V,E) ==> &2 <= dist x`
[
((((use_arg_then2 ("x", [])) (disch_tac [])) THEN (clear_assumption "x") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (case THEN (move ["packV"]))) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in"])));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("iffLR", [iffLR])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("Fnjlbxs.packing", [Fnjlbxs.packing])) (fun fst_arg -> (use_arg_then2 ("V", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("packV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
(((repeat_tactic 1 9 (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART1_OF_FAN", [PAIR_IN_DART1_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ", [PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma split_fan_face_eq_add_diag *)
let split_fan_face_eq_add_diag = Sections.section_proof ["d"]
`d IN dart_of_fan (V,E)
==> split_fan_face (V,E) d = V, add_diag (V,E) d`
[
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"])) THEN ((((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma faces_add_diag *)
let faces_add_diag = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> let H2 = hypermap_of_fan (V, add_diag (V,E) (v,w)) in
let H = hypermap_of_fan (V,E) in
let w' = sigma_fan (vec 0) V E v w in
face_set H2 = {face H2 (v,w), face H2 (w',w)}
UNION (face_set H DELETE (face H (v,w)))`
[
((BETA_TAC THEN (move ["vw_in"])) THEN (repeat_tactic 1 9 ((CONV_TAC let_CONV))));
(((((use_arg_then2 ("EXTENSION", [EXTENSION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_DELETE", [IN_DELETE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SING", [IN_SING]))(thm_tac (new_rewrite [] []))))) THEN (move ["f"]));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_card_face_alt", [fully_surrounded_card_face_alt])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN case THEN (move ["card_f"]));
((((use_arg_then2 ("split_fan_face_eq_add_diag", [split_fan_face_eq_add_diag]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("split_fan_face_eq", [split_fan_face_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`w',w IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["w'w_in"]))));
(((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart1_switch", [dart1_switch]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("w'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair3", [f_fan_pair3]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((THENL) (split_tac) [(((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))); ALL_TAC]) (((((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("orbC", [orbC]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("orbA", [orbA]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("orNb", [orNb]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((((THENL) case [ALL_TAC; (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))]) THEN ((TRY done_tac))) THEN (case THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN ((((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE face_split_fan_face_explicit))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("face_split_fan_face", [face_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("split_fan_face_eq_add_diag", [split_fan_face_eq_add_diag]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))));
(BETA_TAC THEN (case THEN (move ["fan2"])) THEN (case THEN (move ["dart2"])) THEN (move ["f_surr2"]) THEN (move ["fs_eq"]) THEN (case THEN ALL_TAC) THEN (case THEN ((move ["f2_vw"]) THEN (move ["f2_w'w"]))) THEN (move ["_"]));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH2"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["fH2"])))));
((fun arg_tac -> arg_tac (Arg_term (`hypermap_of_fan _`))) (term_tac (set_tac "H2")));
((THENL_ROT (-1)) (split_tac));
((THENL_FIRST) case ((case THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN ((((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((BETA_TAC THEN (case THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_face_representation", [lemma_face_representation])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (case THEN (move ["d"]))) THEN ((((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN (move ["f_neq"])));
((THENL_LAST) (((fun arg_tac -> (use_arg_then2 ("fs_eq", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) (((((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((((use_arg_then2 ("f_neq", [])) (disch_tac [])) THEN (clear_assumption "f_neq") THEN ((use_arg_then2 ("contra", [contra])) (disch_tac [])) THEN (clear_assumption "contra") THEN (DISCH_THEN apply_tac) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_face_representation", [lemma_face_representation])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (case THEN (move ["d"])));
(((((use_arg_then2 ("dartH2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SING", [IN_SING]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in_cond"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
((THENL_ROT (-1)) ((THENL) (((use_arg_then2 ("d_in_cond", [])) (disch_tac [])) THEN (clear_assumption "d_in_cond") THEN case) [(move ["d_in"]); ALL_TAC]));
((case THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (DISJ1_TAC) THEN (DISJ1_TAC));
((((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))) THEN ((use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (thm_tac apply_tac)) THEN ((((use_arg_then2 ("f2_vw", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((THENL_ROT (-1)) (((fun arg_tac -> arg_tac (Arg_term (`d IN face (hypermap_of_fan (V,E)) (v,w)`))) (disch_eq_tac "d_in_f" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)));
((DISJ2_TAC) THEN ((((use_arg_then2 ("fs_eq", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("d_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("d_in_f", [])) (disch_tac [])) THEN (clear_assumption "d_in_f") THEN ((use_arg_then2 ("contra", [contra])) (disch_tac [])) THEN (clear_assumption "contra") THEN (DISCH_THEN apply_tac)) THEN (((use_arg_then2 ("contraLR", [contraLR])) (disch_tac [])) THEN (clear_assumption "contraLR") THEN (DISCH_THEN apply_tac) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_different_faces", [lemma_different_faces])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac));
((THENL_ROT (-1)) (((fun arg_tac -> arg_tac (Arg_term (`d = v,w \/ d = w',v`))) (disch_eq_tac "d_eq" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac)));
((DISJ1_TAC) THEN (DISJ2_TAC) THEN (((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))) THEN ((use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (thm_tac apply_tac)));
(((((use_arg_then2 ("f2_w'w", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_DIFF", [IN_DIFF]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SING", [IN_SING]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((DISJ1_TAC) THEN (DISJ1_TAC) THEN (((use_arg_then2 ("d_eq", [])) (disch_tac [])) THEN (clear_assumption "d_eq") THEN case THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))));
((((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))) THEN ((use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (thm_tac apply_tac)) THEN ((((use_arg_then2 ("f2_vw", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma f_fan_pair_ext_power_add_diag *)
let f_fan_pair_ext_power_add_diag = Sections.section_proof ["v";"w";"k"]
`let f = face (hypermap_of_fan (V,E)) (v,w) in
let w' = sigma_fan (vec 0) V E v w in
v,w IN dart_of_fan (V,E) /\ 3 < CARD f
/\ 1 <= k /\ k <= CARD f - 2
==> (f_fan_pair_ext (V, add_diag (V,E) (v,w)) POWER k) (w',w)
= (f_fan_pair_ext (V,E) POWER k) (v,w)`
[
(repeat_tactic 1 9 ((CONV_TAC let_CONV)));
((fun arg_tac -> arg_tac (Arg_term (`face _ (v,w)`))) (term_tac (set_tac "f")));
(BETA_TAC THEN (case THEN (move ["vw_in"])) THEN (case THEN (move ["card_f"])) THEN (move ["k_ineqs"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((THENL_FIRST) (((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE f_split_fan_face))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC)) ((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((((use_arg_then2 ("split_fan_face_eq_add_diag", [split_fan_face_eq_add_diag]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(BETA_TAC THEN (move ["f_eqs"]) THEN (case THEN (move ["fan2"])) THEN (case THEN (move ["dart2"])) THEN (move ["f_surr2"]));
((repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair_power", [f_fan_pair_power]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((THENL) (((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN ((use_arg_then2 ("k", [])) (disch_tac [])) THEN (clear_assumption "k") THEN elim) [ALL_TAC; ((move ["k"]) THEN (move ["Ih"]))]) ((arith_tac) THEN (done_tac)));
((BETA_TAC THEN (move ["k_ineqs"])) THEN ((THENL) (((fun arg_tac -> (use_arg_then2 ("posnP", [posnP])) (fun fst_arg -> (use_arg_then2 ("k", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN case) [(((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))); (move ["k_gt0"])]));
(((((use_arg_then2 ("ONE", [ONE]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_eqs", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((repeat_tactic 1 9 (((use_arg_then2 ("COM_POWER", [COM_POWER]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("Ih", []))(thm_tac (new_rewrite [] []))))) ((((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN ((use_arg_then2 ("k_gt0", [])) (disch_tac [])) THEN (clear_assumption "k_gt0") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("f_eqs", []))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("f_fan_pair_power", [f_fan_pair_power]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("negb_or", [negb_or]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext_power_in_dart", [f_fan_pair_ext_power_in_dart]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("orTb", [orTb]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) (((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_diag_not_in_dart", [fully_surrounded_diag_not_in_dart])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC)) ((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (move ["ww'_n_in"]));
(split_tac);
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w = (f_fan_pair_ext (V,E) POWER 0) (v,w)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [2] []))))))) (((((use_arg_then2 ("POWER_0", [POWER_0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("I_THM", [I_THM]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inj", [f_fan_pair_ext_power_inj])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("LT_NZ", [LT_NZ]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((THENL_FIRST) (split_tac) ((((use_arg_then2 ("ww'_n_in", [])) (disch_tac [])) THEN (clear_assumption "ww'_n_in") THEN ((use_arg_then2 ("contra", [contra])) (disch_tac [])) THEN (clear_assumption "contra") THEN (DISCH_THEN apply_tac) THEN (((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("f_fan_pair_ext_power_in_dart", [f_fan_pair_ext_power_in_dart]))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
(split_tac);
((((use_arg_then2 ("ww'_n_in", [])) (disch_tac [])) THEN (clear_assumption "ww'_n_in") THEN ((use_arg_then2 ("contra", [contra])) (disch_tac [])) THEN (clear_assumption "contra") THEN (DISCH_THEN apply_tac)) THEN ((((use_arg_then2 ("dart_switch", [dart_switch]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("f_fan_pair_ext_power_in_dart", [f_fan_pair_ext_power_in_dart]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan (vec 0) V E w' v, w' = (inverse (f_fan_pair_ext (V,E)) POWER 2) (v,w)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
((((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("dart_switch", [dart_switch]))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("sigma_in_dart1", [sigma_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`2 = CARD f - (CARD f - 2)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN BETA_TAC) THEN (arith_tac));
(((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inj", [f_fan_pair_ext_power_inj])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("k_ineqs", [])) (disch_tac [])) THEN (clear_assumption "k_ineqs") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma inverse_f_fan_pair_ext_add_diag *)
let inverse_f_fan_pair_ext_add_diag = Sections.section_proof ["v";"w"]
`let f = face (hypermap_of_fan (V,E)) (v,w) in
let w' = sigma_fan (vec 0) V E v w in
v,w IN dart_of_fan (V,E) /\ 3 < CARD f
==> inverse (f_fan_pair_ext (V, add_diag (V,E) (v,w))) (w',w)
= (inverse (f_fan_pair_ext (V,E)) POWER 2) (v,w)`
[
(repeat_tactic 1 9 ((CONV_TAC let_CONV)));
(BETA_TAC THEN (case THEN ((move ["vw_in"]) THEN (move ["card_f"]))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE face_split_fan_face_explicit))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("split_fan_face_eq_add_diag", [split_fan_face_eq_add_diag]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`face (hypermap_of_fan (V,E)) (v,w)`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`hypermap_of_fan _`))) (term_tac (set_tac "H2")));
(BETA_TAC THEN (case THEN (move ["_"])) THEN (case THEN ALL_TAC) THEN (case THEN (move ["_"])) THEN (move ["card2_w'w"]) THEN (move ["_"]) THEN (case THEN (move ["fan2"])) THEN (case THEN (move ["dart2"])) THEN (move ["f_surr2"]));
(((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [] [])))));
((fun arg_tac -> arg_tac (Arg_term (`1 = CARD (face H2 (w',w)) - (CARD f - 2)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
((((use_arg_then2 ("card2_w'w", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`2 = CARD f - (CARD f - 2)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("H2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("H2_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card2_w'w", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)) THEN (((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((THENL_FIRST) (((use_arg_then2 ("subKn", [subKn]))(thm_tac (new_rewrite [] [])))) ((((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [2] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("f_fan_pair_ext_power_inverse", [f_fan_pair_ext_power_inverse])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
((((use_arg_then2 ("w'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE f_fan_pair_ext_power_add_diag))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma azim_dart_eq_dihV *)
let azim_dart_eq_dihV = Sections.section_proof ["v";"w"]
`(v,w) IN dart_of_fan (V,E)
==> azim_dart (V,E) (v,w) = dihV (vec 0) v w (sigma_fan (vec 0) V E v w)`
[
((BETA_TAC THEN (move ["vw_in"])) THEN (((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in1"])));
((((use_arg_then2 ("fully_surrounded_azim_dart_eq_azim", [fully_surrounded_azim_dart_eq_azim]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("AZIM_DIVH", [AZIM_DIVH]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((fun arg_tac -> (use_arg_then2 ("DART1_NOT_COLLINEAR", [DART1_NOT_COLLINEAR])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("sigma_in_dart1", [sigma_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("fully_surrounded_azim_dart_eq_azim", [fully_surrounded_azim_dart_eq_azim]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_surr", [])) (disch_tac [])) THEN (clear_assumption "f_surr") THEN BETA_TAC) THEN ((((use_arg_then2 ("fully_surrounded", [fully_surrounded]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section FullySurroundedAddDiag *)
let pack_dist = Sections.finalize_theorem pack_dist;;
let split_fan_face_eq_add_diag = Sections.finalize_theorem split_fan_face_eq_add_diag;;
let faces_add_diag = Sections.finalize_theorem faces_add_diag;;
let f_fan_pair_ext_power_add_diag = Sections.finalize_theorem f_fan_pair_ext_power_add_diag;;
let inverse_f_fan_pair_ext_add_diag = Sections.finalize_theorem inverse_f_fan_pair_ext_add_diag;;
let azim_dart_eq_dihV = Sections.finalize_theorem azim_dart_eq_dihV;;
Sections.end_section "FullySurroundedAddDiag";;
(* Section Fan *)
Sections.begin_section "Fan";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(Sections.add_section_hyp "f_surr" (`fully_surrounded (V,E)`));;
(* Lemma fan_sol_pos *)
let fan_sol_pos = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> &0 <= sol (vec 0) (dart_leads_into (vec 0) V E v w)`
[
(BETA_TAC THEN (move ["vw_in"]));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_imp_conforming", [fully_surrounded_imp_conforming])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("Conforming.conforming_fan", [Conforming.conforming_fan]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (case THEN (move ["c_angle"])) THEN (move ["_"])));
((((use_arg_then2 ("c_angle", [])) (disch_tac [])) THEN (clear_assumption "c_angle") THEN BETA_TAC) THEN ((((fun arg_tac -> arg_tac (Arg_theorem (let_RULE Conforming.conforming_solid_angle_fan)))(thm_tac (new_rewrite [] [])))) THEN (move ["c_angle"])));
((fun arg_tac -> (use_arg_then2 ("fan_hypermaps_iso_explicit2", [fan_hypermaps_iso_explicit2])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["iso"])));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (move ["_"])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart (hypermap_of_fan (V,E))`))) (term_tac (have_gen_tac [](move ["vw_in2"])))) ((((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("iso_components", [iso_components])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in2", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["_"]) THEN (case THEN (move ["f_eq"])) THEN (move ["_"])))));
((((use_arg_then2 ("f_eq", [])) (disch_tac [])) THEN (clear_assumption "f_eq") THEN BETA_TAC) THEN ((fun arg_tac -> arg_tac (Arg_term (`face _1 _2`))) (term_tac (set_tac "f1"))) THEN (BETA_TAC THEN (move ["f1_eq"])));
((((fun arg_tac -> (use_arg_then2 ("c_angle", [])) (fun fst_arg -> (use_arg_then2 ("f1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (ANTS_TAC));
(((((use_arg_then2 ("f1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("f1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart_leads_into_eq1", [dart_leads_into_eq1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(BETA_TAC THEN (case THEN (move ["r1"])) THEN (case THEN (move ["r2"])) THEN (move ["_"]));
((((use_arg_then2 ("r2", [])) (disch_tac [])) THEN (clear_assumption "r2") THEN BETA_TAC) THEN ((((use_arg_then2 ("Sphere.eventually_radial", [Sphere.eventually_radial]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["r"])) THEN (case THEN (move ["r_gt0"])) THEN (move ["rad"])));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("Vol1.sol_spec", [Vol1.sol_spec])) (fun fst_arg -> (use_arg_then2 ("r_gt0", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("rad", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INTER_COMM", [INTER_COMM]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("r1", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((THENL_LAST) ((((use_arg_then2 ("REAL_LE_MUL", [REAL_LE_MUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_DIV", [REAL_LE_DIV]))(thm_tac (new_rewrite [] []))))) ((arith_tac) THEN (done_tac)));
((THENL_FIRST) (((use_arg_then2 ("REAL_POW_LE", [REAL_POW_LE]))(thm_tac (new_rewrite [] [])))) ((((use_arg_then2 ("r_gt0", [])) (disch_tac [])) THEN (clear_assumption "r_gt0") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("real_ge", [real_ge]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("Vol1.VOLUME_PROPS_MEASURABLE", [Vol1.VOLUME_PROPS_MEASURABLE]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma sol_fan_eq *)
let sol_fan_eq = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> sol_fan (V,E) (face (hypermap_of_fan (V,E)) (v, w))
= sol (vec 0) (dart_leads_into (vec 0) V E v w)`
[
(((((use_arg_then2 ("sol_fan", [sol_fan]))(thm_tac (new_rewrite [] [])))) THEN (move ["vw_in"])) THEN ((((use_arg_then2 ("fully_surrounded_sol", [fully_surrounded_sol]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("REAL_ADD_SYM", [REAL_ADD_SYM]))(thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("REAL_ABS_REFL", [REAL_ABS_REFL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fully_surrounded_sol", [fully_surrounded_sol]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("fan_sol_pos", [fan_sol_pos]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(Sections.add_section_hyp "packV" (`packing V`));;
(Sections.add_section_hyp "subV" (`V SUBSET ball_annulus`));;
(* Let dart1_eq *)
Sections.add_section_lemma "dart1_eq" (Sections.section_proof []
`dart1_of_fan (V,E) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let dartH *)
Sections.add_section_lemma "dartH" (Sections.section_proof []
`dart (hypermap_of_fan (V,E)) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let fH *)
Sections.add_section_lemma "fH" (Sections.section_proof []
`face_map (hypermap_of_fan (V,E)) = f_fan_pair_ext (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let nH *)
Sections.add_section_lemma "nH" (Sections.section_proof []
`node_map (hypermap_of_fan (V,E)) = n_fan_pair_ext (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let norm_v *)
Sections.add_section_lemma "norm_v" (Sections.section_proof ["v"]
`v IN V ==> &2 <= norm v /\ norm v <= #2.52`
[
((in_tac ["subV"] false (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] []))))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("subV", [])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC));
(((((use_arg_then2 ("Fnjlbxs.in_ball_annulus", [Fnjlbxs.in_ball_annulus]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
]);;
(* Let pack_dist *)
Sections.add_section_lemma "pack_dist" (Sections.section_proof ["x"]
`x IN dart_of_fan (V,E) ==> &2 <= dist x`
[
((((use_arg_then2 ("x", [])) (disch_tac [])) THEN (clear_assumption "x") THEN case THEN (move ["v"]) THEN (move ["w"])) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in"])));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("iffLR", [iffLR])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("Fnjlbxs.packing", [Fnjlbxs.packing])) (fun fst_arg -> (use_arg_then2 ("V", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("packV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
(((repeat_tactic 1 9 (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART1_OF_FAN", [PAIR_IN_DART1_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ", [PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma rho_pos *)
let rho_pos = Sections.section_proof ["v"]
`v IN V ==> &0 <= &1 + const1 * (&1 - ln_fan v)`
[
((THENL_LAST) ((BETA_TAC THEN (move ["vV"])) THEN ((((use_arg_then2 ("REAL_LE_ADD", [REAL_LE_ADD]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_MUL", [REAL_LE_MUL]))(thm_tac (new_rewrite [] [])))))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lmfun", [lmfun]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("vV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Section V *)
Sections.begin_section "V";;
(Sections.add_section_var (mk_var ("v", (`:real^3`))));;
(Sections.add_section_hyp "vV" (`v IN V`));;
(* Lemma ln_def *)
let ln_def = Sections.section_proof []
`ln_fan v = (#2.52 - yn_fan v) / #0.52`
[
((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lmfun", [lmfun]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("vV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma rho_def *)
let rho_def = Sections.section_proof []
`rho_fan v = (&1 + sol0 / pi) - ln_fan v * sol0 / pi`
[
((((use_arg_then2 ("rho_fan", [rho_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 <= &1 + const1 * (&1 - ln_fan v)`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("rho_pos", [rho_pos]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma ln_lo *)
let ln_lo = Sections.section_proof []
`&0 <= ln_fan v`
[
(((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("Fnjlbxs.lmfun_ge0", [Fnjlbxs.lmfun_ge0]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma ln_hi *)
let ln_hi = Sections.section_proof []
`ln_fan v <= &1`
[
(((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lmfun", [lmfun]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("vV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma yn_lo *)
let yn_lo = Sections.section_proof []
`&2 <= yn_fan v`
[
(((((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma yn_hi *)
let yn_hi = Sections.section_proof []
`yn_fan v <= #2.52`
[
(((((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rho_lo *)
let rho_lo = Sections.section_proof []
`&1 <= rho_fan v`
[
(((use_arg_then2 ("rho_fan", [rho_fan]))(thm_tac (new_rewrite [] []))));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 <= const1 * (&1 - ln_fan v)`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("REAL_LE_MUL", [REAL_LE_MUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_hi", [ln_hi])) (disch_tac [])) THEN (clear_assumption "ln_hi") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma rho_hi *)
let rho_hi = Sections.section_proof []
`rho_fan v <= &1 + sol0 / pi`
[
(((use_arg_then2 ("rho_fan", [rho_fan]))(thm_tac (new_rewrite [] []))));
((fun arg_tac -> arg_tac (Arg_term (`&1 + _`))) (term_tac (set_tac "x")));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`abs x = x`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) (((((use_arg_then2 ("REAL_ABS_REFL", [REAL_ABS_REFL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("x_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_pos", [rho_pos]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((((use_arg_then2 ("x_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_LE_LADD", [REAL_LE_LADD]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("REAL_MUL_RID", [REAL_MUL_RID])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`const1`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [2] []))))) THEN (((use_arg_then2 ("REAL_LE_MUL2", [REAL_LE_MUL2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_REFL", [REAL_LE_REFL]))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lmfun", [lmfun]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("vV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section V *)
let ln_def = Sections.finalize_theorem ln_def;;
let rho_def = Sections.finalize_theorem rho_def;;
let ln_lo = Sections.finalize_theorem ln_lo;;
let ln_hi = Sections.finalize_theorem ln_hi;;
let yn_lo = Sections.finalize_theorem yn_lo;;
let yn_hi = Sections.finalize_theorem yn_hi;;
let rho_lo = Sections.finalize_theorem rho_lo;;
let rho_hi = Sections.finalize_theorem rho_hi;;
Sections.end_section "V";;
(* Section Dart *)
Sections.begin_section "Dart";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN dart_of_fan (V,E)`));;
(* Lemma edge_sym *)
let edge_sym = Sections.section_proof []
`ye_fan d = ye_fan (e_fan_pair_ext (V,E) d)`
[
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
(((((use_arg_then2 ("e_fan_pair_ext", [e_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("e_fan_pair", [e_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("DIST_SYM", [DIST_SYM]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y1_def *)
let y1_def = Sections.section_proof []
`y1_fan d = yn_fan (FST d)`
[
(((((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y2_def *)
let y2_def = Sections.section_proof []
`y2_fan d = yn_fan (FST (f_fan_pair_ext (V,E) d))`
[
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["d_in"]));
(((((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("d_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y3_def *)
let y3_def = Sections.section_proof []
`y3_fan (V,E) d = yn_fan (FST (inverse (f_fan_pair_ext (V,E)) d))`
[
(((((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4_def *)
let y4_def = Sections.section_proof []
`y4_fan (V,E) d = ye_fan (f_fan_pair_ext (V,E) d)`
[
(((((use_arg_then2 ("y4_fan", [y4_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y5_def *)
let y5_def = Sections.section_proof []
`y5_fan (V,E) d = ye_fan (inverse (f_fan_pair_ext (V,E)) d)`
[
(((((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y6_def *)
let y6_def = Sections.section_proof []
`y6_fan d = ye_fan d`
[
(((((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y8_def *)
let y8_def = Sections.section_proof []
`y8_fan (V,E) d = y5_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d)`
[
((((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma y9_def *)
let y9_def = Sections.section_proof []
`y9_fan (V,E) d = ye_fan (f_fan_pair_ext (V,E) d)`
[
(((((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma azim_lo *)
let azim_lo = Sections.section_proof []
`&0 <= azim_dart (V,E) d`
[
((((fun arg_tac -> arg_tac (Arg_theorem (GEN_ALL AZIM_DART_POS)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma azim_hi *)
let azim_hi = Sections.section_proof []
`azim_dart (V,E) d <= pi`
[
((((use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_surr", [])) (disch_tac [])) THEN (clear_assumption "f_surr") THEN BETA_TAC) THEN ((((use_arg_then2 ("fully_surrounded", [fully_surrounded]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim_lo *)
let rhazim_lo = Sections.section_proof []
`&0 <= rhazim_fan (V,E) d`
[
(((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_MUL", [REAL_LE_MUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ABS_POS", [REAL_ABS_POS]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim_hi *)
let rhazim_hi = Sections.section_proof []
`rhazim_fan (V,E) d <= pi + sol0`
[
((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("REAL_MUL_RID", [REAL_MUL_RID])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`pi + sol0`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))));
((((fun arg_tac -> (use_arg_then2 ("REAL_MUL_LINV", [REAL_MUL_LINV])) (fun fst_arg -> (use_arg_then2 ("PI_NZ", [PI_NZ])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [3] []))))) THEN (((use_arg_then2 ("REAL_MUL_ASSOC", [REAL_MUL_ASSOC]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_MUL2", [REAL_LE_MUL2]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("azim_hi", [azim_hi]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ABS_POS", [REAL_ABS_POS]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("REAL_ADD_RDISTRIB", [REAL_ADD_RDISTRIB]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("REAL_MUL_RINV", [REAL_MUL_RINV])) (fun fst_arg -> (use_arg_then2 ("PI_NZ", [PI_NZ])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("real_div", [real_div]))(gsym_then (thm_tac (new_rewrite [] []))))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`lmfun (h_dart d) = ln_fan (FST d)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) (((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`abs _`))) (term_tac (set_tac "x")));
((fun arg_tac -> arg_tac (Arg_term (`FST d IN V`))) (term_tac (have_gen_tac [](move ["fst_in"]))));
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["d_in"]) THEN (simp_tac)) THEN (((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`x = &1 + const1 * (&1 - ln_fan (FST d))`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
(((((use_arg_then2 ("x_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_ABS_REFL", [REAL_ABS_REFL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rho_pos", [rho_pos]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("REAL_LE_LADD", [REAL_LE_LADD]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("REAL_MUL_RID", [REAL_MUL_RID])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`const1`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [2] []))))));
((((use_arg_then2 ("REAL_LE_MUL2", [REAL_LE_MUL2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_REFL", [REAL_LE_REFL]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lmfun", [lmfun]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("fst_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma ye_lo *)
let ye_lo = Sections.section_proof []
`&2 <= ye_fan d`
[
(((((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Let d_inV *)
Sections.add_section_lemma "d_inV" (Sections.section_proof []
`FST d IN V /\ SND d IN V`
[
((((fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac)) THEN (((use_arg_then2 ("pair_expand", [pair_expand]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma y1_lo *)
let y1_lo = Sections.section_proof []
`&2 <= y1_fan d`
[
(((((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y2_lo *)
let y2_lo = Sections.section_proof []
`&2 <= y2_fan d`
[
(((((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y1_hi *)
let y1_hi = Sections.section_proof []
`y1_fan d <= #2.52`
[
(((((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y2_hi *)
let y2_hi = Sections.section_proof []
`y2_fan d <= #2.52`
[
(((((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y6_lo *)
let y6_lo = Sections.section_proof []
`&2 <= y6_fan d`
[
(((((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Dart *)
let edge_sym = Sections.finalize_theorem edge_sym;;
let y1_def = Sections.finalize_theorem y1_def;;
let y2_def = Sections.finalize_theorem y2_def;;
let y3_def = Sections.finalize_theorem y3_def;;
let y4_def = Sections.finalize_theorem y4_def;;
let y5_def = Sections.finalize_theorem y5_def;;
let y6_def = Sections.finalize_theorem y6_def;;
let y8_def = Sections.finalize_theorem y8_def;;
let y9_def = Sections.finalize_theorem y9_def;;
let azim_lo = Sections.finalize_theorem azim_lo;;
let azim_hi = Sections.finalize_theorem azim_hi;;
let rhazim_lo = Sections.finalize_theorem rhazim_lo;;
let rhazim_hi = Sections.finalize_theorem rhazim_hi;;
let ye_lo = Sections.finalize_theorem ye_lo;;
let y1_lo = Sections.finalize_theorem y1_lo;;
let y2_lo = Sections.finalize_theorem y2_lo;;
let y1_hi = Sections.finalize_theorem y1_hi;;
let y2_hi = Sections.finalize_theorem y2_hi;;
let y6_lo = Sections.finalize_theorem y6_lo;;
Sections.end_section "Dart";;
(* Section Dart3 *)
Sections.begin_section "Dart3";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 3 (hypermap_of_fan (V,E))`));;
(* Let card_f *)
Sections.add_section_lemma "card_f" (Sections.section_proof []
`CARD (face (hypermap_of_fan (V,E)) d) = 3`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let d_in_dart *)
Sections.add_section_lemma "d_in_dart" (Sections.section_proof []
`d IN dart_of_fan (V,E)`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma y4'_eq_y4 *)
let y4'_eq_y4 = Sections.section_proof []
`y4'_fan (V,E) d = y4_fan (V,E) d`
[
(((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["card_f"]) THEN (move ["vw_in"]));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart1_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["vw_in1"])))) ((((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y4_fan", [y4_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((fun arg_tac -> (use_arg_then2 ("f_fan_pair3", [f_fan_pair3])) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Dart3 *)
let y4'_eq_y4 = Sections.finalize_theorem y4'_eq_y4;;
Sections.end_section "Dart3";;
(* Let fd_in *)
Sections.add_section_lemma "fd_in" (Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) ==> f_fan_pair_ext (V,E) d IN dart_of_fan (V,E)`
[
((((((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (move ["d_in"])) THEN (((use_arg_then2 ("Hypermap.lemma_dart_invariant", [Hypermap.lemma_dart_invariant]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let ifd_in *)
Sections.add_section_lemma "ifd_in" (Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) ==> inverse (f_fan_pair_ext (V,E)) d IN dart_of_fan (V,E)`
[
((((((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (move ["d_in"])) THEN (((use_arg_then2 ("Hypermap.lemma_dart_inveriant_under_inverse_maps", [Hypermap.lemma_dart_inveriant_under_inverse_maps]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let in_dart_inV *)
Sections.add_section_lemma "in_dart_inV" (Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) ==> FST d IN V /\ SND d IN V`
[
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (DISCH_THEN (fun snd_th -> (fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac));
]);;
(* Section StdDart *)
Sections.begin_section "StdDart";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Let in_std *)
Sections.add_section_lemma "in_std" (Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) ==> dist d <= #2.52 /\ dist d <= &3`
[
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"])) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inE_eq_in_dart1", [inE_eq_in_dart1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_ESTD", [IN_ESTD]))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
]);;
(* Section Inner *)
Sections.begin_section "Inner";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN dart_of_fan (V,E)`));;
(* Lemma ye_hi_std *)
let ye_hi_std = Sections.section_proof []
`ye_fan d <= &3`
[
(((((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4_hi_std *)
let y4_hi_std = Sections.section_proof []
`y4_fan (V,E) d <= &3`
[
(((((use_arg_then2 ("y4_fan", [y4_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y5_hi_std *)
let y5_hi_std = Sections.section_proof []
`y5_fan (V,E) d <= &3`
[
(((((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y6_hi_std *)
let y6_hi_std = Sections.section_proof []
`y6_fan d <= &3`
[
(((((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y8_hi_std *)
let y8_hi_std = Sections.section_proof []
`y8_fan (V,E) d <= #2.52`
[
(((((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma y9_hi_std *)
let y9_hi_std = Sections.section_proof []
`y9_fan (V,E) d <= #2.52`
[
(((((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma ye_hi_std2 *)
let ye_hi_std2 = Sections.section_proof []
`ye_fan d <= &3`
[
(((((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4_hi_std2 *)
let y4_hi_std2 = Sections.section_proof []
`y4_fan (V,E) d <= #2.52`
[
(((((use_arg_then2 ("y4_fan", [y4_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y5_hi_std2 *)
let y5_hi_std2 = Sections.section_proof []
`y5_fan (V,E) d <= #2.52`
[
(((((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y6_hi_std2 *)
let y6_hi_std2 = Sections.section_proof []
`y6_fan d <= #2.52`
[
(((((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma yy10_std *)
let yy10_std = Sections.section_proof []
`ye_fan d <= #2.52`
[
(((((use_arg_then2 ("ye_fan", [ye_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_std", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Inner *)
let ye_hi_std = Sections.finalize_theorem ye_hi_std;;
let y4_hi_std = Sections.finalize_theorem y4_hi_std;;
let y5_hi_std = Sections.finalize_theorem y5_hi_std;;
let y6_hi_std = Sections.finalize_theorem y6_hi_std;;
let y8_hi_std = Sections.finalize_theorem y8_hi_std;;
let y9_hi_std = Sections.finalize_theorem y9_hi_std;;
let ye_hi_std2 = Sections.finalize_theorem ye_hi_std2;;
let y4_hi_std2 = Sections.finalize_theorem y4_hi_std2;;
let y5_hi_std2 = Sections.finalize_theorem y5_hi_std2;;
let y6_hi_std2 = Sections.finalize_theorem y6_hi_std2;;
let yy10_std = Sections.finalize_theorem yy10_std;;
Sections.end_section "Inner";;
(* Finalization of the section StdDart *)
let ye_hi_std = Sections.finalize_theorem ye_hi_std;;
let y4_hi_std = Sections.finalize_theorem y4_hi_std;;
let y5_hi_std = Sections.finalize_theorem y5_hi_std;;
let y6_hi_std = Sections.finalize_theorem y6_hi_std;;
let y8_hi_std = Sections.finalize_theorem y8_hi_std;;
let y9_hi_std = Sections.finalize_theorem y9_hi_std;;
let ye_hi_std2 = Sections.finalize_theorem ye_hi_std2;;
let y4_hi_std2 = Sections.finalize_theorem y4_hi_std2;;
let y5_hi_std2 = Sections.finalize_theorem y5_hi_std2;;
let y6_hi_std2 = Sections.finalize_theorem y6_hi_std2;;
let yy10_std = Sections.finalize_theorem yy10_std;;
Sections.end_section "StdDart";;
(* Section DartMore *)
Sections.begin_section "DartMore";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN dart_of_fan (V,E)`));;
(* Lemma azim2_lo *)
let azim2_lo = Sections.section_proof []
`&0 <= azim2_fan (V,E) d`
[
(((((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma azim2_hi *)
let azim2_hi = Sections.section_proof []
`azim2_fan (V,E) d <= pi`
[
(((((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_hi", [azim_hi]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma azim3_lo *)
let azim3_lo = Sections.section_proof []
`&0 <= azim3_fan (V,E) d`
[
(((((use_arg_then2 ("azim3_fan", [azim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma azim3_hi *)
let azim3_hi = Sections.section_proof []
`azim3_fan (V,E) d <= pi`
[
(((((use_arg_then2 ("azim3_fan", [azim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_hi", [azim_hi]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim2_lo *)
let rhazim2_lo = Sections.section_proof []
`&0 <= rhazim2_fan (V,E) d`
[
(((((use_arg_then2 ("rhazim2_fan", [rhazim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim_lo", [rhazim_lo]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim2_hi *)
let rhazim2_hi = Sections.section_proof []
`rhazim2_fan (V,E) d <= pi + sol0`
[
(((((use_arg_then2 ("rhazim2_fan", [rhazim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim_hi", [rhazim_hi]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim3_lo *)
let rhazim3_lo = Sections.section_proof []
`&0 <= rhazim3_fan (V,E) d`
[
(((((use_arg_then2 ("rhazim3_fan", [rhazim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim_lo", [rhazim_lo]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma rhazim3_hi *)
let rhazim3_hi = Sections.section_proof []
`rhazim3_fan (V,E) d <= pi + sol0`
[
(((((use_arg_then2 ("rhazim3_fan", [rhazim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim_hi", [rhazim_hi]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y3_lo *)
let y3_lo = Sections.section_proof []
`&2 <= y3_fan (V,E) d`
[
(((((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y3_hi *)
let y3_hi = Sections.section_proof []
`y3_fan (V,E) d <= #2.52`
[
(((((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4_lo *)
let y4_lo = Sections.section_proof []
`&2 <= y4_fan (V,E) d`
[
(((((use_arg_then2 ("y4_fan", [y4_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y5_lo *)
let y5_lo = Sections.section_proof []
`&2 <= y5_fan (V,E) d`
[
(((((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y7_lo *)
let y7_lo = Sections.section_proof []
`&2 <= y7_fan (V,E) d`
[
((((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("TWO", [TWO]))(thm_tac (new_rewrite [2] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("ifd_in", [])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("ifd_in", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma y7_hi *)
let y7_hi = Sections.section_proof []
`y7_fan (V,E) d <= #2.52`
[
((((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("TWO", [TWO]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("norm_v", []))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("ifd_in", [])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("ifd_in", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma y8_lo *)
let y8_lo = Sections.section_proof []
`&2 <= y8_fan (V,E) d`
[
(((((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ifd_in", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma y9_lo *)
let y9_lo = Sections.section_proof []
`&2 <= y9_fan (V,E) d`
[
(((((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pack_dist", [pack_dist]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y4'_lo *)
let y4'_lo = Sections.section_proof []
`&2 <= y4'_fan (V,E) d`
[
(((use_arg_then2 ("packV", [])) (disch_tac [])) THEN (clear_assumption "packV") THEN BETA_TAC);
(((((use_arg_then2 ("Ckqowsa.packing", [Ckqowsa.packing]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] []))))) THEN (DISCH_THEN apply_tac));
((((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("ifd_in", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("sigma_fan_not_fixed", [sigma_fan_not_fixed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma azim2c *)
let azim2c = Sections.section_proof []
`azim2_fan (V,E) d = azim_dart (V,E) (f_fan_pair_ext (V,E) d)`
[
((((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma azim3c *)
let azim3c = Sections.section_proof []
`azim3_fan (V,E) d = azim_dart (V,E) (inverse (f_fan_pair_ext (V,E)) d)`
[
((((use_arg_then2 ("azim3_fan", [azim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma rhazim2c *)
let rhazim2c = Sections.section_proof []
`rhazim2_fan (V,E) d = rhazim_fan (V,E) (f_fan_pair_ext (V,E) d)`
[
((((use_arg_then2 ("rhazim2_fan", [rhazim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma rhazim3c *)
let rhazim3c = Sections.section_proof []
`rhazim3_fan (V,E) d = rhazim_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d)`
[
((((use_arg_then2 ("rhazim3_fan", [rhazim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma RHA *)
let RHA = Sections.section_proof []
`rhazim_fan (V,E) d >= azim_dart (V,E) d`
[
((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("REAL_MUL_LID", [REAL_MUL_LID])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`azim_dart _ d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (((use_arg_then2 ("REAL_LE_RMUL", [REAL_LE_RMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("rho_lo", [rho_lo]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma RHB *)
let RHB = Sections.section_proof []
`rhazim_fan (V,E) d <= azim_dart (V,E) d * (&1 + sol0 / pi)`
[
((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_MUL_SYM", [REAL_MUL_SYM]))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("REAL_LE_LMUL", [REAL_LE_LMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("rho_hi", [rho_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma RHBLO *)
let RHBLO = Sections.section_proof []
`yn_fan (FST d) <= #2.18 ==> rhazim_fan (V,E) d <= azim_dart (V,E) d * rho218`
[
((BETA_TAC THEN (move ["ineq"])) THEN ((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_MUL_SYM", [REAL_MUL_SYM]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("REAL_LE_LMUL", [REAL_LE_LMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rho_def", [rho_def]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("ln_def", [ln_def]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("rho218", [rho218]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("Nonlinear_lemma.rho_alt", [Nonlinear_lemma.rho_alt]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ADD_ASSOC", [REAL_ADD_ASSOC]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_LE_LADD", [REAL_LE_LADD]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("real_sub", [real_sub]))(gsym_then (thm_tac (new_rewrite [] []))))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`const1 - x / #0.52 * const1 <= const1 * y / #0.52
<=> const1 * #0.52 <= const1 * (x + y)`))) (term_tac (have_gen_tac ["x"; "y"](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("REAL_LE_LMUL", [REAL_LE_LMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ineq", [ineq])) (disch_tac [])) THEN (clear_assumption "ineq") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma RHBHI *)
let RHBHI = Sections.section_proof []
`#2.18 <= yn_fan (FST d) ==> rhazim_fan (V,E) d >= azim_dart (V,E) d * rho218`
[
((BETA_TAC THEN (move ["ineq"])) THEN ((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_MUL_SYM", [REAL_MUL_SYM]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_LMUL", [REAL_LE_LMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_lo", [azim_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rho_def", [rho_def]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("ln_def", [ln_def]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("in_dart_inV", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("rho218", [rho218]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("Nonlinear_lemma.rho_alt", [Nonlinear_lemma.rho_alt]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sol0_over_pi_EQ_const1", [sol0_over_pi_EQ_const1]))(thm_tac (new_rewrite [] [])))));
((repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_ADD_ASSOC", [REAL_ADD_ASSOC]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_LE_LADD", [REAL_LE_LADD]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(gsym_then (thm_tac (new_rewrite [] [])))))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`const1 * y / #0.52 <= const1 - x / #0.52 * const1
<=> const1 * #0.52 >= const1 * (x + y)`))) (term_tac (have_gen_tac ["x"; "y"](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LE_LMUL", [REAL_LE_LMUL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("const1_ge0", [const1_ge0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ineq", [ineq])) (disch_tac [])) THEN (clear_assumption "ineq") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section DartMore *)
let azim2_lo = Sections.finalize_theorem azim2_lo;;
let azim2_hi = Sections.finalize_theorem azim2_hi;;
let azim3_lo = Sections.finalize_theorem azim3_lo;;
let azim3_hi = Sections.finalize_theorem azim3_hi;;
let rhazim2_lo = Sections.finalize_theorem rhazim2_lo;;
let rhazim2_hi = Sections.finalize_theorem rhazim2_hi;;
let rhazim3_lo = Sections.finalize_theorem rhazim3_lo;;
let rhazim3_hi = Sections.finalize_theorem rhazim3_hi;;
let y3_lo = Sections.finalize_theorem y3_lo;;
let y3_hi = Sections.finalize_theorem y3_hi;;
let y4_lo = Sections.finalize_theorem y4_lo;;
let y5_lo = Sections.finalize_theorem y5_lo;;
let y7_lo = Sections.finalize_theorem y7_lo;;
let y7_hi = Sections.finalize_theorem y7_hi;;
let y8_lo = Sections.finalize_theorem y8_lo;;
let y9_lo = Sections.finalize_theorem y9_lo;;
let y4'_lo = Sections.finalize_theorem y4'_lo;;
let azim2c = Sections.finalize_theorem azim2c;;
let azim3c = Sections.finalize_theorem azim3c;;
let rhazim2c = Sections.finalize_theorem rhazim2c;;
let rhazim3c = Sections.finalize_theorem rhazim3c;;
let RHA = Sections.finalize_theorem RHA;;
let RHB = Sections.finalize_theorem RHB;;
let RHBLO = Sections.finalize_theorem RHBLO;;
let RHBHI = Sections.finalize_theorem RHBHI;;
Sections.end_section "DartMore";;
(* Section Node *)
Sections.begin_section "Node";;
(Sections.add_section_var (mk_var ("n", (`:real^3#real^3->bool`))));;
(Sections.add_section_hyp "n_in" (`n IN node_set (hypermap_of_fan (V,E))`));;
(* Let n_repr *)
Sections.add_section_lemma "n_repr" (Sections.section_proof []
`?v w. v,w IN dart_of_fan (V,E) /\ n = node (hypermap_of_fan (V,E)) (v,w)`
[
(((use_arg_then2 ("n_in", [])) (disch_tac [])) THEN (clear_assumption "n_in") THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_node_representation", [lemma_node_representation])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (case THEN (case THEN ((move ["v"]) THEN (move ["w"])))) THEN (move ["h"]));
((((use_arg_then2 ("v", [])) (term_tac exists_tac)) THEN ((use_arg_then2 ("w", [])) (term_tac exists_tac))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma azim_sum *)
let azim_sum = Sections.section_proof []
`sum n (azim_dart (V,E)) = &2 * pi`
[
(((use_arg_then2 ("n_repr", [])) (disch_tac [])) THEN (clear_assumption "n_repr") THEN BETA_TAC THEN (case THEN (move ["v"])) THEN (case THEN (move ["w"])) THEN (case THEN (move ["vw_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("SUM_AZIM_DART", [SUM_AZIM_DART]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma rhazim_sum *)
let rhazim_sum = Sections.section_proof []
`sum n (rhazim_fan (V,E)) = &2 * pi * rho_fan (FST (CHOICE n))`
[
((((use_arg_then2 ("REAL_MUL_ASSOC", [REAL_MUL_ASSOC]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_sum", [azim_sum]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("SUM_RMUL", [SUM_RMUL]))(gsym_then (thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("SUM_EQ", [SUM_EQ])) (thm_tac apply_tac)) THEN (move ["d"]) THEN (move ["d_in"]) THEN (simp_tac)) THEN ((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_MUL_SYM", [REAL_MUL_SYM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_EQ_MUL_LCANCEL", [REAL_EQ_MUL_LCANCEL]))(thm_tac (new_rewrite [] []))))) THEN (DISJ2_TAC));
(((((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (congr_tac (`rho_fan _`)));
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("n_repr", [])) (disch_tac [])) THEN (clear_assumption "n_repr") THEN BETA_TAC THEN (case THEN (move ["v"])) THEN (case THEN (move ["w"])) THEN (case THEN (move ["vw_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))) THEN (move ["d_in"]));
((((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("fst_node_hypermap_of_fan", [fst_node_hypermap_of_fan])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac)));
((((fun arg_tac -> (use_arg_then2 ("lemma_node_identity", [lemma_node_identity])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("CHOICE_DEF", [CHOICE_DEF]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("MEMBER_NOT_EMPTY", [MEMBER_NOT_EMPTY]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((use_arg_then2 ("d", [])) (term_tac exists_tac)) THEN (((use_arg_then2 ("node_refl", [node_refl]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Finalization of the section Node *)
let azim_sum = Sections.finalize_theorem azim_sum;;
let rhazim_sum = Sections.finalize_theorem rhazim_sum;;
Sections.end_section "Node";;
(* Section Face *)
Sections.begin_section "Face";;
(Sections.add_section_var (mk_var ("f", (`:real^3#real^3->bool`))));;
(Sections.add_section_hyp "f_in" (`f IN face_set (hypermap_of_fan (V,E))`));;
(* Let f_repr *)
Sections.add_section_lemma "f_repr" (Sections.section_proof []
`?v w. v,w IN dart_of_fan (V,E) /\ f = face (hypermap_of_fan (V,E)) (v,w)`
[
(((use_arg_then2 ("f_in", [])) (disch_tac [])) THEN (clear_assumption "f_in") THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_face_representation", [lemma_face_representation])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (case THEN (case THEN ((move ["v"]) THEN (move ["w"])))) THEN (move ["h"]));
((((use_arg_then2 ("v", [])) (term_tac exists_tac)) THEN ((use_arg_then2 ("w", [])) (term_tac exists_tac))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let confV *)
Sections.add_section_lemma "confV" (Sections.section_proof []
`conforming_fan (vec 0,V,E)`
[
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_imp_conforming", [fully_surrounded_imp_conforming])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Lemma sol_lo *)
let sol_lo = Sections.section_proof []
`&0 <= sol_fan (V,E) f`
[
(((((use_arg_then2 ("sol_fan", [sol_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ABS_POS", [REAL_ABS_POS]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma tau_lo *)
let tau_lo = Sections.section_proof []
`&0 <= tau_fan (V,E) f`
[
(((((use_arg_then2 ("tau_fan", [tau_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ABS_POS", [REAL_ABS_POS]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma sol_hi *)
let sol_hi = Sections.section_proof []
`sol_fan (V,E) f <= &4 * pi`
[
((use_arg_then2 ("f_repr", [])) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["v"]) THEN (case THEN (move ["w"])) THEN (case THEN (move ["vw_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))));
((((use_arg_then2 ("sol_fan_eq", [sol_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> (use_arg_then2 ("fan_hypermaps_iso_explicit2", [fan_hypermaps_iso_explicit2])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["iso"])));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (move ["_"])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v,w IN dart (hypermap_of_fan (V,E))`))) (term_tac (have_gen_tac [](move ["vw_in2"])))) ((((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("iso_components", [iso_components])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in2", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["_"]) THEN (case THEN (move ["f_eq"])) THEN (move ["_"])))));
((((use_arg_then2 ("dart_leads_into_eq1", [dart_leads_into_eq1]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("f_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("Conforming.SUM_SOL_IN_FACE_SET_EQ_4PI", [Conforming.SUM_SOL_IN_FACE_SET_EQ_4PI])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("confV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((THENL_ROT (-1)) (((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_EQ_IMP_LE", [REAL_EQ_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("SUM_POS_BOUND", [SUM_POS_BOUND])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (ANTS_TAC)));
((((use_arg_then2 ("f_eq", [])) (disch_tac [])) THEN (clear_assumption "f_eq") THEN BETA_TAC) THEN ((fun arg_tac -> arg_tac (Arg_term (`face _1 _2`))) (term_tac (set_tac "f1"))) THEN (BETA_TAC THEN (move ["f_eq"])));
(((fun arg_tac -> (conv_thm_tac DISCH_THEN) (fun fst_arg -> (use_arg_then2 ("f1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (thm_tac MP_TAC)) THEN BETA_TAC THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("f1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("FINITE_HYPERMAP_ORBITS", [FINITE_HYPERMAP_ORBITS]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(BETA_TAC THEN (move ["f1"]) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("lemma_face_representation", [lemma_face_representation])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (case THEN (move ["d"])) THEN (case THEN (move ["d_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("ext_contracted", [ext_contracted])) (fun fst_arg -> (use_arg_then2 ("d", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((fun arg_tac -> (use_arg_then2 ("hypermap_of_fan_rep_alt", [hypermap_of_fan_rep_alt])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`contracted_dart d IN dart (hypermap_of_fan (V,E))`))) (term_tac (have_gen_tac [](move ["cd_in"]))));
((((fun arg_tac -> (use_arg_then2 ("hyp_iso_dart", [hyp_iso_dart])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("fan_hypermaps_iso_explicit", [fan_hypermaps_iso_explicit])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("iso_components", [iso_components])) (fun fst_arg -> (use_arg_then2 ("iso", [iso])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("pair_expand", [pair_expand])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`contracted_dart d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart_leads_into_eq1", [dart_leads_into_eq1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("pair_expand", [pair_expand]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("fan_sol_pos", [fan_sol_pos]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("pair_expand", [pair_expand]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma sol_sum *)
let sol_sum = Sections.section_proof []
`sum f (azim_dart (V,E)) = sol_fan (V,E) f + &(CARD f - 2) * pi`
[
((use_arg_then2 ("f_repr", [])) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["v"]) THEN (case THEN (move ["w"])) THEN (case THEN (move ["vw_in"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))));
((((use_arg_then2 ("sol_fan_eq", [sol_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("fully_surrounded_sol", [fully_surrounded_sol]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("SUM_SUB", [SUM_SUB]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("FACE_FINITE", [FACE_FINITE]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("SUM_CONST", [SUM_CONST])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`pi`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("FACE_FINITE", [FACE_FINITE]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("ETA_AX", [ETA_AX])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`azim_dart (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((THENL_LAST) (((use_arg_then2 ("REAL_OF_NUM_SUB", [REAL_OF_NUM_SUB]))(gsym_then (thm_tac (new_rewrite [] []))))) ((arith_tac) THEN (done_tac)));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("FULLY_SURROUNDED_IMP_CARD_FACE_GE_3", [FULLY_SURROUNDED_IMP_CARD_FACE_GE_3])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma sol_sum3 *)
let sol_sum3 = Sections.section_proof []
`CARD f = 3 ==> sum f (azim_dart (V,E)) = sol_fan (V,E) f + pi`
[
(((((use_arg_then2 ("sol_sum", [sol_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma sol_sum4 *)
let sol_sum4 = Sections.section_proof []
`CARD f = 4 ==> sum f (azim_dart (V,E)) = sol_fan (V,E) f + &2 * pi`
[
(((((use_arg_then2 ("sol_sum", [sol_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma sol_sum5 *)
let sol_sum5 = Sections.section_proof []
`CARD f = 5 ==> sum f (azim_dart (V,E)) = sol_fan (V,E) f + &3 * pi`
[
(((((use_arg_then2 ("sol_sum", [sol_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma sol_sum6 *)
let sol_sum6 = Sections.section_proof []
`CARD f = 6 ==> sum f (azim_dart (V,E)) = sol_fan (V,E) f + &4 * pi`
[
(((((use_arg_then2 ("sol_sum", [sol_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section Face *)
let sol_lo = Sections.finalize_theorem sol_lo;;
let tau_lo = Sections.finalize_theorem tau_lo;;
let sol_hi = Sections.finalize_theorem sol_hi;;
let sol_sum = Sections.finalize_theorem sol_sum;;
let sol_sum3 = Sections.finalize_theorem sol_sum3;;
let sol_sum4 = Sections.finalize_theorem sol_sum4;;
let sol_sum5 = Sections.finalize_theorem sol_sum5;;
let sol_sum6 = Sections.finalize_theorem sol_sum6;;
Sections.end_section "Face";;
(* Section FaceTau *)
Sections.begin_section "FaceTau";;
(Sections.add_section_hyp "tau_h" (`lp_tau (V,E)`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(Sections.add_section_var (mk_var ("f", (`:real^3#real^3->bool`))));;
(Sections.add_section_hyp "f_in" (`f IN face_set (hypermap_of_fan (V,E))`));;
(* Lemma tau_sum *)
let tau_sum = Sections.section_proof []
`sum f (rhazim_fan (V,E)) = tau_fan (V,E) f + &(CARD f - 2) * (pi + sol0)`
[
((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("lemma_face_representation", [lemma_face_representation])) (fun fst_arg -> (use_arg_then2 ("f_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC THEN (case THEN (case THEN ((move ["v"]) THEN (move ["w"])))) THEN (case THEN ALL_TAC)) THEN ((((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] [])))) THEN (move ["vw_in"]) THEN (move ["f_eq"])));
((((use_arg_then2 ("f_eq", []))(thm_tac (new_rewrite [2] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE tauVEF_alt3)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("f_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))));
(((use_arg_then2 ("REAL_OF_NUM_SUB", [REAL_OF_NUM_SUB]))(gsym_then (thm_tac (new_rewrite [] [])))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("FULLY_SURROUNDED_IMP_CARD_FACE_GE_3", [FULLY_SURROUNDED_IMP_CARD_FACE_GE_3])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("f_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`FINITE f`))) (term_tac (have_gen_tac [](move ["fin_f"])))) (((((use_arg_then2 ("f_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("FACE_FINITE", [FACE_FINITE]))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("SUM_SUB", [SUM_SUB]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("SUM_CONST", [SUM_CONST])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`pi`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("SUM_CONST", [SUM_CONST])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`sol0`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("REAL_ADD_ASSOC", [REAL_ADD_ASSOC]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("REAL_ADD_RID", [REAL_ADD_RID]))(gsym_then (thm_tac (new_rewrite [] []))))));
((THENL_LAST) (congr_tac (`_1 + _2:real`)) ((arith_tac) THEN (done_tac)));
(((use_arg_then2 ("SUM_EQ", [SUM_EQ])) (thm_tac apply_tac)) THEN (move ["d"]) THEN (move ["d_in_f"]));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
(((((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("IN_TRANS", [IN_TRANS])) (fun fst_arg -> (use_arg_then2 ("d_in_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("lemma_face_subset", [lemma_face_subset]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(gsym_then (thm_tac (new_rewrite [] [])))))));
(((((use_arg_then2 ("rho_def", [rho_def]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma tau_sum3 *)
let tau_sum3 = Sections.section_proof []
`CARD f = 3 ==>
sum f (rhazim_fan (V,E)) = tau_fan (V,E) f + (pi + sol0)`
[
(((((use_arg_then2 ("tau_sum", [tau_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma tau_sum4 *)
let tau_sum4 = Sections.section_proof []
`CARD f = 4 ==>
sum f (rhazim_fan (V,E)) = tau_fan (V,E) f + &2 * (pi + sol0)`
[
(((((use_arg_then2 ("tau_sum", [tau_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma tau_sum5 *)
let tau_sum5 = Sections.section_proof []
`CARD f = 5 ==>
sum f (rhazim_fan (V,E)) = tau_fan (V,E) f + &3 * (pi + sol0)`
[
(((((use_arg_then2 ("tau_sum", [tau_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma tau_sum6 *)
let tau_sum6 = Sections.section_proof []
`CARD f = 6 ==>
sum f (rhazim_fan (V,E)) = tau_fan (V,E) f + &4 * (pi + sol0)`
[
(((((use_arg_then2 ("tau_sum", [tau_sum]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section Inner *)
let tau_sum = Sections.finalize_theorem tau_sum;;
let tau_sum3 = Sections.finalize_theorem tau_sum3;;
let tau_sum4 = Sections.finalize_theorem tau_sum4;;
let tau_sum5 = Sections.finalize_theorem tau_sum5;;
let tau_sum6 = Sections.finalize_theorem tau_sum6;;
Sections.end_section "Inner";;
(Sections.add_section_hyp "contrV" (`contravening V`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(Sections.add_section_var (mk_var ("f", (`:real^3#real^3->bool`))));;
(Sections.add_section_hyp "f_in" (`f IN face_set (hypermap_of_fan (V,E))`));;
(* Let tgt_ineq *)
Sections.add_section_lemma "tgt_ineq" (Sections.section_proof []
`&4 * pi - &20 * sol0 <= tgt`
[
((fun arg_tac -> arg_tac (Arg_theorem (create_interval `&4 * pi - &20 * sol0`))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
(((((use_arg_then2 ("interval_arith", [interval_arith]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("tgt", [tgt]))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
]);;
(* Lemma tauVEF_hi *)
let tauVEF_hi = Sections.section_proof []
`tauVEF (V,E,f) <= tgt`
[
((((use_arg_then2 ("REAL_LE_TRANS", [REAL_LE_TRANS])) (disch_tac [])) THEN (clear_assumption "REAL_LE_TRANS") THEN (DISCH_THEN apply_tac)) THEN ((fun arg_tac -> arg_tac (Arg_term (`&4 * pi - &20 * sol0`))) (term_tac exists_tac)) THEN ((((use_arg_then2 ("tgt_ineq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andbT", [andbT]))(thm_tac (new_rewrite [] []))))));
(((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("sum_tauVEF_upper_bound", [sum_tauVEF_upper_bound])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC));
((((use_arg_then2 ("contrV", [])) (disch_tac [])) THEN (clear_assumption "contrV") THEN BETA_TAC) THEN (((((use_arg_then2 ("contravening", [contravening]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("real_gt", [real_gt]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_LT_LE", [REAL_LT_LE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((DISCH_THEN (fun snd_th -> (use_arg_then2 ("SUM_POS_BOUND", [SUM_POS_BOUND])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("f_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("FINITE_HYPERMAP_ORBITS", [FINITE_HYPERMAP_ORBITS]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)) THEN (move ["f2"]) THEN (move ["f2_in"]));
((((use_arg_then2 ("tau_h", [])) (disch_tac [])) THEN (clear_assumption "tau_h") THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_tau", [lp_tau]))(thm_tac (new_rewrite [] [])))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma tau_hi *)
let tau_hi = Sections.section_proof []
`tau_fan (V,E) f <= tgt`
[
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("tauVEF_hi", [tauVEF_hi]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Inner *)
let tauVEF_hi = Sections.finalize_theorem tauVEF_hi;;
let tau_hi = Sections.finalize_theorem tau_hi;;
Sections.end_section "Inner";;
(* Finalization of the section FaceTau *)
let tau_sum = Sections.finalize_theorem tau_sum;;
let tau_sum3 = Sections.finalize_theorem tau_sum3;;
let tau_sum4 = Sections.finalize_theorem tau_sum4;;
let tau_sum5 = Sections.finalize_theorem tau_sum5;;
let tau_sum6 = Sections.finalize_theorem tau_sum6;;
let tauVEF_hi = Sections.finalize_theorem tauVEF_hi;;
let tau_hi = Sections.finalize_theorem tau_hi;;
Sections.end_section "FaceTau";;
(* Section Nonlinear *)
Sections.begin_section "Nonlinear";;
(* Section V *)
Sections.begin_section "V";;
(Sections.add_section_var (mk_var ("v", (`:real^3`))));;
(Sections.add_section_hyp "vV" (`v IN V`));;
(* Lemma ln_fan_ly *)
let ln_fan_ly = Sections.section_proof []
`ln_fan v = ly (norm v)`
[
((((use_arg_then2 ("ln_fan", [ln_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`v = FST (v,v)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((ALL_TAC) THEN (done_tac)));
((((use_arg_then2 ("h_dart", [h_dart]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ly_EQ_lmfun", [ly_EQ_lmfun]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("norm_v", [])) (fun fst_arg -> (use_arg_then2 ("vV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma rho_fan_eq_rho *)
let rho_fan_eq_rho = Sections.section_proof []
`rho_fan v = rho (norm v)`
[
((((use_arg_then2 ("rho_fan", [rho_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("Sphere.rho", [Sphere.rho]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ln_fan_ly", [ln_fan_ly]))(gsym_then (thm_tac (new_rewrite [] []))))));
((fun arg_tac -> arg_tac (Arg_term (`&1 + _`))) (term_tac (set_tac "x")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`abs x = x`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((((use_arg_then2 ("x_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("REAL_ABS_REFL", [REAL_ABS_REFL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("x_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_pos", [rho_pos]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section V *)
let ln_fan_ly = Sections.finalize_theorem ln_fan_ly;;
let rho_fan_eq_rho = Sections.finalize_theorem rho_fan_eq_rho;;
Sections.end_section "V";;
(* Section Y *)
Sections.begin_section "Y";;
(* Lemma ys_eq *)
let ys_eq = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> y1_fan (v,w) = norm v
/\ y2_fan (v,w) = norm w
/\ y3_fan (V,E) (v,w) = norm (sigma_fan (vec 0) V E v w)
/\ y4'_fan (V,E) (v,w) = dist (w, sigma_fan (vec 0) V E v w)
/\ y5_fan (V,E) (v,w) = dist (v, sigma_fan (vec 0) V E v w)
/\ y6_fan (v,w) = dist (v,w)`
[
(BETA_TAC THEN (move ["vw_in"]));
((((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("DIST_SYM", [DIST_SYM]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma inverse_f_fan_pair_ext_power2 *)
let inverse_f_fan_pair_ext_power2 = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> let w' = sigma_fan (vec 0) V E v w in
let u = sigma_fan (vec 0) V E w' v in
(inverse (f_fan_pair_ext (V,E)) POWER 2) (v,w) = u,w'`
[
((BETA_TAC THEN (move ["vw_in"])) THEN (repeat_tactic 1 9 ((CONV_TAC let_CONV))));
((((use_arg_then2 ("TWO", [TWO]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("dart_switch", [dart_switch]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("sigma_in_dart1", [sigma_in_dart1]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y78_eq *)
let y78_eq = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
==> let w' = sigma_fan (vec 0) V E v w in
let u = sigma_fan (vec 0) V E w' v in
y8_fan (V,E) (v,w) = dist (w',u) /\
y7_fan (V,E) (v,w) = norm u`
[
((BETA_TAC THEN (move ["vw_in"])) THEN (repeat_tactic 1 9 ((CONV_TAC let_CONV))));
((((use_arg_then2 ("DIST_SYM", [DIST_SYM]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_power2)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("TWO", [TWO]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_power2)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma y9_eq *)
let y9_eq = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E) /\ CARD (face (hypermap_of_fan (V,E)) (v,w)) = 4
==> let w' = sigma_fan (vec 0) V E v w in
let u = sigma_fan (vec 0) V E w' v in
y9_fan (V,E) (v,w) = dist (w,u)`
[
((BETA_TAC THEN (case THEN ((move ["vw_in"]) THEN (move ["card_f"])))) THEN (repeat_tactic 1 9 ((CONV_TAC let_CONV))));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w1")));
((((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE face4_eq)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("w1_def", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma ys_eq_alt *)
let ys_eq_alt = Sections.section_proof ["d"]
`d IN dart_of_fan (V,E)
==> y1_fan d = norm (FST d)
/\ y2_fan d = norm (SND d)
/\ y3_fan (V,E) d = norm (sigma_fan (vec 0) V E (FST d) (SND d))
/\ y4'_fan (V,E) d = dist (SND d, sigma_fan (vec 0) V E (FST d) (SND d))
/\ y5_fan (V,E) d = dist (FST d, sigma_fan (vec 0) V E (FST d) (SND d))
/\ y6_fan d = dist d`
[
((((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (simp_tac) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("ys_eq", [ys_eq])) (thm_tac (match_mp_then snd_th MP_TAC))))) THEN (done_tac));
];;
(* Finalization of the section Y *)
let ys_eq = Sections.finalize_theorem ys_eq;;
let inverse_f_fan_pair_ext_power2 = Sections.finalize_theorem inverse_f_fan_pair_ext_power2;;
let y78_eq = Sections.finalize_theorem y78_eq;;
let y9_eq = Sections.finalize_theorem y9_eq;;
let ys_eq_alt = Sections.finalize_theorem ys_eq_alt;;
Sections.end_section "Y";;
(* Section Dart *)
Sections.begin_section "Dart";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN dart_of_fan (V,E)`));;
(* Lemma azim_fan_eq_dih_y *)
let azim_fan_eq_dih_y = Sections.section_proof []
`azim_dart (V,E) d
= dih_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
(((((fun arg_tac -> arg_tac (Arg_theorem (let_RULE fully_surrounded_azim_eq_dih_y)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma rhazim_fan_eq_rhazim *)
let rhazim_fan_eq_rhazim = Sections.section_proof []
`rhazim_fan (V,E) d
= rhazim (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("Sphere.rhazim", [Sphere.rhazim]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rhazim_fan", [rhazim_fan]))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("h_dart", [h_dart]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("yn_fan", [yn_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("ln_fan", [ln_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("rho_fan", [rho_fan]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rho_fan_eq_rho", [rho_fan_eq_rho]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("in_dart_inV", [])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma delta_y_not_neg *)
let delta_y_not_neg = Sections.section_proof []
`~(delta_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)
< &0)`
[
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE delta_y_pos))) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`sigma_fan (vec 0) V E v w`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
(((((use_arg_then2 ("REAL_NOT_LT", [REAL_NOT_LT]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Finalization of the section Dart *)
let azim_fan_eq_dih_y = Sections.finalize_theorem azim_fan_eq_dih_y;;
let rhazim_fan_eq_rhazim = Sections.finalize_theorem rhazim_fan_eq_rhazim;;
let delta_y_not_neg = Sections.finalize_theorem delta_y_not_neg;;
Sections.end_section "Dart";;
(* Section Dart3 *)
Sections.begin_section "Dart3";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 3 (hypermap_of_fan (V,E))`));;
(* Let card_f *)
Sections.add_section_lemma "card_f" (Sections.section_proof []
`CARD (face (hypermap_of_fan (V,E)) d) = 3`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let d_in_dart *)
Sections.add_section_lemma "d_in_dart" (Sections.section_proof []
`d IN dart_of_fan (V,E)`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma dart3_yf_eq *)
let dart3_yf_eq = Sections.section_proof []
`y1_fan (f_fan_pair_ext (V,E) d) = y2_fan d
/\ y2_fan (f_fan_pair_ext (V,E) d) = y3_fan (V,E) d
/\ y3_fan (V,E) (f_fan_pair_ext (V,E) d) = y1_fan d
/\ y4_fan (V,E) (f_fan_pair_ext (V,E) d) = y5_fan (V,E) d
/\ y5_fan (V,E) (f_fan_pair_ext (V,E) d) = y6_fan d
/\ y6_fan (f_fan_pair_ext (V,E) d) = y4_fan (V,E) d`
[
((repeat_tactic 12 0 (((fun arg_tac ->(use_arg_then2 ("y1_fan", [y1_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y2_fan", [y2_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y3_fan", [y3_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y4_fan", [y4_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y5_fan", [y5_fan]))(fun tmp_arg1 -> (use_arg_then2 ("y6_fan", [y6_fan]))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in1"])));
((repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("f_fan_pair3", [f_fan_pair3])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["eq"])));
(((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("eq", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma dart3_y_invf_eq *)
let dart3_y_invf_eq = Sections.section_proof []
`y1_fan (inverse (f_fan_pair_ext (V,E)) d) = y3_fan (V,E) d
/\ y2_fan (inverse (f_fan_pair_ext (V,E)) d) = y1_fan d
/\ y3_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y2_fan d
/\ y4_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y6_fan d
/\ y5_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y4_fan (V,E) d
/\ y6_fan (inverse (f_fan_pair_ext (V,E)) d) = y5_fan (V,E) d`
[
((repeat_tactic 12 0 (((fun arg_tac ->(use_arg_then2 ("y1_fan", [y1_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y2_fan", [y2_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y3_fan", [y3_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y4_fan", [y4_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y5_fan", [y5_fan]))(fun tmp_arg1 -> (use_arg_then2 ("y6_fan", [y6_fan]))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in1"])));
((fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_power2))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
(((((use_arg_then2 ("TWO", [TWO]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER", [POWER]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> arg_tac (Arg_theorem (let_RULE TRIANGULAR_FACE)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("f_fan_pair3", [f_fan_pair3])) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart3_azim_fan_eq_dih_y *)
let dart3_azim_fan_eq_dih_y = Sections.section_proof []
`azim_dart (V,E) d
= dih_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
(((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart3_rhazim_fan_eq_rhazim *)
let dart3_rhazim_fan_eq_rhazim = Sections.section_proof []
`rhazim_fan (V,E) d
= rhazim (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
(((((use_arg_then2 ("rhazim_fan_eq_rhazim", [rhazim_fan_eq_rhazim]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart3_sol_fan_eq_sol *)
let dart3_sol_fan_eq_sol = Sections.section_proof []
`sol_fan (V,E) (face (hypermap_of_fan (V,E)) d)
= sol_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
(((((use_arg_then2 ("sol_fan_eq", [sol_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE fully_surrounded_sol_eq_sol_y)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Finalization of the section Dart3 *)
let dart3_yf_eq = Sections.finalize_theorem dart3_yf_eq;;
let dart3_y_invf_eq = Sections.finalize_theorem dart3_y_invf_eq;;
let dart3_azim_fan_eq_dih_y = Sections.finalize_theorem dart3_azim_fan_eq_dih_y;;
let dart3_rhazim_fan_eq_rhazim = Sections.finalize_theorem dart3_rhazim_fan_eq_rhazim;;
let dart3_sol_fan_eq_sol = Sections.finalize_theorem dart3_sol_fan_eq_sol;;
Sections.end_section "Dart3";;
(* Section Dart3_more *)
Sections.begin_section "Dart3_more";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 3 (hypermap_of_fan (V,E))`));;
(* Lemma dart3_azim2_fan_eq_dih2_y *)
let dart3_azim2_fan_eq_dih2_y = Sections.section_proof []
`azim2_fan (V,E) d
= dih2_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("dih2_y", [dih2_y]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart3_azim_fan_eq_dih_y", [dart3_azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("dart3_yf_eq", [dart3_yf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart3_azim3_fan_eq_dih3_y *)
let dart3_azim3_fan_eq_dih3_y = Sections.section_proof []
`azim3_fan (V,E) d
= dih3_y (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("dih3_y", [dih3_y]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim3_fan", [azim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart3_azim_fan_eq_dih_y", [dart3_azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((use_arg_then2 ("dart3_y_invf_eq", [dart3_y_invf_eq]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart3_rhazim2_fan_eq_rhazim2 *)
let dart3_rhazim2_fan_eq_rhazim2 = Sections.section_proof []
`rhazim2_fan (V,E) d
= rhazim2 (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("rhazim2", [rhazim2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim2_fan", [rhazim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart3_rhazim_fan_eq_rhazim", [dart3_rhazim_fan_eq_rhazim]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("node2_y", [node2_y]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("dart3_yf_eq", [dart3_yf_eq]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma dart3_rhazim3_fan_eq_rhazim3 *)
let dart3_rhazim3_fan_eq_rhazim3 = Sections.section_proof []
`rhazim3_fan (V,E) d
= rhazim3 (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((((use_arg_then2 ("rhazim3", [rhazim3]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("rhazim3_fan", [rhazim3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart3_rhazim_fan_eq_rhazim", [dart3_rhazim_fan_eq_rhazim]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("node3_y", [node3_y]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("dart3_y_invf_eq", [dart3_y_invf_eq]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Finalization of the section Dart3_more *)
let dart3_azim2_fan_eq_dih2_y = Sections.finalize_theorem dart3_azim2_fan_eq_dih2_y;;
let dart3_azim3_fan_eq_dih3_y = Sections.finalize_theorem dart3_azim3_fan_eq_dih3_y;;
let dart3_rhazim2_fan_eq_rhazim2 = Sections.finalize_theorem dart3_rhazim2_fan_eq_rhazim2;;
let dart3_rhazim3_fan_eq_rhazim3 = Sections.finalize_theorem dart3_rhazim3_fan_eq_rhazim3;;
Sections.end_section "Dart3_more";;
(* Lemma dart4_f_fan_pair_ext_power2 *)
let dart4_f_fan_pair_ext_power2 = Sections.section_proof ["d"]
`d IN dart_of_fan (V,E) /\
CARD (face (hypermap_of_fan (V,E)) d) = 4
==> (f_fan_pair_ext (V,E) POWER 2) d = (inverse (f_fan_pair_ext (V,E)) POWER 2) d`
[
(BETA_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["card_f"]))));
((((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("eq_sym", [eq_sym]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`2 = 4 - 2`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [2] []))))))) ((arith_tac) THEN (done_tac)));
(((use_arg_then2 ("FINITE_ORBIT_MAP_INVERSE", [FINITE_ORBIT_MAP_INVERSE])) (thm_tac apply_tac)) THEN ((fun arg_tac -> arg_tac (Arg_term (`dart (hypermap_of_fan (V,E))`))) (term_tac exists_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("face_map_and_darts", [face_map_and_darts]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("face", [face]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
];;
(* Section Dart4 *)
Sections.begin_section "Dart4";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 4 (hypermap_of_fan (V,E))`));;
(* Let card_f *)
Sections.add_section_lemma "card_f" (Sections.section_proof []
`CARD (face (hypermap_of_fan (V,E)) d) = 4`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let d_in_dart *)
Sections.add_section_lemma "d_in_dart" (Sections.section_proof []
`d IN dart_of_fan (V,E)`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma dart4_yf_eq *)
let dart4_yf_eq = Sections.section_proof []
`y1_fan (f_fan_pair_ext (V,E) d) = y2_fan d
/\ y2_fan (f_fan_pair_ext (V,E) d) = y7_fan (V,E) d
/\ y3_fan (V,E) (f_fan_pair_ext (V,E) d) = y1_fan d
/\ y5_fan (V,E) (f_fan_pair_ext (V,E) d) = y6_fan d
/\ y6_fan (f_fan_pair_ext (V,E) d) = y9_fan (V,E) d
/\ y7_fan (V,E) (f_fan_pair_ext (V,E) d) = y3_fan (V,E) d
/\ y8_fan (V,E) (f_fan_pair_ext (V,E) d) = y5_fan (V,E) d
/\ y9_fan (V,E) (f_fan_pair_ext (V,E) d) = y8_fan (V,E) d`
[
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["inv_f_f"])));
((repeat_tactic 1 9 (((fun arg_tac ->(use_arg_then2 ("y1_fan", [y1_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y3_fan", [y3_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y5_fan", [y5_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y6_fan", [y6_fan]))(fun tmp_arg1 -> (use_arg_then2 ("y9_fan", [y9_fan]))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y2_def", [y2_def]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("fd_in", []))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("inv_f_f", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("yn_fan", [yn_fan]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((repeat_tactic 1 9 (((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] []))))));
((((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("dart4_f_fan_pair_ext_power2", [dart4_f_fan_pair_ext_power2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inv_f_f", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart4_y_invf_eq *)
let dart4_y_invf_eq = Sections.section_proof []
`y1_fan (inverse (f_fan_pair_ext (V,E)) d) = y3_fan (V,E) d
/\ y2_fan (inverse (f_fan_pair_ext (V,E)) d) = y1_fan d
/\ y3_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y7_fan (V,E) d
/\ y5_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y8_fan (V,E) d
/\ y6_fan (inverse (f_fan_pair_ext (V,E)) d) = y5_fan (V,E) d
/\ y7_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y2_fan d
/\ y8_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y9_fan (V,E) d
/\ y9_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d) = y6_fan d`
[
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["inv_f_f"])));
((repeat_tactic 1 9 (((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inv_f_f", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [1] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse _`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (simp_tac));
((fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext _`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`(inverse f POWER 2) (inverse f x) = inverse f ((inverse f POWER 2) x)`))) (term_tac (have_gen_tac ["x"](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
(((((use_arg_then2 ("COM_POWER_FUNCTION", [COM_POWER_FUNCTION]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse f POWER 2`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER", [POWER]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_f_fan_pair_ext_power2", [dart4_f_fan_pair_ext_power2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("f_def", []))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inv_f_f", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart4_cross_eq_y4' *)
let dart4_cross_eq_y4' = Sections.section_proof []
`y4'_fan (V,E) (f_fan_pair_ext (V,E) d)
= y4'_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d)`
[
((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["inv_f_f"])));
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
(((repeat_tactic 1 9 (((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inv_f_f", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("DIST_SYM", [DIST_SYM]))(thm_tac (new_rewrite [] []))))) THEN (congr_tac (`dist _`)) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] [])))) THEN (split_tac));
(((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse _`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_f_fan_pair_ext_power2", [dart4_f_fan_pair_ext_power2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("POWER_1", [POWER_1])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [1] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair_power", [f_fan_pair_power]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("f_fan_pair", [f_fan_pair]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
];;
(* Lemma dart4_cross_eq_enclosed *)
let dart4_cross_eq_enclosed = Sections.section_proof []
`y4'_fan (V,E) (f_fan_pair_ext (V,E) d)
= enclosed (y1_fan d) (y5_fan (V,E) d) (y6_fan d) (y4'_fan (V,E) d)
(y2_fan d) (y3_fan (V,E) d) (y7_fan (V,E) d) (y8_fan (V,E) d) (y9_fan (V,E) d)`
[
(((use_arg_then2 ("dart4_cross_eq_y4'", [dart4_cross_eq_y4']))(thm_tac (new_rewrite [] []))));
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE fully_surrounded_enclosed))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE y78_eq)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE y9_eq)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E w' v`))) (term_tac (set_tac "u")));
(BETA_TAC THEN (((conv_thm_tac DISCH_THEN)(gsym_then (thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse _`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [(`FST _`)]))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))));
((((fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_power2)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("u_def", []))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Dart4 *)
let dart4_yf_eq = Sections.finalize_theorem dart4_yf_eq;;
let dart4_y_invf_eq = Sections.finalize_theorem dart4_y_invf_eq;;
let dart4_cross_eq_y4' = Sections.finalize_theorem dart4_cross_eq_y4';;
let dart4_cross_eq_enclosed = Sections.finalize_theorem dart4_cross_eq_enclosed;;
Sections.end_section "Dart4";;
(* Section Tau *)
Sections.begin_section "Tau";;
(* Lemma dart3_tauVEF_eq_taum *)
let dart3_tauVEF_eq_taum = Sections.section_proof ["d"]
`d IN darts_k 3 (hypermap_of_fan (V,E))
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d)
= taum (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((BETA_TAC THEN (move ["d_in3"])) THEN ((((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac []ALL_TAC)));
((((use_arg_then2 ("d_in3", [])) (disch_tac [])) THEN (clear_assumption "d_in3") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((use_arg_then2 ("d_in3", [])) (disch_tac [])) THEN (clear_assumption "d_in3") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in3"]) THEN (move ["vw_in"]));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE fully_surrounded_tau_eq_taum))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("subV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC));
((((use_arg_then2 ("vw_in3", [])) (disch_tac [])) THEN (clear_assumption "vw_in3") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart4_tauVEF_eq_tauq *)
let dart4_tauVEF_eq_tauq = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d)
= tauq (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d)
(y5_fan (V,E) d) (y6_fan d) (y7_fan (V,E) d) (y8_fan (V,E) d) (y9_fan (V,E) d)`
[
(BETA_TAC THEN (move ["d_in4"]));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))));
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (case THEN (move ["vw_in"])) THEN (move ["card_f"]));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE fully_surrounded_tau_eq_tauq))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("subV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
(((repeat_tactic 1 9 (((use_arg_then2 ("ys_eq", [ys_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE y78_eq)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE y9_eq)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(Sections.add_section_hyp "tau_h" (`lp_tau (V,E)`));;
(* Lemma dart3_tau_fan_eq_taum *)
let dart3_tau_fan_eq_taum = Sections.section_proof ["d"]
`d IN darts_k 3 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d)
= taum (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4_fan (V,E) d) (y5_fan (V,E) d) (y6_fan d)`
[
((BETA_TAC THEN (move ["d_in3"])) THEN (((use_arg_then2 ("d_in3", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["card_f"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart3_tauVEF_eq_taum", [dart3_tauVEF_eq_taum]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma dart4_tau_fan_eq_tauq *)
let dart4_tau_fan_eq_tauq = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d)
= tauq (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d)
(y5_fan (V,E) d) (y6_fan d) (y7_fan (V,E) d) (y8_fan (V,E) d) (y9_fan (V,E) d)`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["card_f"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Tau *)
let dart3_tauVEF_eq_taum = Sections.finalize_theorem dart3_tauVEF_eq_taum;;
let dart4_tauVEF_eq_tauq = Sections.finalize_theorem dart4_tauVEF_eq_tauq;;
let dart3_tau_fan_eq_taum = Sections.finalize_theorem dart3_tau_fan_eq_taum;;
let dart4_tau_fan_eq_tauq = Sections.finalize_theorem dart4_tau_fan_eq_tauq;;
Sections.end_section "Tau";;
(* Finalization of the section Nonlinear *)
let ln_fan_ly = Sections.finalize_theorem ln_fan_ly;;
let rho_fan_eq_rho = Sections.finalize_theorem rho_fan_eq_rho;;
let ys_eq = Sections.finalize_theorem ys_eq;;
let inverse_f_fan_pair_ext_power2 = Sections.finalize_theorem inverse_f_fan_pair_ext_power2;;
let y78_eq = Sections.finalize_theorem y78_eq;;
let y9_eq = Sections.finalize_theorem y9_eq;;
let ys_eq_alt = Sections.finalize_theorem ys_eq_alt;;
let azim_fan_eq_dih_y = Sections.finalize_theorem azim_fan_eq_dih_y;;
let rhazim_fan_eq_rhazim = Sections.finalize_theorem rhazim_fan_eq_rhazim;;
let delta_y_not_neg = Sections.finalize_theorem delta_y_not_neg;;
let dart3_yf_eq = Sections.finalize_theorem dart3_yf_eq;;
let dart3_y_invf_eq = Sections.finalize_theorem dart3_y_invf_eq;;
let dart3_azim_fan_eq_dih_y = Sections.finalize_theorem dart3_azim_fan_eq_dih_y;;
let dart3_rhazim_fan_eq_rhazim = Sections.finalize_theorem dart3_rhazim_fan_eq_rhazim;;
let dart3_sol_fan_eq_sol = Sections.finalize_theorem dart3_sol_fan_eq_sol;;
let dart3_azim2_fan_eq_dih2_y = Sections.finalize_theorem dart3_azim2_fan_eq_dih2_y;;
let dart3_azim3_fan_eq_dih3_y = Sections.finalize_theorem dart3_azim3_fan_eq_dih3_y;;
let dart3_rhazim2_fan_eq_rhazim2 = Sections.finalize_theorem dart3_rhazim2_fan_eq_rhazim2;;
let dart3_rhazim3_fan_eq_rhazim3 = Sections.finalize_theorem dart3_rhazim3_fan_eq_rhazim3;;
let dart4_f_fan_pair_ext_power2 = Sections.finalize_theorem dart4_f_fan_pair_ext_power2;;
let dart4_yf_eq = Sections.finalize_theorem dart4_yf_eq;;
let dart4_y_invf_eq = Sections.finalize_theorem dart4_y_invf_eq;;
let dart4_cross_eq_y4' = Sections.finalize_theorem dart4_cross_eq_y4';;
let dart4_cross_eq_enclosed = Sections.finalize_theorem dart4_cross_eq_enclosed;;
let dart3_tauVEF_eq_taum = Sections.finalize_theorem dart3_tauVEF_eq_taum;;
let dart4_tauVEF_eq_tauq = Sections.finalize_theorem dart4_tauVEF_eq_tauq;;
let dart3_tau_fan_eq_taum = Sections.finalize_theorem dart3_tau_fan_eq_taum;;
let dart4_tau_fan_eq_tauq = Sections.finalize_theorem dart4_tau_fan_eq_tauq;;
Sections.end_section "Nonlinear";;
(* Finalization of the section Fan *)
let fan_sol_pos = Sections.finalize_theorem fan_sol_pos;;
let sol_fan_eq = Sections.finalize_theorem sol_fan_eq;;
let rho_pos = Sections.finalize_theorem rho_pos;;
let ln_def = Sections.finalize_theorem ln_def;;
let rho_def = Sections.finalize_theorem rho_def;;
let ln_lo = Sections.finalize_theorem ln_lo;;
let ln_hi = Sections.finalize_theorem ln_hi;;
let yn_lo = Sections.finalize_theorem yn_lo;;
let yn_hi = Sections.finalize_theorem yn_hi;;
let rho_lo = Sections.finalize_theorem rho_lo;;
let rho_hi = Sections.finalize_theorem rho_hi;;
let edge_sym = Sections.finalize_theorem edge_sym;;
let y1_def = Sections.finalize_theorem y1_def;;
let y2_def = Sections.finalize_theorem y2_def;;
let y3_def = Sections.finalize_theorem y3_def;;
let y4_def = Sections.finalize_theorem y4_def;;
let y5_def = Sections.finalize_theorem y5_def;;
let y6_def = Sections.finalize_theorem y6_def;;
let y8_def = Sections.finalize_theorem y8_def;;
let y9_def = Sections.finalize_theorem y9_def;;
let azim_lo = Sections.finalize_theorem azim_lo;;
let azim_hi = Sections.finalize_theorem azim_hi;;
let rhazim_lo = Sections.finalize_theorem rhazim_lo;;
let rhazim_hi = Sections.finalize_theorem rhazim_hi;;
let ye_lo = Sections.finalize_theorem ye_lo;;
let y1_lo = Sections.finalize_theorem y1_lo;;
let y2_lo = Sections.finalize_theorem y2_lo;;
let y1_hi = Sections.finalize_theorem y1_hi;;
let y2_hi = Sections.finalize_theorem y2_hi;;
let y6_lo = Sections.finalize_theorem y6_lo;;
let y4'_eq_y4 = Sections.finalize_theorem y4'_eq_y4;;
let ye_hi_std = Sections.finalize_theorem ye_hi_std;;
let y4_hi_std = Sections.finalize_theorem y4_hi_std;;
let y5_hi_std = Sections.finalize_theorem y5_hi_std;;
let y6_hi_std = Sections.finalize_theorem y6_hi_std;;
let y8_hi_std = Sections.finalize_theorem y8_hi_std;;
let y9_hi_std = Sections.finalize_theorem y9_hi_std;;
let ye_hi_std2 = Sections.finalize_theorem ye_hi_std2;;
let y4_hi_std2 = Sections.finalize_theorem y4_hi_std2;;
let y5_hi_std2 = Sections.finalize_theorem y5_hi_std2;;
let y6_hi_std2 = Sections.finalize_theorem y6_hi_std2;;
let yy10_std = Sections.finalize_theorem yy10_std;;
let azim2_lo = Sections.finalize_theorem azim2_lo;;
let azim2_hi = Sections.finalize_theorem azim2_hi;;
let azim3_lo = Sections.finalize_theorem azim3_lo;;
let azim3_hi = Sections.finalize_theorem azim3_hi;;
let rhazim2_lo = Sections.finalize_theorem rhazim2_lo;;
let rhazim2_hi = Sections.finalize_theorem rhazim2_hi;;
let rhazim3_lo = Sections.finalize_theorem rhazim3_lo;;
let rhazim3_hi = Sections.finalize_theorem rhazim3_hi;;
let y3_lo = Sections.finalize_theorem y3_lo;;
let y3_hi = Sections.finalize_theorem y3_hi;;
let y4_lo = Sections.finalize_theorem y4_lo;;
let y5_lo = Sections.finalize_theorem y5_lo;;
let y7_lo = Sections.finalize_theorem y7_lo;;
let y7_hi = Sections.finalize_theorem y7_hi;;
let y8_lo = Sections.finalize_theorem y8_lo;;
let y9_lo = Sections.finalize_theorem y9_lo;;
let y4'_lo = Sections.finalize_theorem y4'_lo;;
let azim2c = Sections.finalize_theorem azim2c;;
let azim3c = Sections.finalize_theorem azim3c;;
let rhazim2c = Sections.finalize_theorem rhazim2c;;
let rhazim3c = Sections.finalize_theorem rhazim3c;;
let RHA = Sections.finalize_theorem RHA;;
let RHB = Sections.finalize_theorem RHB;;
let RHBLO = Sections.finalize_theorem RHBLO;;
let RHBHI = Sections.finalize_theorem RHBHI;;
let azim_sum = Sections.finalize_theorem azim_sum;;
let rhazim_sum = Sections.finalize_theorem rhazim_sum;;
let sol_lo = Sections.finalize_theorem sol_lo;;
let tau_lo = Sections.finalize_theorem tau_lo;;
let sol_hi = Sections.finalize_theorem sol_hi;;
let sol_sum = Sections.finalize_theorem sol_sum;;
let sol_sum3 = Sections.finalize_theorem sol_sum3;;
let sol_sum4 = Sections.finalize_theorem sol_sum4;;
let sol_sum5 = Sections.finalize_theorem sol_sum5;;
let sol_sum6 = Sections.finalize_theorem sol_sum6;;
let tau_sum = Sections.finalize_theorem tau_sum;;
let tau_sum3 = Sections.finalize_theorem tau_sum3;;
let tau_sum4 = Sections.finalize_theorem tau_sum4;;
let tau_sum5 = Sections.finalize_theorem tau_sum5;;
let tau_sum6 = Sections.finalize_theorem tau_sum6;;
let tauVEF_hi = Sections.finalize_theorem tauVEF_hi;;
let tau_hi = Sections.finalize_theorem tau_hi;;
let ln_fan_ly = Sections.finalize_theorem ln_fan_ly;;
let rho_fan_eq_rho = Sections.finalize_theorem rho_fan_eq_rho;;
let ys_eq = Sections.finalize_theorem ys_eq;;
let inverse_f_fan_pair_ext_power2 = Sections.finalize_theorem inverse_f_fan_pair_ext_power2;;
let y78_eq = Sections.finalize_theorem y78_eq;;
let y9_eq = Sections.finalize_theorem y9_eq;;
let ys_eq_alt = Sections.finalize_theorem ys_eq_alt;;
let azim_fan_eq_dih_y = Sections.finalize_theorem azim_fan_eq_dih_y;;
let rhazim_fan_eq_rhazim = Sections.finalize_theorem rhazim_fan_eq_rhazim;;
let delta_y_not_neg = Sections.finalize_theorem delta_y_not_neg;;
let dart3_yf_eq = Sections.finalize_theorem dart3_yf_eq;;
let dart3_y_invf_eq = Sections.finalize_theorem dart3_y_invf_eq;;
let dart3_azim_fan_eq_dih_y = Sections.finalize_theorem dart3_azim_fan_eq_dih_y;;
let dart3_rhazim_fan_eq_rhazim = Sections.finalize_theorem dart3_rhazim_fan_eq_rhazim;;
let dart3_sol_fan_eq_sol = Sections.finalize_theorem dart3_sol_fan_eq_sol;;
let dart3_azim2_fan_eq_dih2_y = Sections.finalize_theorem dart3_azim2_fan_eq_dih2_y;;
let dart3_azim3_fan_eq_dih3_y = Sections.finalize_theorem dart3_azim3_fan_eq_dih3_y;;
let dart3_rhazim2_fan_eq_rhazim2 = Sections.finalize_theorem dart3_rhazim2_fan_eq_rhazim2;;
let dart3_rhazim3_fan_eq_rhazim3 = Sections.finalize_theorem dart3_rhazim3_fan_eq_rhazim3;;
let dart4_f_fan_pair_ext_power2 = Sections.finalize_theorem dart4_f_fan_pair_ext_power2;;
let dart4_yf_eq = Sections.finalize_theorem dart4_yf_eq;;
let dart4_y_invf_eq = Sections.finalize_theorem dart4_y_invf_eq;;
let dart4_cross_eq_y4' = Sections.finalize_theorem dart4_cross_eq_y4';;
let dart4_cross_eq_enclosed = Sections.finalize_theorem dart4_cross_eq_enclosed;;
let dart3_tauVEF_eq_taum = Sections.finalize_theorem dart3_tauVEF_eq_taum;;
let dart4_tauVEF_eq_tauq = Sections.finalize_theorem dart4_tauVEF_eq_tauq;;
let dart3_tau_fan_eq_taum = Sections.finalize_theorem dart3_tau_fan_eq_taum;;
let dart4_tau_fan_eq_tauq = Sections.finalize_theorem dart4_tau_fan_eq_tauq;;
Sections.end_section "Fan";;
(* Section Sym *)
Sections.begin_section "Sym";;
(Sections.add_section_var (mk_var ("y1", (`:real`))); Sections.add_section_var (mk_var ("y2", (`:real`))); Sections.add_section_var (mk_var ("y3", (`:real`))); Sections.add_section_var (mk_var ("y4", (`:real`))); Sections.add_section_var (mk_var ("y5", (`:real`))); Sections.add_section_var (mk_var ("y6", (`:real`))));;
(* Lemma sol_y_sym_reflect *)
let sol_y_sym_reflect = Sections.section_proof []
`sol_y y1 y2 y3 y4 y5 y6 = sol_y y1 y3 y2 y4 y6 y5`
[
((repeat_tactic 1 9 (((use_arg_then2 ("sol_y", [sol_y]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_EQ_ADD_LCANCEL", [REAL_EQ_ADD_LCANCEL]))(thm_tac (new_rewrite [] [])))));
((repeat_tactic 1 9 (((use_arg_then2 ("REAL_ADD_ASSOC", [REAL_ADD_ASSOC]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_EQ_ADD_RCANCEL", [REAL_EQ_ADD_RCANCEL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ADD_SYM", [REAL_ADD_SYM]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_EQ_ADD_LCANCEL", [REAL_EQ_ADD_LCANCEL]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma taum_sym_reflect *)
let taum_sym_reflect = Sections.section_proof []
`taum y1 y2 y3 y4 y5 y6 = taum y1 y3 y2 y4 y6 y5`
[
((repeat_tactic 1 9 (((use_arg_then2 ("taum", [taum]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("sol_y_sym_reflect", [sol_y_sym_reflect]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_sub", [real_sub]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("REAL_EQ_ADD_LCANCEL", [REAL_EQ_ADD_LCANCEL]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("lnazim", [lnazim]))(thm_tac (new_rewrite [] []))))));
(((repeat_tactic 1 9 (((use_arg_then2 ("REAL_MUL_LNEG", [REAL_MUL_LNEG]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("REAL_EQ_MUL_LCANCEL", [REAL_EQ_MUL_LCANCEL]))(thm_tac (new_rewrite [] []))))) THEN (DISJ2_TAC));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_EQ_ADD_LCANCEL", [REAL_EQ_ADD_LCANCEL]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ADD_SYM", [REAL_ADD_SYM]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_EQ_ADD_LCANCEL", [REAL_EQ_ADD_LCANCEL]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Finalization of the section Sym *)
let sol_y_sym_reflect = Sections.finalize_theorem sol_y_sym_reflect;;
let taum_sym_reflect = Sections.finalize_theorem taum_sym_reflect;;
Sections.end_section "Sym";;
(* Section NonlinearSplit *)
Sections.begin_section "NonlinearSplit";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "fanV" (`FAN (vec 0,V,E)`));;
(Sections.add_section_hyp "f_surr" (`fully_surrounded (V,E)`));;
(Sections.add_section_hyp "packV" (`packing V`));;
(Sections.add_section_hyp "subV" (`V SUBSET ball_annulus`));;
(* Let dart1_eq *)
Sections.add_section_lemma "dart1_eq" (Sections.section_proof []
`dart1_of_fan (V,E) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let dartH *)
Sections.add_section_lemma "dartH" (Sections.section_proof []
`dart (hypermap_of_fan (V,E)) = dart_of_fan (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let fH *)
Sections.add_section_lemma "fH" (Sections.section_proof []
`face_map (hypermap_of_fan (V,E)) = f_fan_pair_ext (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Let nH *)
Sections.add_section_lemma "nH" (Sections.section_proof []
`node_map (hypermap_of_fan (V,E)) = n_fan_pair_ext (V,E)`
[
((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
]);;
(* Section Dart *)
Sections.begin_section "Dart";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN dart_of_fan (V,E)`));;
(* Let split_eq *)
Sections.add_section_lemma "split_eq" (Sections.section_proof []
`split_fan_face (V,E) d = V, add_diag (V,E) d`
[
(((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
(((((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma add_diag_sigma_eq *)
let add_diag_sigma_eq = Sections.section_proof ["v";"w"]
`v,w IN dart_of_fan (V,E)
/\ ~(v = SND d) /\ ~(v = sigma_fan (vec 0) V E (FST d) (SND d))
==> sigma_fan (vec 0) V (add_diag (V,E) d) v w = sigma_fan (vec 0) V E v w`
[
(((use_arg_then2 ("split_eq", [])) (disch_tac [])) THEN (clear_assumption "split_eq") THEN ((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["a"]) THEN (move ["b"]) THEN (move ["ab_in"]) THEN (move ["split_eq"]) THEN (simp_tac) THEN (case THEN ((move ["vw_in"]) THEN (move ["neq"]))));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("n_split_fan_face_eq1", [n_split_fan_face_eq1])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("ab_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`v,w`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC)) THEN (ANTS_TAC));
(((((fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("ab_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("neq", []))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
(((((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("n_fan_pair", [n_fan_pair]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma inverse_f_ext_d_split_eq *)
let inverse_f_ext_d_split_eq = Sections.section_proof []
`inverse (f_fan_pair_ext (V,add_diag (V,E) d)) d
= inverse (f_fan_pair_ext (V,E)) d`
[
(((use_arg_then2 ("add_diag_sigma_eq", [add_diag_sigma_eq])) (disch_tac [])) THEN (clear_assumption "add_diag_sigma_eq") THEN ((use_arg_then2 ("split_eq", [])) (disch_tac [])) THEN (clear_assumption "split_eq") THEN ((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (simp_tac) THEN (move ["vw_in"]) THEN (move ["split_eq"]) THEN (move ["sigma_eq"]));
((((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("dart1_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (move ["vw_in1"])));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["fan2"]) THEN (case THEN (move ["dart2_eq"])) THEN (move ["f_surr2"])))));
(in_tac ["fan2"; "f_surr2"; "dart2_eq"] false (((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))));
(((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSE_EQ", [PERMUTES_INVERSE_EQ])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("sigma_in_dart1", [sigma_in_dart1])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in1", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["vw'_in1"])));
((((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart_switch", [dart_switch]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("dart2_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw'_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("sigma_eq", []))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ", [PAIR_IN_DART1_OF_FAN_IMP_NOT_EQ])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart1_switch", [dart1_switch]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("f_fan_pair_last", [f_fan_pair_last])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("dart2_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma ys_split_eq *)
let ys_split_eq = Sections.section_proof []
`y3_fan (V,add_diag (V,E) d) d = y3_fan (V,E) d
/\ y4'_fan (V,add_diag (V,E) d) d = y4'_fan (V,E) d
/\ y5_fan (V,add_diag (V,E) d) d = y5_fan (V,E) d`
[
(((repeat_tactic 1 9 (((fun arg_tac ->(use_arg_then2 ("y3_fan", [y3_fan]))(fun tmp_arg1 -> (fun arg_tac ->(use_arg_then2 ("y4'_fan", [y4'_fan]))(fun tmp_arg1 -> (use_arg_then2 ("y5_fan", [y5_fan]))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(fun tmp_arg2 -> arg_tac (Arg_theorem (CONJ (get_arg_thm tmp_arg1) (get_arg_thm tmp_arg2))))))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("inverse_f_ext_d_split_eq", [inverse_f_ext_d_split_eq]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Lemma ys_split_eq2 *)
let ys_split_eq2 = Sections.section_proof ["v";"w"]
`let f = face (hypermap_of_fan (V,E)) (v,w) in
let w' = sigma_fan (vec 0) V E v w in
v,w IN dart_of_fan (V,E) /\ 3 < CARD f
==> y1_fan (w',w) = y3_fan (V,E) (v,w)
/\ y2_fan (w',w) = y2_fan (v,w)
/\ y3_fan (V, add_diag (V,E) (v,w)) (w',w) = y7_fan (V,E) (v,w)
/\ y5_fan (V, add_diag (V,E) (v,w)) (w',w) = y8_fan (V,E) (v,w)
/\ y6_fan (w',w) = y4'_fan (V,E) (v,w)
/\ y9_fan (V, add_diag (V,E) (v,w)) (w',w) = y9_fan (V,E) (v,w)`
[
(repeat_tactic 1 9 ((CONV_TAC let_CONV)));
(BETA_TAC THEN (case THEN ((move ["vw_in"]) THEN (move ["card_f"]))));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y1_fan", [y1_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y2_fan", [y2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y6_fan", [y6_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("DIST_SYM", [DIST_SYM])) (fun fst_arg -> (use_arg_then2 ("w'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("y3_fan", [y3_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("w'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_add_diag)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("y7_fan", [y7_fan]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("y8_fan", [y8_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y5_fan", [y5_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("o_THM", [o_THM]))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((repeat_tactic 1 9 (((use_arg_then2 ("y9_fan", [y9_fan]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE f_fan_pair_ext_power_add_diag)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("fanV", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_surr", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("leqnn", [leqnn]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(* Finalization of the section Dart *)
let add_diag_sigma_eq = Sections.finalize_theorem add_diag_sigma_eq;;
let inverse_f_ext_d_split_eq = Sections.finalize_theorem inverse_f_ext_d_split_eq;;
let ys_split_eq = Sections.finalize_theorem ys_split_eq;;
let ys_split_eq2 = Sections.finalize_theorem ys_split_eq2;;
Sections.end_section "Dart";;
(* Section Split4 *)
Sections.begin_section "Split4";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 4 (hypermap_of_fan (V,E))`));;
(* Let card_f *)
Sections.add_section_lemma "card_f" (Sections.section_proof []
`CARD (face (hypermap_of_fan (V,E)) d) = 4`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Let d_in_dart *)
Sections.add_section_lemma "d_in_dart" (Sections.section_proof []
`d IN dart_of_fan (V,E)`
[
((((use_arg_then2 ("d_in", [])) (disch_tac [])) THEN (clear_assumption "d_in") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
]);;
(* Lemma dart4_azim2_eq_sum *)
let dart4_azim2_eq_sum = Sections.section_proof []
`azim2_fan (V,E) d
= dih_y (y2_fan d) (y3_fan (V,E) d) (y1_fan d)
(y5_fan (V,E) d) (y6_fan d) (y4'_fan (V,E) d) +
dih_y (y2_fan d) (y7_fan (V,E) d) (y3_fan (V,E) d)
(y8_fan (V,E) d) (y4'_fan (V,E) d) (y9_fan (V,E) d)`
[
(((use_arg_then2 ("card_f", [])) (disch_tac [])) THEN (clear_assumption "card_f") THEN ((use_arg_then2 ("d_in_dart", [])) (disch_tac [])) THEN (clear_assumption "d_in_dart") THEN ((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]) THEN (move ["card_f"]));
((((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((fun arg_tac -> arg_tac (Arg_term (`3 < CARD (face (hypermap_of_fan (V,E)) (v,w))`))) (term_tac (have_gen_tac [](move ["card_gt3"]))));
((((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE azim_split_fan_face_add))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_gt3", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fan_split_fan_face", [fan_split_fan_face])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((fun arg_tac -> arg_tac (Arg_term (`split_fan_face (V,E) (v,w) = V, add_diag (V,E) (v,w)`))) (term_tac (have_gen_tac [](move ["split_eq"]))));
(((((use_arg_then2 ("split_fan_face", [split_fan_face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("add_diag", [add_diag]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["fan2"])) THEN (case THEN (move ["dart2"])) THEN (move ["f_surr2"]));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`w,w' IN dart_of_fan (V,add_diag (V,E) (v,w))`))) (term_tac (have_gen_tac [](move ["ww'_in"]))));
(((((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_SING", [IN_SING]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(congr_tac (`_1 + _2:real`));
((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("ww'_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`sigma_fan (vec 0) V (add_diag (V,E) (v,w)) w w' = v`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("DIST_SYM", [DIST_SYM])) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE n_split_fan_face))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_gt3", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])));
((((((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("n_fan_pair", [n_fan_pair]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((case THEN (move ["_"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`f_fan_pair (V,E) (v,w)`))) (term_tac (set_tac "d2")));
((fun arg_tac -> arg_tac (Arg_term (`d2 IN dart_of_fan (V,add_diag (V,E) (v,w))`))) (term_tac (have_gen_tac [](move ["d2_in"]))));
((((use_arg_then2 ("d2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart1_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("POWER_1", [POWER_1])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f_fan_pair (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("f_fan_pair_power", [f_fan_pair_power]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq])) (fun fst_arg -> (use_arg_then2 ("f_surr2", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (move ["dart2_1"])));
((fun arg_tac -> arg_tac (Arg_term (`d2 = f_fan_pair_ext (V,add_diag (V,E) (v,w)) (w',w)`))) (term_tac (have_gen_tac [](move ["d2_eq"]))));
((((use_arg_then2 ("d2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE f_split_fan_face))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))));
(((((use_arg_then2 ("f_fan_pair_ext", [f_fan_pair_ext]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dart2_1", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart_switch", [dart_switch]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("ww'_in", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`w', w IN dart_of_fan (V,add_diag (V,E) (v,w))`))) (term_tac (have_gen_tac [](move ["w'w_in"]))));
(((((use_arg_then2 ("dart2", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_UNION", [IN_UNION]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("IN_INSERT", [IN_INSERT]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`w',w IN darts_k 3 (hypermap_of_fan (V,add_diag (V,E) (v,w)))`))) (term_tac (have_gen_tac [](move ["w'w_in3"]))));
((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fan2", [fan2])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("w'w_in", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("andTb", [andTb]))(thm_tac (new_rewrite [] [])))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE face_split_fan_face_explicit))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_gt3", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))) THEN ((fun arg_tac -> arg_tac (Arg_term (`hypermap_of_fan _`))) (term_tac (set_tac "H2"))));
(((((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["_"])) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("card_f", []))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`d2 IN darts_k 3 (hypermap_of_fan (V,add_diag (V,E) (v,w)))`))) (term_tac (have_gen_tac [](move ["d2_in3"]))));
(((((use_arg_then2 ("d2_eq", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("d2_eq", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("dart3_yf_eq", [dart3_yf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y4'_eq_y4", [y4'_eq_y4]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("w'w_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((repeat_tactic 1 9 (((fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE y78_eq))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> arg_tac (Arg_theorem (let_RULE y9_eq)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E w' v`))) (term_tac (set_tac "u")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`sigma_fan (vec 0) V (add_diag (V,E) (v,w)) w' w = u`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))))) ((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("DIST_SYM", [DIST_SYM])) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac)));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE n_split_fan_face))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("card_gt3", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["eq"])) THEN (move ["_"]));
((((use_arg_then2 ("eq", [])) (disch_tac [])) THEN (clear_assumption "eq") THEN BETA_TAC) THEN (((((use_arg_then2 ("split_eq", []))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("n_fan_pair", [n_fan_pair]))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("u_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("PAIR_EQ", [PAIR_EQ]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["_"]))) THEN (done_tac));
];;
(* Lemma tauq_cross_split *)
let tauq_cross_split = Sections.section_proof []
`tauq (y1_fan d) (y2_fan d) (y3_fan (V,E) d) (y4'_fan (V,E) d)
(y5_fan (V,E) d) (y6_fan d) (y7_fan (V,E) d) (y8_fan (V,E) d) (y9_fan (V,E) d)
= taum (y1_fan d) (y3_fan (V,E) d) (y7_fan (V,E) d)
(y8_fan (V,E) d) (y4'_fan (V,E) (f_fan_pair_ext (V,E) d)) (y5_fan (V,E) d)
+ taum (y1_fan d) (y2_fan d) (y7_fan (V,E) d)
(y9_fan (V,E) d) (y4'_fan (V,E) (f_fan_pair_ext (V,E) d)) (y6_fan d)`
[
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((fun arg_tac -> (use_arg_then2 ("lemma_face_identity", [lemma_face_identity])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("face", [face]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("POWER_1", [POWER_1]))(gsym_then (thm_tac (new_rewrite [2] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("lemma_orbit_power", [lemma_orbit_power])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`dart_of_fan (V,E)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("orbit_reflect", [orbit_reflect]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("face_map_and_darts", [face_map_and_darts]))(thm_tac (new_rewrite [] [])))))) THEN (done_tac));
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("dart4_yf_eq", [dart4_yf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("tauq", [tauq]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("REAL_ADD_SYM", [REAL_ADD_SYM]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("taum_sym", [taum_sym]))(thm_tac (new_rewrite [] []))))) THEN (congr_tac (`_1 + _2:real`)));
((((use_arg_then2 ("taum_sym_reflect", [taum_sym_reflect]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
(((((use_arg_then2 ("taum_sym", [taum_sym]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("taum_sym_reflect", [taum_sym_reflect]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Split4 *)
let dart4_azim2_eq_sum = Sections.finalize_theorem dart4_azim2_eq_sum;;
let tauq_cross_split = Sections.finalize_theorem tauq_cross_split;;
Sections.end_section "Split4";;
(* Section MoreSplit4 *)
Sections.begin_section "MoreSplit4";;
(Sections.add_section_var (mk_var ("d", (`:real^3#real^3`))));;
(Sections.add_section_hyp "d_in" (`d IN darts_k 4 (hypermap_of_fan (V,E))`));;
(* Lemma dart4_azim_cross_split *)
let dart4_azim_cross_split = Sections.section_proof []
`azim_dart (V,E) d
= dih_y (y1_fan d) (y3_fan (V,E) d) (y7_fan (V,E) d)
(y8_fan (V,E) d) (y4'_fan (V,E) (f_fan_pair_ext (V,E) d)) (y5_fan (V,E) d)
+ dih_y (y1_fan d) (y2_fan d) (y7_fan (V,E) d)
(y9_fan (V,E) d) (y4'_fan (V,E) (f_fan_pair_ext (V,E) d)) (y6_fan d)`
[
((fun arg_tac -> arg_tac (Arg_term (`azim_dart (V,E) d = azim2_fan (V,E) (inverse (f_fan_pair_ext (V,E)) d)`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] [])))))));
(((((use_arg_then2 ("azim2_fan", [azim2_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("dart4_azim2_eq_sum", [dart4_azim2_eq_sum]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((repeat_tactic 1 9 (((use_arg_then2 ("dart4_y_invf_eq", [dart4_y_invf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_cross_eq_y4'", [dart4_cross_eq_y4']))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("Nonlinear_lemma.dih_y_sym", [Nonlinear_lemma.dih_y_sym]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section MoreSplit4 *)
let dart4_azim_cross_split = Sections.finalize_theorem dart4_azim_cross_split;;
Sections.end_section "MoreSplit4";;
(* Finalization of the section NonlinearSplit *)
let add_diag_sigma_eq = Sections.finalize_theorem add_diag_sigma_eq;;
let inverse_f_ext_d_split_eq = Sections.finalize_theorem inverse_f_ext_d_split_eq;;
let ys_split_eq = Sections.finalize_theorem ys_split_eq;;
let ys_split_eq2 = Sections.finalize_theorem ys_split_eq2;;
let dart4_azim2_eq_sum = Sections.finalize_theorem dart4_azim2_eq_sum;;
let tauq_cross_split = Sections.finalize_theorem tauq_cross_split;;
let dart4_azim_cross_split = Sections.finalize_theorem dart4_azim_cross_split;;
Sections.end_section "NonlinearSplit";;
(* Section QuadIneqs *)
Sections.begin_section "QuadIneqs";;
(Sections.add_section_var (mk_var ("V", (`:real^3->bool`))));;
(Sections.add_section_var (mk_var ("E", (`:(real^3->bool)->bool`))));;
(Sections.add_section_hyp "h_fan" (`lp_fan (V,E)`));;
(* Lemma y4'_lo_2h0 *)
let y4'_lo_2h0 = Sections.section_proof ["k";"d"]
`3 < k /\ d IN darts_k k (hypermap_of_fan (V,E))
==> #2.52 <= y4'_fan (V,E) d`
[
((((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN (clear_assumption "h_fan") THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (case THEN (move ["diag_dist"])) THEN (move ["_"])));
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]));
(((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["k_gt"])) THEN (case THEN (move ["vw_in"])) THEN (move ["card_f"]));
((((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (move ["vw_in1"])));
((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac) THEN (((use_arg_then2 ("diag_dist", []))(thm_tac (new_rewrite [] [])))));
((((fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("sigma_fan_inV", [sigma_fan_inV]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("sigma_fan_not_fixed", [sigma_fan_not_fixed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((use_arg_then2 ("inE_eq_in_dart1", [inE_eq_in_dart1]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((simp_tac THEN TRY done_tac)));
((((use_arg_then2 ("fully_surrounded_diag_not_in_dart", [fully_surrounded_diag_not_in_dart]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Lemma dart4_y4'_lo *)
let dart4_y4'_lo = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> #2.52 <= y4'_fan (V,E) d`
[
(((DISCH_THEN (fun snd_th -> (use_arg_then2 ("y4'_lo_2h0", [y4'_lo_2h0])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (DISCH_THEN apply_tac)) THEN (arith_tac) THEN (done_tac));
];;
(* Lemma y4'_hi *)
let y4'_hi = Sections.section_proof ["d"]
`d IN dart_of_fan (V,E)
==> y4'_fan (V,E) d <= &4 * h0`
[
(in_tac ["h_fan"] false ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("SUBSET", [SUBSET]))(thm_tac (new_rewrite [] []))))));
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in"]));
((((use_arg_then2 ("vw_in", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (move ["vw_in1"])));
((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("vw_in1", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
(((use_arg_then2 ("DIST_TRIANGLE_LE", [DIST_TRIANGLE_LE])) (thm_tac apply_tac)) THEN ((fun arg_tac -> arg_tac (Arg_term (`vec 0`))) (term_tac exists_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("DIST_0", [DIST_0]))(thm_tac (new_rewrite [] []))))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`&4 * h0 = &2 * h0 + &2 * h0`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("REAL_LE_ADD2", [REAL_LE_ADD2]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("iffLR", [iffLR])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("Fnjlbxs.in_ball_annulus", [Fnjlbxs.in_ball_annulus])) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((fun arg_tac -> (use_arg_then2 ("iffLR", [iffLR])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("Fnjlbxs.in_ball_annulus", [Fnjlbxs.in_ball_annulus])) (fun fst_arg -> (use_arg_then2 ("w'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("h_fan", []))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("PAIR_IN_DART_OF_FAN", [PAIR_IN_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((((use_arg_then2 ("w'_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("h_fan", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("sigma_fan_inV", [sigma_fan_inV]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Y4_hi_bound *)
Sections.begin_section "Y4_hi_bound";;
(Sections.add_section_hyp "ineq" ((hd (Ineq.getexact "3287695934")).ineq));;
(* Lemma dart4_y4'_hi *)
let dart4_y4'_hi = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> y4'_fan (V,E) d <= #4.37`
[
((((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (move ["h_fan2"])));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["fH"])))));
(((use_arg_then2 ("d", [])) (disch_tac [])) THEN (clear_assumption "d") THEN case THEN (move ["v"]) THEN (move ["w"]) THEN (move ["vw_in4"]));
((((use_arg_then2 ("vw_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["vw_in"])) THEN (move ["card_f"]) THEN (move ["bounds"])));
(((fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("REAL_LE_TOTAL", [REAL_LE_TOTAL])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`#4.37`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN case THEN ((TRY done_tac)) THEN (move ["y4_bound"]));
(((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("ineq", [ineq])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y9_fan (V,E) (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y6_fan (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) (f_fan_pair_ext (V,E) (v,w))`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y5_fan (V,E) (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y8_fan (V,E) (v,w)`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC);
(((((use_arg_then2 ("INEQ_ALT", [INEQ_ALT]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac)) THEN (ANTS_TAC));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`&2 * h0 = #2.52`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac)));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`#2.0 = &2`))) (term_tac (have_gen_tac [](((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("y4_bound", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("y4'_hi", [y4'_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y9_lo", [y9_lo])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y8_lo", [y8_lo])) (fun fst_arg -> (use_arg_then2 ("vw_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("y4'_hi", [y4'_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("ys_eq", [ys_eq])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE y78_eq))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (fun arg_tac -> arg_tac (Arg_theorem (let_RULE y9_eq))) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E v w`))) (term_tac (set_tac "w'")));
((fun arg_tac -> arg_tac (Arg_term (`sigma_fan _ V E w' v`))) (term_tac (set_tac "u")));
((((use_arg_then2 ("dart4_cross_eq_y4'", [dart4_cross_eq_y4']))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("y4'_fan", [y4'_fan]))(thm_tac (new_rewrite [] [])))) THEN (((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`inverse _`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] [(`FST _`)]))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))));
((((fun arg_tac -> arg_tac (Arg_theorem (let_RULE inverse_f_fan_pair_ext_power2)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("w'_def", []))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("u_def", []))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("INVERSE_F_FAN_PAIR_EXT_EXPLICIT", [INVERSE_F_FAN_PAIR_EXT_EXPLICIT]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("res", [res]))(thm_tac (new_rewrite [] [])))));
((((use_arg_then2 ("fully_surrounded_dart_of_fan_eq", [fully_surrounded_dart_of_fan_eq]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("vw_in", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac));
((((use_arg_then2 ("delta_y", [delta_y]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("REAL_POW_2", [REAL_POW_2]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (((use_arg_then2 ("DELTA_EQ_DELTA_X", [DELTA_EQ_DELTA_X]))(gsym_then (thm_tac (new_rewrite [] []))))));
(repeat_tactic 1 9 (((fun arg_tac -> (use_arg_then2 ("DIST_SYM", [DIST_SYM])) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("Collect_geom.DELTA_POS_4POINTS", [Collect_geom.DELTA_POS_4POINTS])) (fun fst_arg -> (use_arg_then2 ("w", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("w'", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("u", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("v", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((arith_tac) THEN (done_tac));
];;
(* Section Std *)
Sections.begin_section "Std";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Lemma dart4_y4'_hi_std *)
let dart4_y4'_hi_std = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> y4'_fan (V,E) d <= #4.37`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
(((fun arg_tac -> (use_arg_then2 ("dart4_y4'_hi", [dart4_y4'_hi])) (fun fst_arg -> (use_arg_then2 ("d_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((in_tac ["h_fan"] false (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN (in_tac ["d_in"] false ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)))));
(((((use_arg_then2 ("y5_hi_std2", [y5_hi_std2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_hi_std2", [y6_hi_std2])) (fun fst_arg -> (use_arg_then2 ("std", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_hi_std", [y8_hi_std]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_hi_std", [y9_hi_std]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Std *)
let dart4_y4'_hi_std = Sections.finalize_theorem dart4_y4'_hi_std;;
Sections.end_section "Std";;
(* Finalization of the section Y4_hi_bound *)
let dart4_y4'_hi = Sections.finalize_theorem dart4_y4'_hi;;
let dart4_y4'_hi_std = Sections.finalize_theorem dart4_y4'_hi_std;;
Sections.end_section "Y4_hi_bound";;
(* Lemma dart4_delta_y_not_neg2 *)
let dart4_delta_y_not_neg2 = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> ~(delta_y (y7_fan (V,E) d) (y2_fan d) (y3_fan (V,E) d)
(y4'_fan (V,E) d) (y8_fan (V,E) d) (y9_fan (V,E) d) < &0)`
[
((((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN (clear_assumption "h_fan") THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN ALL_TAC THEN (case THEN (move ["fanV"])) THEN (case THEN (move ["f_surr"])) THEN (case THEN (move ["_"])) THEN (case THEN ((move ["subV"]) THEN (move ["packV"]))) THEN (move ["d_in4"])));
((fun arg_tac -> (use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN (case THEN ((move ["dartH"]) THEN (case THEN (move ["_"])) THEN (case THEN (move ["_"])) THEN (move ["fH"])))));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("dartH", []))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
((fun arg_tac -> arg_tac (Arg_term (`f_fan_pair_ext (V,E)`))) (term_tac (set_tac "f")));
((fun arg_tac -> arg_tac (Arg_term (`f (f d) IN dart_of_fan (V,E) /\ f d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](case THEN ((move ["ffd_in"]) THEN (move ["fd_in"]))))));
((((fun arg_tac -> (use_arg_then2 ("o_THM", [o_THM])) (fun fst_arg -> (use_arg_then2 ("f", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("POWER_2", [POWER_2]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("fH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dartH", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("lemma_dart_invariant_power_face", [lemma_dart_invariant_power_face]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("lemma_dart_invariant", [lemma_dart_invariant]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((fun arg_tac -> arg_tac (Arg_term (`f d IN darts_k 4 (hypermap_of_fan (V,E))`))) (term_tac (have_gen_tac [](move ["fd_in4"]))));
(((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("delta_y_not_neg", [delta_y_not_neg])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("f_surr", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("packV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("subV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (use_arg_then2 ("ffd_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun arg -> thm_tac MP_TAC arg THEN ALL_TAC));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [1; 3; 5; 7; 9; 11] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("dart4_yf_eq", [dart4_yf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_cross_eq_y4'", [dart4_cross_eq_y4']))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((fun arg_tac -> (use_arg_then2 ("PERMUTES_INVERSES", [PERMUTES_INVERSES])) (fun fst_arg -> (fun arg_tac -> (use_arg_then2 ("F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN", [F_FAN_PAIR_EXT_PERMUTES_DART_OF_FAN])) (fun fst_arg -> (use_arg_then2 ("fanV", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))));
((repeat_tactic 1 9 (((use_arg_then2 ("dart4_yf_eq", [dart4_yf_eq]))(thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac)));
((((fun arg_tac -> arg_tac (Arg_theorem ((GEN_ALL o CONJUNCT2 o SPEC_ALL) Merge_ineq.delta_y_sym)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(* Section Ineq119 *)
Sections.begin_section "Ineq119";;
(Sections.add_section_hyp "h_main" ((hd (Ineq.getexact "3862621143 revised")).ineq));;
(Sections.add_section_hyp "h_reduced" ((hd (Ineq.getexact "3862621143 side")).ineq));;
(Sections.add_section_hyp "h_front" ((hd (Ineq.getexact "3862621143 front")).ineq));;
(Sections.add_section_hyp "h_back" ((hd (Ineq.getexact "3862621143 back")).ineq));;
(Sections.add_section_hyp "h_back2" ((hd (Ineq.getexact "6988401556")).ineq));;
(Sections.add_section_hyp "h_y4" ((hd (Ineq.getexact "3287695934")).ineq));;
(* Lemma ineq119_tauVEF *)
let ineq119_tauVEF = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d) - #0.453 * azim_dart (V,E) d + #0.777 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (move ["h_fan2"])));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN (clear_assumption "d_in4") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))));
((fun arg_tac -> arg_tac (Arg_term (`#2.0 = &2 /\ &2 * h0 = #2.52 /\ #0.0 = &0 /\ tame_table_d 2 1 = #0.103`))) (term_tac (have_gen_tac [](move ["eqs"]))));
(((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("tame_table_d", [tame_table_d]))(thm_tac (new_rewrite [] []))))) THEN (arith_tac) THEN (done_tac));
(in_tac ["h_main"; "h_reduced"; "h_front"; "h_back"; "h_back2"] false ((((use_arg_then2 ("Ineq.dart_std4", [Ineq.dart_std4]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("Ineq.apex_flat", [Ineq.apex_flat]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("eqs", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INEQ_ALT", [INEQ_ALT]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_gt", [real_gt]))(thm_tac (new_rewrite [] [])))))));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("h_main", [])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y1_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y2_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y3_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y5_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y6_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y7_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y8_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y9_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (ANTS_TAC));
((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y7_lo", [y7_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y8_lo", [y8_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y9_lo", [y9_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("dart4_y4'_hi", [dart4_y4'_hi])) (fun fst_arg -> (use_arg_then2 ("h_y4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((THENL_FIRST) case (((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (done_tac)));
((((use_arg_then2 ("delta_y_not_neg", [delta_y_not_neg]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_delta_y_not_neg2", [dart4_delta_y_not_neg2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("orFb", [orFb]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("orbF", [orbF]))(thm_tac (new_rewrite [] [])))));
case;
(((((use_arg_then2 ("dart4_cross_eq_enclosed", [dart4_cross_eq_enclosed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["cross_le"]));
((((use_arg_then2 ("tauq_cross_split", [tauq_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_azim_cross_split", [dart4_azim_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`y4'_fan _1 _2`))) (term_tac (set_tac "c_diag")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t1")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t2")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a1")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a2")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 < t1 - #0.453 * a1 + #0.777 / &2 /\ &0 < t2 - #0.453 * a2 + #0.777 / &2`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("t1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("t2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((split_tac) THEN (((use_arg_then2 ("h_reduced", [])) (disch_tac [])) THEN (clear_assumption "h_reduced") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("cross_le", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC THEN (move ["diag_le"]));
(((use_arg_then2 ("h_y4", [])) (disch_tac [])) THEN (clear_assumption "h_y4") THEN ((use_arg_then2 ("h_main", [])) (disch_tac [])) THEN (clear_assumption "h_main") THEN ((use_arg_then2 ("h_reduced", [])) (disch_tac [])) THEN (clear_assumption "h_reduced") THEN BETA_TAC THEN (move ["_"]) THEN (move ["_"]) THEN (move ["_"]));
((((use_arg_then2 ("tauq", [tauq]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t1")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t2")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 < t1 + #0.103 - #0.453 * a + #0.777 /\ #0.103 < t2`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
(((((use_arg_then2 ("t1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("t2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a_def", []))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN (split_tac));
((((use_arg_then2 ("h_front", [])) (disch_tac [])) THEN (clear_assumption "h_front") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("diag_le", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y3_lo", [y3_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y5_lo", [y5_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
(((fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) d <= sqrt8`))) (disch_eq_tac "y4'_ineq" [])) THEN case THEN (simp_tac) THEN (process_fst_eq_tac));
((((use_arg_then2 ("h_back2", [])) (disch_tac [])) THEN (clear_assumption "h_back2") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("y4'_ineq", []))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
(((((use_arg_then2 ("y3_lo", [y3_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y3_hi", [y3_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("y4'_ineq", [])) (disch_tac [])) THEN (clear_assumption "y4'_ineq") THEN BETA_TAC) THEN ((((use_arg_then2 ("REAL_NOT_LE", [REAL_NOT_LE]))(thm_tac (new_rewrite [] [])))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["y4'_ineq"])));
((((use_arg_then2 ("h_back", [])) (disch_tac [])) THEN (clear_assumption "h_back") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("y4'_ineq", []))(thm_tac (new_rewrite [] []))))));
((((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("y3_lo", [y3_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y3_hi", [y3_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("diag_le", [])) (disch_tac [])) THEN (clear_assumption "diag_le") THEN BETA_TAC) THEN (arith_tac) THEN (done_tac));
];;
(Sections.add_section_hyp "h_tau" (`lp_tau (V,E)`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(* Lemma ineq119 *)
let ineq119 = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) - #0.453 * azim_dart (V,E) d + #0.777 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["_"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineq119_tauVEF", [ineq119_tauVEF]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Std *)
Sections.begin_section "Std";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Lemma ineq119_std *)
let ineq119_std = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) - #0.453 * azim_dart (V,E) d + #0.777 >= &0`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
(((fun arg_tac -> (use_arg_then2 ("ineq119", [ineq119])) (fun fst_arg -> (use_arg_then2 ("d_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((in_tac ["h_fan"] false (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN (in_tac ["d_in"] false ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)))));
(((((use_arg_then2 ("y5_hi_std2", [y5_hi_std2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_hi_std2", [y6_hi_std2])) (fun fst_arg -> (use_arg_then2 ("std", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_hi_std", [y8_hi_std]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_hi_std", [y9_hi_std]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Std *)
let ineq119_std = Sections.finalize_theorem ineq119_std;;
Sections.end_section "Std";;
(* Finalization of the section Inner *)
let ineq119 = Sections.finalize_theorem ineq119;;
let ineq119_std = Sections.finalize_theorem ineq119_std;;
Sections.end_section "Inner";;
(* Finalization of the section Ineq119 *)
let ineq119_tauVEF = Sections.finalize_theorem ineq119_tauVEF;;
let ineq119 = Sections.finalize_theorem ineq119;;
let ineq119_std = Sections.finalize_theorem ineq119_std;;
Sections.end_section "Ineq119";;
(* Section Ineq120 *)
Sections.begin_section "Ineq120";;
(Sections.add_section_hyp "h_120" ((hd (Ineq.getexact "4240815464 a")).ineq));;
(Sections.add_section_hyp "h_120r" ((hd (Ineq.getexact "4240815464 a reduced")).ineq));;
(Sections.add_section_hyp "h_y4" ((hd (Ineq.getexact "3287695934")).ineq));;
(* Lemma ineq120_tauVEF *)
let ineq120_tauVEF = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d) + #0.7573 * azim_dart (V,E) d - #1.433 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (move ["h_fan2"])));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN (clear_assumption "d_in4") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`#2.0 = &2 /\ &2 * h0 = #2.52 /\ #0.0 = &0`))) (term_tac (have_gen_tac [](move ["eqs"])))) ((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac)));
(in_tac ["h_120"; "h_120r"] false ((((use_arg_then2 ("Ineq.dart_std4", [Ineq.dart_std4]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("eqs", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INEQ_ALT", [INEQ_ALT]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_gt", [real_gt]))(thm_tac (new_rewrite [] [])))))));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("h_120", [])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y1_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y2_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y3_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y5_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y6_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y7_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y8_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y9_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (ANTS_TAC));
((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y7_lo", [y7_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y8_lo", [y8_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y9_lo", [y9_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("dart4_y4'_hi", [dart4_y4'_hi])) (fun fst_arg -> (use_arg_then2 ("h_y4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((THENL_FIRST) case (((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (done_tac)));
((((use_arg_then2 ("delta_y_not_neg", [delta_y_not_neg]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_delta_y_not_neg2", [dart4_delta_y_not_neg2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (repeat_tactic 1 9 (((use_arg_then2 ("orbF", [orbF]))(thm_tac (new_rewrite [] []))))));
(((((use_arg_then2 ("dart4_cross_eq_enclosed", [dart4_cross_eq_enclosed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["cross_le"]));
((((use_arg_then2 ("tauq_cross_split", [tauq_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_azim_cross_split", [dart4_azim_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`y4'_fan _1 _2`))) (term_tac (set_tac "c_diag")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t1")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t2")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a1")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a2")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 < t1 + #0.7573 * a1 - #1.433 / &2 /\ &0 < t2 + #0.7573 * a2 - #1.433 / &2`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("t1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("t2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((split_tac) THEN (((use_arg_then2 ("h_120r", [])) (disch_tac [])) THEN (clear_assumption "h_120r") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("cross_le", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(Sections.add_section_hyp "h_tau" (`lp_tau (V,E)`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(* Lemma ineq120 *)
let ineq120 = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #0.7573 * azim_dart (V,E) d - #1.433 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["_"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineq120_tauVEF", [ineq120_tauVEF]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Std *)
Sections.begin_section "Std";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Lemma ineq120_std *)
let ineq120_std = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #0.7573 * azim_dart (V,E) d - #1.433 >= &0`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
(((fun arg_tac -> (use_arg_then2 ("ineq120", [ineq120])) (fun fst_arg -> (use_arg_then2 ("d_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((in_tac ["h_fan"] false (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN (in_tac ["d_in"] false ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)))));
(((((use_arg_then2 ("y5_hi_std2", [y5_hi_std2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_hi_std2", [y6_hi_std2])) (fun fst_arg -> (use_arg_then2 ("std", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_hi_std", [y8_hi_std]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_hi_std", [y9_hi_std]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Std *)
let ineq120_std = Sections.finalize_theorem ineq120_std;;
Sections.end_section "Std";;
(* Finalization of the section Inner *)
let ineq120 = Sections.finalize_theorem ineq120;;
let ineq120_std = Sections.finalize_theorem ineq120_std;;
Sections.end_section "Inner";;
(* Finalization of the section Ineq120 *)
let ineq120_tauVEF = Sections.finalize_theorem ineq120_tauVEF;;
let ineq120 = Sections.finalize_theorem ineq120;;
let ineq120_std = Sections.finalize_theorem ineq120_std;;
Sections.end_section "Ineq120";;
(* Section Ineq121 *)
Sections.begin_section "Ineq121";;
(Sections.add_section_hyp "h_121" ((hd (Ineq.getexact "6944699408 a")).ineq));;
(Sections.add_section_hyp "h_121r" ((hd (Ineq.getexact "6944699408 a reduced")).ineq));;
(Sections.add_section_hyp "h_y4" ((hd (Ineq.getexact "3287695934")).ineq));;
(* Lemma ineq121_tauVEF *)
let ineq121_tauVEF = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d) + #0.972 * azim_dart (V,E) d - #1.707 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (move ["h_fan2"])));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN (clear_assumption "d_in4") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`#2.0 = &2 /\ &2 * h0 = #2.52 /\ #0.0 = &0`))) (term_tac (have_gen_tac [](move ["eqs"])))) ((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac)));
(in_tac ["h_121"; "h_121r"] false ((((use_arg_then2 ("Ineq.dart_std4", [Ineq.dart_std4]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("eqs", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INEQ_ALT", [INEQ_ALT]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_gt", [real_gt]))(thm_tac (new_rewrite [] [])))))));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("h_121", [])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y1_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y2_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y3_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y5_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y6_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y7_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y8_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y9_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (ANTS_TAC));
((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y7_lo", [y7_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y8_lo", [y8_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y9_lo", [y9_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("dart4_y4'_hi", [dart4_y4'_hi])) (fun fst_arg -> (use_arg_then2 ("h_y4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((THENL_FIRST) case (((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (done_tac)));
(((((use_arg_then2 ("dart4_cross_eq_enclosed", [dart4_cross_eq_enclosed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["cross_le"]));
((((use_arg_then2 ("tauq_cross_split", [tauq_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_azim_cross_split", [dart4_azim_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`y4'_fan _1 _2`))) (term_tac (set_tac "c_diag")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t1")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t2")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a1")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a2")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 < t1 + #0.972 * a1 - #1.707 / &2 /\ &0 < t2 + #0.972 * a2 - #1.707 / &2`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("t1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("t2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((split_tac) THEN (((use_arg_then2 ("h_121r", [])) (disch_tac [])) THEN (clear_assumption "h_121r") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("cross_le", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(Sections.add_section_hyp "h_tau" (`lp_tau (V,E)`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(* Lemma ineq121 *)
let ineq121 = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #0.972 * azim_dart (V,E) d - #1.707 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["_"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineq121_tauVEF", [ineq121_tauVEF]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Std *)
Sections.begin_section "Std";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Lemma ineq121_std *)
let ineq121_std = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #0.972 * azim_dart (V,E) d - #1.707 >= &0`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
(((fun arg_tac -> (use_arg_then2 ("ineq121", [ineq121])) (fun fst_arg -> (use_arg_then2 ("d_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((in_tac ["h_fan"] false (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN (in_tac ["d_in"] false ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)))));
(((((use_arg_then2 ("y5_hi_std2", [y5_hi_std2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_hi_std2", [y6_hi_std2])) (fun fst_arg -> (use_arg_then2 ("std", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_hi_std", [y8_hi_std]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_hi_std", [y9_hi_std]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Std *)
let ineq121_std = Sections.finalize_theorem ineq121_std;;
Sections.end_section "Std";;
(* Finalization of the section Inner *)
let ineq121 = Sections.finalize_theorem ineq121;;
let ineq121_std = Sections.finalize_theorem ineq121_std;;
Sections.end_section "Inner";;
(* Finalization of the section Ineq121 *)
let ineq121_tauVEF = Sections.finalize_theorem ineq121_tauVEF;;
let ineq121 = Sections.finalize_theorem ineq121;;
let ineq121_std = Sections.finalize_theorem ineq121_std;;
Sections.end_section "Ineq121";;
(* Section Ineq122 *)
Sections.begin_section "Ineq122";;
(Sections.add_section_hyp "h_main" ((hd (Ineq.getexact "7043724150 a")).ineq));;
(Sections.add_section_hyp "h_reduced" ((hd (Ineq.getexact "7043724150 a reduced v2")).ineq));;
(Sections.add_section_hyp "h_y4" ((hd (Ineq.getexact "3287695934")).ineq));;
(* Lemma ineq122_tauVEF *)
let ineq122_tauVEF = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tauVEF (V,E,face (hypermap_of_fan (V,E)) d) + #4.72 * azim_dart (V,E) d - #6.248 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("h_fan", [])) (disch_tac [])) THEN BETA_TAC) THEN ((((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] [])))) THEN (move ["h_fan2"])));
((fun arg_tac -> arg_tac (Arg_term (`d IN dart_of_fan (V,E)`))) (term_tac (have_gen_tac [](move ["d_in"]))));
((((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN (clear_assumption "d_in4") THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN (((conv_thm_tac DISCH_THEN)(thm_tac (new_rewrite [] []))))) THEN (done_tac));
((((use_arg_then2 ("dart4_tauVEF_eq_tauq", [dart4_tauVEF_eq_tauq]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("real_ge", [real_ge]))(thm_tac (new_rewrite [] [])))));
((THENL_FIRST) ((fun arg_tac -> arg_tac (Arg_term (`#2.0 = &2 /\ &2 * h0 = #2.52 /\ #0.0 = &0`))) (term_tac (have_gen_tac [](move ["eqs"])))) ((((use_arg_then2 ("h0", [h0]))(thm_tac (new_rewrite [] [])))) THEN (arith_tac) THEN (done_tac)));
(in_tac ["h_main"; "h_reduced"] false ((((use_arg_then2 ("Ineq.dart_std4", [Ineq.dart_std4]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("eqs", []))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("INEQ_ALT", [INEQ_ALT]))(thm_tac (new_rewrite [] []))))) THEN (repeat_tactic 1 9 (((use_arg_then2 ("real_gt", [real_gt]))(thm_tac (new_rewrite [] [])))))));
((((fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (fun arg_tac -> (use_arg_then2 ("h_main", [])) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y1_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y2_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y3_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y4'_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y5_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y6_fan d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y7_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y8_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (fun fst_arg -> (fun arg_tac -> arg_tac (Arg_term (`y9_fan (V,E) d`))) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN BETA_TAC) THEN (ANTS_TAC));
((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y7_lo", [y7_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y8_lo", [y8_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y9_lo", [y9_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("dart4_y4'_hi", [dart4_y4'_hi])) (fun fst_arg -> (use_arg_then2 ("h_y4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((THENL_FIRST) case (((((use_arg_then2 ("azim_fan_eq_dih_y", [azim_fan_eq_dih_y]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac))) THEN ((DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN BETA_TAC) THEN (done_tac)));
(((((use_arg_then2 ("dart4_cross_eq_enclosed", [dart4_cross_eq_enclosed]))(gsym_then (thm_tac (new_rewrite [] []))))) THEN ((TRY done_tac))) THEN (DISCH_THEN (fun snd_th -> (use_arg_then2 ("REAL_LT_IMP_LE", [REAL_LT_IMP_LE])) (thm_tac (match_mp_then snd_th MP_TAC)))) THEN (move ["cross_le"]));
((((use_arg_then2 ("tauq_cross_split", [tauq_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("dart4_azim_cross_split", [dart4_azim_cross_split]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((fun arg_tac -> arg_tac (Arg_term (`y4'_fan _1 _2`))) (term_tac (set_tac "c_diag")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t1")));
((fun arg_tac -> arg_tac (Arg_term (`taum _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "t2")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a1")));
((fun arg_tac -> arg_tac (Arg_term (`dih_y _1 _2 _3 _4 _5 _6`))) (term_tac (set_tac "a2")));
((THENL_FIRST) (((THENL_ROT 1)) ((fun arg_tac -> arg_tac (Arg_term (`&0 < t1 + #4.72 * a1 - #6.248 / &2 /\ &0 < t2 + #4.72 * a2 - #6.248 / &2`))) (term_tac (have_gen_tac []ALL_TAC)))) ((arith_tac) THEN (done_tac)));
((((use_arg_then2 ("t1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a1_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("t2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("a2_def", []))(gsym_then (thm_tac (new_rewrite [] []))))));
((split_tac) THEN (((use_arg_then2 ("h_reduced", [])) (disch_tac [])) THEN (clear_assumption "h_reduced") THEN (DISCH_THEN apply_tac)) THEN ((repeat_tactic 1 9 (((use_arg_then2 ("ALL", [ALL]))(thm_tac (new_rewrite [] []))))) THEN (simp_tac) THEN (repeat_tactic 1 9 (((use_arg_then2 ("bounds", []))(thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("cross_le", []))(thm_tac (new_rewrite [] [])))) THEN (simp_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_lo", [y3_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y5_lo", [y5_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_lo", [y8_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y3_hi", [y3_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
((((fun arg_tac -> (use_arg_then2 ("y1_lo", [y1_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_lo", [y2_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_lo", [y6_lo])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_lo", [y7_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y7_hi", [y7_hi]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_lo", [y9_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((fun arg_tac -> (use_arg_then2 ("y1_hi", [y1_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y2_hi", [y2_hi])) (fun fst_arg -> (use_arg_then2 ("d_in", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("c_diag_def", []))(gsym_then (thm_tac (new_rewrite [] []))))) THEN (((use_arg_then2 ("dart4_y4'_lo", [dart4_y4'_lo]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)));
((((use_arg_then2 ("f_fan_pair_ext_in_darts_k", [f_fan_pair_ext_in_darts_k]))(thm_tac (new_rewrite [] [])))) THEN (done_tac));
];;
(Sections.add_section_hyp "h_tau" (`lp_tau (V,E)`));;
(* Section Inner *)
Sections.begin_section "Inner";;
(* Lemma ineq122 *)
let ineq122 = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E)) ==>
y5_fan (V,E) d <= #2.52
/\ y6_fan d <= #2.52
/\ y8_fan (V,E) d <= #2.52
/\ y9_fan (V,E) d <= #2.52
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #4.72 * azim_dart (V,E) d - #6.248 >= &0`
[
((BETA_TAC THEN (move ["d_in4"]) THEN (move ["bounds"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN (move ["d_in"])) THEN (move ["_"])));
(((((use_arg_then2 ("tau_fan_eq_tauVEF", [tau_fan_eq_tauVEF]))(thm_tac (new_rewrite [] [])))) THEN (repeat_tactic 0 10 (((use_arg_then2 ("lemma_in_face_set", [lemma_in_face_set]))(gsym_then (thm_tac (new_rewrite [] [])))))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("ineq122_tauVEF", [ineq122_tauVEF]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Section Std *)
Sections.begin_section "Std";;
(Sections.add_section_hyp "std" (`E = ESTD V`));;
(* Lemma ineq122_std *)
let ineq122_std = Sections.section_proof ["d"]
`d IN darts_k 4 (hypermap_of_fan (V,E))
==> tau_fan (V,E) (face (hypermap_of_fan (V,E)) d) + #4.72 * azim_dart (V,E) d - #6.248 >= &0`
[
((BETA_TAC THEN (move ["d_in4"])) THEN (((use_arg_then2 ("d_in4", [])) (disch_tac [])) THEN BETA_TAC) THEN (((((use_arg_then2 ("darts_k", [darts_k]))(thm_tac (new_rewrite [] [])))) THEN (((use_arg_then2 ("inE", [inE]))(thm_tac (new_rewrite [] []))))) THEN ALL_TAC THEN (case THEN ((move ["d_in"]) THEN (move ["_"])))));
(((fun arg_tac -> (use_arg_then2 ("ineq122", [ineq122])) (fun fst_arg -> (use_arg_then2 ("d_in4", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg))) (disch_tac [])) THEN (DISCH_THEN apply_tac));
((in_tac ["h_fan"] false (((use_arg_then2 ("lp_fan", [lp_fan]))(thm_tac (new_rewrite [] []))))) THEN (in_tac ["d_in"] false ((((use_arg_then2 ("COMPONENTS_HYPERMAP_OF_FAN", [COMPONENTS_HYPERMAP_OF_FAN]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)))));
(((((use_arg_then2 ("y5_hi_std2", [y5_hi_std2]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((fun arg_tac -> (use_arg_then2 ("y6_hi_std2", [y6_hi_std2])) (fun fst_arg -> (use_arg_then2 ("std", [])) (fun snd_arg -> combine_args_then arg_tac fst_arg snd_arg)))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y8_hi_std", [y8_hi_std]))(thm_tac (new_rewrite [] [])))) THEN ((TRY done_tac)) THEN (((use_arg_then2 ("y9_hi_std", [y9_hi_std]))(thm_tac (new_rewrite [] []))))) THEN (done_tac));
];;
(* Finalization of the section Std *)
let ineq122_std = Sections.finalize_theorem ineq122_std;;
Sections.end_section "Std";;
(* Finalization of the section Inner *)
let ineq122 = Sections.finalize_theorem ineq122;;
let ineq122_std = Sections.finalize_theorem ineq122_std;;
Sections.end_section "Inner";;
(* Finalization of the section Ineq122 *)
let ineq122_tauVEF = Sections.finalize_theorem ineq122_tauVEF;;
let ineq122 = Sections.finalize_theorem ineq122;;
let ineq122_std = Sections.finalize_theorem ineq122_std;;
Sections.end_section "Ineq122";;
(* Finalization of the section QuadIneqs *)
let y4'_lo_2h0 = Sections.finalize_theorem y4'_lo_2h0;;
let dart4_y4'_lo = Sections.finalize_theorem dart4_y4'_lo;;
let y4'_hi = Sections.finalize_theorem y4'_hi;;
let dart4_y4'_hi = Sections.finalize_theorem dart4_y4'_hi;;
let dart4_y4'_hi_std = Sections.finalize_theorem dart4_y4'_hi_std;;
let dart4_delta_y_not_neg2 = Sections.finalize_theorem dart4_delta_y_not_neg2;;
let ineq119_tauVEF = Sections.finalize_theorem ineq119_tauVEF;;
let ineq119 = Sections.finalize_theorem ineq119;;
let ineq119_std = Sections.finalize_theorem ineq119_std;;
let ineq120_tauVEF = Sections.finalize_theorem ineq120_tauVEF;;
let ineq120 = Sections.finalize_theorem ineq120;;
let ineq120_std = Sections.finalize_theorem ineq120_std;;
let ineq121_tauVEF = Sections.finalize_theorem ineq121_tauVEF;;
let ineq121 = Sections.finalize_theorem ineq121;;
let ineq121_std = Sections.finalize_theorem ineq121_std;;
let ineq122_tauVEF = Sections.finalize_theorem ineq122_tauVEF;;
let ineq122 = Sections.finalize_theorem ineq122;;
let ineq122_std = Sections.finalize_theorem ineq122_std;;
Sections.end_section "QuadIneqs";;
(* Close the module *)
end;;