(*==========================================================  TOPOLOGICAL FMAPS, HMAPS - WITH TAGS AND EMBEDDINGS  PART 6:.  PROPERTIES OF MERGING AND SPLITTING FACES expf / L1  COMPLETE: OK! ============================================================*)
(* Load Jordan1. Load Jordan2. Load Jordan3. Load Jordan4. Load Jordan5. *)
Require Export Jordan5.
(*========================================================== 1. MERGING FACES BY L1 (CASE ~expf m x y0) ===========================================================*)
(* CASE k = one IN cF_L (from Jordan5) : OK *)
(* 1. CASE ~expf m x y0: FACE MERGING *)
(* FIRST, SOME LEMMAS: *)
(* OK: *)
Open Scope nat_scope.
(* i-SUCCS OF x BY cF_L1, FOR i < DEG OF x, ARE INVARIANT: *)
(* OK: *)
(* i-SUCCS OF x BY cF_L1, FOR i < DEG x, DIFFER FROM x *)
(* OK: *)
(* THE dx_SUCC OF x BY cF_L1 IS y_1: *)
(* IT IS DIFFRENT FROM x: *)
(* j-SUCCS OF y BY cF_L1, FOR j < DEGREE OF y, ARE INVARIANT: *)
(* j-SUCCS OF y_1 BY cF_L1, FOR j < DEG OF y0 (OR y_1), ARE INVARIANT:*)
(* THE ARE DIFFERENT FROM x: *)
(* THE ARE DIFFERENT FROM x - OTHER FORM: *)
(* OK: *)
(* THEN, ABOUT THE DEGREES, OK: *)
(* TECHNICAL LEMMA: *)
(* AND (MORE TECHNICAL), OK!!: *)
(* FROM WHERE "THE" GREAT RESULT ABOUT THE DEGREES: *)
(* CHANGER LES NOMS... *)
(* THEN, OK: *)
(* OTHER FORM, w.r.t. y_1: *)
(* THEN, WE HAVE: *)
(* OTHER FORM FOR y0: *)
(* FINALLY, THE OTHER ORBITS ARE INCHANGED: *)
(* OK, BY INDUCTION ON i: *)
(* THEN, THE RESULT: *)
(* COROLLARY: *)
(* VERSION orb, OK: *)
(* TECHNICAL LEMMA: THE OTHER DEGREES ARE INCHANGED: *)
(* AND (VERY USEFUL): *)
(* PRESERVATION OF THE PARTITION, EXCEPT 2 MERGED FACES *)
(* OK: *)
(* FINALLY, THE RESULT ABOUT THE DEGREES: *)
(*============================================================ PUIS LA 1ERE PARTIE DE expf_L1_CNS... =============================================================*)
(* RECALL:  Lemma expf_L1_CNS:forall (m:fmap)(x y z t:dart), inv_hmap (L m one x y) -> exd m z -> (expf (L m one x y) z t <-> let x1 := cA m one x in let x10 := cA m zero x1 in let y0 := cA m zero y in let y_1 := cA_1 m one y in if expf_dec m x y0 then betweenf m x z y0 /\ betweenf m x t y0 \/ betweenf m y_1 z x10 /\ betweenf m y_1 t x10 \/ ~ expf m x z /\ expf m z t else   expf m z t \/ expf m z x /\ expf m t y0 \/ expf m t x /\ expf m z y0). *)
(* ESSAIS:  Definition dec (A:Prop):Set:= {A}+{~A}.  Lemma or_and_dec : forall (A B C D:Prop), dec A -> dec B -> dec C -> dec D -> {A /\ B \/ C /\ D} + {~(A /\ B \/ C /\ D)}.  *)
(* AUXILARIES: *)
Definition dec (A:Prop):Set:= {A}+{~A}.
(* OK: *)
(* OK!! *)
(* THEN, IN SUMMARY: NON-NECESSARY  Lemma expf_L1_II_CNS:forall (m:fmap)(x y z t:dart), inv_hmap (L m one x y) -> exd m z -> expf_dec m x y0 -> (expf (L m one x y) z t <-> let x1 := cA m one x in let x10 := cA m zero x1 in let y0 := cA m zero y in let y_1 := cA_1 m one y in expf m z t \/ expf m z x /\ expf m t y0 \/ expf m t x /\ expf m z y0 ).  *)
(*========================================================== 2. SPLITTING A FACE BY L1 (Case expf m x y0) ===========================================================*)
(* A FEW USEFUL LEMMAS: *)
Open Scope nat_scope.

Lemma diff_cF_L1_x_y0:forall(m:fmap)(x y:dart)(i j:nat),
inv_hmap m -> prec_L m one x y ->
let y0 := cA m zero y in
let dx := MF.degree m x in
let m1:= L m one x y in
y0 = Iter (cF m) j x -> expf m x y0 ->
(0 < i <= j /\ j < dx - 1) ->
Iter (cF m1) i x <> x.