-- Example 7 restart K = ZZ/101 S = K[s,t,Degrees=>{-1,1}] -- the operation of GL(2) on S opS = (ww,gg) -> sub(ww,(vars S)*gg) -- a random element in GL(2) randomM = () -> ( M := matrix{{0,0},{0,0}}; while rank M < 2 do ( M = random(K^2,K^2) ); return M ) -- Test Matrices randomG = randomM() randomH = randomM() -- TEST: is it a representation? assert (opS(opS(vars S,randomG),randomH)==opS(vars S,randomH*randomG)) -- the quartics S4 = mingens (ideal vars S)^4 -- the representation on S4 rhoS4 = (g) -> sub((opS(S4,g) // S4),K) -- TEST: does this give the same operation? assert (0==S4*rhoS4(randomG) - opS(S4,randomG)) -- TEST: is it a representation assert (rhoS4(randomG)*rhoS4(randomH) == rhoS4(randomG*randomH)) -- the exterior algebra ind = apply(flatten entries S4,i->sum degree i) E = K[apply(ind,i->e_{i}),SkewCommutative=>true] --, Degrees=>ind] -- the operation on E opE = (ww,gg) -> sub(ww,(vars E)*rhoS4(gg)) -- the 2-Forms E2 = mingens (ideal vars E)^2 -- is something invariant isInvariantE = (ee) -> fold((a,b)->(a and b),apply(10,i->opE(ee,randomM()) == ee)) -- the orbit of the lowest weight vector S6 = mingens ideal mingens ideal apply(100,i->opE(E2_0_0,randomM()));transpose S6 -- TEST: is the ideal generated by S6 invariant? assert isInvariantE(ideal S6) -- the other subrepresentation S2 = matrix{{ 3*e_{2}*e_{0}-e_{4}*e_{-2}, e_{4}*e_{-4}-2*e_{2}*e_{-2}, 3*e_{0}*e_{-2}-e_{2}*e_{-4} }} -- TEST: is the ideal generated by S6 invariant? assert isInvariantE(ideal S2) -- a generic 1-form w = random(1,E) w = sum gens E -- a generic fiber betti (fiber = ideal mingens ideal(w * (vars E))) -- 0: 1 . -- 1: . 4 -- intersect with linear space betti super(basis(2,intersect(fiber,ideal S6)))