Arithmetic Ops Group Methods for the Weyl algebra
Ops.Rd
Allows arithmetic operators such as addition, multiplication,
division, integer powers, etc. to be used for weyl
objects.
Idiom such as x^2 + y*z/5
should work as expected. Addition
and subtraction, and scalar multiplication, are the same as those of
the spray package; but “*
” is interpreted as
functional composition, and “^
” is interpreted as
repeated composition. A number of helper functions are documented
here (which are not designed for the end-user).
Usage
# S3 method for class 'weyl'
Ops(e1, e2 = NULL)
weyl_prod_helper1(a,b,c,d)
weyl_prod_helper2(a,b,c,d)
weyl_prod_helper3(a,b,c,d)
weyl_prod_univariate_onerow(S1,S2,func)
weyl_prod_univariate_nrow(S1,S2)
weyl_prod_multivariate_onerow_singlecolumn(S1,S2,column)
weyl_prod_multivariate_onerow_allcolumns(S1,S2)
weyl_prod_multivariate_nrow_allcolumns(S1,S2)
weyl_power_scalar(S,n)
Details
All arithmetic is as for spray
objects, apart from *
and
^
. Here, *
is interpreted as operator concatenation:
Thus, if \(w_1\) and \(w_2\) are Weyl objects, then
\(w_1w_2\) is defined as the operator that takes \(f\)
to \(w_1(w_2f)\).
Functions such as weyl_prod_multivariate_nrow_allcolumns()
are
low-level helper functions with self-explanatory names. In this
context, “univariate
” means the first Weyl algebra,
generated by \(\left\lbrace x,\partial\right\rbrace\),
subject to \(x\partial-\partial x=1\); and
“multivariate
” means the algebra generated by
\(\left\lbrace
x_1,x_2,\ldots,x_n,\partial_{x_1},\partial_{x_2},\ldots,\partial_{x_n}\right\rbrace\)
where \(n>1\).
The product is somewhat user-customisable via option prodfunc
,
which affects function weyl_prod_univariate_onerow()
. Currently
the package offers three examples: weyl_prod_helper1()
,
weyl_prod_helper2()
, and weyl_prod_helper3()
. These are
algebraically identical but occupy different positions on the
efficiency-readability scale. The option defaults to
weyl_prod_helper3()
, which is the fastest but most opaque. The
vignette provides further details, motivation, and examples.
Powers, as in x^n
, are defined in the usual way. Negative powers
will always return an error.