(** The language of Bellantoni and Cook *)
(** * Syntax and induction principle  - [BC_ind2] is a handmade induction principle because the one generated automatically by Coq ignores the types [list BC] in the constructor [comp]. *)
Inductive BC : Set :=
| zero : BC
| proj : nat -> nat -> nat -> BC
| succ : bool -> BC
| pred : BC
| cond : BC
| rec : BC -> BC -> BC -> BC
| comp : nat -> nat -> BC -> list BC -> list BC -> BC.

Lemma BC_ind2 :
forall P : BC -> Prop,
P zero ->
(forall n s i, P (proj n s i)) ->
(forall b, P (succ b)) ->
P pred ->
P cond ->
(forall g h0 h1, P g -> P h0 -> P h1 -> P (rec g h0 h1)) ->
(forall n s h rl tl, P h -> (forall r, In r rl -> P r) ->
(forall s, In s tl -> P s) ->
P (comp n s h rl tl)) ->
forall e, P e.