rcliff {clifford} R Documentation

## Random clifford objects

### Description

Random Clifford algebra elements, intended as quick “get you going” examples of clifford objects

### Usage

rcliff(n=9, d=6, g=4, include.fewer=TRUE)


### Arguments

 n Number of terms d Dimensionality of underlying vector space g Maximum grade of any term include.fewer Boolean, with FALSE meaning to return a clifford object comprising only terms of grade g, and default TRUE meaning to include terms with grades less than g (including a term of grade zero, that is, a scalar)

### Details

Function rcliff() gives a quick nontrivial Clifford object, typically with terms having a range of grades (see ‘grade.Rd’); argument include.fewer=FALSE ensures that all terms are of the same grade.

Function rblade() gives a Clifford object that is a blade (see ‘term.Rd’). It returns the wedge product of a number of 1-vectors, for example $$\left(e_1+2e_2\right)\wedge\left(e_1+3e_5\right)$$.

Perwass gives the following lemma:

Given blades $$A_{\langle r\rangle}, B_{\langle s\rangle}, C_{\langle t\rangle}$$, then

$\langle A_{\langle r\rangle} B_{\langle s\rangle} C_{\langle t\rangle} \rangle_0 = \langle C_{\langle t\rangle} A_{\langle r\rangle} B_{\langle s\rangle} \rangle_0$

In the proof he notes in an intermediate step that

$\langle A_{\langle r\rangle} B_{\langle s\rangle} \rangle_t * C_{\langle t\rangle} = C_{\langle t\rangle} * \langle A_{\langle r\rangle} B_{\langle s\rangle} \rangle_t = \langle C_{\langle t\rangle} A_{\langle r\rangle} B_{\langle s\rangle} \rangle_0.$

Package idiom is shown in the examples.

### Note

If the grade exceeds the dimensionality, $$g>d$$, then the result is arguably zero; rcliff() returns an error.

### Author(s)

Robin K. S. Hankin

term,grade

### Examples


rcliff()
rcliff(d=3,g=2)
rcliff(3,10,7)
rcliff(3,10,7,include=TRUE)

x1 <- rcliff()
x2 <- rcliff()
x3 <- rcliff()

x1*(x2*x3) == (x1*x2)*x3  # should be TRUE

# We can invert blades easily:
ainv <- rev(a)/scalprod(a)

zap(a*ainv)  # 1 (to numerical precision)
zap(ainv*a)  # 1 (to numerical precision)

# Perwass 2009, lemma 3.9:

# Intermediate step

x1 <- grade(A*B,3) %star% C
x2 <- C %star% grade(A*B,3)