as.1form.Rd
Given a vector, return the corresponding 1-form; the exterior
derivative of a 0-form (that is, a scalar function). Function
grad()
is a synonym.
as.1form(v)
grad(v)
The exterior derivative of a \(k\)-form \(\phi\) is a \((k+1)\)-form \(\mathrm{d}\phi\) given by
$$ \mathrm{d}\phi \left( P_\mathbf{x}\left(\mathbf{v}_i,\ldots,\mathbf{v}_{k+1}\right) \right) = \lim_{h\longrightarrow 0}\frac{1}{h^{k+1}}\int_{\partial P_\mathbf{x}\left(h\mathbf{v}_1,\ldots,h\mathbf{v}_{k+1}\right)}\phi $$
We can use the facts that
$$ \mathrm{d}\left(f\,\mathrm{d}x_{i_1}\wedge\cdots\wedge\mathrm{d}x_{i_k}\right)= \mathrm{d}f\wedge\mathrm{d}x_{i_1}\wedge\cdots\wedge\mathrm{d}x_{i_k} $$
and $$ \mathrm{d}f=\sum_{j=1}^n\left(D_j f\right)\,\mathrm{d}x_j $$
to calculate differentials of general \(k\)-forms. Specifically, if
$$ \phi=\sum_{1\leq i_i < \cdots < i_k\leq n} a_{i_1\ldots i_k}\mathrm{d}x_{i_1}\wedge\cdots\wedge\mathrm{d}x_{i_k} $$
then $$ \mathrm{d}\phi= \sum_{1\leq i_i < \cdots < i_k\leq n} [\sum_{j=1}^nD_ja_{i_1\ldots i_k}\mathrm{d}x_j]\wedge\mathrm{d}x_{i_1}\wedge \cdots\wedge\mathrm{d}x_{i_k.} $$
The entry in square brackets is given by grad()
. See the
examples for appropriate R idiom.
A one-form
as.1form(1:9) # note ordering of terms
#> An alternating linear map from V^1 to R with V=R^9:
#> val
#> 9 = 9
#> 8 = 8
#> 7 = 7
#> 6 = 6
#> 5 = 5
#> 4 = 4
#> 3 = 3
#> 2 = 2
#> 1 = 1
as.1form(rnorm(20))
#> An alternating linear map from V^1 to R with V=R^20:
#> val
#> 1 = -0.8607243
#> 14 = -0.4321952
#> 2 = 0.4212304
#> 15 = -0.6675648
#> 3 = 1.4505432
#> 16 = 1.3895059
#> 4 = 0.1943924
#> 13 = -0.7820777
#> 12 = -0.7721921
#> 11 = 0.9110785
#> 10 = -0.7160587
#> 9 = -1.7810619
#> 8 = -0.9441017
#> 7 = 2.7361084
#> 20 = -0.7893881
#> 19 = 2.5844322
#> 6 = 1.3398599
#> 18 = 0.2053894
#> 5 = -0.6912054
#> 17 = 0.9118739
grad(c(4,7)) ^ grad(1:4)
#> An alternating linear map from V^2 to R with V=R^4:
#> val
#> 1 2 = 1
#> 1 3 = 12
#> 2 3 = 21
#> 1 4 = 16
#> 2 4 = 28