Instantly share code, notes, and snippets.

Last active March 11, 2018 09:56
Show Gist options
• Save kumadasu/2f47d755e38f3253e0b3f94c536c8530 to your computer and use it in GitHub Desktop.

# 5.1 Subspace

``````a=e1
b=e2
c=e3
``````

## vector

``````a+2*a
a+b
``````

## 2-vector

``````a^b
2*a^3*b
a^a
a^b+a^c
a^(b+c)
``````

## 3-vector

``````a^b^c
b^a^c
a^b^a

d=e1+e2+e3
a^b^(2*c+3*d)
2*a^b^c+3*a^b^d

a^b^(c+2*a+3*b)
``````

# 5.2 Outer product algebra

``````a^(b^c)
(a^b)^c
a^b^c

2^a
a^2
2*a

a^b^c^d
``````

# 5.3 Contraction

## 5.3.1

``````lcont(a, 3*a)
lcont(a, 3*a^b)

a^b
lcont(d, a^b)
``````

## 5.3.2

``````lcont(a^b, c^d)
``````

## 5.3.3

``````lcont(a, a^b^c)
lcont(b^a, a^b^c)
lcont(a^b, a^b^c)
``````

## 5.3.4

``````lcont(2, 3)
lcont(2, a)
lcont(2, a^b)
lcont(2, a^b^c)

lcont(c, a^b)
``````

# 5.4 Norm

``````norm(2)
sqrt(lcont(2,2))

norm(2*a)
sqrt(lcont(2*a, 2*a))

norm(2*a^b)
sqrt(lcont(2*b^a, 2*a^b))

norm(2*a^b^c)
sqrt(lcont(2*c^b^a, 2*a^b^c))
``````

# 5.5 Dual

``````dual(a)
dual(a^b)
dual(a^b^c)
dual(3)

I = a^b^c
-lcont(a, I)
-lcont(a^b, I)
-lcont(a^b^c, I)
-lcont(3, I)

dual(dual(a^b))

norm(dual(2*a^b^c))
``````

# 疑問

• 縮約(lcont)と内積(.)は違う？