# polynomial | poly¶

Build the tuple of polynomial, ie the $k$-tape polynomial which is the Cartesian product of the input polynomials.

## Examples¶

In :
import vcsn
exp = vcsn.context('lan, q').expression
def poly(e, size=3):
'The approximation of expression e as a polynomial.'
return exp(e).shortest(3)
p1 = poly('(<2>ab)*')
p1

Out:
$\varepsilon \oplus \left\langle 2\right\rangle \mathit{ab} \oplus \left\langle 4\right\rangle \mathit{abab}$
In :
p2 = poly('(<3>x)*')
p2

Out:
$\varepsilon \oplus \left\langle 3\right\rangle \mathit{x} \oplus \left\langle 9\right\rangle \mathit{xx}$
In :
p1 | p2

Out:
$\varepsilon|\varepsilon \oplus \left\langle 3\right\rangle \varepsilon|\mathit{x} \oplus \left\langle 9\right\rangle \varepsilon|\mathit{xx} \oplus \left\langle 2\right\rangle \mathit{ab}|\varepsilon \oplus \left\langle 6\right\rangle \mathit{ab}|\mathit{x} \oplus \left\langle 18\right\rangle \mathit{ab}|\mathit{xx} \oplus \left\langle 4\right\rangle \mathit{abab}|\varepsilon \oplus \left\langle 12\right\rangle \mathit{abab}|\mathit{x} \oplus \left\langle 36\right\rangle \mathit{abab}|\mathit{xx}$
In :
(exp('(<2>ab)*') |  exp('(<3>x)*')).shortest(9)

Out:
$\varepsilon|\varepsilon \oplus \left\langle 3\right\rangle \varepsilon|\mathit{x} \oplus \left\langle 9\right\rangle \varepsilon|\mathit{xx} \oplus \left\langle 2\right\rangle \mathit{ab}|\varepsilon \oplus \left\langle 6\right\rangle \mathit{ab}|\mathit{x} \oplus \left\langle 18\right\rangle \mathit{ab}|\mathit{xx} \oplus \left\langle 27\right\rangle \varepsilon|\mathit{xxx} \oplus \left\langle 54\right\rangle \mathit{ab}|\mathit{xxx} \oplus \left\langle 81\right\rangle \varepsilon|\mathit{xxxx}$