Definition pX := cons (A:=Term A n).Definition pO := nil (A:=Term A n).Fixpoint fP (a : list (Term A n)) : listA :=
  match a with
  | nil => nilA
  | b :: p => consA (T2M b) (fP p)
  end.

Theorem fP_app : forall p q : list (Term A n), fP (p ++ q) = fP p ++ fP q.