Skip to content

Commit ec7943a

Browse files
committed
Polish
1 parent 769da76 commit ec7943a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/math/differential-geometry.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ arrays.
13121312

13131313
One can represent tensor equations as follows::
13141314

1315-
Contraction(Product([Transpose(A), B]), [2, 3])
1315+
Contract(Product([Transpose(A), B]), [2, 3])
13161316

13171317
Which represents the following tensor equations:
13181318

@@ -1334,7 +1334,7 @@ always have to be one up one down, and they can be swapped via the metric
13341334
tensor.
13351335

13361336
It turns out the exact same representation can also be applied to arrays, so
1337-
:code:`Contraction(Product([Transpose(A), B]), [2, 3])` represents::
1337+
:code:`Contract(Product([Transpose(A), B]), [2, 3])` represents::
13381338

13391339
matmul(tranpose(A), B)
13401340

@@ -1357,7 +1357,7 @@ List of fundamental tensor operations::
13571357
Product
13581358
Add
13591359
Transpose
1360-
Contract / Contraction
1360+
Contract
13611361
Assign
13621362
Rank
13631363

@@ -1366,7 +1366,7 @@ We just need to know the rank, not the actual dimensions, so::
13661366
A = Tensor("A", 2)
13671367
B = Tensor("A", 2)
13681368
C = Tensor("A", 2)
1369-
Assign(C, Contraction(Product([Transpose(A), B]), [2, 3]))
1369+
Assign(C, Contract(Product([Transpose(A), B]), [2, 3]))
13701370

13711371
represents::
13721372

@@ -1389,11 +1389,11 @@ or::
13891389
end do
13901390

13911391
Matrix multiplication :code:`matmul(A, B)` is represented by
1392-
:code:`Contraction(Product([A, B]), [Rank(A), Rank(A)+1])`, typically
1392+
:code:`Contract(Product([A, B]), [Rank(A), Rank(A)+1])`, typically
13931393
:code:`Rank(A) == 2`.
13941394

13951395
Dot proudct :code:`dot_product(A, B)` is represented by
1396-
:code:`Contraction(Product([A, B]), [Rank(A), Rank(A)+1])`, typically
1396+
:code:`Contract(Product([A, B]), [Rank(A), Rank(A)+1])`, typically
13971397
:code:`Rank(A) == 1`.
13981398

13991399
Rank 0 tensors are scalars. Their value can be used instead of their symbol,
@@ -1407,12 +1407,12 @@ rank 0, or to be completely explicit::
14071407
Using the fundamental tensor operations above we can then build/define many
14081408
other tensor operations::
14091409

1410-
dot_product(A, B) = Contraction(Product([A, B]), [Rank(A), Rank(A)+1])
1411-
matmul(A, B) = Contraction(Product([A, B]), [Rank(A), Rank(A)+1])
1410+
dot_product(A, B) = Contract(Product([A, B]), [Rank(A), Rank(A)+1])
1411+
matmul(A, B) = Contract(Product([A, B]), [Rank(A), Rank(A)+1])
14121412
Tr A = Contract(A, [1, 2]) # assuming Rank(A) = 2
14131413
|A| = sqrt(Contract(Product([A,A]), [1, Rank(A)+1], [2, Rank(A)+2], ...
14141414
[Rank(A), 2*Rank(A)]))
1415-
A^n = Product([A, A, ..., A]) # n-times
1415+
A^n = matmul(matmul(matmul(A, A), A), ...) # n-times
14161416
Exp(A) = sum_n^oo A^n/n!
14171417

14181418
Examples

0 commit comments

Comments
 (0)