diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 3d9290d..818fdb9 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -28811,6 +28811,7 @@ d P )spool )lisp (bye) \end{chunk} + \begin{chunk}{DeRhamComplex.help} ==================================================================== DeRhamComplex examples @@ -29061,193 +29062,1464 @@ o )help Operator o )show DeRhamComplex \end{chunk} -\pagehead{DeRhamComplex}{DERHAM} -\pagepic{ps/v103derhamcomplex.ps}{DERHAM}{1.00} -{\bf See}\\ -\pageto{ExtAlgBasis}{EAB} -\pageto{AntiSymm}{ANTISYM} -{\bf Exports:}\\ -\begin{tabular}{llll} -\cross{DERHAM}{0} & -\cross{DERHAM}{1} & -\cross{DERHAM}{characteristic} & -\cross{DERHAM}{coefficient} \\ -\cross{DERHAM}{coerce} & -\cross{DERHAM}{degree} & -\cross{DERHAM}{exteriorDifferential} & -\cross{DERHAM}{generator} \\ -\cross{DERHAM}{hash} & -\cross{DERHAM}{homogeneous?} & -\cross{DERHAM}{latex} & -\cross{DERHAM}{leadingBasisTerm} \\ -\cross{DERHAM}{leadingCoefficient} & -\cross{DERHAM}{map} & -\cross{DERHAM}{one?} & -\cross{DERHAM}{recip} \\ -\cross{DERHAM}{reductum} & -\cross{DERHAM}{retract} & -\cross{DERHAM}{retractable?} & -\cross{DERHAM}{retractIfCan} \\ -\cross{DERHAM}{sample} & -\cross{DERHAM}{subtractIfCan} & -\cross{DERHAM}{totalDifferential} & -\cross{DERHAM}{zero?} \\ -\cross{DERHAM}{?\~{}=?} & -\cross{DERHAM}{?*?} & -\cross{DERHAM}{?**?} & -\cross{DERHAM}{?\^{}?} \\ -\cross{DERHAM}{?+?} & -\cross{DERHAM}{?-?} & -\cross{DERHAM}{-?} & -\cross{DERHAM}{?=?} -\end{tabular} +\begin{chunk}{leadingCoefficient.help} +==================================================================== +leadingCoefficient from DeRhamComplex (DERHAM) +==================================================================== -\begin{chunk}{domain DERHAM DeRhamComplex} -)abbrev domain DERHAM DeRhamComplex -++ Author: Larry A. Lambe and Kurt Pagani -++ Date : 01/26/91. -++ Revised : 12/01/91. -++ Description: -++ The deRham complex of Euclidean space, that is, the -++ class of differential forms of arbitary degree over a coefficient ring. -++ See Flanders, Harley, Differential Forms, With Applications to the Physical -++ Sciences, New York, Academic Press, 1963. - -DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where - CoefRing : Join(Ring, OrderedSet) - ASY ==> AntiSymm(R,listIndVar) - DIFRING ==> DifferentialRing - LALG ==> LeftAlgebra - FMR ==> FreeMod(R,EAB) - I ==> Integer - L ==> List - EAB ==> ExtAlgBasis -- these are exponents of basis elements in order - NNI ==> NonNegativeInteger - O ==> OutputForm - R ==> Expression(CoefRing) - SMR ==> SquareMatrix(#listIndVar,R) - - Export == Join(LALG(R), RetractableTo(R)) with - leadingCoefficient : % -> R - ++ leadingCoefficient(df) returns the leading - ++ coefficient of differential form df. - leadingBasisTerm : % -> % - ++ leadingBasisTerm(df) returns the leading - ++ basis term of differential form df. - reductum : % -> % - ++ reductum(df), where df is a differential form, - ++ returns df minus the leading - ++ term of df if df has two or more terms, and - ++ 0 otherwise. - coefficient : (%,%) -> R - ++ coefficient(df,u), where df is a differential form, - ++ returns the coefficient of df containing the basis term u - ++ if such a term exists, and 0 otherwise. - generator : NNI -> % - ++ generator(n) returns the nth basis term for a differential form. - homogeneous? : % -> Boolean - ++ homogeneous?(df) tests if all of the terms of - ++ differential form df have the same degree. - retractable? : % -> Boolean - ++ retractable?(df) tests if differential form df is a 0-form, - ++ i.e., if degree(df) = 0. - degree : % -> NNI - ++ degree(df) returns the homogeneous degree of differential form df. - map : (R -> R, %) -> % - ++ map(f,df) replaces each coefficient x of differential - ++ form df by \spad{f(x)}. - totalDifferential : R -> % - ++ totalDifferential(x) returns the total differential - ++ (gradient) form for element x. - exteriorDifferential : % -> % - ++ exteriorDifferential(df) returns the exterior - ++ derivative (gradient, curl, divergence, ...) of - ++ the differential form df. - dim : % -> NNI - ++ dimension of the underlying space - ++ that is, dim ExtAlg = 2^dim - hodgeStar : (%,SMR) -> % - ++ computes the Hodge dual of the differential form % with respect - ++ to the metric g. - dot : (%,%,SMR) -> R - ++ compute the inner product of two differential forms w.r.t. g - proj : (%,NNI) -> % - ++ projection to homogeneous terms of degree p - interiorProduct : (Vector(R),%,SMR) -> % - ++ calculates the interior product i_X(a) of the vector field X - ++ with the differential form a (w.r.t. metric g) - lieDerivative : (Vector(R),%,SMR) -> % - ++ calculates the Lie derivative L_X(a) of the differential - ++ form a with respect to the vector field X (w.r.t. metric g) +NAME +==== - Implement == ASY add - Rep := ASY + leadingCoefficient - dim := #listIndVar +DOMAIN +====== - totalDifferential(f) == - divs:=[differentiate(f,listIndVar.i)*generator(i)$ASY for i in 1..dim] - reduce("+",divs) + DeRhamComplex (DERHAM) - termDiff : (R, %) -> % - termDiff(r,e) == - totalDifferential(r) * e +SYNOPSYS +======== - exteriorDifferential(x) == - x = 0 => 0 - termDiff(leadingCoefficient(x)$Rep,leadingBasisTerm x) + _ - exteriorDifferential(reductum x) + leadingCoefficient : % -> Expression(CoefRing) - lv := [concat("d",string(liv))$String::Symbol for liv in listIndVar] + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) - displayList:EAB -> O - displayList(x):O == - le: L I := exponents(x)$EAB - reduce(_*,[(lv.i)::O for i in 1..dim | ((le.i) = 1)])$L(O) +DESCRIPTION +=========== - makeTerm:(R,EAB) -> O - makeTerm(r,x) == - -- we know that r ^= 0 - x = Nul(dim)$EAB => r::O - (r = 1) => displayList(x) - r::O * displayList(x) + leadingCoefficient(df) returns the leading coefficient of + differential form df. - terms : % -> List Record(k: EAB, c: R) - terms(a) == - -- it is the case that there are at least two terms in a - a pretend List Record(k: EAB, c: R) - - err1:="CoefRing has no IntegralDomain" - err2:="Not Implemented" - err3:="Degenerate metric" - err4:="Index out of range" +ARGUMENTS +========= - -- coord space dimension - dim(f) == dim + A DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) - -- flip 0->1, 1->0 - flip(b:ExtAlgBasis):ExtAlgBasis == - bl := b pretend List(NNI) - [(i+1) rem 2 for i in bl] pretend ExtAlgBasis +RETURN VALUE +============ - -- list the positions of a's (a=0,1) in x - pos(x:EAB, a:NNI):List(NNI) == - y:= x pretend List(NNI) - [j for j in 1..#y | y.j=a] + Expression(CoefRing) - -- compute dot of singletons - dot1(r:Record(k:EAB,c:R),s:Record(k:EAB,c:R),g:SMR):R == - not CoefRing has IntegralDomain => error(err1) - test(r.k ^= s.k) => 0::R - idx := pos(r.k,1) - idx = [] => r.c * s.c - reduce("*",[1/g(j,j) for j in idx]::List(R))*r.c*s.c + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) - -- export - dot(x,y,g) == - tx:=terms(x) - ty:=terms(y) +EXAMPLES +======== + + der:=DERHAM(Integer,[x,y,z]) + [dx,dy,dz]:=[generator(i)$der for i in 1..3] + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + leadingCoefficient sigma + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op leadingCoefficient + +\end{chunk} + +\begin{chunk}{leadingBasisTerm.help} +==================================================================== +leadingBasisTerm from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + leadingBasisTerm + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + leadingBasisTerm : % -> % + +DESCRIPTION +=========== + + leadingBasisTerm(df) returns the leading basis term of differential form df. + +ARGUMENTS +========= + + A DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + A DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + + +EXAMPLES +======== + + der:=DERHAM(Integer,[x,y,z]) + [dx,dy,dz]:=[generator(i)$der for i in 1..3] + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + leadingBasisTerm sigma + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op leadingBasisTerm + +\end{chunk} + +\begin{chunk}{reductum.help} +==================================================================== +reductum from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + reductum + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + reductum : % -> % + +DESCRIPTION +=========== + + reductum(df), where df is a differential form, returns df minus + the leading term of df if df has two or more terms, and 0 otherwise. + +ARGUMENTS +========= + + A DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element of a DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +EXAMPLES +======== + + der:=DERHAM(Integer,[x,y,z]) + [dx,dy,dz]:=[generator(i)$der for i in 1..3] + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + reductum sigma + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op reductum + +\end{chunk} + +\begin{chunk}{coefficient.help} +==================================================================== +coefficient from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + coefficient + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + coefficient : (%,%) -> R + +DESCRIPTION +=========== + + coefficient(df,u), where df is a differential form, + returns the coefficient of df containing the basis term u + if such a term exists, and 0 otherwise. + +ARGUMENTS +========= + + Both arguments are an element of a DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + Expression(CoefRing) + + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + R := Expression(Integer) + [dx,dy,dz] := [generator(i)$der for i in 1..3] + 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 + alpha : der := f*dx + g*dy + h*dz + beta : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy + gamma := alpha * beta + coefficient(gamma, dx*dy) + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op coefficient + +\end{chunk} + +\begin{chunk}{generator.help} +==================================================================== +generator from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + generator + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + generator : NonNegativeInteger -> % + +DESCRIPTION +=========== + + generator(n) returns the nth basis term for a differential form. + +ARGUMENTS +========= + + The argument is a non-negative integer + +RETURN VALUE +============ + + An element of a DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + [dx,dy,dz] := [generator(i)$der for i in 1..3] + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op generator + +\end{chunk} + +\begin{chunk}{homogeneous?.help} +==================================================================== +homogeneous? from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + homogeneous? + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + homogeneous? : % -> Boolean + +DESCRIPTION +=========== + + homogeneous?(df) tests if all of the terms of differential form df + have the same degree. + + +ARGUMENTS +========= + + An element of a DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element of Boolean + +EXAMPLES +======== + + der:=DERHAM(Integer,[x,y,z]) + [dx,dy,dz]:=[generator(i)$der for i in 1..3] + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + homogeneous? sigma + a:BOP:=operator('a) + b:BOP:=operator('b) + c:BOP:=operator('c) + theta:=a(x,y,z)*dx*dy + b(x,y,z)*dx*dz + c(x,y,z)*dy*dz + homogeneous? (sigma+theta) + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op homogeneous? + +\end{chunk} + +\begin{chunk}{retractable?.help} +==================================================================== +retractable? from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + retractable? + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + retractable? : % -> Boolean + +DESCRIPTION +=========== + + retractable?(df) tests if differential form df is a 0-form, + i.e., if degree(df) = 0. + +ARGUMENTS +========= + + An element of a DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element of Boolean + +EXAMPLES +======== + + der:=DERHAM(Integer,[x,y,z]) + [dx,dy,dz]:=[generator(i)$der for i in 1..3] + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + retractable? sigma + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op retractable? + +\end{chunk} + +\begin{chunk}{degree.help} +==================================================================== +degree from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + degree + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + degree : % -> NonNegativeInteger + +DESCRIPTION +=========== + + degree(df) returns the homogeneous degree of differential form df. + +ARGUMENTS +========= + + An element of a DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element of NonNegativeInteger + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + t1 := generator(1)$der + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + a:BOP:=operator('a) + b:BOP:=operator('b) + c:BOP:=operator('c) + theta:der:=a(x,y,z)*dx*dy + b(x,y,z)*dx*dz + c(x,y,z)*dy*dz + [degree x for x in [sigma,theta,t1]] + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op degree + +\end{chunk} + +\begin{chunk}{map.help} +==================================================================== +map from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + map + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + map : (R -> R, %) -> % + +DESCRIPTION +=========== + + degree(df) returns the homogeneous degree of differential form df. + +ARGUMENTS +========= + + Given R := Expression(CoefRing) + + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + + The first argument is a function from R to R. + + The second argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element from DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + R := Expression(Integer) + T(x:R):R == x^2 + map(T,sigma) + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op map + +\end{chunk} + +\begin{chunk}{totalDifferential.help} +==================================================================== +totalDifferential from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + totalDifferential + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + totalDifferential : R -> % + +DESCRIPTION +=========== + + totalDifferential(x) returns the total differential (gradient) form + for element x. + +ARGUMENTS +========= + + Expression(CoefRing) + + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + +RETURN VALUE +============ + + An element from DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + a : BOP := operator('a) + totalDifferential(a(x,y,z))$der + totalDifferential(x^2+y^2+sin(x)*z^2)$der + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op totalDifferential + +\end{chunk} + +\begin{chunk}{exteriorDifferential.help} +==================================================================== +exteriorDifferential from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + exteriorDifferential + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + exteriorDifferential : % -> % + +DESCRIPTION +=========== + + exteriorDifferential(df) returns the exterior + derivative (gradient, curl, divergence, ...) of the differential form df. + +ARGUMENTS +========= + + An element from DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element from DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + R := Expression(Integer) + [dx,dy,dz] := [generator(i)$der for i in 1..3] + 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 + alpha : der := f*dx + g*dy + h*dz + exteriorDifferential alpha + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op exteriorDifferential + +\end{chunk} + +\begin{chunk}{dim.help} +==================================================================== +dim from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + dim + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + dim : % -> NonNegativeInteger + +DESCRIPTION +=========== + + dimension of the underlying space that is, dim ExtAlg = 2^dim + +ARGUMENTS +========= + + An element from DeRhamComplex, such as DeRhamComplex(Integer,[x,y,z]) + +RETURN VALUE +============ + + An element from NonNegativeInteger + +EXAMPLES +======== + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op dim + +\end{chunk} + +\begin{chunk}{hodgeStar.help} +==================================================================== +hodgeStar from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + hodgeStar + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + hodgeStar : (%,SMR) -> % + +DESCRIPTION +=========== + + Computes the Hodge dual of the differential form with respect + to the metric g. + +ARGUMENTS +========= + + The first argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The second argument is an element of SquareMatrix(#listIndVar,R) + +RETURN VALUE +============ + + An element from NonNegativeInteger + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + G:SquareMatrix(3,Integer):=diagonalMatrix([1,1,1]) + hodgeStar(sigma,G) + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op hodgeStar + +\end{chunk} + +\begin{chunk}{dot.help} +==================================================================== +dot from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + dot + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + dot : (%,%,SMR) -> R + +DESCRIPTION +=========== + + Compute the inner product of two differential forms w.r.t. g + +ARGUMENTS +========= + + The first argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The second argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The third argument is an element of SquareMatrix(#listIndVar,R) + +RETURN VALUE +============ + + Expression(CoefRing) + + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + +EXAMPLES +======== + + der := DeRhamComplex(Integer,[x,y,z]) + f:BOP:=operator('f) + g:BOP:=operator('g) + h:BOP:=operator('h) + sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + G:SquareMatrix(3,Integer):=diagonalMatrix([1,1,1]) + dot(sigma,sigma,G) + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op dot + +\end{chunk} + +\begin{chunk}{proj.help} +==================================================================== +proj from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + proj + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + proj : (%,NNI) -> % + +DESCRIPTION +=========== + + Projection to homogeneous terms of degree p + +ARGUMENTS +========= + + The first argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The second argument is an element from NonNegativeInteger + +RETURN VALUE +============ + + An element from DeRhamComplex such as DeRhamComplex(Integer,[x,y,z]). + +EXAMPLES +======== + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op proj + +\end{chunk} + +\begin{chunk}{interiorProduct.help} +==================================================================== +interiorProduct from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + interiorProduct + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + interiorProduct : (Vector(R),%,SMR) -> % + +DESCRIPTION +=========== + + Calculates the interior product i_X(a) of the vector field X + with the differential form a (w.r.t. metric g) + +ARGUMENTS +========= + + The first element is a Vector(Expression(CoefRing)) + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + + The second argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The third argument is an element of SquareMatrix(#listIndVar,R) + +RETURN VALUE +============ + + An element from DeRhamComplex such as DeRhamComplex(Integer,[x,y,z]). + +EXAMPLES +======== + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op interiorProduct + +\end{chunk} + +\begin{chunk}{lieDerivative.help} +==================================================================== +lieDerivative from DeRhamComplex (DERHAM) +==================================================================== + +NAME +==== + + lieDerivative + +DOMAIN +====== + + DeRhamComplex (DERHAM) + +SYNOPSYS +======== + + lieDerivative : (Vector(R),%,SMR) -> % + +DESCRIPTION +=========== + + Calculates the Lie derivative L_X(a) of the differential + form a with respect to the vector field X (w.r.t. metric g) + +ARGUMENTS +========= + + The first element is a Vector(Expression(CoefRing)) + where CoefRing is part of the constructor signature: + DeRhamComplex(CoefRing,listIndVar:List Symbol) + + The second argument is an element from DeRhamComplex, + such as DeRhamComplex(Integer,[x,y,z]). + + The third argument is an element of SquareMatrix(#listIndVar,R) + +RETURN VALUE +============ + + An element from DeRhamComplex such as DeRhamComplex(Integer,[x,y,z]). + +EXAMPLES +======== + +NOTES +===== + +REFERENCES +========== + +Flanders, Harley, +"Differential Forms, With Applications to the Physical Sciences", +New York, Academic Press, 1963. + +SEE ALSO +======== + +o )show DeRhamComplex +o )d op lieDerivative + +\end{chunk} + +\pagehead{DeRhamComplex}{DERHAM} +\pagepic{ps/v103derhamcomplex.ps}{DERHAM}{1.00} +{\bf See}\\ +\pageto{ExtAlgBasis}{EAB} +\pageto{AntiSymm}{ANTISYM} + +{\bf Exports:}\\ +\begin{tabular}{llll} +\cross{DERHAM}{0} & +\cross{DERHAM}{1} & +\cross{DERHAM}{characteristic} & +\cross{DERHAM}{coefficient} \\ +\cross{DERHAM}{coerce} & +\cross{DERHAM}{degree} & +\cross{DERHAM}{exteriorDifferential} & +\cross{DERHAM}{generator} \\ +\cross{DERHAM}{hash} & +\cross{DERHAM}{homogeneous?} & +\cross{DERHAM}{latex} & +\cross{DERHAM}{leadingBasisTerm} \\ +\cross{DERHAM}{leadingCoefficient} & +\cross{DERHAM}{map} & +\cross{DERHAM}{one?} & +\cross{DERHAM}{recip} \\ +\cross{DERHAM}{reductum} & +\cross{DERHAM}{retract} & +\cross{DERHAM}{retractable?} & +\cross{DERHAM}{retractIfCan} \\ +\cross{DERHAM}{sample} & +\cross{DERHAM}{subtractIfCan} & +\cross{DERHAM}{totalDifferential} & +\cross{DERHAM}{zero?} \\ +\cross{DERHAM}{?\~{}=?} & +\cross{DERHAM}{?*?} & +\cross{DERHAM}{?**?} & +\cross{DERHAM}{?\^{}?} \\ +\cross{DERHAM}{?+?} & +\cross{DERHAM}{?-?} & +\cross{DERHAM}{-?} & +\cross{DERHAM}{?=?} +\end{tabular} + +\begin{chunk}{domain DERHAM DeRhamComplex} +)abbrev domain DERHAM DeRhamComplex +++ Author: Larry A. Lambe and Kurt Pagani +++ Date : 01/26/91. +++ Revised : 12/01/91. +++ Description: +++ The deRham complex of Euclidean space, that is, the +++ class of differential forms of arbitary degree over a coefficient ring. +++ See Flanders, Harley, Differential Forms, With Applications to the Physical +++ Sciences, New York, Academic Press, 1963. + +DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where + CoefRing : Join(Ring, OrderedSet) + ASY ==> AntiSymm(R,listIndVar) + DIFRING ==> DifferentialRing + LALG ==> LeftAlgebra + FMR ==> FreeMod(R,EAB) + I ==> Integer + L ==> List + EAB ==> ExtAlgBasis -- these are exponents of basis elements in order + NNI ==> NonNegativeInteger + O ==> OutputForm + R ==> Expression(CoefRing) + SMR ==> SquareMatrix(#listIndVar,R) + + Export == Join(LALG(R), RetractableTo(R)) with + + leadingCoefficient : % -> R + ++ leadingCoefficient(df) returns the leading + ++ coefficient of differential form df. + ++ + ++X der:=DERHAM(Integer,[x,y,z]) + ++X [dx,dy,dz]:=[generator(i)$der for i in 1..3] + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X leadingCoefficient sigma + + leadingBasisTerm : % -> % + ++ leadingBasisTerm(df) returns the leading + ++ basis term of differential form df. + ++ + ++X der:=DERHAM(Integer,[x,y,z]) + ++X [dx,dy,dz]:=[generator(i)$der for i in 1..3] + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X leadingBasisTerm sigma + + reductum : % -> % + ++ reductum(df), where df is a differential form, returns df minus + ++ the leading term of df if df has two or more terms, and + ++ 0 otherwise. + ++ + ++X der:=DERHAM(Integer,[x,y,z]) + ++X [dx,dy,dz]:=[generator(i)$der for i in 1..3] + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X reductum sigma + + coefficient : (%,%) -> R + ++ coefficient(df,u), where df is a differential form, + ++ returns the coefficient of df containing the basis term u + ++ if such a term exists, and 0 otherwise. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X R := Expression(Integer) + ++X [dx,dy,dz] := [generator(i)$der for i in 1..3] + ++X f : R := x**2*y*z-5*x**3*y**2*z**5 + ++X g : R := z**2*y*cos(z)-7*sin(x**3*y**2)*z**2 + ++X h : R :=x*y*z-2*x**3*y*z**2 + ++X alpha : der := f*dx + g*dy + h*dz + ++X beta : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy + ++X gamma := alpha * beta + ++X coefficient(gamma, dx*dy) + + generator : NNI -> % + ++ generator(n) returns the nth basis term for a differential form. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X [dx,dy,dz] := [generator(i)$der for i in 1..3] + + homogeneous? : % -> Boolean + ++ homogeneous?(df) tests if all of the terms of + ++ differential form df have the same degree. + ++ + ++X der:=DERHAM(Integer,[x,y,z]) + ++X [dx,dy,dz]:=[generator(i)$der for i in 1..3] + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X homogeneous? sigma + ++X a:BOP:=operator('a) + ++X b:BOP:=operator('b) + ++X c:BOP:=operator('c) + ++X theta:=a(x,y,z)*dx*dy + b(x,y,z)*dx*dz + c(x,y,z)*dy*dz + ++X homogeneous? (sigma+theta) + + retractable? : % -> Boolean + ++ retractable?(df) tests if differential form df is a 0-form, + ++ i.e., if degree(df) = 0. + ++ + ++X der:=DERHAM(Integer,[x,y,z]) + ++X [dx,dy,dz]:=[generator(i)$der for i in 1..3] + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X retractable? sigma + + degree : % -> NNI + ++ degree(df) returns the homogeneous degree of differential form df. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X t1 := generator(1)$der + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X a:BOP:=operator('a) + ++X b:BOP:=operator('b) + ++X c:BOP:=operator('c) + ++X theta:der:=a(x,y,z)*dx*dy + b(x,y,z)*dx*dz + c(x,y,z)*dy*dz + ++X [degree x for x in [sigma,theta,t1]] + + map : (R -> R, %) -> % + ++ map(f,df) replaces each coefficient x of differential + ++ form df by \spad{f(x)}. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X R := Expression(Integer) + ++X T(x:R):R == x^2 + ++X map(T,sigma) + + totalDifferential : R -> % + ++ totalDifferential(x) returns the total differential + ++ (gradient) form for element x. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X a : BOP := operator('a) + ++X totalDifferential(a(x,y,z))$der + ++X totalDifferential(x^2+y^2+sin(x)*z^2)$der + + exteriorDifferential : % -> % + ++ exteriorDifferential(df) returns the exterior + ++ derivative (gradient, curl, divergence, ...) of + ++ the differential form df. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X R := Expression(Integer) + ++X [dx,dy,dz] := [generator(i)$der for i in 1..3] + ++X f : R := x**2*y*z-5*x**3*y**2*z**5 + ++X g : R := z**2*y*cos(z)-7*sin(x**3*y**2)*z**2 + ++X h : R :=x*y*z-2*x**3*y*z**2 + ++X alpha : der := f*dx + g*dy + h*dz + ++X exteriorDifferential alpha + + dim : % -> NNI + ++ dimension of the underlying space + ++ that is, dim ExtAlg = 2^dim + + hodgeStar : (%,SMR) -> % + ++ computes the Hodge dual of the differential form with respect + ++ to the metric g. + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X G:SquareMatrix(3,Integer):=diagonalMatrix([1,1,1]) + ++X hodgeStar(sigma,G) + + dot : (%,%,SMR) -> R + ++ compute the inner product of two differential forms w.r.t. g + ++ + ++X der := DeRhamComplex(Integer,[x,y,z]) + ++X f:BOP:=operator('f) + ++X g:BOP:=operator('g) + ++X h:BOP:=operator('h) + ++X sigma:der:=f(x,y,z)*dx + g(x,y,z)*dy + h(x,y,z)*dz + ++X G:SquareMatrix(3,Integer):=diagonalMatrix([1,1,1]) + ++X dot(sigma,sigma,G) + + proj : (%,NNI) -> % + ++ projection to homogeneous terms of degree p + + interiorProduct : (Vector(R),%,SMR) -> % + ++ calculates the interior product i_X(a) of the vector field X + ++ with the differential form a (w.r.t. metric g) + + lieDerivative : (Vector(R),%,SMR) -> % + ++ calculates the Lie derivative L_X(a) of the differential + ++ form a with respect to the vector field X (w.r.t. metric g) + + Implement == ASY add + Rep := ASY + + dim := #listIndVar + + totalDifferential(f) == + divs:=[differentiate(f,listIndVar.i)*generator(i)$ASY for i in 1..dim] + reduce("+",divs) + + termDiff : (R, %) -> % + termDiff(r,e) == + totalDifferential(r) * e + + exteriorDifferential(x) == + x = 0 => 0 + termDiff(leadingCoefficient(x)$Rep,leadingBasisTerm x) + _ + exteriorDifferential(reductum x) + + lv := [concat("d",string(liv))$String::Symbol for liv in listIndVar] + + displayList:EAB -> O + displayList(x):O == + le: L I := exponents(x)$EAB + reduce(_*,[(lv.i)::O for i in 1..dim | ((le.i) = 1)])$L(O) + + makeTerm:(R,EAB) -> O + makeTerm(r,x) == + -- we know that r ^= 0 + x = Nul(dim)$EAB => r::O + (r = 1) => displayList(x) + r::O * displayList(x) + + terms : % -> List Record(k: EAB, c: R) + terms(a) == + -- it is the case that there are at least two terms in a + a pretend List Record(k: EAB, c: R) + + err1:="CoefRing has no IntegralDomain" + err2:="Not Implemented" + err3:="Degenerate metric" + err4:="Index out of range" + + -- coord space dimension + dim(f) == dim + + -- flip 0->1, 1->0 + flip(b:ExtAlgBasis):ExtAlgBasis == + bl := b pretend List(NNI) + [(i+1) rem 2 for i in bl] pretend ExtAlgBasis + + -- list the positions of a's (a=0,1) in x + pos(x:EAB, a:NNI):List(NNI) == + y:= x pretend List(NNI) + [j for j in 1..#y | y.j=a] + + -- compute dot of singletons + dot1(r:Record(k:EAB,c:R),s:Record(k:EAB,c:R),g:SMR):R == + not CoefRing has IntegralDomain => error(err1) + test(r.k ^= s.k) => 0::R + idx := pos(r.k,1) + idx = [] => r.c * s.c + reduce("*",[1/g(j,j) for j in idx]::List(R))*r.c*s.c + + -- compute dot of singleton terms, general symmetric g +-- dot2(r:REABR, s:REABR, g:SMR):R == +-- not CoefRing has IntegralDomain => error(err1) +-- pr := pos(r.k,1) -- list positions of 1 in r +-- ps := pos(s.k,1) -- list positions of 1 in s +-- test(#p1 ^= #ps) => 0::R -- not same degree => 0 +-- pr = [] => r.c * s.c -- empty pr,ps => product of coefs +-- G := inverse(g)::SMR -- compute the inverse of the metric g +-- test(#pr = 1) => G(pr.1,ps.1)::R * r.c * s.c -- only one element +-- M:Matrix(R) -- the minor +-- M := matrix([[G(pr.i,ps.j])::R for j in 1..#ps] for i in 1..#pr]) +-- determinant(M)::R * r.c * s.c + + -- export + dot(x,y,g) == + not symmetric? g => error(err2) + tx:=terms(x) + ty:=terms(y) + tx = [] or ty = [] => 0::R +-- if diagonal? g then -- better performance +-- reduce("+",[dot2(tx.j,ty.j,g) for j in 1..#tx]) +-- else +-- reduce("+",[dot1(tx.j,ty.j,g) for j in 1..#tx]) reduce("+",[dot1(tx.j,ty.j,g) for j in 1..#tx]) -- export diff --git a/books/bookvolbib.pamphlet b/books/bookvolbib.pamphlet index 2783275..5ede61c 100644 --- a/books/bookvolbib.pamphlet +++ b/books/bookvolbib.pamphlet @@ -7088,7 +7088,7 @@ rational right-hand sides etc." \index{Flanders, Harley} \begin{chunk}{axiom.bib} @book{Flan03, - author = "Flanders, Harley and Mathematics", + author = "Flanders, Harley", title = "Differential Forms with Applications to the Physical Sciences", year = "2003", location = "Mineola, N.Y", diff --git a/changelog b/changelog index 19e879d..6f61b2f 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20141119 tpd src/axiom-website/patches.html 20141119.01.tpd.patch +20141119 tpd books/bookvol10.3 help files for DeRhamComplex +20141119 tpd books/bookvolbib fix Flan03 author list 20141117 tpd src/axiom-website/patches.html 20141117.02.tpd.patch 20141117 tpd books/bookvol10.3 help files for PermutationGroup 20141117 tpd src/axiom-website/patches.html 20141117.01.tpd.patch diff --git a/patch b/patch index 8f086ad..89cb94a 100644 --- a/patch +++ b/patch @@ -1,8 +1,38 @@ -books/bookvol10.3 help files for PermutationGroup +books/bookvol10.3 help files for DeRhamComplex The )help command now recognizes - )help PermutationGroup -- the constructor name - )help PERMGRP -- the abbreviation - )help order -- the function implementations from PERMGRP + )help DeRhamComplex -- the constructor name + )help DERHAM -- the abbreviation + )help leadingCoefficient + )help leadingBasisTerm + )help reductum + )help coefficient + )help generator + )help homogeneous? + )help retractable? + )help degree + )help map + )help totalDifferential + )help exteriorDifferential + )help dim + )help hodgeStar + )help dot + )help proj + )help interiorProduct + )help lieDerivative all of which open in an edit window +There are also usage example code for + )d op leadingCoefficient + )d op leadingBasisTerm + )d op reductum + )d op coefficient + )d op generator + )d op homogeneous? + )d op retractable? + )d op degree + )d op map + )d op totalDifferential + )d op exteriorDifferential + )d op hodgeStar + )d op dot diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 154893b..2d843fd 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4710,6 +4710,8 @@ src/input/Makefile remove gonshor.input
books/bookvol5 newHelpSpad2Cmd now recognizes )help abbreviations
20141117.02.tpd.patch books/bookvol10.3 help files for PermutationGroup
+20141119.01.tpd.patch +books/bookvol10.3 help files for DeRhamComplex