login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for ExampleSkewPolynomial revision 3 of 5

1 2 3 4 5
Editor: hemmecke
Time: 2015/02/19 23:16:51 GMT+0
Note:

changed:
-1
Q ==> Fraction UnivariatePolynomial('q, Z)
VM ==> OrderedVariableList ['y, 'w, 'u]
V  ==> OrderedVariableList ['Y, 'W, 'U]
M ==> SparseMultivariatePolynomial(Q, VM)
K := Fraction M
sigmay: Automorphism K := 1
yv: VM := 'y
derivy(m: M): M == D(m, yv)
deltay(k: K): K == D(k, derivy)
wm: M := 'w
sigmaw1(k: K): K == eval(k, wm, wm+1)
sigmaw2(k: K): K == eval(k, wm, wm-1)
sigmaw: Automorphism K := morphism(sigmaw1, sigmaw2)
um: M := 'u; qQ: Q := 'q::Q; qQ1 := inv qQ
sigmau1(k: K): K == eval(k, um, qQ*um)$K
sigmau2(k: K): K == eval(k, um, qQ1*um)$K
sigmau: Automorphism K := morphism(sigmau1, sigmau2)$Automorphism(K)
deltawu(k: K): K == 0
YV: V := index(1)$V; WV: V := index(2)$V;
sigma(v: V): Automorphism K ==_
  if v=YV then sigmay else if v=WV then sigmaw else sigmau
delta(v: V): K -> K == if v=YV then deltay else deltawu
T ==> SparseMultivariateSkewPolynomial(K, V, sigma, delta)
y: T := 'y::K::T; w: T := 'w::K::T; u: T := 'u::K::T; q: T := qQ::K::T;
Y: T := monomial(1, index(1)$V, 1)
W: T := monomial(1, index(2)$V, 1)
U: T := monomial(1, index(3)$V, 1)
t: T := y*w*u*q
Y*t
W*t
U*t

changed:
-
-
\begin{axiom}
)set message time on
(Y+y+1)^100;
(X1+x1+1)^100;
(X2+x2+1)^100;
\end{axiom}


Computing with non-commutative polynomials

Univariate differential case

Let's first consider a differential operator algebra.

fricas
Z ==> Integer
Type: Void
fricas
P ==> UnivariatePolynomial('x, Z)
Type: Void
fricas
sigma1: Automorphism P := 1

\label{eq1}\mbox{\rm R - > R}(1)
Type: Automorphism(UnivariatePolynomial?(x,Integer))
fricas
delta1: P -> P := D$P

\label{eq2}\mbox{theMap (...)}(2)
Type: (UnivariatePolynomial?(x,Integer) -> UnivariatePolynomial?(x,Integer))
fricas
S1 ==> UnivariateSkewPolynomial('X, P, sigma1, delta1)
Type: Void
fricas
x1: S1 := 'x

\label{eq3}x(3)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(DIFRING-;D;2S;1,303))
fricas
X1: S1 := 'X

\label{eq4}X(4)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(DIFRING-;D;2S;1,303))
fricas
X1*x1

\label{eq5}{x \  X}+ 1(5)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(DIFRING-;D;2S;1,303))

Univariate shift case

Similarly, we can define a shift algebra.

fricas
xp: P := 'x

\label{eq6}x(6)
Type: UnivariatePolynomial?(x,Integer)
fricas
sigma2: Automorphism P := morphism((p: P): P +-> p(x+1), (p: P): P +-> p(x-1))

\label{eq7}\mbox{\rm R - > R}(7)
Type: Automorphism(UnivariatePolynomial?(x,Integer))
fricas
delta2: P -> P := (p: P): P +-> 0

\label{eq8}\mbox{theMap (...)}(8)
Type: (UnivariatePolynomial?(x,Integer) -> UnivariatePolynomial?(x,Integer))
fricas
S2 ==> UnivariateSkewPolynomial('X, P, sigma2, delta2)
Type: Void
fricas
x2: S2 := 'x

\label{eq9}x(9)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(*1;anonymousFunction;2;initial;internal))
fricas
X2: S2 := 'X

\label{eq10}X(10)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(*1;anonymousFunction;2;initial;internal))
fricas
X2*x2

\label{eq11}{\left(x + 1 \right)}\  X(11)
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(*1;anonymousFunction;2;initial;internal))

Multivariate case

The multivariate case is only sligthly more complicated.

Let us here use a field as coefficient domain.

fricas
Q ==> Fraction UnivariatePolynomial('q, Z)
Type: Void
fricas
VM ==> OrderedVariableList ['y, 'w, 'u]
Type: Void
fricas
V  ==> OrderedVariableList ['Y, 'W, 'U]
Type: Void
fricas
M ==> SparseMultivariatePolynomial(Q, VM)
Type: Void
fricas
K := Fraction M

\label{eq12}\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{SparseMultivariatePolynomial}\ } (\hbox{\axiomType{Fraction}\ } (\hbox{\axiomType{UnivariatePolynomial}\ } (q , \hbox{\axiomType{Integer}\ })) , \hbox{\axiomType{OrderedVariableList}\ } ([ y , w , u ])))(12)
Type: Type
fricas
sigmay: Automorphism K := 1

\label{eq13}\mbox{\rm R - > R}(13)
Type: Automorphism(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))))
fricas
yv: VM := 'y

