/usr/share/axiom-20170501/src/algebra/ZLINDEP.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | )abbrev package ZLINDEP IntegerLinearDependence
++ Author: Manuel Bronstein
++ Date Last Updated: 14 May 1991
++ Description:
++ Test for linear dependence over the integers.
IntegerLinearDependence(R) : SIG == CODE where
R: LinearlyExplicitRingOver Integer
Z ==> Integer
SIG ==> with
linearlyDependentOverZ? : Vector R -> Boolean
++ \spad{linearlyDependentOverZ?([v1,...,vn])} returns true if the
++ vi's are linearly dependent over the integers, false otherwise.
linearDependenceOverZ : Vector R -> Union(Vector Z, "failed")
++ \spad{linearlyDependenceOverZ([v1,...,vn])} returns
++ \spad{[c1,...,cn]} if
++ \spad{c1*v1 + ... + cn*vn = 0} and not all the ci's are 0, "failed"
++ if the vi's are linearly independent over the integers.
solveLinearlyOverQ : (Vector R, R) ->
Union(Vector Fraction Z, "failed")
++ \spad{solveLinearlyOverQ([v1,...,vn], u)} returns \spad{[c1,...,cn]}
++ such that \spad{c1*v1 + ... + cn*vn = u},
++ "failed" if no such rational numbers ci's exist.
CODE ==> add
import LinearDependence(Z, R)
linearlyDependentOverZ? v == linearlyDependent? v
linearDependenceOverZ v == linearDependence v
solveLinearlyOverQ(v, c) == solveLinear(v, c)
|