I am trying to implement the Plücker relations in Sagemath. Sage has an interface for Macaulay2, and this latter has a command Grassmannian(k-1, n-1) for computing the Plücker relations of the Grassmannian $\text{Gr}(k,n)$.
My problem is: when I do this, Sage returns me a Macaulay2 object, which I want to turn into a Sage object. When I try the command Grassmannian(k-1, n-1).sage(), the compiler returns:
ValueError: variable name 'p_{0' is not alphanumeric.
So I guess the problem is that Macaulay2 uses variables p_{i,j,k}, and this is a problem for Sage. Do you know how can I fix it?
EDIT: here is the code:
R = macaulay2('QQ[apply(subsets(6,3), i -> p_i)]')
G = macaulay2.Grassmannian(2,5,R)
G.sage()
You can use variables that SageMath can understand:
So:
When you have numbers higher than 9 appearing you can add a separator like this:
I tried using an underscore as the separator at first but I didn't manage to make it work.