Inductive ppcm (p q : Term A n) : Term A n -> Prop :=
    ppcm0 :
      forall s : Term A n,
      (forall r : Term A n, divP r p -> divP r q -> divP r s) ->
      divP s p -> divP s q -> ppcm p q s.Inductive ppcm (p q : Term A n) : Term A n -> Prop :=
    ppcm0 :
      forall s : Term A n,
      (forall r : Term A n, divP r p -> divP r q -> divP r s) ->
      divP s p -> divP s q -> ppcm p q s.

(* Specifications: *)
Theorem ppc_is_ppcm : forall a b : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> ppcm a b (ppc a b).
Theorem ppc_multTerm_divP : forall a b : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> divP (multTerm (A:=A) multA (n:=n) a b) (ppc a b).
Theorem divP_comp : forall a b c d : Term A n, divP a c -> eqTerm (A:=A) eqA (n:=n) a b -> eqTerm (A:=A) eqA (n:=n) c d -> divP b d.
Theorem divP_multTerm_l : forall a b c : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> eqTerm (A:=A) eqA (n:=n) (multTerm (A:=A) multA (n:=n) a b) c -> divP c a.
Theorem divP_multTerm_r : forall a b c : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> eqTerm (A:=A) eqA (n:=n) (multTerm (A:=A) multA (n:=n) a b) c -> divP c b.
Theorem divP_ppcl : forall a b : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> divP (ppc a b) a.
Theorem divP_ppcr : forall a b : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> divP (ppc a b) b.
Theorem divTerm_compo : forall (a b c : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b) (nZc : ~ zeroP (A:=A) A0 eqA (n:=n) c), divP a b -> divP b c -> eqTerm (A:=A) eqA (n:=n) (divTerm a nZc) (multTerm (A:=A) multA (n:=n) (divTerm a nZb) (divTerm b nZc)).
Theorem divP_comp_ppc0 : forall (a b : Term A n) (nZa : ~ zeroP (A:=A) A0 eqA (n:=n) a) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b) (nZppab : ~ zeroP (A:=A) A0 eqA (n:=n) (ppc a b)) (p : list (Term A n)), eqTerm (A:=A) eqA (n:=n) b (multTerm (A:=A) multA (n:=n) (divTerm (multTerm (A:=A) multA (n:=n) a b) nZppab) (divTerm (ppc a b) nZa)).
Theorem divP_comp_ppc1 : forall (a b : Term A n) (nZa : ~ zeroP (A:=A) A0 eqA (n:=n) a) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b) (nZppab : ~ zeroP (A:=A) A0 eqA (n:=n) (ppc a b)) (p : list (Term A n)), eqTerm (A:=A) eqA (n:=n) a (multTerm (A:=A) multA (n:=n) (divTerm (multTerm (A:=A) multA (n:=n) a b) nZppab) (divTerm (ppc a b) nZb)).
Theorem divP_dec : forall a b : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> {divP a b} + {~ divP a b}.
Theorem divP_eqT : forall a b c : Term A n, eqT a b -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> divP a c -> divP b c.
Theorem eqTerm_multTerm_imp_eqTerm : forall a b c : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) c -> eqTerm (A:=A) eqA (n:=n) (multTerm (A:=A) multA (n:=n) c a) (multTerm (A:=A) multA (n:=n) c b) -> eqTerm (A:=A) eqA (n:=n) a b.
Theorem multTerm_eqTerm_inv : forall a b c : Term A n, eqTerm (A:=A) eqA (n:=n) (multTerm (A:=A) multA (n:=n) a b) (multTerm (A:=A) multA (n:=n) a c) -> ~ zeroP (A:=A) A0 eqA (n:=n) a -> eqTerm (A:=A) eqA (n:=n) b c.
Theorem eqT_nzero_divP : forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b), eqT a (multTerm (A:=A) multA (n:=n) (divTerm a nZb) b) -> ~ zeroP (A:=A) A0 eqA (n:=n) a -> divP a b.
Theorem eqT_nzero_eqT_divP : forall (a b c : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b), eqT c (multTerm (A:=A) multA (n:=n) (divTerm c nZb) b) -> ~ zeroP (A:=A) A0 eqA (n:=n) a -> eqT a c -> divP a b.