Definition ListToCP {T : Type} (l : list T) (Default : T) : cartesianPower T (length l).Fixpoint circPermNCP {T:Type} {m:nat} (n : nat) (cp : cartesianPower T (S (S m))) :=
  match n with
  | 0 => cp
  | S p => circPermNCP p (consTailCP (tailCP cp) (headCP cp))
  end.

Lemma circPermNConsTlOK {T:Type} {m:nat} : forall (n : nat) (cp : cartesianPower T (S (S m))), consTailCP (tailCP (circPermNCP n cp)) (headCP (circPermNCP n cp)) = circPermNCP n (consTailCP (tailCP cp) (headCP cp)).