Opaque PlusMod2_e.
(** Def 11 of (Rose) *)
Definition PlusOneMinusMod2_e : Cobham :=
Comp 3 Cond [
Proj 3 2;
Proj 3 0;
Comp 3 PlusOneMinus_e [Proj 3 0; Proj 3 1];
Proj 3 0
].

(* Specifications: *)
Lemma arity_PlusOneMinusMod2 :
arity PlusOneMinusMod2_e = ok_arity 3.
Lemma rec_bounded_PlusOneMinusMod2 :
rec_bounded PlusOneMinusMod2_e.
Lemma PlusOneMinusMod2_correct : forall l,
bs2nat (Sem PlusOneMinusMod2_e l) =
bs2nat (hd nil l) +
(1 - bs2nat (hd nil (tl l))) *
mod2 (bs2nat (hd nil (tl (tl l)))).
Lemma PlusOneMinusMod2_length : forall l,
length (Sem PlusOneMinusMod2_e l) <= S (length (hd nil l)).