$SPAD/src/input lindep.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool lindep.output
)set message test on
)set message auto off
)clear all
--S 1 of 10
v(i:INT):DIRPROD(5, FRAC INT) ==
   directProduct vector [i / (i + j) for j in 0..4]
--R
--R   Function declaration v : Integer -> DirectProduct(5,Fraction(Integer
--R      )) has been added to workspace.
--R                                                                   Type: Void
--E 1

———-

Create several elements of Q^{5} — * —

--S 2 of 10
V := vector [v i for i in 1..6]
--R
--R   Compiling function v with type Integer -> DirectProduct(5,Fraction(
--R      Integer))
--R
--R   (2)
--R       1 1 1 1     2 1 2 1     3 3 1 3     4 2 4 1     5 5 5 5     6 3 2 3
--R   [[1,-,-,-,-],[1,-,-,-,-],[1,-,-,-,-],[1,-,-,-,-],[1,-,-,-,-],[1,-,-,-,-]]
--R       2 3 4 5     3 2 5 3     4 5 2 7     5 3 7 2     6 7 8 9     7 4 3 5
--R                             Type: Vector(DirectProduct(5,Fraction(Integer)))
--E 2

———-

Are they linearly dependent over Z?

— * —

--S 3 of 10
linearlyDependentOverZ? V
--R

--R
--R   (3)  true
--R                                                                Type: Boolean
--E 3

———-

Get the linear dependence relation over Z explicitly — * —

--S 4 of 10
linearDependenceOverZ V
--R
--R
--R   (4)  [- 1,15,- 70,140,- 126,42]
--R                                             Type: Union(Vector(Integer),...)
--E 4

———-

The Vi’s are linearly dependent, express V.2 in terms of the others — * —

--S 5 of 10
solveLinearlyOverQ(delete(V, 2), V.2)
--R
--R
--R          1 14   28 42   14
--R   (5)  [--,--,- --,--,- --]
--R         15  3    3  5    5
--R                                   Type: Union(Vector(Fraction(Integer)),...)
--E 5
--S 6 of 10
w(i:INT):SQMATRIX(2, INT) ==
   squareMatrix matrix [[i, i + 1], [i - 1, -i]]
--R
--R   Function declaration w : Integer -> SquareMatrix(2,Integer) has been
--R      added to workspace.
--R                                                                   Type: Void
--E 6

———-

Create several elements of Z(2)

— * —

--S 7 of 10
W := vector [w i for i in 1..3]
--R
--R   Compiling function w with type Integer -> SquareMatrix(2,Integer)

--R
--R         +1   2 + +2   3 + +3   4 +
--R   (7)  [|      |,|      |,|      |]
--R         +0  - 1+ +1  - 2+ +2  - 3+
--R                                        Type: Vector(SquareMatrix(2,Integer))
--E 7

———-

Are they linearly dependent over Z?

— * —

--S 8 of 10
linearlyDependentOverZ? W
--R
--R
--R   (8)  true
--R                                                                Type: Boolean
--E 8

———-

Get the linear dependence relation over Z explicitly — * —

--S 9 of 10
linearDependenceOverZ W
--R
--R
--R   (9)  [1,- 2,1]
--R                                             Type: Union(Vector(Integer),...)
--E 9

———-

The Wi’s are linearly dependent, express W.2 in terms of the others — * —

--S 10 of 10
solveLinearlyOverQ(delete(W, 2), W.2)
--R
--R
--R          1 1
--R   (10)  [-,-]
--R          2 2
--R                                   Type: Union(Vector(Fraction(Integer)),...)
--E 10
)spool
)lisp (bye)

———-

References^{[1] nothing}

6