define LinearCombinationType(R: AdditiveType): Category == AdditiveType with { *: (R, %) -> %; add!: (%, R, %) -> %; times!: (R, %) -> %; .................... } define LinearArithmeticType(R: Join(AdditiveType, ExpressionType)): Category == Join(ArithmeticType, ExpressionType, LinearCombinationType(R)) with { ^: (%, AldorInteger) -> %; coerce: R -> %; .......................... } define MonogenicLinearArithmeticType(R: Join(ArithmeticType, ExpressionType)): Category == with { apply: (%, ExpressionTree) -> ExpressionTree; apply: (TextWriter, %, Symbol) -> TextWriter; coefficients: % -> Generator(R); ........................ } define MonogenicAlgebra(R: Join(ArithmeticType, ExpressionType)): Category == .......................................... coerce: Vector(R) -> % if (R has GcdDomain) then content: (%) -> R primitive: (%) -> (R, %) primitivePart: (%) -> % .......................................... define UnivariatePolynomialAlgebra(R: Join(ArithmeticType, ExpressionType)): Category == .......................................... compose: (%, %) -> %; define UnivariatePolynomialCategory0(R: Join(ExpressionType, ArithmeticType)): Category == if (R has Field) then EuclideanDomain define UnivariatePolynomialCategory(R: Join(ExpressionType, ArithmeticType)): Category == if (R has FactorizationRing) then factor(p: %): R, Product(%) == .. }
Will be discussed in more detail during next lectures