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: v = ZZ.valuation(2)
sage: v.value_group()
Additive Abelian Group generated by 1
sage: v.value_semigroup()
Additive Abelian Semigroup generated by 1
-
class
sage.rings.valuation.value_group.
DiscreteValuationCodomain
¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.structure.parent.Parent
The codomain of discrete valuations, the rational numbers extended by \(\pm\infty\).
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValuationCodomain sage: C = DiscreteValuationCodomain(); C Codomain of Discrete Valuations
-
class
sage.rings.valuation.value_group.
DiscreteValueGroup
(generator)¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.structure.parent.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: 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
-
denominator
()¶ Return the denominator of a generator of this group.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueGroup sage: DiscreteValueGroup(3/8).denominator() 8
-
gen
()¶ Return a generator of this group.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueGroup sage: DiscreteValueGroup(-3/8).gen() 3/8
-
index
(other)¶ Return the index of
other
in this group.INPUT:
other
– a subgroup of this group
EXAMPLES:
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
-
is_trivial
()¶ Return whether this is the trivial additive abelian group.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueGroup sage: DiscreteValueGroup(-3/8).is_trivial() False sage: DiscreteValueGroup(0).is_trivial() True
-
numerator
()¶ Return the numerator of a generator of this group.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueGroup sage: DiscreteValueGroup(3/8).numerator() 3
-
some_elements
()¶ Return some typical elements in this group.
EXAMPLES:
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]
-
class
sage.rings.valuation.value_group.
DiscreteValueSemigroup
(generators)¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.structure.parent.Parent
The value semigroup of a discrete valuation, an additive subsemigroup of \(\QQ\) generated by
generators
.INPUT:
generators
– rational numbers
EXAMPLES:
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
-
gens
()¶ Return the generators of this semigroup.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup sage: DiscreteValueSemigroup(-3/8).gens() (-3/8,)
-
is_group
()¶ Return whether this semigroup is a group.
EXAMPLES:
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
Invoking this method also changes the category of this semigroup if it is a group:
sage: D in AdditiveMagmas().AdditiveAssociative().AdditiveUnital().AdditiveInverse() True
-
is_trivial
()¶ Return whether this is the trivial additive abelian semigroup.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup sage: DiscreteValueSemigroup(-3/8).is_trivial() False sage: DiscreteValueSemigroup([]).is_trivial() True
-
some_elements
()¶ Return some typical elements in this semigroup.
EXAMPLES:
sage: from sage.rings.valuation.value_group import DiscreteValueSemigroup sage: list(DiscreteValueSemigroup([-3/8,1/2]).some_elements()) [0, -3/8, 1/2, ...]