diff --git a/src/sage/rings/valuation/augmented_valuation.py b/src/sage/rings/valuation/augmented_valuation.py index 5b4666d45cb..c02b0a6957c 100644 --- a/src/sage/rings/valuation/augmented_valuation.py +++ b/src/sage/rings/valuation/augmented_valuation.py @@ -433,6 +433,12 @@ def augmentation_chain(self): r""" Return a list with the chain of augmentations down to the underlying :mod:`Gauss valuation `. + .. NOTE:: + + This method runs in time linear in the length of the chain (though + the printed representation might seem to indicate that it takes + quadratic time to construct the chain.) + EXAMPLES:: sage: R. = QQ[] diff --git a/src/sage/rings/valuation/developing_valuation.py b/src/sage/rings/valuation/developing_valuation.py index a73130c9cea..7b5935fca35 100644 --- a/src/sage/rings/valuation/developing_valuation.py +++ b/src/sage/rings/valuation/developing_valuation.py @@ -40,7 +40,7 @@ [x + 1, 1] """ # **************************************************************************** -# Copyright (C) 2013-2017 Julian Rüth +# Copyright (C) 2013-2025 Julian Rüth # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of @@ -102,6 +102,29 @@ def phi(self): sage: v = GaussValuation(S) # needs sage.libs.ntl sage: v.phi() # needs sage.libs.ntl (1 + O(2^5))*x + + Use + :meth:`~sage.rings.valuation.inductive_valuation.InductiveValuation.augmentation_chain` + to obtain the sequence of key polynomials of an + :class:`~sage.rings.valuation.inductive_valuation.InductiveValuation`:: + + sage: R. = QQ[] + sage: v = GaussValuation(R, QQ.valuation(2)) + sage: v = v.augmentation(x, 1) + sage: v = v.augmentation(x^2 + 2*x + 4, 3) + + sage: v + [ Gauss valuation induced by 2-adic valuation, v(x) = 1, v(x^2 + 2*x + 4) = 3 ] + + sage: [w.phi() for w in v.augmentation_chain()[:-1]] + [x^2 + 2*x + 4, x] + + A similar approach can be used to obtain the key polynomials and their + corresponding valuations:: + + sage: [(w.phi(), w.mu()) for w in v.augmentation_chain()[:-1]] + [(x^2 + 2*x + 4, 3), (x, 1)] + """ return self._phi