# Complex RΒΆ

gaussian.spad line 542 [edit on github]

spadtype {Complex(R)} creates the domain of elements of the form `a + b * i`

where `a`

and `b`

come from the ring `R`

, and `i`

is a new element such that `i^2 = -1`

.

- 0: %
from AbelianMonoid

- 1: %
from MagmaWithUnit

- *: (%, %) -> %
from Magma

- *: (%, Fraction Integer) -> % if R has Field
from RightModule Fraction Integer

- *: (%, Integer) -> % if R has LinearlyExplicitOver Integer
from RightModule Integer

- *: (%, R) -> %
from RightModule R

- *: (Fraction Integer, %) -> % if R has Field
from LeftModule Fraction Integer

- *: (Integer, %) -> %
from AbelianGroup

- *: (NonNegativeInteger, %) -> %
from AbelianMonoid

- *: (PositiveInteger, %) -> %
from AbelianSemiGroup

- *: (R, %) -> %
from LeftModule R

- +: (%, %) -> %
from AbelianSemiGroup

- -: % -> %
from AbelianGroup

- -: (%, %) -> %
from AbelianGroup

- ^: (%, %) -> % if R has TranscendentalFunctionCategory
- ^: (%, Fraction Integer) -> % if R has RadicalCategory and R has TranscendentalFunctionCategory
from RadicalCategory

- ^: (%, Integer) -> % if R has Field
from DivisionRing

- ^: (%, NonNegativeInteger) -> %
from MagmaWithUnit

- ^: (%, PositiveInteger) -> %
from Magma

- abs: % -> % if R has RealNumberSystem
from ComplexCategory R

- acos: % -> % if R has TranscendentalFunctionCategory

- acosh: % -> % if R has TranscendentalFunctionCategory

- acot: % -> % if R has TranscendentalFunctionCategory

- acoth: % -> % if R has TranscendentalFunctionCategory

- acsc: % -> % if R has TranscendentalFunctionCategory

- acsch: % -> % if R has TranscendentalFunctionCategory

- annihilate?: (%, %) -> Boolean
from Rng

- antiCommutator: (%, %) -> %

- argument: % -> R if R has TranscendentalFunctionCategory
from ComplexCategory R

- asec: % -> % if R has TranscendentalFunctionCategory

- asech: % -> % if R has TranscendentalFunctionCategory

- asin: % -> % if R has TranscendentalFunctionCategory

- asinh: % -> % if R has TranscendentalFunctionCategory

- associates?: (%, %) -> Boolean if R has IntegralDomain
from EntireRing

- associator: (%, %, %) -> %
from NonAssociativeRng

- atan: % -> % if R has TranscendentalFunctionCategory

- atanh: % -> % if R has TranscendentalFunctionCategory

- basis: () -> Vector %
from FramedModule R

- characteristic: () -> NonNegativeInteger
from NonAssociativeRing

- characteristicPolynomial: % -> SparseUnivariatePolynomial R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- charthRoot: % -> % if R has FiniteFieldCategory
from FiniteFieldCategory

- charthRoot: % -> Union(%, failed) if % has CharacteristicNonZero and R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has CharacteristicNonZero

- coerce: % -> %
from Algebra %

- coerce: % -> OutputForm
from CoercibleTo OutputForm

- coerce: Fraction Integer -> % if R has Field or R has RetractableTo Fraction Integer
- coerce: Integer -> %
from NonAssociativeRing

- coerce: R -> %
from CoercibleFrom R

- commutator: (%, %) -> %
from NonAssociativeRng

- complex: (R, R) -> %
from ComplexCategory R

- conditionP: Matrix % -> Union(Vector %, failed) if % has CharacteristicNonZero and R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

- conjugate: % -> %
from ComplexCategory R

- convert: % -> Complex DoubleFloat if R has RealConstant
- convert: % -> Complex Float if R has RealConstant
from ConvertibleTo Complex Float

- convert: % -> InputForm if R has ConvertibleTo InputForm
from ConvertibleTo InputForm

