# getRandomLinearForms -- retrieve a list of random degree 1 and 0 forms of specified types

## Synopsis

• Usage:
getRandomLinearForms(R, L)
• Inputs:
• R, a ring, the ring where the forms should live
• L, a list, a list with 6 entries, each a number of types of forms. Constant forms, monomial forms (plus a constant term if Homogeneous => false), monomial forms, binomial forms, trinomial forms, and random forms.
• Optional inputs:
• Verify => , default value false, whether to check if the output linear forms have Jacobian of maximal rank
• Verbose => , default value false, turn on or off verbose output
• Homogeneous => , default value false, allows constant terms on some linear forms if true
• Outputs:
• a list, a list of random forms of the specified types

## Description

This will give you a list of random forms (ring elements) of the specified types. This is useful, because in many cases, for instance when doing generic projection, you only need a a certain number of the forms in the map to be fully random. Furthermore, at the cost of some randomness, using monomial or binomial forms can be much faster.

The types of form are specified via the second argument, a list with 5 entries. The first entry is how many constant forms are allowed.

 i1 : R = ZZ/31[a,b,c] o1 = R o1 : PolynomialRing i2 : getRandomLinearForms(R, {2,0,0,0,0,0}) o2 = {1, -12} o2 : List

The second entry in the list is how many monomial forms are returned. Note if Homogeneous=>false then these forms will usually have constant terms.

 i3 : getRandomLinearForms(R, {0,2,0,0,0,0}, Homogeneous=>true) o3 = {a, a} o3 : List i4 : getRandomLinearForms(R, {0,2,0,0,0,0}, Homogeneous=>false) o4 = {b + 13, a + 7} o4 : List

Next, the third entry is how many monomial forms (without constant terms, even if Homogeneous=>false).

 i5 : getRandomLinearForms(R, {0,0,2,0,0,0}, Homogeneous=>false) o5 = {c, c} o5 : List

The fourth entry is how many binomial forms should be returned.

 i6 : getRandomLinearForms(R, {0,0,0,1,0,0}, Homogeneous=>true) o6 = {b - 12c} o6 : List i7 : getRandomLinearForms(R, {0,0,0,1,0,0}, Homogeneous=>false) o7 = {- 14c + 2} o7 : List

The ultimate entry is how many truly random forms to produce.

 i8 : getRandomLinearForms(R, {0,0,0,0,0,1}, Homogeneous=>true) o8 = {13a + 14b + 3c} o8 : List i9 : getRandomLinearForms(R, {0,0,0,0,0,1}, Homogeneous=>false) o9 = {- 12a - 10b + 7c + 15} o9 : List

You may combine the different specifications to create a list of the desired type. The order is randomized.

If the option Verify=>true, then this will check the jacobian of the list of forms (discounting the constant forms), to make sure it has maximal rank. Random forms in small numbers of variables over small fields will produce non-injective ring maps occasionally otherwise.

## Ways to use getRandomLinearForms :

• "getRandomLinearForms(Ring,List)"

## For the programmer

The object getRandomLinearForms is .