Hint Resolve multipar_context_independent.

(* Specifications: *)
Lemma Good_add_tm: forall G D x A,
erased_tm A -> Good G D -> Good ((x, Tm A)::G ) D.
Lemma Good_add_tm_2: forall G D x A, x `notin` dom G -> erased_tm A -> Good G D -> Good ((x, Tm A)::G ) (add x D).
Lemma multipar_app_left_Rel:
forall a a' c' S D, lc_tm a -> multipar S D a' c' -> multipar S D (a_App a Rel a') (a_App a Rel c').
Lemma multipar_capp_left: forall a a' S D, multipar S D a a' -> multipar S D (a_CApp a g_Triv) (a_CApp a' g_Triv).
Lemma join_capp: forall a a' S D, joins S D a a' -> joins S D (a_CApp a g_Triv) (a_CApp a' g_Triv).
Lemma multipar_app_lr_Rel: forall a a' c c' S D, lc_tm a -> lc_tm a' -> multipar S D a c -> multipar S D a' c' -> multipar S D (a_App a Rel a') (a_App c Rel c').
Lemma multipar_app_lr_Irrel: forall a c S D, lc_tm a -> multipar S D a c -> multipar S D (a_App a Irrel a_Bullet) (a_App c Irrel a_Bullet).
Lemma join_app_Rel: forall a a' b b' S D, joins S D a b -> joins S D a' b' -> joins S D (a_App a Rel a') (a_App b Rel b').
Lemma join_app_Irrel: forall a b S D, joins S D a b -> joins S D (a_App a Irrel a_Bullet) (a_App b Irrel a_Bullet).
(* Lemma Par_iapp : forall G D a c y L, y `notin` fv_tm_tm_tm a \u L -> (forall x, x `notin` L -> RhoCheck Irrel x (open_tm_wrt_tm a (a_Var_f x))) -> Par G D (open_tm_wrt_tm a a_Bullet) c -> Par G D (a_UAbs Irrel a) (a_UAbs Irrel (close_tm_wrt_tm y c)). *)
Lemma multipar_UAbs_exists :  ∀ (x : atom) (G : context) (D : available_props)
(rho : relflag) (a a' : tm),
x `notin` fv_tm_tm_tm a
→ multipar G D (open_tm_wrt_tm a (a_Var_f x)) a'
→ multipar G D (a_UAbs rho a) (a_UAbs rho (close_tm_wrt_tm x a')).
Lemma multipar_iapp : forall G D a c y L,
y `notin` fv_tm_tm_tm a \u L ->
(forall x, x `notin` L -> RhoCheck Irrel x (open_tm_wrt_tm a (a_Var_f x))) ->
multipar G D (open_tm_wrt_tm a a_Bullet) c ->
multipar G D (a_UAbs Irrel a) (a_UAbs Irrel (close_tm_wrt_tm y c)).
Lemma joins_iapp : forall S D a1 a2 L1 L2,
(forall x, x `notin` L1 -> RhoCheck Irrel x (open_tm_wrt_tm a1 (a_Var_f x))) ->
(forall x, x `notin` L2 -> RhoCheck Irrel x (open_tm_wrt_tm a2 (a_Var_f x))) ->
joins S D (open_tm_wrt_tm a1 a_Bullet) (open_tm_wrt_tm a2 a_Bullet) ->
joins S D (a_UAbs Irrel a1) (a_UAbs Irrel a2).
Lemma multipar_App_destruct_Rel : forall S D a1 a2 c,
multipar S D (a_App a1 Rel a2) c ->
(exists a1' a2',
multipar S D (a_App a1 Rel a2) (a_App (a_UAbs Rel a1') Rel a2') /\
multipar S D a1 (a_UAbs Rel a1') /\
multipar S D a2 a2' /\
multipar S D (open_tm_wrt_tm a1' a2') c) \/
(exists a1' a2',
multipar S D (a_App a1 Rel a2) (a_App a1' Rel a2') /\
multipar S D a1 a1' /\
multipar S D a2 a2').
Lemma multipar_App_destruct_Irrel : forall S D a1 c,
multipar S D (a_App a1 Irrel a_Bullet) c ->
(exists a1',
multipar S D (a_App a1 Irrel a_Bullet) (a_App (a_UAbs Irrel a1') Irrel a_Bullet) /\
multipar S D a1 (a_UAbs Irrel a1') /\ multipar S D (open_tm_wrt_tm a1' a_Bullet) c) \/
(exists a1',
multipar S D (a_App a1 Irrel a_Bullet) (a_App a1' Irrel a_Bullet) /\
multipar S D a1 a1').
Lemma consistent_mutual:
(forall S a A,   Typing S a A -> True) /\
(forall S phi,   PropWff S phi -> True) /\
(forall S D p1 p2, Iso S D p1 p2 -> Good S D -> (forall A1 B1 T1 A2 B2 T2, p1 = Eq A1 B1 T1 -> p2 = Eq A2 B2 T2-> (joins S D A1 A2 /\ joins S D B1 B2 /\ joins S D T1 T2))) /\
(forall S D A B T,   DefEq S D A B T -> Good S D -> joins S D A B) /\
(forall S,       Ctx S -> True).
Lemma consistent_defeq: forall S D A B T,   DefEq S D A B T -> Good S D -> joins S D A B.
(* ------------------------------------------------------- *)
Lemma no_aAbs : forall G rho A' a A, Typing G (a_Abs rho A' a) A -> False.
Lemma no_aCAbs : forall G A' a A, Typing G (a_CAbs A' a) A -> False.
Lemma Good_nil : forall D, Good nil D.
Lemma consistent_Star : forall A0,
consistent a_Star A0 -> value_type A0 -> A0 = a_Star.