Value groups of discrete valuations - Discrete Valuations and Discrete Pseudo-Valuations

Skip to content
Back to top
View this page
Edit this page

# Value groups of discrete valuations

This file defines additive sub(semi-)groups of \(\QQ\) and related structures.

AUTHORS:

- Julian Rüth (2013-09-06): initial version

EXAMPLES:

Sage

    sage: v = ZZ.valuation(2)
    sage: v.value_group()
    Additive Abelian Group generated by 1
    sage: v.value_semigroup()
    Additive Abelian Semigroup generated by 1

Python

    >>> from sage.all import *
    >>> v = ZZ.valuation(Integer(2))
    >>> v.value_group()
    Additive Abelian Group generated by 1
    >>> v.value_semigroup()
    Additive Abelian Semigroup generated by 1

class sage.rings.valuation.value_group.DiscreteValuationCodomain

  Bases: `UniqueRepresentation`, `Parent`

  The codomain of discrete valuations, the rational numbers extended by \(\pm\infty\).

  EXAMPLES:

  Sage

      sage: from sage.rings.valuation.value_group import DiscreteValuationCodomain
      sage: C = DiscreteValuationCodomain(); C
      Codomain of Discrete Valuations

  Python

      >>> from sage.all import *
      >>> from sage.rings.valuation.value_group import DiscreteValuationCodomain
      >>> C = DiscreteValuationCodomain(); C
      Codomain of Discrete Valuations

class sage.rings.valuation.value_group.DiscreteValueGroup(generator)

  Bases: `UniqueRepresentation`, `Parent`

  The value group of a discrete valuation, an additive subgroup of \(\QQ\) generated by `generator`.

  INPUT:

  - `generator` – a rational number

  Note

  We do not rely on the functionality provided by additive abelian groups in Sage since these require the underlying set to be the integers. Therefore, we roll our own Z-module here. We could have used `AdditiveAbelianGroupWrapper` here, but it seems to be somewhat outdated. In particular, generic group functionality should now come from the category and not from the super-class. A facade of Q appeared to be the better approach.

  EXAMPLES:

  Sage

      sage: from sage.rings.valuation.value_group import DiscreteValueGroup
      sage: D1 = DiscreteValueGroup(0); D1
      Trivial Additive Abelian Group
      sage: D2 = DiscreteValueGroup(4/3); D2
      Additive Abelian Group generated by 4/3
      sage: D3 = DiscreteValueGroup(-1/3); D3
      Additive Abelian Group generated by 1/3

  Python

      >>> from sage.all import *
      >>> from sage.rings.valuation.value_group import DiscreteValueGroup
      >>> D1 = DiscreteValueGroup(Integer(0)); D1
      Trivial Additive Abelian Group
      >>> D2 = DiscreteValueGroup(Integer(4)/Integer(3)); D2
      Additive Abelian Group generated by 4/3
      >>> D3 = DiscreteValueGroup(-Integer(1)/Integer(3)); D3
      Additive Abelian Group generated by 1/3

  denominator()

    Return the denominator of a generator of this group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(3/8).denominator()
        8

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(Integer(3)/Integer(8)).denominator()
        8

  gen()

    Return a generator of this group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(-3/8).gen()
        3/8

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(-Integer(3)/Integer(8)).gen()
        3/8

  index(other)

    Return the index of `other` in this group.

    INPUT:

    - `other` – a subgroup of this group

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(3/8).index(DiscreteValueGroup(3))
        8
        sage: DiscreteValueGroup(3).index(DiscreteValueGroup(3/8))
        Traceback (most recent call last):
        ...
        ValueError: other must be a subgroup of this group
        sage: DiscreteValueGroup(3).index(DiscreteValueGroup(0))
        Traceback (most recent call last):
        ...
        ValueError: other must have finite index in this group
        sage: DiscreteValueGroup(0).index(DiscreteValueGroup(0))
        1
        sage: DiscreteValueGroup(0).index(DiscreteValueGroup(3))
        Traceback (most recent call last):
        ...
        ValueError: other must be a subgroup of this group

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(Integer(3)/Integer(8)).index(DiscreteValueGroup(Integer(3)))
        8
        >>> DiscreteValueGroup(Integer(3)).index(DiscreteValueGroup(Integer(3)/Integer(8)))
        Traceback (most recent call last):
        ...
        ValueError: other must be a subgroup of this group
        >>> DiscreteValueGroup(Integer(3)).index(DiscreteValueGroup(Integer(0)))
        Traceback (most recent call last):
        ...
        ValueError: other must have finite index in this group
        >>> DiscreteValueGroup(Integer(0)).index(DiscreteValueGroup(Integer(0)))
        1
        >>> DiscreteValueGroup(Integer(0)).index(DiscreteValueGroup(Integer(3)))
        Traceback (most recent call last):
        ...
        ValueError: other must be a subgroup of this group

  is_trivial()

    Return whether this is the trivial additive abelian group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(-3/8).is_trivial()
        False
        sage: DiscreteValueGroup(0).is_trivial()
        True

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(-Integer(3)/Integer(8)).is_trivial()
        False
        >>> DiscreteValueGroup(Integer(0)).is_trivial()
        True

  numerator()

    Return the numerator of a generator of this group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(3/8).numerator()
        3

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(Integer(3)/Integer(8)).numerator()
        3

  some_elements()

    Return some typical elements in this group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueGroup
        sage: DiscreteValueGroup(-3/8).some_elements()
        [3/8, -3/8, 0, 42, 3/2, -3/2, 9/8, -9/8]

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueGroup
        >>> DiscreteValueGroup(-Integer(3)/Integer(8)).some_elements()
        [3/8, -3/8, 0, 42, 3/2, -3/2, 9/8, -9/8]

