# Singular

### 4.22.2 coneViaInequalities

`Syntax:`
`coneViaInequalities(` intmat IE `)`
`coneViaInequalities(` intmat IE, intmat E `)`
`coneViaInequalities(` intmat IE, intmat E, int flags `)`
`Type:`
cone
`Purpose:`
cone consisting of all points x, such that IE*x >= 0 in each component and (if stated) E*x = 0; inequalities and (if stated) equations will be transformed, getting rid of redundancies; flags may range between 0,..,3 defining an upper and lower bit (0=0*2+0, 1=0*2+1, 2=1*2+0, 3=1*2+1), if higher bit is 1, then program assumes each inequality yields a facet, if lower bit is 1, then program assumes the kernel of E is the span of the cone, if either bit is 0, then program computes the information itself.
`Example:`
 ```LIB"gfanlib.so"; // Let's define a cone in R^3 given by the following inequalities: intmat IE[6][3]= 1,3,5, 1,5,3, 0,1,-1, 0,1,1, 1,0,0, -1,0,0; cone c=coneViaInequalities(IE); c; ==> AMBIENT_DIM ==> 3 ==> INEQUALITIES ==> 0,1,-1, ==> 0,1, 1, ==> 1,3, 5, ==> 1,5, 3 ==> LINEAR_SPAN ==> -1,0,0 ==> // Note that the last two inequalities yield x1 = 0, hence also possible: intmat IE[4][3]= ==> // ** redefining IE ** 0,1,-1, 0,1,1; intmat E[1][3]= 1,0,0; cone c=coneViaInequalities(IE,E); ==> // ** redefining c ** c; ==> AMBIENT_DIM ==> 3 ==> INEQUALITIES ==> 0,1,-1, ==> 0,1, 1 ==> LINEAR_SPAN ==> 1,0,0 ==> // each inequalities gives rise to a facet intmat IE[2][3]= ==> // ** redefining IE ** 0,1,-1, 0,1,1; intmat E[1][3]= ==> // ** redefining E ** 1,0,0; cone c=coneViaInequalities(IE,E,1); ==> // ** redefining c ** c; ==> AMBIENT_DIM ==> 3 ==> INEQUALITIES ==> 0,1,-1, ==> 0,1, 1 ==> LINEAR_SPAN ==> 1,0,0 ==> // and the kernel of E is the span of the cone intmat IE[2][3]= ==> // ** redefining IE ** 0,1,-1, 0,1,1; intmat E[1][3]= ==> // ** redefining E ** 1,0,0; cone c=coneViaInequalities(IE,E,3); ==> // ** redefining c ** c; ==> AMBIENT_DIM ==> 3 ==> FACETS ==> 0,1,-1, ==> 0,1, 1 ==> LINEAR_SPAN ==> 1,0,0 ==> ```