- convert: % -> Pattern Float if R has ConvertibleTo Pattern Float
from ConvertibleTo Pattern Float

- convert: % -> Pattern Integer if R has ConvertibleTo Pattern Integer
from ConvertibleTo Pattern Integer

- convert: % -> SparseUnivariatePolynomial R
- convert: % -> Vector R
from FramedModule R

- convert: SparseUnivariatePolynomial R -> %
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- convert: Vector R -> %
from FramedModule R

- coordinates: % -> Vector R
from FramedModule R

- coordinates: (%, Vector %) -> Vector R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- coordinates: (Vector %, Vector %) -> Matrix R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- coordinates: Vector % -> Matrix R
from FramedModule R

- cos: % -> % if R has TranscendentalFunctionCategory

- cosh: % -> % if R has TranscendentalFunctionCategory

- cot: % -> % if R has TranscendentalFunctionCategory

- coth: % -> % if R has TranscendentalFunctionCategory

- createPrimitiveElement: () -> % if R has FiniteFieldCategory
from FiniteFieldCategory

- csc: % -> % if R has TranscendentalFunctionCategory

- csch: % -> % if R has TranscendentalFunctionCategory

- D: % -> % if R has DifferentialRing
from DifferentialRing

- D: (%, List Symbol) -> % if R has PartialDifferentialRing Symbol
- D: (%, List Symbol, List NonNegativeInteger) -> % if R has PartialDifferentialRing Symbol
- D: (%, NonNegativeInteger) -> % if R has DifferentialRing
from DifferentialRing

- D: (%, R -> R) -> %
from DifferentialExtension R

- D: (%, R -> R, NonNegativeInteger) -> %
from DifferentialExtension R

- D: (%, Symbol) -> % if R has PartialDifferentialRing Symbol
- D: (%, Symbol, NonNegativeInteger) -> % if R has PartialDifferentialRing Symbol

- definingPolynomial: () -> SparseUnivariatePolynomial R
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- derivationCoordinates: (Vector %, R -> R) -> Matrix R if R has Field
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- differentiate: % -> % if R has DifferentialRing
from DifferentialRing

- differentiate: (%, List Symbol) -> % if R has PartialDifferentialRing Symbol
- differentiate: (%, List Symbol, List NonNegativeInteger) -> % if R has PartialDifferentialRing Symbol
- differentiate: (%, NonNegativeInteger) -> % if R has DifferentialRing
from DifferentialRing

- differentiate: (%, R -> R) -> %
from DifferentialExtension R

- differentiate: (%, R -> R, NonNegativeInteger) -> %
from DifferentialExtension R

- differentiate: (%, Symbol) -> % if R has PartialDifferentialRing Symbol
- differentiate: (%, Symbol, NonNegativeInteger) -> % if R has PartialDifferentialRing Symbol

- discreteLog: % -> NonNegativeInteger if R has FiniteFieldCategory
from FiniteFieldCategory

- discreteLog: (%, %) -> Union(NonNegativeInteger, failed) if R has FiniteFieldCategory

- discriminant: () -> R
from FramedAlgebra(R, SparseUnivariatePolynomial R)

- discriminant: Vector % -> R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- divide: (%, %) -> Record(quotient: %, remainder: %) if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- euclideanSize: % -> NonNegativeInteger if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- eval: (%, Equation R) -> % if R has Evalable R
from Evalable R

- eval: (%, List Equation R) -> % if R has Evalable R
from Evalable R

- eval: (%, List R, List R) -> % if R has Evalable R
from InnerEvalable(R, R)

- eval: (%, List Symbol, List R) -> % if R has InnerEvalable(Symbol, R)
from InnerEvalable(Symbol, R)

- eval: (%, R, R) -> % if R has Evalable R
from InnerEvalable(R, R)

- eval: (%, Symbol, R) -> % if R has InnerEvalable(Symbol, R)
from InnerEvalable(Symbol, R)

- exp: % -> % if R has TranscendentalFunctionCategory

- expressIdealMember: (List %, %) -> Union(List %, failed) if R has Field or R has IntegerNumberSystem
from PrincipalIdealDomain

