 The principal problems with truly inhomogeneous polynomial handling
seem to centre around reduction state information. I briefly describe
the present implementation, by means of monomial pointers ("Mpt");
and then list the procedures employing such pointers. After that comes
a few lines of mathematical explanation; describing throubles in the
general situation; and finally suggestions on possible ways to tackle
this. (Based on discussions JoeB & VU, October 2004.)


 In the present (homogeneous) setting, the monomial pointer is either
a list of "critical pairs", or a "reduction state". The latter is
either
NIL (meaning "This monomial is not investigated for reduction state"), or
T (meaning "This monomial is not reducible by means of the known Groebner
   basis elements"), or
a polynomial p (meaning "The leading monomial of the Groebner basis
	        element p divides this monomial").

An important special case is the leading monomial of a Groebner basis
element p. Its monomial pointer will be p; so that in a sense it is
self-referencing. Thus, a Groebner basis element often will be
represented by its leading monomial in the code.

------------------------------------------------------

Investigation 2004-10-09, listing current uses of Mpt (in version 0.984).

Note, that the macros Mpt, Mpt!?, and PutMpt are facultatively defined also
in the file logodd.sl, but not employed. These DMaybe's be commented out.

Procedures employing the Mpt structure:

Procedure		File		Employment	    Time criticallity
-------------------------------------------------------------------------
UNSIGNLC!'S		char0.sl	Gbe repr		No
InHomogReduceHomBasis	homog.sl	Gbe repr		No
DEGREELISTPUTPOINTERS	homog.sl	Gbe repr		No
PointerOut		inout.sl	Gbe repr		No
PointerPrint		inout.sl	Gbe repr		No
reglieMONINTERN		liemonom.sl	red status		Yes
FixGbe			main.sl		Gbe repr		No
commSPolPrep		main.sl		crit pairs		Somewhat
SPolPrepInsert		main.sl		crit pairs		Somewhat
ELIMPAIRS		main.sl		crit pairs		No
GbeLm!?			normwd.sl	Gbe repr		No
SubtractRedor		polynom.sl	Gbe repr		Somewhat
commAwayP		reclaim.sl	??			Yes??
ReducePol		reduct.sl	red status		Yes
NORMALFORM		reduct.sl	red status		Yes
FormSPol		reduct.sl	Gbe repr		No
FindGroebF		reduct.sl	Gbe repr		Yes
PutLeadMonPtr		strategy.sl	Gbe repr		No
								[but ought to!]
LeadMonList2PolList	strategy.sl	Gbe repr		No
(non)commSPolInputs	strategy.sl	crit pairs + red status	No(t much)
CALCREDUCTORPRIORITY	strategy.sl	Gbe repr		No
MinMon			strategy.sl	Gbe repr		No (?)
CLEARCDEGREEOBSTRUCTIONS strategy.sl	crit pairs		No
CLEARCDEGREEGKINPUT	strategy.sl	crit pairs		No
FixNGbe			strategy.sl	Gbe repr		Somewhat
anNEWGBELM2CHAIN	chrecord.sl	Gbe repr		No
AutoReduceFromTo	stg.sl		Gbe repr		Somewhat
AutoReduceFix		stg.sl		Gbe repr		Somewhat
commMonTreformT		stg.sl		red status??		??
commMonTreformNIL	stg.sl		red status??		??
ReduceSubstantialPol	stg.sl		red status		Yes
StagFormSPol		stg.sl		Gbe repr		No
STAGGERFINISH		stg.sl		Gbe repr		No
AUTOREDUCESTAGGEROUTPUT	stg.sl		Gbe repr		No
StagSPairTransform	stg.sl		red status??		No??
StagFixNGBasElt		stg.sl		red status + Gbe repr	No (?)
MakeTrivPair!@Mon	stg.sl		red status??		??

--------------------------------------------------------------

Mathematical explanation: Since all polynomials are homogeneous,
and we investigate polynomials in order of increasing total degree,
the reduction state of a monomial will not change after it is
considered for reduction for the first time: Either a "reductor"
was found for the monomial, or the monomial is in "normal form"
(i.e., irreducible). The only exception is when a monomial m first
is found to be irreducible, and later is found to be the leading
monomial of an entire polynomial p in "normal form", with respect
to known the partial Groebner basis. Then we may add p as a new
Groebner basis element, and let the pointer of m be p.

Saving reduction state is efficient, when the Groebner basis is
large. Every time we encounter a monomial m which already was
investigated once, we just employ the reduction state information,
instead of again running through the entire partial Groebner basis,
for each one of its leading monomials testing if this is a factor
of m.

In a more general setting, with any kinds of polynomials and
monoid orders, the reduction state information may be obsolete.
If we found that m may be reduced by means of a polynomial p, we
may still make use of this information; but if m was found to be
irreducible, we cannot trust this result. Possibly, we may have
added new Groebner basis elements with leading monomials of
rather low degree, after m was investigated, and one of the new
polynomials might be used in order to reduce m.


Some ways to tackle this:

 * We may keep only "positive" information "m may be reduced by p",
   but not distinguish "irreducible" monomials from "uninvestigated".
   DRAW BACK: Lots of investigations of the same monomial.

 * We may allow inhomogeneous input, but demand that the monoid
   order (a.k.a. "term order") considers total degrees first.
   Then, probably, in most cases, new Groebner basis elements will
   not have strictly lower degrees than already found "old" such
   ones. We then may proceed as usual, except when we get a "drop"
   in new Groebner basis element degrees. When we get a "drop", we
   proclaim information about "irreducibility" obsolete, by means
   of some variant of the REDUCE TRICK (infra).
   DRAW BACKS: Information about reduction state will be a little
   more time consuming; and many unneccessary repetitions of
   reductions will be performed
   The draw backs may be partially countered by clever variants of
   the reduce trick (infra).

 * We may limit reduction to leading term reduction. In this way,
   actually NO monomial EVER will be considered to be in "normal
   form", since if a leading monomial in normal form is found, the
   polynomial immediately is converted into a new Groebner basis
   element.
   DRAW BACK: Probably a lot of unneccessary rather long tails of
   polynomials. However, this is more a feeling than based on
   knowledge. Some experimenting with "leading monomial only"
   reduction might be interesting.

   In fact, a "leading monomial only" strategy could be incorporated
   into the present (homogeneous input) setting, as a minor strategy
   mode.

 * We may make irreducibility information obsolete, every time a new
   Groebner basis element is added. Possibly, a more sofisticated
   variant, trying to limit testings as much as possibly to the
   Groebner basis elements not yet tested; by keeping track of the
   lowest possible degree of NEW Groebner basis element (as distinct
   from OLD ones); or possibly keeping a list of the G. b. elements,
   in the order they were introduced, and information on which was
   the last tested one.
   DRAW BACKS: Either lots of unneccessary tests, or a fairly
   complicated handling of "reduction state information". 
   There are two kinds of information which yield "This G. b. element
   p need not be tested": The total degree of the leading monomial
   of p is larger than the total degree of m; or: p was introduced
   before the last time m was tested. Both may not be represented
   simultaneously by thye same linearly ordered list. A two
   dimensional ordering of the G. b. elements, ordered by both
   introduction time and total degree, might be optimal; given a point
   in this, only the G. b. elements in one quadrant with respect to
   this point need to be investigated. Is this possible to implement
   efficiently???

-------------------------------------------------

     THE REDUCE TRICK for keeping track of reduction states:

 Create specific objects whenever a new reducibility possibility
appears. In its original form, the reduction state will be a dotted
pair, whose CAR initially is set to (e.g.) T. This dotted pair is
saved as the value of a global variable. Whenever a form has be
tested for reductions, some property of it is set to the present
value of this global variable.

When a new potential reduction is introduced, the CAR of the old
reduction state dotted pair is changed to NIL (say), destructively
(by means of RPLACA). Then, a new dotted pair (with T as CAR) is
formed, and the value of the global variable is set to this pair.

Whenever a form is investigated for reduction, the CAR of its
reduction property is investigated. If the property is the most
recent reducibility state dotted pair, then this CAR is T; meaning
that we already have made a total investigation for reducibility, and
no further investigation is necessary. If the CAR is NIL, then the
dotted pair is obsolete, and a new reduction investigation should be
performed.


 There are several possible variants. We may keep information, not of
T, but of the smalles possible degree where trouble may appear. We may
test not the CAR, but the pair itself, for being EQ with the value of
the global variable. We may add further information, like the position
of the last G. b. element for which m was tested.

-----------------------------------------------------

 COMMENTS BY VU:

1)It might be useful to save the information about the total degree of the
monomial in the proppery list because it may be used rather often. Probably
the length only instead of the total degree is necessary.

2)One possible way to use Reduce trick is the following. Instead of one
univeral special object we create several of them P_k, each for every length
(max 1000 - we hardly will be able calulate over degree 1000).
Every time when we get a new (checked)
normal word of total degree k we  check if the current P_k has CAR equal
 to T.
If yes, we set our pointer to  be equal with this P_k. If not we create
a new P_k with the value T and set our pointer to it.

Every time when we get a new GB element of total degree k we change the
value from
T to NIL for all P_i with i>k (if any). Naturally we make change for the
leading monomial, but this is the only change we do in the degeree k.

The advantage is that we can save the information about the
normality of the words of shorter length and can accumulate normal words
in the given degree.

An alternative is to create new P_i every time we get a new GB element,
but there is a risk that there will be to many empty elements (with no
refernces.



