# `groebner`::`normalf`

Complete reduction modulo a polynomial ideal

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```groebner::normalf(`p`, `polys`, <`order`>)
```

## Description

`groebner::normalf(p, polys)` computes a normal form of the polynomial `p` by complete reduction modulo all polynomials in the list `polys`.

The rules laid down in the introduction to the groebner package concerning the polynomial types and the ordering apply.

The polynomials in the list `polys` must all be of the same type as `p`. In particular, do not mix polynomials created via `poly` and polynomial expressions.

## Examples

### Example 1

We consider the ideal generated by the following polynomials:

```p1 := poly(x^2 - x + 2*y^2, [x,y]): p2 := poly(x + 2*y - 1, [x,y]):```

We compute the normal form of the following polynomial `p` modulo the ideal generated by `p1`, `p2` with respect to lexicographical ordering:

```p := poly(x^2*y - 2*x*y + 1, [x,y]): groebner::normalf(p, [p1, p2], LexOrder);```
` `

Note that `p1`, `p2` do not form a Gröbner basis. The corresponding Gröbner basis leads to a different normal form of `p`:

`groebner::normalf(p, groebner::gbasis([p1, p2]), LexOrder)`
` `
`delete p1, p2, p:`

## Parameters

 `p` A polynomial or a polynomial expression. The coefficients in this polynomial and polynomial expression can be arbitrary arithmetical expressions. `polys` A list of polynomials of the same type as `p`. In particular, if `p` is a polynomial expression, `polys` must be a list of polynomial expressions. `order` One of the identifiers `DegInvLexOrder`, `DegreeOrder`, and `LexOrder`, or a user-defined term ordering of type `Dom::MonomOrdering`. The default ordering is `DegInvLexOrder`.

## Return Values

Polynomial of the same type as the input polynomials. If polynomial expressions are used as input, then a polynomial expression is returned.

## Algorithms

A polynomial g is a reduced form of a polynomial p modulo a list of polynomials p1, …, pn, if and none of the leading terms of the pi divides the leading term of p, or if — for some ig is a reduced form of p - qpi, where q is the quotient of the leading monomial of p and the leading monomial of pi. A reduced form always exists, but need not be unique. It is unique, if the pi form a Gröbner basis.

In the implementation of `groebner::normalf`, reduction modulo some pi of largest possible total degree is preferred, if reduction modulo several pi is possible.