- exquo: (%, %) -> Union(%, failed) if R has IntegralDomain
from EntireRing

- exquo: (%, R) -> Union(%, failed) if R has IntegralDomain
from ComplexCategory R

- extendedEuclidean: (%, %) -> Record(coef1: %, coef2: %, generator: %) if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- extendedEuclidean: (%, %, %) -> Union(Record(coef1: %, coef2: %), failed) if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- factor: % -> Factored % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has Field or R has IntegerNumberSystem

- factorPolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

- factorsOfCyclicGroupSize: () -> List Record(factor: Integer, exponent: NonNegativeInteger) if R has FiniteFieldCategory
from FiniteFieldCategory

- factorSquareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

- gcd: (%, %) -> % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field
from GcdDomain

- gcd: List % -> % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field
from GcdDomain

- gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field

- generator: () -> %
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- hash: % -> SingleInteger if R has Hashable
from Hashable

- hashUpdate!: (HashState, %) -> HashState if R has Hashable
from Hashable

- imag: % -> R
from ComplexCategory R

- imaginary: () -> %
from ComplexCategory R

- index: PositiveInteger -> % if R has Finite
from Finite

- init: % if R has FiniteFieldCategory
from StepThrough

- inv: % -> % if R has Field
from DivisionRing

- latex: % -> String
from SetCategory

- lcm: (%, %) -> % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field
from GcdDomain

- lcm: List % -> % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field
from GcdDomain

- lcmCoef: (%, %) -> Record(llcm_res: %, coeff1: %, coeff2: %) if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field
from LeftOreRing

- leftPower: (%, NonNegativeInteger) -> %
from MagmaWithUnit

- leftPower: (%, PositiveInteger) -> %
from Magma

- leftRecip: % -> Union(%, failed)
from MagmaWithUnit

- lift: % -> SparseUnivariatePolynomial R
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- log: % -> % if R has TranscendentalFunctionCategory

- lookup: % -> PositiveInteger if R has Finite
from Finite

- map: (R -> R, %) -> %
from FullyEvalableOver R

- minimalPolynomial: % -> SparseUnivariatePolynomial R if R has Field
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- multiEuclidean: (List %, %) -> Union(List %, failed) if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- nextItem: % -> Union(%, failed) if R has FiniteFieldCategory
from StepThrough

- norm: % -> R
from ComplexCategory R

- nthRoot: (%, Integer) -> % if R has RadicalCategory and R has TranscendentalFunctionCategory
from RadicalCategory

- OMwrite: % -> String if R has OpenMath
from OpenMath

- OMwrite: (%, Boolean) -> String if R has OpenMath
from OpenMath

- OMwrite: (OpenMathDevice, %) -> Void if R has OpenMath
from OpenMath

- OMwrite: (OpenMathDevice, %, Boolean) -> Void if R has OpenMath
from OpenMath

- one?: % -> Boolean
from MagmaWithUnit

- opposite?: (%, %) -> Boolean
from AbelianMonoid

- order: % -> OnePointCompletion PositiveInteger if R has FiniteFieldCategory
- order: % -> PositiveInteger if R has FiniteFieldCategory
from FiniteFieldCategory

