proposition: Lemma app_2_n_app {T:Type} {n:nat} : forall (pred : arity T (S (S (S n)))) (x1 x2 : T) (cpp : cartesianPower T (S n)) (cpt : cartesianPower T (S (S (S n)))), app_2_n pred x1 x2 cpp -> headCP cpt = x1 -> headCP (tailCP cpt) = x2 -> tailCP (tailCP cpt) = cpp -> app pred cpt.
proof: Proof. intros. induction n. simpl in *. rewrite H0; rewrite H1; rewrite H2. apply H. clear IHn. simpl in *. rewrite H0; rewrite H1; rewrite H2. apply H. Qed.
imports: Arith NArith List Sorting Coq.Program.Equality