# Singular

#### D.7.1.14 invariant_basis_reynolds

Procedure from library `finvar.lib` (see finvar_lib).

Usage:
invariant_basis_reynolds(REY,d[,flags]);
REY: a <matrix> representing the Reynolds operator, d: an <int> indicating of which degree (>0) the homogeneous basis shoud be, flags: an optional <intvec> with two entries: its first component gives the dimension of the space (default <0 meaning unknown) and its second component is used as the number of polynomials that should be mapped to invariants during one call of evaluate_reynolds if the dimension of the space is unknown or the number such that number x dimension polynomials are mapped to invariants during one call of evaluate_reynolds

Assume:
REY is the first return value of group_reynolds() or reynolds_molien() and flags[1] given by partial_molien

Return:
the basis (type <ideal>) of the space of invariants of degree d

Theory:
Monomials of degree d are mapped to invariants with the Reynolds operator. A linearly independent set is generated with the help of minbase.

Example:
 ```LIB "finvar.lib"; ring R=0,(x,y,z),dp; matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; intvec flags=0,1,0; matrix REY,M=reynolds_molien(A,flags); flags=8,6; print(invariant_basis_reynolds(REY,6,flags)); ==> z6, ==> x2z4+y2z4, ==> x2y2z2, ==> x3yz2-xy3z2, ==> x4z2+y4z2, ==> x4y2+x2y4, ==> x5y-xy5, ==> x6+y6 ```