Module Import Prog := Syn.MkProg (PlusProg).
Definition rank : function -> nat := ltac:(autorank function_beq ranklist).
Fixpoint quote_value (n : nat) : value :=
match n with
| 0    => c_capply zero []
| S n' => c_capply succ [quote_value n']
end.
(* QI *)
Definition cs (c : constructor) := 1. (* same for all *)
Definition value_default := quote_value 0.

Theorem plus_correct n m :
evaluates (fapply plus [term_from_value(quote_value n); term_from_value(quote_value m)]) (quote_value(n+m)).