refine (fix F n (a: Acc lt n) {struct a} :=
match a with
| Acc_intro x =>
let Re := fun m (p: lt m n) => F m (x m p)  in _
end).
clearbody Re. clear F.
destruct n...
destruct (elemsRimpl CR (nats 0 (S n)))...
intros.
destruct (In_nats_inv _ _ _ H)...
Qed.
Definition C n: R := proj1_sig (CRimpl (lt_wf n)).
(* .. and which satisfies the following recursive equation: *)

Lemma Ceq n: C n =
match n with
| 0 => 0
| _ => pred n + 2 * Ravg (map C (nats 0 n))
end.