> < ^ Date: Mon, 14 Sep 1998 10:42:54 -0400 (EDT)
> ^ From: Jeffrey A Hall <jah@cinnamon.sr.unh.edu >
^ Subject: Equality of ring elements in GAP 4

Dear Forum,
I'm not sure I understand what "equality" means
in domains in GAP 4. Consider the following function, which
should replace each occurence of x in polynomial f with t:

---begin file "hom.g"----

HomZxZ_pt := function( f, x, p, t)   

local i, tmp, coeffs, one;

coeffs := CoefficientsOfUnivariatePolynomial( f );
tmp := 0;

  for i in [ 0..(Length(coeffs) - 1) ] do
    tmp := tmp + coeffs[i+1]*t^i;
  od;
  return tmp;
end;

---end file "hom.g"----

Now let's use the function HomZxZ_pt.

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

gap> Read( "hom.g" );
gap> x := Indeterminate(Rationals, 1);
x_1
gap> A := x^23 -3;;
gap> B := (x^7 - 7)*(x^7 - 11)*(x^7 - 23);;
gap> 
gap> p := 2;;
gap> R := PolynomialRing( GF(p), 1 );;
gap> t := Indeterminate( GF(p), 1 );;
gap> 
gap> H := HomZxZ_pt( A + B, x, p, t);
x_1^7+x_1^14+x_1^21+x_1^23
gap> h := t^7 + t^14 + t^21 + t^23;
x_1^7+x_1^14+x_1^21+x_1^23
gap> 
gap> H = h;
true
gap> 
gap> Factors( h );
[ x_1, x_1, x_1, x_1, x_1, x_1, x_1, Z(2)^0+x_1, Z(2)^0+x_1+x_1^6, 
  Z(2)^0+x_1^2+x_1^4+x_1^8+x_1^9 ]
gap> 
gap> Factors( H );
Error no method found for operation Quotient with 3 arguments
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop, you can 'quit;' to quit to outer loop,
or you can return to continue
brk> quit;
gap> quit;

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

If h=H, and h and H are both in the same polynomial ring R, then shouldn't
they have the same methods? In particular, why can't we factor both of them
over GF(2) ?

------------------------------------------------------------------
	Jeffrey Allan Hall      	Department of Mathematics
					Kingsbury Hall
	http://www.math.unh.edu/~jah	University of New Hampshire
        jah@spicerack.unh.edu		Durham, NH 03824
------------------------------------------------------------------
    "I am a poor woman, and language is one of the few wealths 
available to me."  -anonymous, quoted by John Simon.

> < [top]