Discussion:
[Axiom-math] Re: pfaffian.input.pamphlet
Martin Rubey
2007-09-30 01:10:11 UTC
Permalink
Martin,
I've been studying Pfaffian systems (related to robotics, a field I
know a bit about). It seems that your algorithm does not work for
z:SQMATRIX(2,INT):=[[0,0],[0,0]]
m:SQMATRIX(2,INT):=[[0,1],[-1,0]]
m2:SQMATRIX(4,SQMATRIX(2,INT)):=[[m,z,z,z],[z,m,z,z],[z,z,m,z],[z,z,z,m]]
which should be 1*1*1*1 = 1
Am I doing something wrong?
The matrix m2 is not skew-symmetric: it should be zero along the diagonal, but
it contains m along the diagonal. Try the following instead:

(19) -> z:SQMATRIX(2,INT):=[[0,0],[0,0]]; m:SQMATRIX(2,INT):=[[0,1],[-1,0]];
m2:= matrix [[z,m,m,m],[-m,z,z,z],[-m,z,z,m],[-m,z,-m,z]]

+ +0 0+ + 0 1+ + 0 1+ + 0 1++
| | | | | | | | ||
| +0 0+ +- 1 0+ +- 1 0+ +- 1 0+|
| |
|+0 - 1+ +0 0+ +0 0+ +0 0+ |
|| | | | | | | | |
|+1 0 + +0 0+ +0 0+ +0 0+ |
(19) | |
|+0 - 1+ +0 0+ +0 0+ + 0 1+|
|| | | | | | | ||
|+1 0 + +0 0+ +0 0+ +- 1 0+|
| |
|+0 - 1+ +0 0+ +0 - 1+ +0 0+ |
|| | | | | | | | |
++1 0 + +0 0+ +1 0 + +0 0+ +
Type: Matrix SquareMatrix(2,Integer)
(20) -> PfChar(l, m2)

4 + 0 2+ 2 +- 1 0 +
(20) l + | |l + | |
+- 2 0+ + 0 - 1+
Type: Polynomial SquareMatrix(2,Integer)

So, the Pfaffian is

+- 1 0 +
| |
+ 0 - 1+

In particular, look at its type: the Pfaffiam is an element of the groung ring.

Martin
root
2007-09-30 02:32:24 UTC
Permalink
Post by Martin Rubey
Martin,
I've been studying Pfaffian systems (related to robotics, a field I
know a bit about). It seems that your algorithm does not work for
z:SQMATRIX(2,INT):=[[0,0],[0,0]]
m:SQMATRIX(2,INT):=[[0,1],[-1,0]]
m2:SQMATRIX(4,SQMATRIX(2,INT)):=[[m,z,z,z],[z,m,z,z],[z,z,m,z],[z,z,z,m]]
which should be 1*1*1*1 = 1
Am I doing something wrong?
The matrix m2 is not skew-symmetric: it should be zero along the diagonal, but
(19) -> z:SQMATRIX(2,INT):=[[0,0],[0,0]]; m:SQMATRIX(2,INT):=[[0,1],[-1,0]];
m2:= matrix [[z,m,m,m],[-m,z,z,z],[-m,z,z,m],[-m,z,-m,z]]
+ +0 0+ + 0 1+ + 0 1+ + 0 1++
| | | | | | | | ||
| +0 0+ +- 1 0+ +- 1 0+ +- 1 0+|
| |
|+0 - 1+ +0 0+ +0 0+ +0 0+ |
|| | | | | | | | |
|+1 0 + +0 0+ +0 0+ +0 0+ |
(19) | |
|+0 - 1+ +0 0+ +0 0+ + 0 1+|
|| | | | | | | ||
|+1 0 + +0 0+ +0 0+ +- 1 0+|
| |
|+0 - 1+ +0 0+ +0 - 1+ +0 0+ |
|| | | | | | | | |
++1 0 + +0 0+ +1 0 + +0 0+ +
Type: Matrix SquareMatrix(2,Integer)
(20) -> PfChar(l, m2)
4 + 0 2+ 2 +- 1 0 +
(20) l + | |l + | |
+- 2 0+ + 0 - 1+
Type: Polynomial SquareMatrix(2,Integer)
So, the Pfaffian is
+- 1 0 +
| |
+ 0 - 1+
In particular, look at its type: the Pfaffiam is an element of the groung ring.
You're quite correct. It seems that the documentation on wikipedia
is wrong, at least as I read it. Do you agree?

Tim
Martin Rubey
2007-09-30 07:06:59 UTC
Permalink
You're quite correct. It seems that the documentation on wikipedia is wrong,
at least as I read it. Do you agree?
Could you point me to the line you believe in error?

Martin
root
2007-09-30 23:40:31 UTC
Permalink
Martin,

I've been writing some pfaffian examples. Should the PfChar code read:

PfChar(lambda, A) ==
n := nrows A

PfChar(lambda, A) ==
n := nrows A
odd? n => 0

Tim
Martin Rubey
2007-10-01 06:12:14 UTC
Permalink
Martin,
PfChar(lambda, A) ==
n := nrows A
PfChar(lambda, A) ==
n := nrows A
odd? n => 0
I didn't check for odd n since I didn't check for skew-symmetry either. Yes,
one should, in a production environment.

Martin

root
2007-09-30 17:41:07 UTC
Permalink
It appears that I mis-read example 3 from the wikipedia page. Their
example looks like the example I sent to you, that is, it looks like
there are 2x2 matrices on the diagonal. A second reading of the page
shows that it can be read instead as having lambdas adjacent to the
zero-diagonal. The lack of alignment of the other zeros led me to
read it as embedded matrices. My mistake.

Tim
Loading...