$SPAD/src/input skew.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool skew.output
)set message test on
)set message auto off
)clear all

———-

Make sure that LALG, EAB, ANTISYM are loaded

We will look at the deRham complex of Euclidean 3-space and use coordinates (x,y,z). — * —

--S 1 of 36
lv:List Symbol := [x,y,z]
--R
--R
--R   (1)  [x,y,z]
--R                                                           Type: List(Symbol)
--E 1

———-

Next is our ring of functions. We can have functions of any number of variables, but since we’ve chosen to work with ordinary Euclidean 3-space, an expression like f(x,t,r,y,u,z) will be treated as a parameterized function of (x,y,z) and will be considered to be constant in the variables t,r,u. We choose expressions with integer coefficients in this example.

— * —

--S 2 of 36
macro coefRing == Integer
--R
--R                                                                   Type: Void
--E 2
--S 3 of 36
R := Expression coefRing
--R
--R
--R   (3)  Expression(Integer)
--R                                                                 Type: Domain

--E 3

———-

The declaration for the deRham complex takes arguments a ring coefRing and a list of variables (lv is of type List Symbol).

— * —

--S 4 of 36
der := DERHAM(coefRing,lv)
--R
--R
--R   (4)  DeRhamComplex(Integer,[x,y,z])
--R                                                                 Type: Domain
--E 4

———-

Here are some functions chosen at random.

— * —

--S 5 of 36
f:R:=x**2*y*z-5*x**3*y**2*z**5
--R
--R
--R            3 2 5    2
--R   (5)  - 5x y z  + x y z
--R                                                    Type: Expression(Integer)
--E 5
--S 6 of 36
g:R:=z**2*y*cos(z)-7*sin(x**3*y**2)*z**2
--R
--R
--R            2     3 2       2
--R   (6)  - 7z sin(x y ) + y z cos(z)
--R                                                    Type: Expression(Integer)
--E 6
--S 7 of 36
h:R:=x*y*z-2*x**3*y*z**2
--R
--R
--R            3   2
--R   (7)  - 2x y z  + x y z
--R                                                    Type: Expression(Integer)
--E 7

———- The multiplicative basis elements for the exterior algebra over R are defined here.

— * —

--S 8 of 36
dx :der := generator(1)
--R
--R
--R   (8)  dx
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 8
--S 9 of 36
dy :der := generator(2)
--R
--R
--R   (9)  dy
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 9
--S 10 of 36
dz :der := generator(3)
--R
--R
--R   (10)  dz
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 10

———-

A nice alternate for the assignments above is — * —

--S 11 of 36
[dx,dy,dz] := [generator(i)$der for i in 1..3]
--R
--R
--R   (11)  [dx,dy,dz]
--R                                   Type: List(DeRhamComplex(Integer,[x,y,z]))
--E 11

———-

Now some 1-forms chosen at random.

— * —

--S 12 of 36
alpha:der := f*dx + g*dy + h*dz
--R
--R
--R   (12)

--R          3   2                   2     3 2       2
--R     (- 2x y z  + x y z)dz + (- 7z sin(x y ) + y z cos(z))dy
--R   +
--R          3 2 5    2
--R     (- 5x y z  + x y z)dx
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 12
--S 13 of 36
beta:der  := cos(tan(x*y*z)+x*y*z)*dx + x*dy
--R
--R
--R   (13)  x dy + cos(tan(x y z) + x y z)dx
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 13

———-

We know that exteriorDifferential^{2} = 0, let’s see that:

— * —

--S 14 of 36
exteriorDifferential alpha
--R
--R
--R   (14)
--R         2                  3 2                    3 2
--R     (y z sin(z) + 14z sin(x y ) - 2y z cos(z) - 2x z  + x z)dy dz
--R   +
--R         3 2 4     2   2          2
--R     (25x y z  - 6x y z  + y z - x y)dx dz
--R   +
--R           2 2 2     3 2       3   5    2
--R     (- 21x y z cos(x y ) + 10x y z  - x z)dx dy
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 14
--S 15 of 36
exteriorDifferential %
--R
--R
--R   (15)  0
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 15

———-

exteriorDifferential is long, let’s shorten that.

— * —

--S 16 of 36

macro exD == exteriorDifferential
--R
--R                                                                   Type: Void
--E 16

———-

We know that exD is a (graded) derivation, let’s see that:

— * —

