# standardForm -- convert to standard form

## Synopsis

• Usage:
standardForm f
• Outputs:
• , the polynomial or monomial in a form involving hash tables.

## Description

A polynomial is represented by hash tables in which the keys are hash tables representing the monomials and the values are the coefficients. The monomials themselves are represented by hash tables in which the keys are the variables and the values are the corresponding exponents.

 i1 : R = ZZ/101[x,y,z]; i2 : standardForm (x^2 - 7 + x*y*z^11 + y) o2 = HashTable{HashTable{} => -7 } HashTable{0 => 1 } => 1 1 => 1 2 => 11 HashTable{0 => 2} => 1 HashTable{1 => 1} => 1 o2 : HashTable

## Code

/usr/share/Macaulay2/Core/orderedmonoidrings.m2:88:33-92:83: --source code:
standardForm RingElement := (f) -> (
R := ring f;
k := coefficientRing R;
(cc,mm) := rawPairs(raw k, raw f);
new HashTable from toList apply(cc, mm, (c,m) -> (standardForm m, new k from c)))

• listForm -- convert to list form
• content -- the content of a polynomial
• coefficients -- monomials and their coefficients
• exponents -- the exponents of a polynomial
• monomials -- matrix of monomials in a ring element or matrix

## Ways to use standardForm :

• "standardForm(MonoidElement)"
• "standardForm(RingElement)"

## For the programmer

The object standardForm is .