- patternMatch: (%, Pattern Float, PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if R has PatternMatchable Float
from PatternMatchable Float

- patternMatch: (%, Pattern Integer, PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %) if R has PatternMatchable Integer
from PatternMatchable Integer

- pi: () -> % if R has TranscendentalFunctionCategory

- plenaryPower: (%, PositiveInteger) -> %
from NonAssociativeAlgebra %

- polarCoordinates: % -> Record(r: R, phi: R) if R has RealNumberSystem and R has TranscendentalFunctionCategory
from ComplexCategory R

- prime?: % -> Boolean if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has Field or R has IntegerNumberSystem

- primeFrobenius: % -> % if R has FiniteFieldCategory
- primeFrobenius: (%, NonNegativeInteger) -> % if R has FiniteFieldCategory

- primitive?: % -> Boolean if R has FiniteFieldCategory
from FiniteFieldCategory

- primitiveElement: () -> % if R has FiniteFieldCategory
from FiniteFieldCategory

- principalIdeal: List % -> Record(coef: List %, generator: %) if R has Field or R has IntegerNumberSystem
from PrincipalIdealDomain

- quo: (%, %) -> % if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- rank: () -> PositiveInteger
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- rational?: % -> Boolean if R has IntegerNumberSystem
from ComplexCategory R

- rational: % -> Fraction Integer if R has IntegerNumberSystem
from ComplexCategory R

- rationalIfCan: % -> Union(Fraction Integer, failed) if R has IntegerNumberSystem
from ComplexCategory R

- real: % -> R
from ComplexCategory R

- recip: % -> Union(%, failed)
from MagmaWithUnit

- reduce: Fraction SparseUnivariatePolynomial R -> Union(%, failed) if R has Field
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- reduce: SparseUnivariatePolynomial R -> %
from MonogenicAlgebra(R, SparseUnivariatePolynomial R)

- reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix Integer, vec: Vector Integer) if R has LinearlyExplicitOver Integer
- reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix R, vec: Vector R)
from LinearlyExplicitOver R

- reducedSystem: Matrix % -> Matrix Integer if R has LinearlyExplicitOver Integer
- reducedSystem: Matrix % -> Matrix R
from LinearlyExplicitOver R

- regularRepresentation: % -> Matrix R
from FramedAlgebra(R, SparseUnivariatePolynomial R)

- regularRepresentation: (%, Vector %) -> Matrix R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- rem: (%, %) -> % if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- representationType: () -> Union(prime, polynomial, normal, cyclic) if R has FiniteFieldCategory
from FiniteFieldCategory

- represents: (Vector R, Vector %) -> %
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- represents: Vector R -> %
from FramedModule R

- retract: % -> Fraction Integer if R has RetractableTo Fraction Integer
from RetractableTo Fraction Integer

- retract: % -> Integer if R has RetractableTo Integer
from RetractableTo Integer

- retract: % -> R
from RetractableTo R

- retractIfCan: % -> Union(Fraction Integer, failed) if R has RetractableTo Fraction Integer
from RetractableTo Fraction Integer

- retractIfCan: % -> Union(Integer, failed) if R has RetractableTo Integer
from RetractableTo Integer

- retractIfCan: % -> Union(R, failed)
from RetractableTo R

- rightPower: (%, NonNegativeInteger) -> %
from MagmaWithUnit

- rightPower: (%, PositiveInteger) -> %
from Magma

- rightRecip: % -> Union(%, failed)
from MagmaWithUnit

- sample: %
from AbelianMonoid

- sec: % -> % if R has TranscendentalFunctionCategory

- sech: % -> % if R has TranscendentalFunctionCategory

- sin: % -> % if R has TranscendentalFunctionCategory

- sinh: % -> % if R has TranscendentalFunctionCategory

- size: () -> NonNegativeInteger if R has Finite
from Finite

- sizeLess?: (%, %) -> Boolean if R has Field or R has IntegerNumberSystem
from EuclideanDomain

- smaller?: (%, %) -> Boolean if R has Comparable
from Comparable

