Skip to content

gfanInterface: Another issue with gfanConvertToNewRing #3601

@felixlotter

Description

@felixlotter

While fighting with #3600 I discovered a more exotic bug, unrelated to NCAlgebra, but probably coming from the same method. To produce a minimal example I copied some code from MultigradedImplicitization.m2 (@bkholler):

needsPackage "gfanInterface"

maxGrading = method(Options => {ReturnTargetGrading => false});
maxGrading RingMap := Matrix => opts -> F -> (
    dom := source F;
    codom := target F;
    elimRing := dom ** codom;
    X := vars dom;
    n := numgens dom;
    elimIdeal := ideal(sub(X, elimRing) - sub(F(X), elimRing));
    linealitySpace(gfanHomogeneitySpace(elimIdeal))
)

R1 = QQ[x1]
R2 = QQ[s1,s2]
maxGrading(map(R1,R2,{x1,x1^2})) -- works fine once
maxGrading(map(R1,R2,{x1,x1^2})) -- error

Here, the error message is

error: no method found for applying promote to:
     argument 1 :  x1 (of class QQ {x1, x2, x3})
     argument 2 :  R1

The problem seems to be the variable name "x1", which is also used inside gfanConvertToNewRing. Interestingly, calling gfanHomogeneitySpace directly, e.g. does not produce any errors. It does, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions