def __init__(self): r""" TESTS:: sage: from sage.rings.valuation.value_group import DiscreteValuationCodomain sage: isinstance(QQ.valuation(2).codomain(), DiscreteValuationCodomain) True """ from sage.sets.finite_enumerated_set import FiniteEnumeratedSet from sage.categories.additive_monoids import AdditiveMonoids UniqueRepresentation.__init__(self) Parent.__init__(self, facade=(QQ, FiniteEnumeratedSet([infinity, -infinity])), category=AdditiveMonoids())
def __init__(self, generator): r""" TESTS:: sage: from sage.rings.valuation.value_group import DiscreteValueGroup sage: isinstance(DiscreteValueGroup(0), DiscreteValueGroup) True """ from sage.categories.modules import Modules self._generator = generator # We can not set the facade to DiscreteValuationCodomain since there # are some issues with iterated facades currently UniqueRepresentation.__init__(self) Parent.__init__(self, facade=QQ, category=Modules(ZZ))
def __init__(self): r""" TESTS:: sage: sys.path.append(os.getcwd()); from mac_lane import * # optional: standalone sage: isinstance(pAdicValuation(QQ, 2).codomain(), DiscreteValuationCodomain) True """ from sage.sets.finite_enumerated_set import FiniteEnumeratedSet from sage.categories.additive_monoids import AdditiveMonoids UniqueRepresentation.__init__(self) Parent.__init__(self, facade=(QQ, FiniteEnumeratedSet([infinity, -infinity])), category=AdditiveMonoids())
def __init__(self, generator): r""" TESTS:: sage: sys.path.append(os.getcwd()); from mac_lane import * # optional: standalone sage: isinstance(DiscreteValueGroup(0), DiscreteValueGroup) True """ from sage.categories.modules import Modules self._generator = generator # We can not set the facade to DiscreteValuationCodomain since there # are some issues with iterated facades currently UniqueRepresentation.__init__(self) Parent.__init__(self, facade=QQ, category=Modules(ZZ))
def __init__(self, parent, base): r""" TESTS:: sage: from henselization import * sage: K = QQ.henselization(2) sage: R.<x> = K[] sage: L = K.extension(x^2 + x + 1) sage: f = L.module()[2] sage: from sage.rings.padics.henselization.maps import HenselizationToVectorSpace sage: isinstance(f, HenselizationToVectorSpace) True """ Morphism.__init__(self, parent) UniqueRepresentation.__init__(self) self._base = base
def __init__(self, parent, base): r""" TESTS:: sage: sys.path.append(os.getcwd()); from completion import * sage: v = pAdicValuation(QQ, 2) sage: K = Completion(QQ, v) sage: R.<x> = K[] sage: L = K.extension(x^2 + x + 1) sage: f = L.vector_space()[2] sage: isinstance(f, CompletionToVectorSpace) True """ Morphism.__init__(self, parent) UniqueRepresentation.__init__(self) self._base = base