Opaque PlusOneMinus_e.
(** Def 9 of (Rose) *)
Definition OneMinusMultPlus'_e : Cobham :=
Rec
(Proj 1 0)
(Comp 3 (Succ false) [Proj 3 0])
(Comp 3 (Succ true) [Proj 3 0])
(Comp 2 Smash [Comp 2 Succ_e [Proj 2 1]; Comp 2 (Succ true) [Proj 2 0]]).

(* Specifications: *)
Lemma arity_OneMinusMultPlus' : arity OneMinusMultPlus'_e = ok_arity 2.
Lemma rec_bounded_OneMinusMultPlus' :
rec_bounded OneMinusMultPlus'_e.
Lemma OneMinusMultPlus'_correct : forall l,
hd nil l = nil \/ bs2nat (hd nil l) <> 0 ->
bs2nat (Sem OneMinusMultPlus'_e l) =
(1 - bs2nat (hd nil l)) * bs2nat (hd nil (tl l)) +
bs2nat (hd nil l) * (1 - (1 - bs2nat (hd nil l))).