Set Implicit Arguments.
Unset Strict Implicit.
(* Call-by-value semantics with cache *)
Section CBV.
Variables variable function constructor : Type.
Variable variable_eq_dec : forall (x1 x2 : variable), {x1=x2}+{x1<>x2}.
Variable function_eq_dec : forall (x1 x2 : function), {x1=x2}+{x1<>x2}.
Variable constructor_eq_dec : forall (x1 x2 : constructor), {x1=x2}+{x1<>x2}.
Notation value := (Syntax.value constructor).
Notation term := (Syntax.term variable function constructor).
Notation pattern := (Syntax.pattern variable constructor).
Notation rule := (Syntax.rule variable function constructor).
Notation term_beq := (term_beq variable_eq_dec function_eq_dec constructor_eq_dec).
Definition cache : Type := list (term * value).
Notation assoc_cache := (assoc term_beq).
Definition cache_beq (C C' : cache) : bool :=
list_beq _ (prod_beq _ _ term_beq (value_beq constructor_eq_dec)) C C'.

Lemma function_beq_refl (f : function) :
forall p, function_beq p f f = true.