Re: Up-Values with GroebnerBasis

*To*: mathgroup at smc.vnet.net*Subject*: [mg19436] Re: [mg19424] Up-Values with GroebnerBasis*From*: "Clifford J. Nelson" <cnelson9 at gte.net>*Date*: Wed, 25 Aug 1999 01:25:10 -0400*References*: <7ptaqh$lj4@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

"Ersek, Ted R" wrote: > Cliff Nelson wrote: > ------------------------ > The Solve function in Mathematica version 3.0.1 uses GroebnerBasis but > GroebnerBasis does not use up-values with which I define my own kind of > numbers. So, how can I use Solve to quickly find solutions to equations > with coefficients which have up-values for addition, subtraction, > multiplication, division, and powers defined by my own rules for B > numbers(a list of numbers wrapped by the head B[{a,b,...}]) in version > 3.0.1? It works fine in version 2.1, 2.2 and 2.2.2. > > ------------------------ > > Are you sure the kernel isn't ignoring your up-values for addition, > subtraction, and > multiplication? In Mathematica Version 3 and 4 the kernel uses built-in > rules for Plus, Times before user defined rules (including your upvalues). > I recommend you start by looking into that. > > As to how you can use Solve to quickly find solutions: > - I don't really understand your problem. > - I only have a vague understanding of GroebnerBasis. > > But if you send in an example you will probably get a solution. Keep in > mind the probability of a good solution is inversely proportional to the > length of your example. > > ------------------------- > Regards, > Ted Ersek > > For Mathematica tips, tricks see > http://www.dot.net.au/~elisha/ersek/Tricks.html ( http://forum.swarthmore.edu/epigone/geometry-research/brydilyum ) is where you can find the links to mathsource for the package with the up-values from RBFields.m. This is long. I hope someone can get it to work. Maybe Method -> n in the Solve function or something like that? The answers to the two Solve statements should be the same. Thank you for your time. Cliff Nelson In[1]:= <<RBFields.m Out[1]= {"E"} In[2]:= GroebnerBasis[{x 2,x y 3}] Out[2]= {x} In[3]:= GroebnerBasis[{x B[{2,2,-4}],x y B[{3,3,-6}]}] Out[3]= {x*y*B[{3, 3, -6}], x*B[{2, 2, -4}]} In[4]:= m= {{x,y},{xx,yy}} Out[4]= {{x, y}, {xx, yy}} In[5]:= divv[x_] := (Plus @@({v,1} First[x]))/(Plus @@ ( {v,1} Last[x])) In[6]:= eq = Range[5] Out[6]= {1, 2, 3, 4, 5} In[7]:= exeq = ( divv/@ NestList [m.#&,m,4]) - eq; In[8]:= Solve[exeq=={0,0,0,0,0},{v,x,xx,y,yy}] >From In[8]:= Solve::svars: Equations may not give solutions for all "solve" variables. Out[8]= {{v -> 0, y -> yy, x -> yy, xx -> 0}} In[9]:= beq = N[ {B[{1,1,-2}],B[{2,2,-4}],B[{3,3,-6}],B[{4,4,-8}],B[{5,5,-10}]}] Out[9]= {B[{1., 1., -2.}], B[{2., 2., -4.}], B[{3., 3., -6.}], B[{4., 4., -8.}], B[{5., 5., -10.}]} In[10]:= exbnumeq = ( divv /@ NestList [m.#&,m,4]) - beq; In[11]:= Solve[exbnumeq=={0,0,0,0,0},{v,x,xx,y,yy}] Out[11]= $Aborted