Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect ring map evaluation over Weyl algebras #3613

Open
mahrud opened this issue Dec 16, 2024 · 6 comments
Open

Incorrect ring map evaluation over Weyl algebras #3613

mahrud opened this issue Dec 16, 2024 · 6 comments

Comments

@mahrud
Copy link
Member

mahrud commented Dec 16, 2024

Ring maps are still not working correctly for ring maps between Weyl algebras and polynomial rings:

needsPackage "WeylAlgebras"

D = QQ[x,y,dx,dy, WeylAlgebra => {x => dx, y => dy}]
-- the associated graded ring is commutative
R = (extractVarsAlgebra D) (monoid[D.dpairVars#1])

x_D * dx_D
sub(x_D * dx_D, R) -- good

x_R * dx_R
sub(x_R * dx_R, D) -- bad: x*dx + 1

cc: @mikestillman @antonleykin

(this doesn't have anything to do with non-associative algebras, but also cc @moorewf just in case you have any ideas)

@antonleykin
Copy link
Contributor

I think both subs and e.g.

f = map (R,D)

should result in error, since

f(dx_D*x_D) == f(dx_D)*f(x_D)

is false.
(Alternatively, class f should not be RingMap.)

@moorewf
Copy link
Contributor

moorewf commented Dec 16, 2024

But we use RingMaps even when the maps are not well-defined all the time. For example, when R --> S is a surjection and you need a quick way to map linear forms from S to linear forms in R, one often considers map(R,S,gens R).

@antonleykin
Copy link
Contributor

I understand it's hacked at the moment, so perhaps a "good" approach would be to have a type named e.g. "SubstitutionMap" for which we can say what behavior is "good" (e.g. for @mahrud 's scenario, this is a map of vector spaces with distinguished monomial bases.)

@mahrud
Copy link
Member Author

mahrud commented Dec 17, 2024

@antonleykin note that in my example I didn't use a ring map, I used substitute. I don't care what's the internal mechanism of substitute. I don't need a new type either, just for substitute to work correctly for sending elements to and from the associated graded ring of the Weyl algebra. How would you suggest this should happen?

@antonleykin
Copy link
Contributor

@antonleykin note that in my example I didn't use a ring map, I used substitute.
Well, you didn't use a map but sub did. The behavior of sub is described (in the "caveats") of it's doc. (Also, the subj of this issue seems to imply this 😄 )
While creating this map it probably flattened the ring:

(last flattenRing R) (x_R*dx_R)

gives you dx*x.

I don't care what's the internal mechanism of substitute. I don't need a new type either, just for substitute to work correctly for sending elements to and from the associated graded ring of the Weyl algebra.

As an M2 user I agree, M2 should do what we want "correctly" and with ease.

How would you suggest this should happen?

That depends on what "correctly" means (for @mahrud, @moorewf, @antonleykin, etc.). Note: "to/from" for (D and gr D) happen to be not available as maps. Perhaps the most common meaning (for an average user) is "substitute, literally". Should one wrap something like this

use D
value toString (x_R*dx_R)

in a method? Should it still be called sub?

@mahrud
Copy link
Member Author

mahrud commented Dec 17, 2024

My point was that I'm fine with ring maps involving Weyl algebras giving an error in certain circumstances, and changing sub to not use ring maps at all.

Incidentally, sub is a frequent source of inefficiency for many people, I think because it constructs a ring map, uses it, then discards it. I think a vector space based sub could solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants