|
1
2
3
4
5
6
7
|
|
Editor: page
Time: 2007/09/27 16:35:18 GMT-7
|
Note:
|
added:
\begin{axiom}
)spool pfaffian.output
)set message test on
)set message auto off
)clear all
--S 1 of 9
B0 n == matrix [[(if i=j+1 and odd? j then -1 else _
if i=j-1 and odd? i then 1 else 0) _
for j in 1..n] for i in 1..n]
--R
--R Type: Void
--E 1
--S 2 of 9
PfChar(lambda, A) ==
n := nrows A
(n = 2) => lambda^2 + A.(1,2)
M := subMatrix(A, 3, n, 3, n)
r := subMatrix(A, 1, 1, 3, n)
s := subMatrix(A, 3, n, 2, 2)
p := PfChar(lambda, M)
d := degree(p, lambda)
B := B0(n-2)
C := r*B
g := [(C*s).(1,1), A.(1,2), 1]
if d >= 4 then
B := M*B
for i in 4..d by 2 repeat
C := C*B
g := cons((C*s).(1,1), g)
g := reverse! g
res := 0
for i in 0..d by 2 for j in 2..d+2 repeat
c := coefficient(p, lambda, i)
for e in first(g, j) for k in 2..-d by -2 repeat
res := res + c * e * lambda^(k+i)
res
--R
--R Type: Void
--E 2
--S 3 of 9
pfaffian A == eval(PfChar(l, A), l=0)
--R
--R Type: Void
--E 3
--S 4 of 9
m:Matrix(Integer):=[[0,15],[-15,0]]
--R
--R + 0 15+
--R (4) | |
--R +- 15 0 +
--R Type: Matrix Integer
--E 4
--S 5 of 9
pfaffian m
--R
--R (5) 15
--R Type: Polynomial Integer
--E 5
--S 6 of 9
(a,b,c,d,e,f):=(3,5,7,11,13,17)
--R
--R (6) 17
--R Type: PositiveInteger
--E
--S 7 of 9
m1:Matrix(Integer):=[[0,a,b,c],[-a,0,d,e],[-b,-d,0,f],[-c,-e,-f,0]]
--R
--R + 0 3 5 7 +
--R | |
--R |- 3 0 11 13|
--R (7) | |
--R |- 5 - 11 0 17|
--R | |
--R +- 7 - 13 - 17 0 +
--R Type: Matrix Integer
--E 7
--S 8 of 9
m1ans:=a*f-b*e+d*c
--R
--R
--R (8) 63
--R Type: PositiveInteger
--E 8
--S 9 of 9
pfaffian m1
--R
--R Compiling function B0 with type PositiveInteger -> Matrix Integer
--R
--R (9) 63
--R Type: Polynomial Integer
--E 9
)spool
)lisp (bye)
\end{axiom}
Axiom output parse error!