Definition constructor_beq (x1 x2 : constructor) : bool :=
if constructor_eq_dec x1 x2 then true else false.

Lemma term_beq_eq t1 t2 : term_beq t1 t2 = true <-> t1 = t2.
Fixpoint pattern_from_value (v : value) : pattern  :=
match v with
| c_capply c lv => p_capply c (map pattern_from_value lv)
end.