GrassmannCalculus`
ExpandAndSimplifyGeneralizedProducts |
|
| | ||||
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Set the book default to establish scalars and vectors.
In[2]:=
★A;
ExpandGeneralizedProducts
SimplifyGeneralizedProducts
ExpandAndSimplifyGeneralizedProducts
In[3]:=
★P |
e
1
e
2
e
1
e
3
△ |
1
e
2
e
3
ExpandGeneralizedProducts |
SimplifyGeneralizedProducts |
ExpandAndSimplifyGeneralizedProducts |
ToMetricElements |
Out[3]=
(a⋀+b⋀)(c+d)
e
1
e
2
e
1
e
3
△
1
e
2
e
3
Out[3]=
(a⋀)(c)+(a⋀)(d)+(b⋀)(c)+(b⋀)(d)
e
1
e
2
△
1
e
2
e
1
e
2
△
1
e
3
e
1
e
3
△
1
e
2
e
1
e
3
△
1
e
3
Out[3]=
ac((⋀)⊖)+ad((⋀)⊖)+bc((⋀)⊖)+bd((⋀)⊖)
e
1
e
2
e
2
e
1
e
2
e
3
e
1
e
3
e
2
e
1
e
3
e
3
Out[3]=
ac((⋀)⊖)+ad((⋀)⊖)+bc((⋀)⊖)+bd((⋀)⊖)
e
1
e
2
e
2
e
1
e
2
e
3
e
1
e
3
e
2
e
1
e
3
e
3
Out[3]=
-ac-bd
e
1
e
1
Using a symbolic expression, expands only the generalized Grassmann products in a Grassmann expression.
ExpandGeneralizedProducts
In[4]:=
X=(a+b)⊖(z+w)+(ax+b+cy)
(ex⋀y+f)X1=
[X]
△ |
1
ExpandGeneralizedProducts |
Out[4]=
(a+b)⊖(w+z)+(b+ax+cy)(f+ex⋀y)
△
1
Out[4]=
(a+b)⊖(w+z)+bf+b(ex⋀y)+(ax)f+(ax)(ex⋀y)+(cy)f+(cy)(ex⋀y)
△
1
△
1
△
1
△
1
△
1
△
1
Applying to gives:
SimplifyGeneralizedProducts
X1
In[5]:=
SimplifyGeneralizedProducts |
Out[5]=
(a+b)⊖(w+z)+ae((x⋀y)⊖x)+ce((x⋀y)⊖y)
However, applying directly to the expression gives the same result.
ExpandAndSimplifyGeneralizedProducts
In[6]:=
ExpandAndSimplifyGeneralizedProducts |
Out[6]=
(a+b)⊖(w+z)+ae((x⋀y)⊖x)+ce((x⋀y)⊖y)
Note that is neither expanded, nor simplified to zero, since it is not a generalized Grassmann product.
(a+b)⊖(z+w)
You can also use new symbols as long as you assert their grades, or you can override the grades of currently declared symbols. Here we assert that is of grade 0, making it a scalar. (Note also that although has been asserted to be a 5-element, it has not been simplified to zero in this 4-space, since it is not a generalized Grassmann product).
x
A
In[7]:=
★ℬ |
4
y
2
△ |
0
y
2
ExpandAndSimplifyGeneralizedProducts |
★Λ
5
★Λ
0
Out[7]=
A+x+x+
y
2
△
0
y
2
Out[7]=
A++2x+⋀
2
x
y
2
y
2
y
2
In[8]:=
★PP;Clear[X,X1]
|
|
|
""


