/usr/lib/open-axiom/input/skew.input is in open-axiom-test 1.5.0~svn3056+ds-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | --Copyright The Numerical Algorithms Group Limited 1994.
-- make sure that LALG, EAB, ANTISYM are loaded
--
)cl all
-- We will look at the deRham complex of Euclidean 3-space and use
-- coordinates (x,y,z).
lv:List Symbol := [x,y,z]
-- 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.
macro coefRing == Integer
R := Expression coefRing
-- The declaration for the deRham complex takes arguments a ring coefRing
-- and a list of variables (lv is of type List Symbol).
der := DERHAM(coefRing,lv)
-- here are some functions chosen at random.
f:R:=x**2*y*z-5*x**3*y**2*z**5
g:R:=z**2*y*cos(z)-7*sin(x**3*y**2)*z**2
h:R:=x*y*z-2*x**3*y*z**2
-- The multiplicative basis elements for the exterior algebra over R are
-- defined here.
dx :der := generator(1)
dy :der := generator(2)
dz :der := generator(3)
-- A nice alternate for the assignments above is
[dx,dy,dz] := [generator(i)$der for i in 1..3]
-- Now some 1-forms chosen at random.
alpha:der := f*dx + g*dy + h*dz
beta:der := cos(tan(x*y*z)+x*y*z)*dx + x*dy
-- we know that exteriorDifferential^2 = 0, let's see that:
exteriorDifferential alpha
exteriorDifferential %
-- exteriorDifferential is long, let's shorten that.
macro exD == exteriorDifferential
-- we know that exD is a (graded) derivation, let's see that:
gamma := alpha * beta
delta := exD gamma
-- need the "-" because alpha is a 1-form and 1 is odd.
epsilon := exD(alpha)*beta - alpha * exD(beta)
delta - epsilon
-- We define some operators.
a:BOP := operator('a)
b:BOP := operator('b)
c:BOP := operator('c)
-- Now some indeterminate one and two forms.
alpha := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz
beta := a(x,y,z) * dx * dy + b(x,y,z) * dx * dz + c(x,y,z) * dy * dz
-- the "gradient".
totalDifferential(a(x,y,z))$der
-- the "curl".
exD alpha
-- the "divergence".
exD beta
-- Note that the deRham complex is an algebra with 1.
id:der := 1
-- 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.
g1:der := a([x,t,y,u,v,z,e]) * id
h1:der := a([x,y,x,t,x,z,y,r,u,x]) * id
exD g1
exD h1
-- 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.
coefficient(gamma, dx*dy)
coefficient(gamma, id)
coefficient(g1,id)
|