Require Export FcEtt.ett_ind.
Require Export FcEtt.ett_par. (* FIXME: the axioms about toplevel shouldn't be there *)
Require Export FcEtt.erase_syntax.  (* lc_erase *)
Module fc_dec_aux (wf : fc_wf_sig) (weak : fc_weak_sig) (subst : fc_subst_sig) (unique: fc_unique_sig).
(**** Decision procedures for a few auxiliary relations ****)

(* Specifications: *)
Lemma eq_relflag_dec : forall t1 t2 : relflag, {t1 = t2} +  {~ t1 = t2}.
Lemma not_in_dec : forall x L, {¬ x `in` L} + {x `in` L}.
Lemma uniq_binds_dec_tm : forall x G, uniq G -> {A | binds x (Tm A) G} + {(forall A, ¬ binds x (Tm A) G)}.
Lemma binds_dec_tm : forall x G, {A | binds x (Tm A) G} + {(forall A, ¬ binds x (Tm A) G)}.
Lemma binds_dec_co : forall x G, {AB, K | binds x (Co (Eq (fst AB) (snd AB) K)) G} + {(forall A B K, ¬ binds x (Co (Eq A B K)) G)}.
Lemma binds_dec_cs : forall x G, {C | binds x (Cs  C) G} + {(forall C, ¬ binds x (Cs  C) G)}.
Lemma Path_dec : forall a, lc_tm a -> { T | Path T a } + { (forall T, not (Path T a)) }.
Lemma Value_AbsIrrel_inversion : forall A a,
Value (a_Abs Irrel A a)
-> lc_tm A /\ forall x, x `notin` fv_tm a -> CoercedValue (open_tm_wrt_tm a (a_Var_f x)).
Lemma Value_UAbsIrrel_inversion : forall a,
Value (a_UAbs Irrel a)
-> forall x, x `notin` fv_tm a -> Value (open_tm_wrt_tm a (a_Var_f x)).