SamplePublisher`GrassmannCalculus`
ComposeGrassmannLinearEquation |
|
| | ||||
Details and Options
Examples
(3)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
In[2]:=
SetCoordinateVectorSpace |
The following composes a 3-dimensional set of linear equations in the Grassmann coordinate form.
In[3]:=
GE=
[{{48,-2,-27},{-6,0,3},{-16,1,9}},{a,b,c}]
ComposeGrassmannLinearEquation |
Out[3]=
x(48-6-16)+y(-2+)+z(-27+3+9)a+b+c
e
x
e
y
e
z
e
x
e
z
e
x
e
y
e
z
e
x
e
y
e
z
The coefficients of the variables are the columns of the matrix. These correspond to the coordinate-elements of the equation and have been set.
In[4]:=
Inactive[c]/@
Activate[%]
GrassmannCoordinates |
Out[4]=
{c[x],c[y],c[z]}
Out[4]=
{48-6-16,-2+,-27+3+9}
e
x
e
y
e
z
e
x
e
z
e
x
e
y
e
z
The following displays the equation in equation form, which would be more appropriate for following Gaussian row reduction steps. The coefficients of the equation basis elements correspond to the rows of the matrix.
In[5]:=
GEE=
[GE]
ToGrassmannEquationForm |
Out[5]=
(48x-2y-27z)+(-6x+3z)+(-16x+y+9z)a+b+c
e
x
e
y
e
z
e
x
e
y
e
z
The equations are really the same and could be expanded to an uncollected form. One could actually type the equation in this form using the variable and basis "tags" for each element on the left.
In[6]:=
GE//ExpandAll
Out[6]=
48x-2y-27z-6x+3z-16x+y+9za+b+c
e
x
e
x
e
x
e
y
e
y
e
z
e
z
e
z
e
x
e
y
e
z
The following uses the Grassmann variable elimination method to solve for by eliminating and by wedging in and . This leaves an equation in , which can be simplified with Solve.
x
y
z
c[y]
c[z]
x
In[7]:=
FastExteriorExpand |
Out[7]=
6x⋀⋀(-3a-9b-6c)⋀⋀
e
x
e
y
e
z
e
x
e
y
e
z
Out[7]=
x(-a-3b-2c)
1
2
Solutions for all the variables can be obtained with and then we can check the solutions in the equation.
SolveGrassmannCoordinateForm
In[8]:=
SolveGrassmannCoordinateForm |
Out[8]=
x(-a-3b-2c),ya+3c,z(-3a-8b-6c)
1
2
1
3
Out[8]=
True
We could also solve the system using Gaussian row reduction methods. Here we do three pivots.
In[9]:=
GEE
[%][{,x}]
[%][{,y}]step1=
[%][{,z}]
PivotGrassmannLinearEquation |
e
x
PivotGrassmannLinearEquation |
e
y
PivotGrassmannLinearEquation |
e
z
Out[9]=
(48x-2y-27z)+(-6x+3z)+(-16x+y+9z)a+b+c
e
x
e
y
e
z
e
x
e
y
e
z
Out[9]=
x--+--+++b++c
y
24
9z
16
e
x
y
4
3z
8
e
y
y
e
z
3
a
e
x
48
a
8
e
y
a
3
e
z
Out[9]=
x-+y+--+--4b+++c
z
2
e
x
3z
2
e
y
z
e
z
2
b
e
x
6
a
2
e
y
a
2
4b
3
e
z
Out[9]=
x+y+z---c+(a+3c)+-a--2c
e
x
e
y
e
z
a
2
3b
2
e
x
e
y
8b
3
e
z
That contains the generic direction on the left hand side and its value on the right hand side in terms of the parameters . We can extract the direction components directly with:
{a,b,c}
In[10]:=
ExtractGrassmannEquation |
Out[10]=
x---c,ya+3c,z-a--2c
a
2
3b
2
8b
3
Symbolic Equation
(1)
Mixed Grassmann and Gaussian Operations
(1)
|
""

