- Usage:
`WeylClosure I, WeylClosure(I,f)`

- Inputs:
`I`, an ideal, a left ideal of the Weyl Algebra`f`, a ring element, a polynomial

- Outputs:
- an ideal, the Weyl closure (w.r.t. f) of I

Let R = K(x_{1}..x_{n})<d_{1}..d_{n}> denote the ring of differential operators with rational function coefficients. The Weyl closure of an ideal I in D is the intersection of the extended ideal RI with D. It consists of all operators which vanish on the common holomorphic solutions of I and is thus analogous to the radical operation on a commutative ideal.
The partial Weyl closure of I with respect to a polynomial f is the intersection of the extended ideal D[f^{-1}] I with D.
The Weyl closure is computed by localizing D/I with respect to a polynomial f vanishing on the singular locus, and computing the kernel of the map D --> D/I --> (D/I)[f^{-1}].

i1 : W = QQ[x,Dx, WeylAlgebra => {x=>Dx}] o1 = W o1 : PolynomialRing |

i2 : I = ideal(x*Dx-2) o2 = ideal(x*Dx - 2) o2 : Ideal of W |

i3 : WeylClosure I 3 2 o3 = ideal (x*Dx - 2, x*Dx - 2, Dx , x*Dx - Dx) o3 : Ideal of W |

The ideal I should be finite holonomic rank, which can be tested manually by holonomicRank.The Weyl closure of non-finite rank ideals or arbitrary submodules has not been implemented.

- Dlocalize -- localization of a D-module
- singLocus -- singular locus of a D-module
- holonomicRank -- rank of a D-module

- WeylClosure(Ideal)
- WeylClosure(Ideal,RingElement)