-- -*- M2-comint -*- hash: 11574828502001345970

i1 : constructPlaneCurve = method(TypicalValue=>Ideal, Options=>{Certify=>false})

o1 = constructPlaneCurve

o1 : MethodFunctionWithOptions

i2 : constructPlaneCurve(ZZ,PolynomialRing):=opt->(d,R) -> ideal random(R^1,R^{1:-d})

o2 = FunctionClosure[currentString:2:40-2:80]

o2 : FunctionClosure

i3 : certifyPlaneCurve = method(TypicalValue=>Boolean)

o3 = certifyPlaneCurve

o3 : MethodFunction

i4 : certifyPlaneCurve(Ideal,ZZ,PolynomialRing):=(I,d,R)-> #decompose I==1

o4 = FunctionClosure[currentString:4:44-4:69]

o4 : FunctionClosure

i5 : planeCurve = new RandomObject from {
          Construction => constructPlaneCurve,
          Certification => certifyPlaneCurve
          }

o5 = planeCurve

o5 : RandomObject

i6 : setRandomSeed("alpha");
 -- setting random seed to 10206284518

i7 : R=ZZ/3[x_0..x_2];

i8 : (random planeCurve)(2,R)

              2
o8 = ideal(- x  - x x  + x x  - x x )
              0    0 1    0 2    1 2

o8 : Ideal of R

i9 : (random planeCurve)(2,R,Certify=>true)

              2    2           2
o9 = ideal(- x  + x  + x x  + x )
              0    1    0 2    2

o9 : Ideal of R

i10 : tally apply(3^4,i->(random planeCurve)(2,R,Certify=>true,Attempts=>1) === null)

o10 = Tally{false => 66}
            true => 15

o10 : Tally

i11 : 
