ParametricLinearEquations(R, Var, Expon, GR)¶
pleqn.spad line 1 [edit on github]
R: Join(EuclideanDomain, PolynomialFactorizationExplicit, CharacteristicZero)
Var: Join(OrderedSet, ConvertibleTo Symbol)
Expon: OrderedAbelianMonoidSup
GR: PolynomialCategory(R, Expon, Var)
This package completely solves a parametric linear system of equations by decomposing the set of all parametric values for which the linear system is consistent into a union of quasi-algebraic sets (which need not be irredundant, but most of the time is). Each quasi-algebraic set is described by a list of polynomials that vanish on the set, and a list of polynomials that vanish at no point of the set. For each quasi-algebraic set, the solution of the linear system is given, as a particular solution and a basis of the homogeneous system. The parametric linear system should be given in matrix form, with a coefficient matrix and a right hand side vector. The entries of the coefficient matrix and right hand side vector should be polynomials in the parametric variables, over a Euclidean domain of characteristic zero. If the system is homogeneous, the right hand side need not be given. The right hand side can also be replaced by an indeterminate vector, in which case, the conditions required for consistency will also be given.
- B1solve: Record(mat: Matrix Fraction Polynomial R, vec: List Fraction Polynomial R, rank: NonNegativeInteger, rows: List Integer, cols: List Integer) -> Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R)
B1solve(s)
solves the system (s
.mat)z
=s
.vec for the variables given by the column indices ofs
.cols in terms of the other variables and the right hand sides
.vec by assuming that the rank iss
.rank, that the system is consistent, with the linearly independent equations indexed by the given row indicess
.rows; the coefficients ins
.mat involving parameters are treated as polynomials. B1solve(s
) returns a particular solution to the system and a basis of the homogeneous system (s
.mat)z
= 0.
- bsolve: (Matrix GR, List Fraction Polynomial R, NonNegativeInteger, String, Integer) -> Record(rgl: List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R)), rgsz: Integer)
bsolve(c, w, r, s, m)
returns a list of regimes and solutions of the systemc
z
=w
for ranks at leastr
; depending on the modem
chosen, it writes the output to a file given by the strings
.
- dmp2rfi: GR -> Fraction Polynomial R
dmp2rfi(p)
convertsp
to target domain
- dmp2rfi: List GR -> List Fraction Polynomial R
dmp2rfi(l)
convertsl
to target domain
- dmp2rfi: Matrix GR -> Matrix Fraction Polynomial R
dmp2rfi(m)
convertsm
to target domain
- factorset: GR -> List GR
factorset(p)
returns the set of irreducible factors ofp
.
- hasoln: (List GR, List GR) -> Record(sysok: Boolean, z0: List GR, n0: List GR)
hasoln(g, l)
tests whether the quasi-algebraic set defined byp
= 0 forp
ing
andq
~=
0 forq
inl
is empty or not and returns a simplified definition of the quasi-algebraic set
- inconsistent?: List GR -> Boolean
inconsistent?(pl)
returnstrue
if the system of equationsp
= 0 forp
inpl
is inconsistent. It is assumed thatpl
is a groebner basis.
- inconsistent?: List Polynomial R -> Boolean
inconsistent?(pl)
returnstrue
if the system of equationsp
= 0 forp
inpl
is inconsistent. It is assumed thatpl
is a groebner basis.
- maxrank: List Record(rank: NonNegativeInteger, eqns: List Record(det: GR, rows: List Integer, cols: List Integer), fgb: List GR) -> NonNegativeInteger
maxrank(r)
returns the maximum rank in the listr
of regimes
- minrank: List Record(rank: NonNegativeInteger, eqns: List Record(det: GR, rows: List Integer, cols: List Integer), fgb: List GR) -> NonNegativeInteger
minrank(r)
returns the minimum rank in the listr
of regimes
- minset: List List GR -> List List GR
minset(sl)
returns the sublist ofsl
consisting of the minimal lists (with respect to inclusion) in the listsl
of lists
- nextSublist: (Integer, Integer) -> List List Integer
nextSublist(n, k)
returns a list ofk
-subsets of {1, …,n
}.
- overset?: (List GR, List List GR) -> Boolean
overset?(s, sl)
returnstrue
ifs
properly a sublist of a member ofsl
; otherwise it returnsfalse
- ParCond: (Matrix GR, NonNegativeInteger) -> List Record(det: GR, rows: List Integer, cols: List Integer)
ParCond(m, k)
returns the list of allk
byk
subdeterminants in the matrixm
- ParCondList: (Matrix GR, NonNegativeInteger) -> List Record(rank: NonNegativeInteger, eqns: List Record(det: GR, rows: List Integer, cols: List Integer), fgb: List GR)
ParCondList(c, r)
computes a list of subdeterminants of each rank>=
r
of the matrixc
and returns a groebner basis for the ideal they generate
- pr2dmp: Polynomial R -> GR
pr2dmp(p)
convertsp
to target domain
- psolve: (Matrix GR, List GR) -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c, w)
solvesc
z
=w
for all possible ranks of the matrixc
and given right hand side vectorw
- psolve: (Matrix GR, List GR, PositiveInteger) -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c, w, k)
solvesc
z
=w
for all possible ranks>=
k
of the matrixc
and given right hand side vectorw
- psolve: (Matrix GR, List GR, PositiveInteger, String) -> Integer
psolve(c, w, k, s)
solvesc
z
=w
for all possible ranks>=
k
of the matrixc
and given right hand sidew
, writes the results to a file nameds
, and returns the number of regimes
- psolve: (Matrix GR, List GR, String) -> Integer
psolve(c, w, s)
solvesc
z
=w
for all possible ranks of the matrixc
and given right hand side vectorw
, writes the results to a file nameds
, and returns the number of regimes
- psolve: (Matrix GR, List Symbol) -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c, w)
solvesc
z
=w
for all possible ranks of the matrixc
and indeterminate right hand sidew
- psolve: (Matrix GR, List Symbol, PositiveInteger) -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c, w, k)
solvesc
z
=w
for all possible ranks>=
k
of the matrixc
and indeterminate right hand sidew
- psolve: (Matrix GR, List Symbol, PositiveInteger, String) -> Integer
psolve(c, w, k, s)
solvesc
z
=w
for all possible ranks>=
k
of the matrixc
and indeterminate right hand sidew
, writes the results to a file nameds
, and returns the number of regimes
- psolve: (Matrix GR, List Symbol, String) -> Integer
psolve(c, w, s)
solvesc
z
=w
for all possible ranks of the matrixc
and indeterminate right hand sidew
, writes the results to a file nameds
, and returns the number of regimes
- psolve: (Matrix GR, PositiveInteger) -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c)
solves the homogeneous linear systemc
z
= 0 for all possible ranks>=
k
of the matrixc
- psolve: (Matrix GR, PositiveInteger, String) -> Integer
psolve(c, k, s)
solvesc
z
= 0 for all possible ranks>=
k
of the matrixc
, writes the results to a file nameds
, and returns the number of regimes
- psolve: (Matrix GR, String) -> Integer
psolve(c, s)
solvesc
z
= 0 for all possible ranks of the matrixc
and given right hand side vectorw
, writes the results to a file nameds
, and returns the number of regimes
- psolve: Matrix GR -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
psolve(c)
solves the homogeneous linear systemc
z
= 0 for all possible ranks of the matrixc
- rdregime: String -> List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
rdregime(s)
reads in a list from a file with names
- redmat: (Matrix GR, List GR) -> Matrix GR
redmat(m, g)
returns a matrix whose entries are those ofm
modulo the ideal generated by the groebner basisg
- redpps: (Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R), List GR) -> Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R)
redpps(s, g)
returns the simplified form ofs
after reducing modulo a groebner basisg
- regime: (Record(det: GR, rows: List Integer, cols: List Integer), Matrix GR, List Fraction Polynomial R, List List GR, NonNegativeInteger, NonNegativeInteger, Integer) -> Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R))
regime(y, c, w, p, r, rm, m)
returns a regime, a list of polynomials specifying the consistency conditions, a particular solution and basis representing the general solution of the parametric linear systemc
z
=w
on that regime. The regime returned depends on the subdeterminanty
.det and the row and column indices. The solutions are simplified using the assumption that the system has rankr
and maximum rankrm
. The listp
represents a list of list of factors of polynomials in a groebner basis of the ideal generated by higher order subdeterminants, and ius used for the simplification. The modem
distinguishes the cases when the system is homogeneous, or the right hand side is arbitrary, or when there is no new right hand side variables.
- se2rfi: List Symbol -> List Fraction Polynomial R
se2rfi(l)
convertsl
to target domain
- sqfree: GR -> GR
sqfree(p)
returns the product of square free factors ofp
- wrregime: (List Record(eqzro: List GR, neqzro: List GR, wcond: List Polynomial R, bsoln: Record(partsol: Vector Fraction Polynomial R, basis: List Vector Fraction Polynomial R)), String) -> Integer
wrregime(l, s)
writes a list of regimes to a file nameds
and returns the number of regimes written