---
title: "Modifiers"
canonical: "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/mods.html"
source: "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/mods.md"
part: "Local Fields"
chapter: "Algebraic Power Series Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Local Fields", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/index-local-fields.md"}
  - {"title": "Algebraic Power Series Rings", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/index-algebraic-power-series-rings.md"}
prev: {"title": "Predicates", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/preds.md"}
next: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/bibliography.md"}
intrinsics:
  - {"name": "ScaleGenerators", "signature": "ScaleGenerators(s, ls): RngPowAlgElt, SeqEnum -> RngPowAlgElt"}
  - {"name": "ChangeRing", "signature": "ChangeRing(s, R): RngPowAlgElt, RngMPol -> RngPowAlgElt"}
  - {"name": "SimplifyRep", "signature": "SimplifyRep(s): RngPowAlgElt -> RngPowAlgElt"}
examples:
  - "ex-e60c95"
---

# Modifiers

The following functions modify the representation of the power series or apply a simple automorphism.

<a id="function-scalegenerators-rngpowalgelt-seqenum"></a>
## `ScaleGenerators(s, ls): RngPowAlgElt, SeqEnum -> RngPowAlgElt`

Let $\{\gamma_i\}_i$ be the basis (determined from the representation chosen by Magma) of the exponent lattice of the series $s$, and let $\sigma: {\underline x}^{\gamma_i} \mapsto ls[i] {\underline x}^{\gamma_i}$. Return the series $\sigma(s)$.

<a id="function-changering-rngpowalgelt-rngmpol"></a>
## `ChangeRing(s, R): RngPowAlgElt, RngMPol -> RngPowAlgElt`

If $R$ is a multivariate polynomial domain compatible with the approximation domain `Domain(s)`, return the same power series with new approximation domain $R$. This is sort of a “coercion between power series rings”.

<a id="function-rpa-simp"></a>
## `SimplifyRep(s): RngPowAlgElt -> RngPowAlgElt`

```magma
Factorizing: BoolElt                    Default: true
```

“Simplifies” the internal representation of a series. The result will be a series of atomic type without recursive (substitution) dependencies on other power series. The defining polynomial of the simplified series will be irreducible and therefore a minimal polynomial over `Domain(s)` (unless `Factorizing` is `false` when it will only be guaranteed to be squarefree). After the simplification, [`DefiningPolynomial`](https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/accessors.md#function-rpa-defp) returns this polynomial, which can be useful (*e.g.*, for [`IsPolynomial`](https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/preds.md#function-rpa-isp)). However, experience shows that the resulting representation is in general neither simple nor more efficient for subsequent computations.

There is a **dangerous pitfall:**

Assume we have a series represented by a tree with nodes of type A and B. Assume further that the leaves have been constructed by [`RationalPuiseux`](https://docs.magma-maths.org/v2.30-1/LocalFields/AlgebraicPowerSeriesRings/cons.md#function-rpa-pui) with parameter `Gamma` set to some value. Then the intention was probably to work over the subring of a polynomial ring with restricted support. If now `SimplifyRep`, with `Factorizing` as `true`, is called, then a minimal polynomial over the whole polynomial ground ring is computed which is maybe not what one wants.

<a id="example-ex-e60c95"></a>
## `Example: Scaling the Generators of a Series (ex-e60c95)`

We can modify `s2` by mapping generators (of Laurent polynomials) $x^{1/5}y^{-2/5} \mapsto 3 x^{1/5}y^{-2/5}$ and $x^{2/5}y^{1/5} \mapsto 4 x^{2/5}y^{1/5}$.

```magma
> Expand(ScaleGenerators(s2, [3,4]), 15);
true
64/81*x^2*y^11 - 64/3*x^5*y^5 - 16/9*x^2*y^6 + 48*x^5 + 4*x^2*y
```

One can naturally view `h1` as a series in ${\mathbb{Q}}(i)[[u,v]]$.

```magma
> Qi<i> := NumberField(R.1^2 + 1) where R is PolynomialRing(Q);
> Qiuv<u,v> := PolynomialRing(Qi, 2, "glex");
> h4 := ChangeRing(s1, Qiuv);
> Expand(h4, 4); Domain(h4);
true u^3 + 3*u^2*v + 3*u*v^2 + v^3 + u^2 + 2*u*v + v^2 + u + v
Polynomial ring of rank 2 over Qi
Graded Lexicographical Order
Variables: u, v
```

We have seen that the power series `h3` is zero, but its representation does not show this immediately. We can “explicitize” its representation.

```magma
> SimplifyRep(h3 : Factorizing := true);
Algebraic power series
0
> DefiningPolynomial($1);
z
```
