Pattern transformer rewritting

* Same behavior but it will be easy to have specific behavior for a new
  ast Node
Add specialized square function for gmp