(* Here we  define a predicate "Has an occurrence of O" 
*)

Fixpoint Has_Zero (t : nat_tree) : Prop :=
  match t return Prop with
  | leaf n1 =>
      (* (nat_leaf n1) *) n1 = 0
                          (* (nat_cons t1 t2) *)
  | cons t1 t2 => Has_Zero t1 \/ Has_Zero t2
  end.

(* Specifications: *)
Lemma zero_occ : forall t : nat_tree, Has_Zero t -> leavemult t = 0.
Theorem cpsalgo : forall t : nat_tree, SPECIF t.