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
p2 = poly('(<3>x)*')
p2
p1 | p2
(exp('(<2>ab)*') | exp('(<3>x)*')).shortest(9)