Definition lastCP {T:Type} {n:nat} (cp : cartesianPower T (S n)) : T.
Definition tailCPbis {T:Type} {n:nat} m1 m2 (cp : cartesianPower T m1) :
(S (S n)) = m1 -> (S n) = m2 -> (cartesianPower T m2).
Definition consTailCP {T:Type} {n:nat} (cp : cartesianPower T n) (t : T) : (cartesianPower T (S n)).
Definition CPToList {T:Type} {n:nat} (cp : cartesianPower T n) : list T.
Definition nthCP {T:Type} {m:nat} (n : nat) (cp : cartesianPower T m) (Default : T) := nth (n-1) (CPToList cp) Default.
Definition ListToCP {T : Type} (l : list T) (Default : T) : cartesianPower T (length l).

Lemma ListToCPTl {T : Type} :
forall (a a0 : T) l (Ha0l : (S (length l)) = length (a0  :: l)) Haa0l Default,
tailCPbis (length (a :: a0 :: l)) (length (a :: l)) (ListToCP (a :: a0 :: l) Default) Haa0l Ha0l =
ListToCP (a0 :: l) Default.