(* This code is copyrighted by its authors; it is distributed under  *)
(* the terms of the LGPL license (see LICENSE and description files) *)
(****************************************************************************  Buchberger : Application of Dickson lemma  Henrik Persson  ****************************************************************************)
Require Export BuchAux.
Section thRO.
Load "hCoefStructure".
Load "hOrderStructure".
Load "hBuchAux".
Definition get_mon : poly A0 eqA ltM -> mon n.
intros sp; case sp.
intros x H'; case x.
exact (M1 n).
intros a H'1; exact (T2M a).
Defined.

(* Specifications: *)
Theorem get_is_correct :
forall (a b : poly A0 eqA ltM) (P : list (poly A0 eqA ltM)),
~
zerop A A0 eqA n ltM
(nf A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec os a
P) ->
In b P ->
~ zerop A A0 eqA n ltM b ->
~
mdiv n (get_mon b)
(get_mon
(nf A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec
os a P)).