eds.red 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. module eds;
  2. %
  3. % EDS V2.2
  4. %
  5. %
  6. % Author: David Hartley
  7. % Physics and Mathematical Physics
  8. % University of Adelaide SA 5005
  9. % Australia
  10. %
  11. % email: DHartley@physics.adelaide.edu.au
  12. %
  13. %
  14. % Description: EDS is a REDUCE package for symbolic analysis of partial
  15. % differential equations using the geometrical approach of
  16. % exterior differential systems. The package implements
  17. % much of exterior differential systems theory, including
  18. % prolongation and involution analysis, and has been
  19. % optimised for large, non-linear problems.
  20. %
  21. %
  22. % Requires: REDUCE 3.8
  23. %
  24. % Created: 23/6/90 V0 as es.red (with Robin W Tucker)
  25. %
  26. % Modified: 8/8/90 V0.1 Added quasi-linear solving and consist-
  27. % ency conditions for simultaneous eqns
  28. % 11/9/90 V0.2 Added resimp in front of all subf, subsq
  29. % etc as temporary fix for subf bug.
  30. % 14/5/91 V0.3 Switched off factor (and on exp) in
  31. % various routines to make simplifications
  32. % work.
  33. % 22/5/91 V0.4 Added subs2 in front of all resimp as
  34. % temporary fix for unseen power LET rule
  35. % bug.
  36. % 26/11/91 V0.5 Altered algorithm in regchn so that
  37. % alpha coefficients are not chosen until
  38. % entire chain has been constructed.
  39. % 30/6/92 V1 Renamed exsys.red.
  40. % Radically altered exsolve to use modulo
  41. % rather than contraction. Eliminated need
  42. % for frame vectors. Added extra switches
  43. % to allow given, random or (as before)
  44. % generic combinations of the independence
  45. % 1-forms to be used to construct a
  46. % regular chain.
  47. % Removed many utilities to tools.red.
  48. % 23/7/92 V1.1 Added module `complete'
  49. % 14/3/94 V1.2 Renamed eds.red.
  50. % Modified for independent compilation,
  51. % and for compatibility with new xideal.
  52. % 25/4/96 V2.0 Total rewrite using parts of earlier
  53. % versions.
  54. % Added types for EDS and coframing.
  55. % 26/11/96 V2.1 Made cross a bundle product when arguments
  56. % share submanifold
  57. % 08/07/03 V2.2 Various bug fixes and updates for REDUCE 3.8
  58. %
  59. % Other packages which must be loaded at run-time.
  60. load_package solve,excalc,xideal;
  61. create!-package('(
  62. eds % Header module
  63. edseval % Definition and manipulation of eds structure for exterior systems
  64. edscfrm % Coframing structure for EDS
  65. systems % Operations on exterior differential systems
  66. tableaux % Definition and manipulation of tableaux using tab structure
  67. contact % Contact systems on jet bundles and Grassmann bundles
  68. invol % Cartan characters, reduced characters, involution test
  69. prolong % Prolonged systems, tableaux
  70. pullback % Pullback transformations
  71. restrict % Restrict to a subset of a coframing
  72. transfrm % Cobasis transformations
  73. edspde % PDE interface to EDS
  74. edsequiv % Check if EDS structures are equivalent
  75. edsuser % Miscellaneous user functions
  76. edsnorml % Converting exterior systems to internal form
  77. edssolve % Specialised solvers for EDS
  78. disjoin % Convert a variety to a disjoint union of sub-coframings
  79. element % Generate a random integral element
  80. edsaux % Miscellaneous support functions
  81. edsexptl % Experimental (algebraic mode) operators
  82. edspatch % Various patches for other parts of Reduce.
  83. ),'(contrib eds));
  84. % Switches
  85. fluid '(!*edsverbose !*edsdebug !*edssloppy !*edsdisjoint !*genpos
  86. !*ranpos);
  87. switch edsverbose; % prints calculation traces when on
  88. switch edsdebug; % prints debugging information when on
  89. switch edsdisjoint; % allows automatic variety decomposition when on
  90. switch edssloppy; % treat quasilinear systems as semilinear
  91. switch genpos; % Calculate characters with system in general
  92. % position
  93. switch ranpos; % Calculate characters with system in random
  94. % position
  95. put('genpos,'simpfg,'((t (setq !*ranpos nil))));
  96. put('ranpos,'simpfg,'((t (setq !*genpos nil))));
  97. % Global variables
  98. fluid '(cfrmcob!* cfrmcrd!* cfrmdrv!* cfrmrsx!* pullback_maps
  99. dependencies);
  100. cfrmcob!* := nil; % cobasis for background coframing
  101. cfrmcrd!* := nil; % coordinates for background coframing
  102. cfrmdrv!* := nil; % structure equations for background coframing
  103. cfrmrsx!* := nil; % restrictions for background coframing as pf
  104. pullback_maps:= makelist {}; % list of maps used by last call to prolong
  105. dependencies := makelist {}; % dependencies removed by pde2eds
  106. flag('(pullback_maps dependencies),'share);
  107. % Macros used throughout
  108. symbolic smacro procedure eds_sys s;
  109. cadr s;
  110. symbolic smacro procedure eds_ind s;
  111. caddr s;
  112. symbolic smacro procedure eds_cfrm s;
  113. cadddr s;
  114. symbolic smacro procedure eds_props s;
  115. car cddddr s;
  116. symbolic smacro procedure cfrm_cob m;
  117. cadr m;
  118. symbolic smacro procedure cfrm_crd m;
  119. caddr m;
  120. symbolic smacro procedure cfrm_drv m;
  121. cadddr m;
  122. symbolic smacro procedure cfrm_rsx m;
  123. nth(m,5);
  124. % Macro for edscall
  125. symbolic macro procedure edscall u;
  126. % evaluate form cadr u within edsprotect
  127. function edsprotect .
  128. foreach x in cdr u collect
  129. function list . mkquote car x . cdr x;
  130. %%%% Form function for edscall
  131. %%%
  132. %%%
  133. %%%put('edscall,'formfn,'formedscall);
  134. %%%
  135. %%%symbolic procedure formedscall(u,v,mode);
  136. %%% % evaluate form cadr u within edsprotect
  137. %%% function edsprotect .
  138. %%% foreach x in formlis(cdr u,v,mode) collect
  139. %%% function list . mkquote car x . cdr x;
  140. % Macros from excalc for compilation
  141. smacro procedure !*k2pf u;
  142. u .* (1 ./ 1) .+ nil;
  143. smacro procedure negpf u;
  144. multpfsq(u,(-1) ./ 1);
  145. smacro procedure lowerind u;
  146. list('minus,u);
  147. endmodule;
  148. end;