Ask Your Question
1

unable to convert ... to a symbolic expression

asked 1 year ago

rrogers gravatar image

Why does this error out?

abc,ABC=var('abc ABC')
aa=[abc^2,ABC];print(aa)
SR(aa[0:1])

After a lot of reporting

TypeError: unable to convert [abc^2, ABC] to a symbolic expression

The original problem was trying to access the ideal .. groebner_basis()
The Groebner part worked but I want to manipulate the output, and I got this error. So far, this code fails on 9.7, 9.8, 10.0 A pointed reference would be fine sorry

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 1 year ago

Max Alekseyev gravatar image

aa[0:1] is a list composed of just one element. Conversion of a list into SR in not defined. Do you mean SR(aa[0]) by any chance?

As for groebner_basis(), it's unclear why do you need symbolic expressions as ideals and Groebner bases are defined over polynomial rings, and typically do not require any conversion to symbolic ring.

Preview: (hide)
link

Comments

Your right and I finally extracted that from the incoming :)
Your question is relevant.
construct an aa=ideal(...).groebner_basis()
Then try
solve(aa, for_this_or that)
It will fail; whereas print(aa) and copy/paste on screen and it works. If that is not clear, I will shrink my problem and post an example. Obviously, I want to automate that:)

rrogers gravatar imagerrogers ( 1 year ago )

Typically one won't need to use solve() function while working with polynomial ideals. Use .variety() method instead.

Max Alekseyev gravatar imageMax Alekseyev ( 1 year ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 1 year ago

Seen: 327 times

Last updated: Jun 05 '23