-- -*- M2 -*-
-- working on k-basis so it can do cross sections:

debug Core

R = ZZ[x]
random(R^1,R^{-5})

R = QQ[a,b,symbol x,symbol y,symbol z]
S = R/(x-y,a*x-b*z)
pres = gens gb presentation S
rawBasis(raw pres, {2}, {2}, {1}, {0,1,2,3,4}, false, -1)

R = QQ[a,b][symbol x,symbol y,symbol z]
S = R/(x-y,a*x-b*z)
pres = gens gb presentation S
rawBasis(raw pres, {2,0}, {2,0}, {1,1}, {0,1,2,3,4}, false, -1) -- y2 yz z2 
rawBasis(raw pres, {2,1}, {2,1}, {1,1}, {0,1,2,3,4}, false, -1) -- y2b yzb z2a z2b 
rawBasis(raw pres, {2,2}, {2,2}, {1,1}, {0,1,2,3,4}, false, -1) -- y2b2 yzb2 z2a2 z2ab z2b2 
rawBasis(raw pres, {2,3}, {2,3}, {1,1}, {0,1,2,3,4}, false, -1) -- y2b3 yzb3 z2a3 z2a2b z2ab2 z2b3 

rawBasis(raw pres, {2,0}, {2,0}, {1,1}, {0,1,2}, false, -1) -- y2 yz z2 
rawBasis(raw pres, {3,0}, {3,0}, {1,1}, {0,1,2}, false, -1) -- y3 y2z yz2 z3 

rawBasis(raw pres, {0}, {0}, {1,1}, {0,1,2}, false, -1)	    -- 1
rawBasis(raw pres, {1}, {1}, {1,1}, {0,1,2}, false, -1)	    -- y z 
rawBasis(raw pres, {2}, {2}, {1,1}, {0,1,2}, false, -1)	    -- y2 yz z2 
rawBasis(raw pres, {3}, {3}, {1,1}, {0,1,2}, false, -1)	    -- y3 y2z yz2 z3 

basis_0 S
basis_1 S
basis_2 S
basis_3 S

R = QQ[a,b]
M = coker matrix transpose{{1,-1,0},{a,0,-b}}
S = symmetricAlgebra M
basis_0 S
basis_1 S
basis_2 S
basis_3 S

R = QQ[a]
basis(-4,-2,R)
basis(-2,-4,R)
basis(4,2,R)
basis(2,4,R)

R = QQ[a,Degrees => { -1 }]
basis(-4,-2,R)
basis(-2,-4,R)
basis(4,2,R)
basis(2,4,R)

end

break KBasis::compute
break KBasis::k_basis0
run
input "~/src/M2/trunk/Macaulay2/bugs/dan/0-k-basis"

Here is the diff so far, not checked in:

