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 cbv := (CBV_cache.cbv variable function constructor).Notation cache := (CBV_cache.cache variable function constructor).Notation wf :=
  (CBV_cache.wf variable_eq_dec function_eq_dec constructor_eq_dec rule_default prog max_arity).Notation assoc_cache := (assoc (term_beq variable_eq_dec function_eq_dec constructor_eq_dec)).Definition term_order (t1 t2: term): Prop :=
  In t1 (sub_terms_strict _ _ _ t2).

Lemma term_order_wf : well_founded term_order.