Fixpoint unary_preserv (e : BC) : bool :=
  match e with
    | zero => true
    | proj n s j => true
    | succ b => b
    | pred => true
    | cond => true
    | rec g h0 h1 => unary_preserv g  &&
                     unary_preserv h0 && 
                     unary_preserv h1 
    | comp _ _ h nl sl => unary_preserv h && 
                          forallb unary_preserv nl &&
                          forallb unary_preserv sl
  end.

(* Specifications: *)
Lemma preservation : forall (e : BC) (vnl vsl : list bs), unary_preserv e = true -> forallb unary vnl = true -> forallb unary vsl = true -> unary (sem e vnl vsl) = true.
Lemma zero_correct n s l1 l2: length (sem (zero_e n s) l1 l2) = 0.