Definition whnf_ord (x y : approx) :=
    lexprod value (fun _ => value) (R_exp beta) (fun _ => subterm) 
      (f1 x) (f1 y).

(* Specifications: *)
Lemma beta_app_list_ctxt : forall (l : list term) (e : env) (u v : term), ctxt beta e u v -> ctxt beta e (app_list l u) (app_list l v).
Lemma beta_whnf_rec : forall (e : env) (t : term) (args : list term), sn (ctxt beta) e (app_list args t) -> {u : term | red beta e (app_list args t) u & head_normal beta e u}.
Theorem beta_whnf : forall (e : env) (t : term), sn (ctxt beta) e t -> {u : term | red beta e t u & head_normal beta e u}.