General Functions

Some of the functions provided by &HAPprime; are not specifically aimed at homological algebra or extending the &HAP; package. The functions in this chapter, which are used internally by &HAPprime; extend some of the standard &GAP; functions and datatypes.

Matrices

See in the &GAP; reference manual for the standard &GAP; matrix functions.

<#Include Label="SumIntersectionMatDestructive_manBaseMat"> <#Include Label="SolutionMat_manBaseMat"> <#Include Label="IsSameSubspace_manBaseMat"> <#Include Label="PrintDimensionsMat_manBaseMat">

Polynomials

See in the &GAP; reference manual for the functions provided by &GAP; for representing an manipulating polynomials.

<#Include Label="TermsOfPolynomial_manPolynomial"> <#Include Label="UnivariateMonomialsOfMonomial_manPolynomial"> <#Include Label="IndeterminateAndCoefficientOfUnivariateMonomial_manPolynomial"> <#Include Label="ReduceIdeal_manPolynomial"> <#Include Label="ReducePolynomialRingPresentation_manPolynomial">

Examples
gap> ring := PolynomialRing(Integers, 2);; gap> i := IndeterminatesOfPolynomialRing(ring);; gap> poly := i[1] + i[1]*i[2]^2 + 3*i[2]^3; x_1*x_2^2+3*x_2^3+x_1 gap> terms := TermsOfPolynomial(poly); [ [ x_1, 1 ], [ x_2^3, 3 ], [ x_1*x_2^2, 1 ] ] gap> UnivariateMonomialsOfMonomial(terms[3][1]); [ x_1, x_2^2 ] gap> IndeterminateAndCoefficientOfUnivariateMonomial(last[2]); [ x_2, 2 ]
gap> ring := PolynomialRing(GF(2), 2);; gap> i := IndeterminatesOfPolynomialRing(ring);; gap> I := [i[1]^2 + i[2], i[1]^3 + i[2]^3]; [ x_1^2+x_2, x_1^3+x_2^3 ] gap> ReduceIdeal(I, MonomialLexOrdering()); [ x_1^2+x_2, x_2^3+x_1*x_2 ]
gap> ring := PolynomialRing(GF(2), 3);; gap> i := IndeterminatesOfPolynomialRing(ring);; gap> ideal := [ i[3]^2 + i[1] + i[2] ]; [ x_3^2+x_1+x_2 ] gap> ReducePolynomialRingPresentation(ring, ideal); [ GF(2)[x_1,x_3], [ ] ]