symbolic.Rd
Returns a character string representing \(k\)-tensor and
\(k\)-form objects in symbolic form. Used by the print method if
either option kform_symbolic_print
or
ktensor_symbolic_print
is non-null.
as.symbolic(M,symbols=letters,d="")
Spivak (p89), in archetypically terse writing, states:
A function \(f\) is considered to be a 0-form and \(f\cdot\omega\) is also written \(f\wedge\omega\). If \(f\colon\mathbb{R}^n\longrightarrow\mathbb{R}\) is differentiable, then \(Df(p)\in\Lambda^1\left(\mathbb{R}^n\right)\). By a minor modification we therefore obtain a 1-form \(\mathrm{d}f\), defined by $$\mathrm{d}f(p)\left(v_p\right)=Df(p)(v).$$
Let us consider in particular the 1-forms \(\mathrm{d}\pi^i\). It is customary to let \(x^i\) denote the function \(\pi^i\) (On \(\mathbb{R}^3\) we often denote \(x^1\), \(x^2\), and \(x^3\) by \(x\), \(y\), and \(z\)). This standard notation has obvious disadvantages but it allows many classical results to be expressed by formulas of equally classical appearance. Since \(\mathrm{d}x^i(p)(v_p)=\mathrm{d}\pi^i(p)(v_p)=D\pi^i(p)(v)=v^i\), we see that \(\mathrm{d}x^1(p),\ldots,\mathrm{d}x^n(p)\) is just the dual basis to \((e_1)_p,\ldots,(e_n)_p\). Thus every k-form \(\omega\) can be written
$$ \omega=\sum_{i_1 < \cdots < i_k}\omega_{i_1,\ldots,i_k} \mathrm{d}x^{i_1}\wedge\cdots\wedge\mathrm{d}x^{i_k}.$$
Function as.symbolic()
uses this format. For completeness, we
add (p77) that \(k\)-tensors may be expressed in the form
$$ \sum_{i_1,\ldots, i_k=1}^n a_{i_1,\ldots,i_k}\cdot \phi_{i_1}\otimes\cdots\otimes\phi_{i_k}.$$
and this form is used for \(k\)-tensors. The print method for
tensors, print.ktensor()
, writes d1
for \(\phi_1\),
d2
for \(\phi_2\) [where \(\phi_i(x^j)=\delta_i^j\)].
Returns a “noquote” character string.
(o <- kform_general(3,2,1:3))
#> An alternating linear map from V^2 to R with V=R^3:
#> val
#> 2 3 = 3
#> 1 3 = 2
#> 1 2 = 1
as.symbolic(o,d="d",symbols=letters[23:26])
#> [1] +3 dx^dy +2 dw^dy + dw^dx
(a <- rform(n=50))
#> An alternating linear map from V^3 to R with V=R^49:
#> val
#> 3 20 38 = 9
#> 4 14 22 = -7
#> 3 36 40 = -5
#> 25 28 34 = 4
#> 1 20 44 = -6
#> 28 38 49 = -3
#> 6 11 22 = 8
#> 9 16 28 = -2
as.symbolic(a,symbols=state.abb)
#> [1] +9 AZ^MD^PA -7 AR^IN^MI -5 AZ^OK^SC +4 MO^NV^ND -6 AL^MD^UT -3 NV^PA^WI +8 CO^HI^MI -2 FL^KS^NV