Learn R Programming

clifford (version 1.0-8)

signature: The signature of the Clifford algebra

Description

Getting and setting the signature of the Clifford algebra

Usage

signature(p,q=0)
is_ok_sig(s)
showsig(s)
# S3 method for sigobj
print(x,...)

Arguments

s,p,q

Integers, specifying number of positive elements on the diagonal of the quadratic form, with s=c(p,q)

x

Object of class sigobj

...

Further arguments, currently ignored

Author

Robin K. S. Hankin

Details

The signature functionality is modelled on lorentz::sol() which gets and sets the speed of light.

Clifford algebras require a bilinear form on R^nR^nR^n ,<.,.>, usually written

x, x=x_1^2+x_2^2+ +x_p^2-x_p+1^2- -x_p+q^2

<x,x>=x_1^2+...+x_p^2-x_p+1^2-...-x_p+q^2

where p+q=np+q=n. With this quadratic form the vector space is denoted R^p,qR^p,qR^p,q and we say that (p,q) is the signature of the bilinear form ,<.,.>. This gives rise to the Clifford algebra C_p,qC_p,q.

If the signature is (p,q), then we have

e_i e_i = +1\, (if 1 i p), -1\, (if p+1 i p+q), 0\, (if i>p+q). omitted

Note that (p,0) corresponds to a positive-semidefinite quadratic form in which e_ie_i=+1omitted for all i pi<=p and e_ie_i=0omitted for all i > p. Similarly, (0,q) corresponds to a negative-semidefinite quadratic form in which e_ie_i=-1omitted for all i qi<=q and e_ie_i=0omitted for all i > q.

Package idiom for a strictly positive-definite quadratic form would be to specify infinite p [in which case q is irrelevant] and for a strictly negative-definite quadratic form we would need p=0,q=omitted.

If we specify e_ie_i=0omitted for all i, then the operation reduces to the wedge product of a Grassman algebra. Package idiom for this is to set p=q=0, but this is not recommended: use the stokes package for Grassman algebras, which is much more efficient and uses nicer idiom.

Function signature(p,q) returns the signature silently; but setting option show_signature to TRUE makes signature() have the side-effect of calling showsig(), which changes the default prompt to display the signature, much like showSOL in the lorentz package. There is special dispensation for “infinite” p or q.

Calling signature() [that is, with no arguments] returns an object of class sigobj with elements corresponding to \(p\) and \(q\). The sigobj class ensures that a near-infinite integer such as .Machine$integer.max will be printed as “Inf” rather than, for example, “2147483647”.

Function is_ok_sig() is a helper function that checks for a proper signature.

Examples

Run this code


signature()

e(1)^2
e(2)^2

signature(1)
e(1)^2
e(2)^2   # note sign

signature(3,4)
sapply(1:10,function(i){drop(e(i)^2)})


signature(Inf)   # restore default




# Nice mapping from Cl(0,2) to the quaternions (loading clifford and
# onion simultaneously is discouraged):

# library("onion")
# signature(0,2)
# Q1 <- rquat(1)
# Q2 <- rquat(1)
# f <- function(H){Re(H)+i(H)*e(1)+j(H)*e(2)+k(H)*e(1:2)}
# f(Q1)*f(Q2) - f(Q1*Q2) # zero to numerical precision
# signature(Inf)

Run the code above in your browser using DataLab