\label{eq14}y(14)
Type: OrderedVariableList?([y,w,u])
fricas
derivy(m: M): M == D(m, yv)
Function declaration derivy : SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u])) -> SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q, Integer)),OrderedVariableList([y,w,u])) has been added to workspace.
Type: Void
fricas
deltay(k: K): K == D(k, derivy)
Function declaration deltay : Fraction(SparseMultivariatePolynomial( Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y, w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
wm: M := 'w

\label{eq15}w(15)
Type: SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))
fricas
sigmaw1(k: K): K == eval(k, wm, wm+1)
Function declaration sigmaw1 : Fraction(SparseMultivariatePolynomial (Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y ,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
sigmaw2(k: K): K == eval(k, wm, wm-1)
Function declaration sigmaw2 : Fraction(SparseMultivariatePolynomial (Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y ,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
sigmaw: Automorphism K := morphism(sigmaw1, sigmaw2)
fricas
Compiling function sigmaw1 with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))
fricas
Compiling function sigmaw2 with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))

\label{eq16}\mbox{\rm R - > R}(16)
Type: Automorphism(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))))
fricas
um: M := 'u; qQ: Q := 'q::Q; qQ1 := inv qQ

\label{eq17}1 \over q(17)
Type: Fraction(UnivariatePolynomial?(q,Integer))
fricas
sigmau1(k: K): K == eval(k, um, qQ*um)$K
Function declaration sigmau1 : Fraction(SparseMultivariatePolynomial (Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y ,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
sigmau2(k: K): K == eval(k, um, qQ1*um)$K
Function declaration sigmau2 : Fraction(SparseMultivariatePolynomial (Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y ,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
sigmau: Automorphism K := morphism(sigmau1, sigmau2)$Automorphism(K)
fricas
Compiling function sigmau1 with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))
fricas
Compiling function sigmau2 with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))

\label{eq18}\mbox{\rm R - > R}(18)
Type: Automorphism(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))))
fricas
deltawu(k: K): K == 0
Function declaration deltawu : Fraction(SparseMultivariatePolynomial (Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y ,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) has been added to workspace.
Type: Void
fricas
YV: V := index(1)$V; WV: V := index(2)$V;
Type: OrderedVariableList?([Y,W,U])
fricas
sigma(v: V): Automorphism K ==_
  if v=YV then sigmay else if v=WV then sigmaw else sigmau
Function declaration sigma : OrderedVariableList([Y,W,U]) -> Automorphism(Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u])))) has been added to workspace.
Type: Void
fricas
delta(v: V): K -> K == if v=YV then deltay else deltawu
Function declaration delta : OrderedVariableList([Y,W,U]) -> ( Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))) -> Fraction(SparseMultivariatePolynomial(Fraction( UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u])))) has been added to workspace.
Type: Void
fricas
T ==> SparseMultivariateSkewPolynomial(K, V, sigma, delta)
Type: Void
fricas
y: T := 'y::K::T; w: T := 'w::K::T; u: T := 'u::K::T; q: T := qQ::K::T;
fricas
Compiling function sigma with type OrderedVariableList([Y,W,U]) -> 
      Automorphism(Fraction(SparseMultivariatePolynomial(Fraction(
      UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))))
fricas
Compiling function delta with type OrderedVariableList([Y,W,U]) -> (
      Fraction(SparseMultivariatePolynomial(Fraction(
      UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u])))
       -> Fraction(SparseMultivariatePolynomial(Fraction(
      UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))))
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
Y: T := monomial(1, index(1)$V, 1)

\label{eq19}D_{Y}(19)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
W: T := monomial(1, index(2)$V, 1)

\label{eq20}D_{W}(20)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
U: T := monomial(1, index(3)$V, 1)

\label{eq21}D_{U}(21)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
t: T := y*w*u*q

\label{eq22}q \  u \  w \  y(22)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
Y*t
fricas
Compiling function deltay with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))
fricas
Compiling function derivy with type SparseMultivariatePolynomial(
      Fraction(UnivariatePolynomial(q,Integer)),OrderedVariableList([y,
      w,u])) -> SparseMultivariatePolynomial(Fraction(
      UnivariatePolynomial(q,Integer)),OrderedVariableList([y,w,u]))

\label{eq23}{q \  u \  w \  y \ {D_{Y}}}+{q \  u \  w}(23)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
W*t
fricas
Compiling function deltawu with type Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u]))) -> Fraction(
      SparseMultivariatePolynomial(Fraction(UnivariatePolynomial(q,
      Integer)),OrderedVariableList([y,w,u])))

\label{eq24}{\left({q \  u \  w}+{q \  u}\right)}\  y \ {D_{W}}(24)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
U*t

\label{eq25}{{q}^{2}}\  u \  w \  y \ {D_{U}}(25)
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))

fricas
)set message time on
(Y+y+1)^100;
Type: SparseMultivariateSkewPolynomial?(Fraction(SparseMultivariatePolynomial?(Fraction(UnivariatePolynomial?(q,Integer)),OrderedVariableList?([y,w,u]))),OrderedVariableList?([Y,W,U]),theMap(*1;sigma;1;initial),theMap(*1;delta;1;initial))
fricas
Time: 0.01 (IN) + 0.54 (EV) = 0.55 sec
(X1+x1+1)^100;
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(DIFRING-;D;2S;1,303))
fricas
Time: 0.26 (EV) = 0.26 sec
(X2+x2+1)^100;
Type: UnivariateSkewPolynomial?(X,UnivariatePolynomial?(x,Integer),R -> R,theMap(*1;anonymousFunction;2;initial;internal))
fricas
Time: 0.93 (IN) + 0.74 (EV) + 0.19 (OT) = 1.86 sec