GrassmannCalculus`
GrassmannExtract |
|
| | ||||
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Here is a Grassmann expression (which also contains a non-Grassmann symbol A). extracts a list of subexpressions.
GrassmannExtract
In[2]:=
★A;X=1+aA⋀(x+y)+2
⊖⋄%//
★c |
B
2
e
3
e
m
GrassmannExtract |
Out[2]=
1+2★c⊖⋄+aA⋀(x+y)
B
2
e
3
e
m
Out[2]=
a,A,★c,x,y,x+y,⊖,⊖⋄,2★c⊖⋄,,,,A⋀(x+y),aA⋀(x+y),1+2★c⊖⋄+aA⋀(x+y)
B
2
e
3
B
2
e
3
e
m
B
2
e
3
e
m
e
3
B
2
e
m
B
2
e
3
e
m
You can also use a list of predicates to extract different types of expression.
In[3]:=
GrassmannExtract |
BasisSymbolQ |
OddGradeQ |
Out[3]=
{},x,y,x+y,⊖,
e
3
B
2
e
3
e
3
You can also use your own predicates. For example, the first example could be modified to exclude any interior products of odd grade.
In[4]:=
GrassmannExtract |
BasisSymbolQ |
OddGradeQ |
InteriorProductQ |
Out[4]=
{{},{x,y,x+y,}}
e
3
e
3
Because is , you could extract expressions from a matrix. For example, here we extract the scalar coefficients in a matrix of Grassmann numbers.
GrassmannExtract
Listable
In[5]:=
★A;
;M=
[{{x,y},{u,v}}];MatrixForm[M]
★ℬ |
2
ComposeGrassmannElement |
Out[5]//MatrixForm=
x 0 e 1 x 1 e 2 x 2 x 3 e 1 e 2 | y 0 e 1 y 1 e 2 y 2 y 3 e 1 e 2 |
u 0 e 1 u 1 e 2 u 2 u 3 e 1 e 2 | v 0 e 1 v 1 e 2 v 2 v 3 e 1 e 2 |
In[6]:=
GrassmannExtract |
ScalarQ |
Out[6]//MatrixForm=
|
| ||||||||
|
|
In[7]:=
Clear[X,M]
|
""

