Inductive eqP : list (Term A n) -> list (Term A n) -> Prop :=
  | eqP0 : eqP (pO A n) (pO A n)
  | eqpP1 :
      forall ma mb p q,
      eqTerm (A:=A) eqA (n:=n) ma mb -> eqP p q -> eqP (pX ma p) (pX mb q).Inductive eqP : list (Term A n) -> list (Term A n) -> Prop :=
  | eqP0 : eqP (pO A n) (pO A n)
  | eqpP1 :
      forall ma mb p q,
      eqTerm (A:=A) eqA (n:=n) ma mb -> eqP p q -> eqP (pX ma p) (pX mb q).Inductive eqP : list (Term A n) -> list (Term A n) -> Prop :=
  | eqP0 : eqP (pO A n) (pO A n)
  | eqpP1 :
      forall ma mb p q,
      eqTerm (A:=A) eqA (n:=n) ma mb -> eqP p q -> eqP (pX ma p) (pX mb q).

(* Specifications: *)
Theorem eqp_refl : reflexive _ eqP.
Theorem eqp_sym : symmetric _ eqP.
Lemma eqp_inv1 : forall p, eqP (pO A n) p -> p = pO A n.
Theorem eqp_inv2 : forall p, eqP p (pO A n) -> p = pO A n.
Theorem eqp_inv3l : forall a b p q, eqP (pX a p) (pX b q) -> eqTerm (A:=A) eqA (n:=n) a b.
Theorem eqp_inv3r : forall a b p q, eqP (pX a p) (pX b q) -> eqP p q.
Theorem eqp_trans : transitive _ eqP.
Theorem ltP_refl_pX : forall (a : Term A n) (p : list (Term A n)), canonical A0 eqA ltM (pX a p) -> ltP (A:=A) (n:=n) ltM p (pX a p).
Theorem eqp_eqTerm : forall a b p q, eqP (pX a p) (pX b q) -> eqTerm (A:=A) eqA (n:=n) a b.
Theorem ltp_eqp_comp : forall p q r s, ltP (A:=A) (n:=n) ltM p q -> canonical A0 eqA ltM p -> canonical A0 eqA ltM q -> eqP p r -> eqP q s -> ltP (A:=A) (n:=n) ltM r s.
Theorem eqp_imp_canonical : forall p q, eqP p q -> canonical A0 eqA ltM p -> canonical A0 eqA ltM q.