Use R ::= QQ[x,y,z];
I := Ideal(x-y^2,x-z^3);
I := Tagged(I,"MyIdeals"); -- I is now tagged with "MyIdeals"
Describe I; -- the default description of an ideal
Record[Type = IDEAL, Value = Record[Gens = [-y^2 + x, -z^3 + x]]]
-------------------------------
Define Describe_MyIdeals(X)
Y := Untagged(X);
PrintLn "The generators are:";
Foreach G In Y.Gens Do
PrintLn" ", G;
EndForeach;
EndDefine;
Describe I; -- Any object tagged with "MyIdeals" is now described
-- using "Describe_MyIdeals".
The generators are:
-y^2 + x
-z^3 + x
-------------------------------
|