(** The language of Cobham *)
(** * Syntax and induction principle  - [Cobham_ind2] is a handmade induction principle because the one generated automatically by Coq ignores the type [list BC] in the constructor [Comp]. *)
Inductive Cobham : Type :=
| Zero : Cobham
| Proj : nat -> nat -> Cobham
| Succ : bool -> Cobham
| Smash : Cobham
| Rec  : Cobham -> Cobham -> Cobham -> Cobham -> Cobham
| Comp : nat -> Cobham -> list Cobham -> Cobham.
Definition Rec2 g h j := Rec g h h j.

Lemma Cobham_ind2' :
forall P : Cobham -> Prop,
forall Q : list Cobham -> Prop,
Q nil ->
(forall e l, P e -> Q l -> Q (e :: l)) ->
P Zero ->
(forall n i, P (Proj n i)) ->
(forall b, P (Succ b)) ->
P Smash ->
(forall j g h0 h1, P j -> P g -> P h0 -> P h1 -> P (Rec j g h0 h1)) ->
(forall n h l, P h -> Q l -> P (Comp n h l)) ->
forall e, P e.