- solveLinearPolynomialEquation: (List SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> Union(List SparseUnivariatePolynomial %, failed) if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

- sqrt: % -> % if R has RadicalCategory and R has TranscendentalFunctionCategory
from RadicalCategory

- squareFree: % -> Factored % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has Field or R has IntegerNumberSystem

- squareFreePart: % -> % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has Field or R has IntegerNumberSystem

- squareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

- subtractIfCan: (%, %) -> Union(%, failed)

- tableForDiscreteLogarithm: Integer -> Table(PositiveInteger, NonNegativeInteger) if R has FiniteFieldCategory
from FiniteFieldCategory

- tan: % -> % if R has TranscendentalFunctionCategory

- tanh: % -> % if R has TranscendentalFunctionCategory

- trace: % -> R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- traceMatrix: () -> Matrix R
from FramedAlgebra(R, SparseUnivariatePolynomial R)

- traceMatrix: Vector % -> Matrix R
from FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

- unit?: % -> Boolean if R has IntegralDomain
from EntireRing

- unitCanonical: % -> % if R has IntegralDomain
from EntireRing

- unitNormal: % -> Record(unit: %, canonical: %, associate: %) if R has IntegralDomain
from EntireRing

- zero?: % -> Boolean
from AbelianMonoid

Algebra %

Algebra Fraction Integer if R has Field

Algebra R

arbitraryPrecision if R has arbitraryPrecision

ArcHyperbolicFunctionCategory if R has TranscendentalFunctionCategory

ArcTrigonometricFunctionCategory if R has TranscendentalFunctionCategory

BiModule(%, %)

BiModule(Fraction Integer, Fraction Integer) if R has Field

BiModule(R, R)

canonicalsClosed if R has Field

canonicalUnitNormal if R has Field

CharacteristicNonZero if R has CharacteristicNonZero

CharacteristicZero if R has CharacteristicZero

CoercibleFrom Fraction Integer if R has RetractableTo Fraction Integer

CoercibleFrom Integer if R has RetractableTo Integer

Comparable if R has Comparable

ConvertibleTo Complex DoubleFloat if R has RealConstant

ConvertibleTo Complex Float if R has RealConstant

ConvertibleTo InputForm if R has ConvertibleTo InputForm

ConvertibleTo Pattern Float if R has ConvertibleTo Pattern Float

ConvertibleTo Pattern Integer if R has ConvertibleTo Pattern Integer

ConvertibleTo SparseUnivariatePolynomial R

DifferentialRing if R has DifferentialRing

DivisionRing if R has Field

ElementaryFunctionCategory if R has TranscendentalFunctionCategory

Eltable(R, %) if R has Eltable(R, R)

EntireRing if R has IntegralDomain

EuclideanDomain if R has Field or R has IntegerNumberSystem

Evalable R if R has Evalable R

FieldOfPrimeCharacteristic if R has FiniteFieldCategory

FiniteFieldCategory if R has FiniteFieldCategory

FiniteRankAlgebra(R, SparseUnivariatePolynomial R)

FramedAlgebra(R, SparseUnivariatePolynomial R)

GcdDomain if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field

HyperbolicFunctionCategory if R has TranscendentalFunctionCategory

InnerEvalable(R, R) if R has Evalable R

InnerEvalable(Symbol, R) if R has InnerEvalable(Symbol, R)

IntegralDomain if R has IntegralDomain

LeftModule Fraction Integer if R has Field

LeftOreRing if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has IntegerNumberSystem or R has Field

LinearlyExplicitOver Integer if R has LinearlyExplicitOver Integer

Module %

Module Fraction Integer if R has Field

Module R

MonogenicAlgebra(R, SparseUnivariatePolynomial R)

multiplicativeValuation if R has IntegerNumberSystem

NonAssociativeAlgebra Fraction Integer if R has Field

noZeroDivisors if R has IntegralDomain

PartialDifferentialRing Symbol if R has PartialDifferentialRing Symbol

PatternMatchable Float if R has PatternMatchable Float

PatternMatchable Integer if R has PatternMatchable Integer

PolynomialFactorizationExplicit if R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has FiniteFieldCategory

PrincipalIdealDomain if R has Field or R has IntegerNumberSystem

RadicalCategory if R has RadicalCategory and R has TranscendentalFunctionCategory

RetractableTo Fraction Integer if R has RetractableTo Fraction Integer

RetractableTo Integer if R has RetractableTo Integer

RightModule Fraction Integer if R has Field

RightModule Integer if R has LinearlyExplicitOver Integer

StepThrough if R has FiniteFieldCategory

TranscendentalFunctionCategory if R has TranscendentalFunctionCategory

TrigonometricFunctionCategory if R has TranscendentalFunctionCategory

UniqueFactorizationDomain if R has IntegerNumberSystem or R has EuclideanDomain and R has PolynomialFactorizationExplicit or R has Field