class sage.rings.valuation.value_group.DiscreteValueSemigroup(generators)

  Bases: `UniqueRepresentation`, `Parent`

  The value semigroup of a discrete valuation, an additive subsemigroup of \(\QQ\) generated by `generators`.

  INPUT:

  - `generators` – rational numbers

  EXAMPLES:

  Sage

      sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup
      sage: D1 = DiscreteValueSemigroup(0); D1
      Trivial Additive Abelian Semigroup
      sage: D2 = DiscreteValueSemigroup(4/3); D2
      Additive Abelian Semigroup generated by 4/3
      sage: D3 = DiscreteValueSemigroup([-1/3, 1/2]); D3
      Additive Abelian Semigroup generated by -1/3, 1/2

  Python

      >>> from sage.all import *
      >>> from sage.rings.valuation.value_group import DiscreteValueSemigroup
      >>> D1 = DiscreteValueSemigroup(Integer(0)); D1
      Trivial Additive Abelian Semigroup
      >>> D2 = DiscreteValueSemigroup(Integer(4)/Integer(3)); D2
      Additive Abelian Semigroup generated by 4/3
      >>> D3 = DiscreteValueSemigroup([-Integer(1)/Integer(3), Integer(1)/Integer(2)]); D3
      Additive Abelian Semigroup generated by -1/3, 1/2

  gens()

    Return the generators of this semigroup.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup
        sage: DiscreteValueSemigroup(-3/8).gens()
        (-3/8,)

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueSemigroup
        >>> DiscreteValueSemigroup(-Integer(3)/Integer(8)).gens()
        (-3/8,)

  is_group()

    Return whether this semigroup is a group.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup
        sage: DiscreteValueSemigroup(1).is_group()
        False
        sage: D = DiscreteValueSemigroup([-1, 1])
        sage: D.is_group()
        True

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueSemigroup
        >>> DiscreteValueSemigroup(Integer(1)).is_group()
        False
        >>> D = DiscreteValueSemigroup([-Integer(1), Integer(1)])
        >>> D.is_group()
        True

    Invoking this method also changes the category of this semigroup if it is a group:

    Sage

        sage: D in AdditiveMagmas().AdditiveAssociative().AdditiveUnital().AdditiveInverse()
        True

    [Python]

        >>> from sage.all import *
        >>> D in AdditiveMagmas().AdditiveAssociative().AdditiveUnital().AdditiveInverse()
        True

  is_trivial()

    Return whether this is the trivial additive abelian semigroup.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup
        sage: DiscreteValueSemigroup(-3/8).is_trivial()
        False
        sage: DiscreteValueSemigroup([]).is_trivial()
        True

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueSemigroup
        >>> DiscreteValueSemigroup(-Integer(3)/Integer(8)).is_trivial()
        False
        >>> DiscreteValueSemigroup([]).is_trivial()
        True

  some_elements()

    Return some typical elements in this semigroup.

    EXAMPLES:

    Sage

        sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup
        sage: list(DiscreteValueSemigroup([-3/8,1/2]).some_elements())              # needs sage.numerical.mip
        [0, -3/8, 1/2, ...]

    Python

        >>> from sage.all import *
        >>> from sage.rings.valuation.value_group import DiscreteValueSemigroup
        >>> list(DiscreteValueSemigroup([-Integer(3)/Integer(8),Integer(1)/Integer(2)]).some_elements())              # needs sage.numerical.mip
        [0, -3/8, 1/2, ...]