Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: define a new object or use the existing?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24364] Re: [mg24360] define a new object or use the existing?
  • From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
  • Date: Wed, 12 Jul 2000 23:13:07 -0400 (EDT)
  • Organization: UMass Lowell
  • References: <200007090853.EAA15447@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Maris:

I take it that you intend to represent your twisted polynomials as sums
of twisted terms.  You might consider an alternate form - something like
TwistedPolynomial[p,opts] where p is a list of pi's and opts includes
options such as Indeterminate->delta.  This is essentially how Al
Hibbard and I implemented polynomials over an arbitrary ring in the
AbstractAlgebra packages  that we wrote.  I found this representation
quite easy to work with.  Of course these objects can be formatted as
you like.

The packages are free to download, examine and use at
http://www.central.edu/eaam.html. A guide with labs is available at http://www.telospub.com/catalog/MATHEMATICA/AAwM.html

Ken Levasseur

Maris Tõnso wrote:
> 
> Hi!
> 
> I am trying to write a program which could handle noncommutative twisted
> polynomials. A noncommutative polynomial has a form
> 
> p(delta) = pn**delta^n + ... + p2**delta^2 + p1**delta + p0,
> 
> where ** denotes noncommutative multiplication. I can not decide, which
> is better way to represent an object pi**delta^i : to define additional
> rules for function NonCommutativeMulitply or to build a special new
> object on
> this purpose, for example  Twisted[pi,i].
> 
> You will probably say that it depends on concrete circumstances or
> there is no difference in principle; but I still hope you can give some
> comments
> on this problem.
> 
> And the other problem: If I choose to build a new object when I would
> like object
>         Twisted[p, n]
> in StandardForm to be printed as
>         p delta^n.
> One way to get it is to use Format and Postfix:
>         Format[Twisted[p_,n_]] := Postfix[{p}, delta^n ]
> But this solution does not satisfy me.
> 
> I would like to know if there exists a elegant way to define the
> formatting for the object Twisted so that
> Twisted[p+q, n]  would printed as  (p+q) delta^n  (not p+q delta^n) and
> Twisted[1, n]  would printed as  delta^n  (not 1 delta^n).
> 
> Thanks for any advices.
> 
> Maris Tonso
> Tallinn, Estonia


  • Prev by Date: Modifying illumination shades
  • Next by Date: Re: With[{software=Mathematica}, Frustration]
  • Previous by thread: define a new object or use the existing?
  • Next by thread: Re: define a new object or use the existing?