GrassmannCalculus`
GrassmannExpandAndSimplify (★) |
|
| | ||||
|
| | ||||
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Set the default book preferences.
In[2]:=
★A;
GrassmannExpand
In[3]:=
X=(ax+b+cy)⋀(ex⋀y+fy)X=GrassmannExpand[X]
Out[3]=
(b+ax+cy)⋀(fy+ex⋀y)
Out[3]=
b⋀(fy)+b⋀(ex⋀y)+(ax)⋀(fy)+(ax)⋀(ex⋀y)+(cy)⋀(fy)+(cy)⋀(ex⋀y)
Applying to X gives
GrassmannSimplify
In[4]:=
GrassmannSimplify
[X]Out[4]=
bfy+(be+af)x⋀y
However, applying directly to the expression gives the same result.
GrassmannExpandAndSimplify
In[5]:=
GrassmannExpandAndSimplify
[(ax+b+cy)⋀(ex⋀y+fy)]Out[5]=
bfy+(be+af)x⋀y
GrassmannExpandAndSimplify
In[6]:=
X=(ax+b+cy)⊖(ex⋀y+fy)GrassmannExpand[%]
GrassmannSimplify
[%]GrassmannExpandAndSimplify[X]
Out[6]=
(b+ax+cy)⊖(fy+ex⋀y)
Out[6]=
b⊖fy+b⊖ex⋀y+ax⊖fy+ax⊖ex⋀y+cy⊖fy+cy⊖ex⋀y
Out[6]=
af(x⊖y)+cf(y⊖y)
Out[6]=
af(x⊖y)+cf(y⊖y)
Set a 4-dimensional vector space.
In[7]:=
★ℬ |
4
We can also use new symbols as long as we assert their grades, and we can override the grades of currently declared symbols. Here we assert that , which is normally declared as a vector of grade 1, is of grade 2, making the exterior product non-zero. Note also that since has been asserted to be a 5-element, it has been simplified to zero in this 4-space. We use the alias ★ for .
x
A
GrassmannExpandAndSimplify
In[8]:=
X=A+(x+y)⋀(x+y)
X,A∈,x∈
★ |
★Λ
5
★Λ
2
Out[8]=
A+(x+y)⋀(x+y)
Out[8]=
x⋀x+2y⋀x
The assertions may also be inclosed in a List.
In[9]:=
X=A+(x+y)⋀(x+y)
X,A∈,x∈
★ |
★Λ
5
★Λ
2
Out[9]=
A+(x+y)⋀(x+y)
Out[9]=
x⋀x+2y⋀x
Suppose we have previously established the rules:
In[10]:=
vRules={v13+4,v2+,v3a+b};
e
1
e
2
e
2
e
4
e
1
e
3
One way to evaluate the following expression would be:
In[11]:=
(dv1)⋀v2⋀(ev3)
[%,vRules]
★ |
Out[11]=
(dv1)⋀v2⋀(ev3)
Out[11]=
3bde⋀⋀+4ade⋀⋀-3bde⋀⋀-4bde⋀⋀
e
1
e
2
e
3
e
1
e
2
e
4
e
1
e
3
e
4
e
2
e
3
e
4
The following uses the transform rules and an assertion.
In[12]:=
(dv1)⋀α
%,vRules,α∈
★ |
★Λ
2
Out[12]=
(dv1)⋀α
Out[12]=
3d⋀α+4d⋀α
e
1
e
2
In[13]:=
Clear[X,vRules]
|
|
|
""