--S 17 of 36
gamma := alpha * beta
--R
--R
--R   (17)
--R        4   2    2               3   2
--R     (2x y z  - x y z)dy dz + (2x y z  - x y z)cos(tan(x y z) + x y z)dx dz
--R   +
--R       2     3 2       2                                   4 2 5    3
--R   ((7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z)dx dy
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 17
--S 18 of 36
delta := exD gamma
--R
--R
--R   (18)
--R                    2     3 2       2 2           4   3    2   2           2
--R           (- 7x y z sin(x y ) + x y z cos(z) + 2x y z  - x y z )tan(x y z)
--R         +
--R                    2     3 2        2 2           4   3     2   2
--R           - 14x y z sin(x y ) + 2x y z cos(z) + 4x y z  - 2x y z
--R      *
--R         sin(tan(x y z) + x y z)
--R     +
--R             2                  3 2                    3 2
--R         (y z sin(z) + 14z sin(x y ) - 2y z cos(z) - 2x z  + x z)
--R      *
--R         cos(tan(x y z) + x y z)
--R     +
--R            4 2 4     3   2             3
--R       - 25x y z  + 8x y z  - 2x y z + x y
--R  *
--R     dx dy dz
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 18

———- Need the “-” because alpha is a 1-form and 1 is odd.

— * —

--S 19 of 36
epsilon := exD(alpha)*beta - alpha * exD(beta)
--R
--R
--R   (19)
--R                    2     3 2       2 2           4   3    2   2           2
--R           (- 7x y z sin(x y ) + x y z cos(z) + 2x y z  - x y z )tan(x y z)
--R         +
--R                    2     3 2        2 2           4   3     2   2
--R           - 14x y z sin(x y ) + 2x y z cos(z) + 4x y z  - 2x y z
--R      *
--R         sin(tan(x y z) + x y z)
--R     +
--R             2                  3 2                    3 2
--R         (y z sin(z) + 14z sin(x y ) - 2y z cos(z) - 2x z  + x z)
--R      *
--R         cos(tan(x y z) + x y z)
--R     +
--R            4 2 4     3   2             3
--R       - 25x y z  + 8x y z  - 2x y z + x y
--R  *
--R     dx dy dz
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 19
--S 20 of 36
delta - epsilon
--R
--R
--R   (20)  0
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 20

———-

We define some operators.

— * —

--S 21 of 36
a:BOP := operator('a)
--R
--R
--R   (21)  a
--R                                                          Type: BasicOperator
--E 21
--S 22 of 36
b:BOP := operator('b)

--R
--R
--R   (22)  b
--R                                                          Type: BasicOperator
--E 22
--S 23 of 36
c:BOP := operator('c)
--R
--R
--R   (23)  c
--R                                                          Type: BasicOperator
--E 23

———-

Now some indeterminate one and two forms.

— * —

--S 24 of 36
alpha := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz
--R
--R
--R   (24)  c(x,y,z)dz + b(x,y,z)dy + a(x,y,z)dx
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 24
--S 25 of 36
beta  := a(x,y,z) * dx * dy + b(x,y,z) * dx * dz + c(x,y,z) * dy * dz
--R
--R
--R   (25)  c(x,y,z)dy dz + b(x,y,z)dx dz + a(x,y,z)dx dy
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 25

———-

The “gradient”.

— * —

--S 26 of 36
totalDifferential(a(x,y,z))$der
--R
--R
--R   (26)  a  (x,y,z)dz + a  (x,y,z)dy + a  (x,y,z)dx
--R          ,3             ,2             ,1
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 26

———- The “curl”.

— * —

--S 27 of 36
exD alpha
--R
--R
--R   (27)
--R     (c  (x,y,z) - b  (x,y,z))dy dz + (c  (x,y,z) - a  (x,y,z))dx dz
--R       ,2           ,3                  ,1           ,3
--R   +
--R     (b  (x,y,z) - a  (x,y,z))dx dy
--R       ,1           ,2
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 27

———-

The “divergence”.

— * —

--S 28 of 36
exD beta
--R
--R
--R   (28)  (c  (x,y,z) - b  (x,y,z) + a  (x,y,z))dx dy dz
--R           ,1           ,2           ,3
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 28

———-

Note that the deRham complex is an algebra with 1.

— * —

--S 29 of 36
id:der := 1
--R
--R
--R   (29)  1
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 29

———-

Now some parameterized functions (and fomrs – left as an exercise). Note how the system keeps track of where your coordinate functions are located in expressions. By multiplying the expressions below by 1 in the deRham complex, we automatically convert them to 0-forms, i.e., functions on our space.

— * —

--S 30 of 36
g1:der := a([x,t,y,u,v,z,e]) * id
--R
--R
--R   (30)  a(x,t,y,u,v,z,e)
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 30
--S 31 of 36
h1:der := a([x,y,x,t,x,z,y,r,u,x]) * id
--R
--R
--R   (31)  a(x,y,x,t,x,z,y,r,u,x)
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 31
--S 32 of 36
exD g1
--R
--R
--R   (32)  a  (x,t,y,u,v,z,e)dz + a  (x,t,y,u,v,z,e)dy + a  (x,t,y,u,v,z,e)dx
--R          ,6                     ,3                     ,1
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 32
--S 33 of 36
exD h1
--R
--R
--R   (33)
--R     a  (x,y,x,t,x,z,y,r,u,x)dz
--R      ,6
--R   +
--R     (a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x))dy
--R       ,7                         ,2
--R   +
--R         a   (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
--R          ,10                         ,5
--R       +
--R         a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
--R          ,3                         ,1
--R    *
--R       dx
--R                                         Type: DeRhamComplex(Integer,[x,y,z])
--E 33

———-

Now note that we can find the coefficient of some basis term in any form (the basis in this case consists of the 8 forms 1, dx, dx, dz, dx dy, dx dz, dy dz, dx dy dz.

— * —

--S 34 of 36
coefficient(gamma, dx*dy)
--R
--R
--R            2     3 2       2                                   4 2 5    3
--R   (34)  (7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z
--R                                                    Type: Expression(Integer)
--E 34
--S 35 of 36
coefficient(gamma, id)
--R
--R
--R   (35)  0
--R                                                    Type: Expression(Integer)
--E 35
--S 36 of 36
coefficient(g1,id)
--R
--R
--R   (36)  a(x,t,y,u,v,z,e)
--R                                                    Type: Expression(Integer)
--E 36
)spool
)lisp (bye)

———-

References^{[1] nothing}

13