Skip to contents

Basic functions for weyl objects

Usage

weyl(M)
is.weyl(M)
as.weyl(val,d)
is.ok.weyl(M)

Arguments

M

A weyl or spray object

val,d

Value and dimension for weyl object

Details

To create a weyl object, pass a spray to function weyl(), as in weyl(M). To create a spray object to pass to weyl(), use function spray(), which is a synonym for spray::spray().

Function weyl() is the formal creator method; is.weyl() tests for weyl objects and is.ok.weyl() checks for well-formed sprays. Function as.weyl() tries (but not very hard) to infer what the user intended and return the right thing.

Value

Return a weyl or a Boolean

Author

Robin K. S. Hankin

Examples


(W <- spray(matrix(1:36,6,6),1:6))
#> +6*x^6*y^12*z^18*dx^24*dy^30*dz^36 +3*x^3*y^9*z^15*dx^21*dy^27*dz^33
#> +5*x^5*y^11*z^17*dx^23*dy^29*dz^35 +4*x^4*y^10*z^16*dx^22*dy^28*dz^34
#> +2*x^2*y^8*z^14*dx^20*dy^26*dz^32 +x*y^7*z^13*dx^19*dy^25*dz^31
weyl(W)
#> A member of the Weyl algebra:
#> +6*x^6*y^12*z^18*dx^24*dy^30*dz^36 +3*x^3*y^9*z^15*dx^21*dy^27*dz^33
#> +5*x^5*y^11*z^17*dx^23*dy^29*dz^35 +4*x^4*y^10*z^16*dx^22*dy^28*dz^34
#> +2*x^2*y^8*z^14*dx^20*dy^26*dz^32 +x*y^7*z^13*dx^19*dy^25*dz^31

as.weyl(15,d=3)
#> A member of the Weyl algebra:
#> 15

is.ok.weyl(spray(matrix(1:30,5,6)))
#> [1] TRUE
is.ok.weyl(spray(matrix(1:30,6,5)))
#> [1] "arity must be even"