Skip to contents

Creates random weyl objects: quick-and-dirty examples of Weyl algebra elements

Usage

rweyl(nterms = 3, vals = seq_len(nterms), dim = 3, powers = 0:2)

Arguments

nterms

Number of terms in output

vals

Values of coefficients

dim

Dimension of weyl object

powers

Set from which to sample the entries of the index matrix

Value

Returns a weyl object

Author

Robin K. S. Hankin

Examples

rweyl()
#> A member of the Weyl algebra:
#> +3*x^2*dy +2*x^2*z^2*dy +x*y^2*dx*dy*dz^2

rweyl(d=7)
#> A member of the Weyl algebra:
#> +3*x1*x4^2*x5^2*x6*d3*d5*d6 +2*x2*x3*x4^2*x6*d1*d2^2*d4*d7
#> +x1*x3*x4^2*x7*d1*d4^2*d6^2*d7^2