Ops: Arithmetic Ops Group Methods for the Weyl algebra

OpsR Documentation

Arithmetic Ops Group Methods for the Weyl algebra

Description

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 operator 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)

Arguments

S, S1, S2, e1, e2

Objects of class weyl, elements of a Weyl algebra

a, b, c, d

Integers, see details

column

column to be multiplied

n

Integer power (non-negative)

func

Function used for products

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.

Value

Generally, return a weyl object

Note

Function weyl_prod_univariate_nrow() is present for completeness, it is not used in the package

Author(s)

Robin K. S. Hankin

Examples

x <- rweyl(n=1,d=2)
y <- rweyl(n=1,d=2)
z <- rweyl(n=2,d=2)


x*(y+z) == x*y + x*z
is.zero(x*(y*z) - (x*y)*z)


RobinHankin/weyl documentation built on April 14, 2025, 11:49 a.m.