(* Specifications: *)
Lemma tm_subst_tm_tm_var : forall a x, tm_subst_tm_tm a x (a_Var_f x) = a.
Lemma co_subst_co_co_var : forall a x, co_subst_co_co a x (g_Var_f x) = a.
Lemma tm_subst_tm_tm_var_neq : forall a x y, x <> y -> tm_subst_tm_tm a y (a_Var_f x) = (a_Var_f x).
Lemma co_subst_co_co_var_neq : forall a x y, x <> y -> co_subst_co_co a y (g_Var_f x) = (g_Var_f x).
Lemma binds_to_Typing: forall G T A, Ctx G -> binds T (Tm A) G -> Typing G A a_Star.
Lemma invert_a_Const : forall G T A, Typing G (a_Const T) A -> exists B, DataTy B a_Star /\ DefEq G (dom G) A B a_Star /\ binds T (Cs B) toplevel.
Lemma invert_a_Fam : forall G F A, Typing G (a_Fam F) A -> exists a B, DefEq G (dom G) A B a_Star /\ binds F (Ax a B) toplevel /\ Typing nil B a_Star.
Lemma invert_a_Star: forall A G, Typing G a_Star A -> DefEq G (dom G) A a_Star a_Star.
Lemma invert_a_Var : forall G x A, Typing G (a_Var_f x) A -> exists A', binds x (Tm A') G /\ DefEq G (dom G) A A' a_Star.
Lemma Path_tm_subst_tm_tm : forall T a x b, Path T a -> lc_tm b -> Path T (tm_subst_tm_tm b x a).
Lemma Path_co_subst_co_tm : forall T a x b, Path T a -> lc_co b -> Path T (co_subst_co_tm b x a).
Lemma Path_unique : forall T1 T2 a, Path T1 a -> Path T2 a -> T1 = T2.
Lemma DataTy_tm_subst_tm_tm : forall b x A, DataTy A a_Star -> lc_tm b -> DataTy (tm_subst_tm_tm b x A) a_Star.
Lemma DataTy_co_subst_co_tm : forall b x A, DataTy A a_Star -> lc_co b -> DataTy (co_subst_co_tm b x A) a_Star.
Lemma reduction_in_one_lc : forall a a', reduction_in_one a a' -> lc_tm a -> lc_tm a'.
Lemma open_tm_erase_rec : forall a, (forall b k, open_tm_wrt_tm_rec k (erase a) (erase b) = erase (open_tm_wrt_tm_rec k a b)) /\ (forall b k, open_brs_wrt_tm_rec k (erase a) (erase b) = erase (open_brs_wrt_tm_rec k a b)) /\ (forall g:co, True) /\ (forall b k, open_constraint_wrt_tm_rec k (erase a) (erase b) = erase (open_constraint_wrt_tm_rec k a b)).
Lemma open_tm_erase_tm : forall a b, open_tm_wrt_tm (erase a) (erase b) = erase (open_tm_wrt_tm a b).
Lemma open_co_erase_rec : forall a, (forall b k, (erase b) = erase (open_tm_wrt_co_rec k a b)) /\ (forall b k, (erase b) = erase (open_brs_wrt_co_rec k a b)) /\ (forall g:co, True) /\ (forall b k, (erase b) = erase (open_constraint_wrt_co_rec k a b)).
Lemma open_co_erase_tm : forall a b, (erase b) = erase (open_tm_wrt_co b a).
Lemma open_co_erase2_rec : forall a, (forall b k g, (open_tm_wrt_co_rec k g (erase b)) = erase (open_tm_wrt_co_rec k a b)) /\ (forall b k g, (open_brs_wrt_co_rec k g (erase b)) = erase (open_brs_wrt_co_rec k a b)) /\ (forall g:co, True) /\ (forall b k g, (open_constraint_wrt_co_rec k g (erase b)) = erase (open_constraint_wrt_co_rec k a b)).
Lemma open_co_erase_tm2 : forall a b g, (open_tm_wrt_co (erase b) g) = erase (open_tm_wrt_co b a).
Lemma Path_lc : forall T a, Path T a -> lc_tm a.
Lemma DataTy_lc : forall A, DataTy A a_Star -> lc_tm A.
Lemma CoercedValue_Value_lc_mutual: (forall A, CoercedValue A -> lc_tm A) /\ (forall A, Value A -> lc_tm A).
Lemma Value_lc : forall A, Value A -> lc_tm A.
Lemma CoercedValue_lc : forall A, CoercedValue A -> lc_tm A.
Lemma ctx_wff_mutual : (forall G0 a A, Typing G0 a A -> Ctx G0) /\ (forall G0 phi, PropWff G0 phi -> Ctx G0) /\ (forall G0 D p1 p2, Iso G0 D p1 p2 -> Ctx G0) /\ (forall G0 D A B T, DefEq G0 D A B T -> Ctx G0) /\ (forall G0, Ctx G0 -> True).
Lemma ann_ctx_wff_mutual : (forall G0 a A, AnnTyping G0 a A -> AnnCtx G0) /\ (forall G0 phi, AnnPropWff G0 phi -> AnnCtx G0) /\ (forall G0 D g p1 p2, AnnIso G0 D g p1 p2 -> AnnCtx G0) /\ (forall G0 D g A B, AnnDefEq G0 D g A B -> AnnCtx G0) /\ (forall G0, AnnCtx G0 -> True).
Lemma AxFix : binds Fix (Ax FixDef FixTy) an_toplevel.
Lemma AnnCtx_strengthen : forall G1 G2, AnnCtx (G2 ++ G1) -> AnnCtx G1.
Lemma binds_to_AnnTyping : forall G x A, AnnCtx G -> binds x (Tm A) G -> AnnTyping G A a_Star.
Lemma binds_to_AnnPropWff: forall G0 a b A c, AnnCtx G0 -> binds c (Co (Eq a b A)) G0 -> AnnPropWff G0 (Eq a b A).
Lemma Ctx_strengthen : forall G1 G2, Ctx (G2 ++ G1) -> Ctx G1.
Lemma binds_to_PropWff: forall G0 A B T c, Ctx G0 -> binds c (Co (Eq A B T)) G0 -> PropWff G0 (Eq A B T).
Lemma bind_map_tm_subst_tm_sort: forall c F A B T x a, binds c (Co (Eq A B T)) F -> binds c (Co (Eq (tm_subst_tm_tm a x A) (tm_subst_tm_tm a x B) (tm_subst_tm_tm a x T))) (map (tm_subst_tm_sort a x) F).
Lemma binds_map_4: forall x A F c0, binds x (Tm A) F -> binds x (Tm (co_subst_co_tm g_Triv c0 A)) (map (co_subst_co_sort g_Triv c0) F).
Lemma binds_map_5: forall c A B T F c1 , binds c (Co (Eq A B T) ) F -> binds c (Co (Eq (co_subst_co_tm g_Triv c1 A) (co_subst_co_tm g_Triv c1 B) (co_subst_co_tm g_Triv c1 T)) ) (map (co_subst_co_sort g_Triv c1) F).
Lemma tm_subst_tm_tm_dom_invariance: forall x a F, dom F = dom (map (tm_subst_tm_sort a x) F).
Lemma eq_relflag_dec : forall t1 t2 : relflag, {t1 = t2} + {~ t1 = t2}.
Lemma Beta_lc1 : forall a a' , Beta a a' -> lc_tm a.
Lemma Beta_lc2 : forall a a' , Beta a a' -> lc_tm a'.
Lemma cf : forall A B (f : A -> B) (a b : A), a = b -> f a = f b.
Lemma Beta_tm_subst : forall a a' b x, Beta a a' -> lc_tm b -> Beta (tm_subst_tm_tm b x a) (tm_subst_tm_tm b x a').
Lemma Beta_co_subst : forall a a' b x, Beta a a' -> lc_co b -> Beta (co_subst_co_tm b x a) (co_subst_co_tm b x a').
Ltac resolve_binds_unique := let EQ := fresh in let h := fresh in match goal with | b : binds ?c ?A ?G, H4 : binds ?c ?B ?G |- _ => assert (EQ : uniq G); eau
Lemma uniq_an_toplevel : uniq an_toplevel.
Lemma uniq_toplevel : uniq toplevel.
Lemma toplevel_closed : forall F a A, binds F (Ax a A) toplevel -> Typing nil a A.
Lemma toplevel_to_const : forall T A, binds T (Cs A) toplevel -> Typing nil A a_Star.
Lemma an_toplevel_closed : forall F a A, binds F (Ax a A) an_toplevel -> AnnTyping nil a A.
Lemma an_toplevel_to_const : forall T A, binds T (Cs A) an_toplevel -> AnnTyping nil A a_Star.
Lemma binds_to_type : forall S T A, AnnSig S -> binds T (Cs A) S -> DataTy A a_Star.