reduce.toc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. \contentsline {chapter}{Abstract}{9}
  2. \contentsline {chapter}{\numberline {1}Introductory Information}{13}
  3. \contentsline {chapter}{\numberline {2}Structure of Programs}{17}
  4. \contentsline {section}{\numberline {2.1}The {REDUCE} Standard Character Set}{17}
  5. \contentsline {section}{\numberline {2.2}Numbers}{17}
  6. \contentsline {section}{\numberline {2.3}Identifiers}{19}
  7. \contentsline {section}{\numberline {2.4}Variables}{20}
  8. \contentsline {section}{\numberline {2.5}Strings}{21}
  9. \contentsline {section}{\numberline {2.6}Comments}{21}
  10. \contentsline {section}{\numberline {2.7}Operators}{22}
  11. \contentsline {chapter}{\numberline {3}Expressions}{25}
  12. \contentsline {section}{\numberline {3.1}Scalar Expressions}{25}
  13. \contentsline {section}{\numberline {3.2}Integer Expressions}{26}
  14. \contentsline {section}{\numberline {3.3}Boolean Expressions}{27}
  15. \contentsline {section}{\numberline {3.4}Equations}{28}
  16. \contentsline {section}{\numberline {3.5}Proper Statements as Expressions}{29}
  17. \contentsline {chapter}{\numberline {4}Lists}{31}
  18. \contentsline {section}{\numberline {4.1}Operations on Lists}{31}
  19. \contentsline {subsection}{\numberline {4.1.1}LIST}{32}
  20. \contentsline {subsection}{\numberline {4.1.2}FIRST}{32}
  21. \contentsline {subsection}{\numberline {4.1.3}SECOND}{32}
  22. \contentsline {subsection}{\numberline {4.1.4}THIRD}{32}
  23. \contentsline {subsection}{\numberline {4.1.5}REST}{32}
  24. \contentsline {subsection}{\numberline {4.1.6}$.$ (Cons) Operator}{32}
  25. \contentsline {subsection}{\numberline {4.1.7}APPEND}{32}
  26. \contentsline {subsection}{\numberline {4.1.8}REVERSE}{33}
  27. \contentsline {subsection}{\numberline {4.1.9}List Arguments of Other Operators}{33}
  28. \contentsline {subsection}{\numberline {4.1.10}Caveats and Examples}{33}
  29. \contentsline {chapter}{\numberline {5}Statements}{35}
  30. \contentsline {section}{\numberline {5.1}Assignment Statements}{36}
  31. \contentsline {subsection}{\numberline {5.1.1}Set Statement}{36}
  32. \contentsline {section}{\numberline {5.2}Group Statements}{37}
  33. \contentsline {section}{\numberline {5.3}Conditional Statements}{37}
  34. \contentsline {section}{\numberline {5.4}FOR Statements}{38}
  35. \contentsline {section}{\numberline {5.5}WHILE \dots DO}{40}
  36. \contentsline {section}{\numberline {5.6}REPEAT \dots UNTIL}{41}
  37. \contentsline {section}{\numberline {5.7}Compound Statements}{41}
  38. \contentsline {subsection}{\numberline {5.7.1}Compound Statements with GO TO}{43}
  39. \contentsline {subsection}{\numberline {5.7.2}Labels and GO TO Statements}{43}
  40. \contentsline {subsection}{\numberline {5.7.3}RETURN Statements}{44}
  41. \contentsline {chapter}{\numberline {6}Commands and Declarations}{47}
  42. \contentsline {section}{\numberline {6.1}Array Declarations}{47}
  43. \contentsline {section}{\numberline {6.2}Mode Handling Declarations}{48}
  44. \contentsline {section}{\numberline {6.3}END}{49}
  45. \contentsline {section}{\numberline {6.4}BYE Command}{49}
  46. \contentsline {section}{\numberline {6.5}SHOWTIME Command}{49}
  47. \contentsline {section}{\numberline {6.6}DEFINE Command}{49}
  48. \contentsline {chapter}{\numberline {7}Built-in Prefix Operators}{51}
  49. \contentsline {section}{\numberline {7.1}Numerical Operators}{51}
  50. \contentsline {subsection}{\numberline {7.1.1}ABS}{51}
  51. \contentsline {subsection}{\numberline {7.1.2}CEILING}{52}
  52. \contentsline {subsection}{\numberline {7.1.3}CONJ}{52}
  53. \contentsline {subsection}{\numberline {7.1.4}FACTORIAL}{52}
  54. \contentsline {subsection}{\numberline {7.1.5}FIX}{52}
  55. \contentsline {subsection}{\numberline {7.1.6}FLOOR}{53}
  56. \contentsline {subsection}{\numberline {7.1.7}IMPART}{53}
  57. \contentsline {subsection}{\numberline {7.1.8}MAX/MIN}{53}
  58. \contentsline {subsection}{\numberline {7.1.9}NEXTPRIME}{53}
  59. \contentsline {subsection}{\numberline {7.1.10}RANDOM}{54}
  60. \contentsline {subsection}{\numberline {7.1.11}RANDOM\_NEW\_SEED}{54}
  61. \contentsline {subsection}{\numberline {7.1.12}REPART}{54}
  62. \contentsline {subsection}{\numberline {7.1.13}ROUND}{55}
  63. \contentsline {subsection}{\numberline {7.1.14}SIGN}{55}
  64. \contentsline {section}{\numberline {7.2}Mathematical Functions}{55}
  65. \contentsline {section}{\numberline {7.3}DF Operator}{59}
  66. \contentsline {subsection}{\numberline {7.3.1}Adding Differentiation Rules}{59}
  67. \contentsline {section}{\numberline {7.4}INT Operator}{60}
  68. \contentsline {subsection}{\numberline {7.4.1}Options}{61}
  69. \contentsline {subsection}{\numberline {7.4.2}Advanced Use}{61}
  70. \contentsline {subsection}{\numberline {7.4.3}References}{61}
  71. \contentsline {section}{\numberline {7.5}LENGTH Operator}{62}
  72. \contentsline {section}{\numberline {7.6}MAP Operator}{62}
  73. \contentsline {section}{\numberline {7.7}MKID Operator}{63}
  74. \contentsline {section}{\numberline {7.8}PF Operator}{64}
  75. \contentsline {section}{\numberline {7.9}SELECT Operator}{65}
  76. \contentsline {section}{\numberline {7.10}SOLVE Operator}{65}
  77. \contentsline {subsection}{\numberline {7.10.1}Handling of Undetermined Solutions}{67}
  78. \contentsline {subsection}{\numberline {7.10.2}Solutions of Equations Involving Cubics and Quartics}{68}
  79. \contentsline {subsection}{\numberline {7.10.3}Other Options}{70}
  80. \contentsline {subsection}{\numberline {7.10.4}Parameters and Variable Dependency}{71}
  81. \contentsline {section}{\numberline {7.11}Even and Odd Operators}{74}
  82. \contentsline {section}{\numberline {7.12}Linear Operators}{75}
  83. \contentsline {section}{\numberline {7.13}Non-Commuting Operators}{76}
  84. \contentsline {section}{\numberline {7.14}Symmetric and Antisymmetric Operators}{76}
  85. \contentsline {section}{\numberline {7.15}Declaring New Prefix Operators}{77}
  86. \contentsline {section}{\numberline {7.16}Declaring New Infix Operators}{77}
  87. \contentsline {section}{\numberline {7.17}Creating/Removing Variable Dependency}{78}
  88. \contentsline {chapter}{\numberline {8}Display and Structuring of Expressions}{81}
  89. \contentsline {section}{\numberline {8.1}Kernels}{81}
  90. \contentsline {section}{\numberline {8.2}The Expression Workspace}{82}
  91. \contentsline {section}{\numberline {8.3}Output of Expressions}{83}
  92. \contentsline {subsection}{\numberline {8.3.1}LINELENGTH Operator}{84}
  93. \contentsline {subsection}{\numberline {8.3.2}Output Declarations}{84}
  94. \contentsline {subsubsection}{ORDER Declaration}{84}
  95. \contentsline {subsubsection}{FACTOR Declaration}{85}
  96. \contentsline {subsection}{\numberline {8.3.3}Output Control Switches}{85}
  97. \contentsline {subsubsection}{ALLFAC Switch}{85}
  98. \contentsline {subsubsection}{DIV Switch}{86}
  99. \contentsline {subsubsection}{LIST Switch}{86}
  100. \contentsline {subsubsection}{NOSPLIT Switch}{86}
  101. \contentsline {subsubsection}{RAT Switch}{87}
  102. \contentsline {subsubsection}{RATPRI Switch}{88}
  103. \contentsline {subsubsection}{REVPRI Switch}{88}
  104. \contentsline {subsection}{\numberline {8.3.4}WRITE Command}{89}
  105. \contentsline {subsection}{\numberline {8.3.5}Suppression of Zeros}{91}
  106. \contentsline {subsection}{\numberline {8.3.6}{FORTRAN} Style Output Of Expressions}{91}
  107. \contentsline {subsubsection}{{FORTRAN} Output Options}{93}
  108. \contentsline {subsection}{\numberline {8.3.7}Saving Expressions for Later Use as Input}{94}
  109. \contentsline {subsection}{\numberline {8.3.8}Displaying Expression Structure}{94}
  110. \contentsline {section}{\numberline {8.4}Changing the Internal Order of Variables}{97}
  111. \contentsline {section}{\numberline {8.5}Obtaining Parts of Algebraic Expressions}{97}
  112. \contentsline {subsection}{\numberline {8.5.1}COEFF Operator}{97}
  113. \contentsline {subsection}{\numberline {8.5.2}COEFFN Operator}{98}
  114. \contentsline {subsection}{\numberline {8.5.3}PART Operator}{98}
  115. \contentsline {subsection}{\numberline {8.5.4}Substituting for Parts of Expressions}{100}
  116. \contentsline {chapter}{\numberline {9}Polynomials and Rationals}{101}
  117. \contentsline {section}{\numberline {9.1}Controlling the Expansion of Expressions}{102}
  118. \contentsline {section}{\numberline {9.2}Factorization of Polynomials}{102}
  119. \contentsline {section}{\numberline {9.3}Cancellation of Common Factors}{104}
  120. \contentsline {subsection}{\numberline {9.3.1}Determining the GCD of Two Polynomials}{105}
  121. \contentsline {section}{\numberline {9.4}Working with Least Common Multiples}{106}
  122. \contentsline {section}{\numberline {9.5}Controlling Use of Common Denominators}{106}
  123. \contentsline {section}{\numberline {9.6}REMAINDER Operator}{106}
  124. \contentsline {section}{\numberline {9.7}RESULTANT Operator}{107}
  125. \contentsline {section}{\numberline {9.8}DECOMPOSE Operator}{108}
  126. \contentsline {section}{\numberline {9.9}INTERPOL operator}{109}
  127. \contentsline {section}{\numberline {9.10}Obtaining Parts of Polynomials and Rationals}{109}
  128. \contentsline {subsection}{\numberline {9.10.1}DEG Operator}{109}
  129. \contentsline {subsection}{\numberline {9.10.2}DEN Operator}{110}
  130. \contentsline {subsection}{\numberline {9.10.3}LCOF Operator}{110}
  131. \contentsline {subsection}{\numberline {9.10.4}LPOWER Operator}{111}
  132. \contentsline {subsection}{\numberline {9.10.5}LTERM Operator}{111}
  133. \contentsline {subsection}{\numberline {9.10.6}MAINVAR Operator}{111}
  134. \contentsline {subsection}{\numberline {9.10.7}NUM Operator}{112}
  135. \contentsline {subsection}{\numberline {9.10.8}REDUCT Operator}{112}
  136. \contentsline {section}{\numberline {9.11}Polynomial Coefficient Arithmetic}{113}
  137. \contentsline {subsection}{\numberline {9.11.1}Rational Coefficients in Polynomials}{113}
  138. \contentsline {subsection}{\numberline {9.11.2}Real Coefficients in Polynomials}{113}
  139. \contentsline {subsection}{\numberline {9.11.3}Modular Number Coefficients in Polynomials}{115}
  140. \contentsline {subsection}{\numberline {9.11.4}Complex Number Coefficients in Polynomials}{115}
  141. \contentsline {chapter}{\numberline {10}Substitution Commands}{117}
  142. \contentsline {section}{\numberline {10.1}SUB Operator}{117}
  143. \contentsline {section}{\numberline {10.2}LET Rules}{118}
  144. \contentsline {subsection}{\numberline {10.2.1}FOR ALL \dots LET}{120}
  145. \contentsline {subsection}{\numberline {10.2.2}FOR ALL \dots SUCH THAT \dots LET}{121}
  146. \contentsline {subsection}{\numberline {10.2.3}Removing Assignments and Substitution Rules}{122}
  147. \contentsline {subsection}{\numberline {10.2.4}Overlapping LET Rules}{122}
  148. \contentsline {subsection}{\numberline {10.2.5}Substitutions for General Expressions}{123}
  149. \contentsline {section}{\numberline {10.3}Rule Lists}{125}
  150. \contentsline {section}{\numberline {10.4}Asymptotic Commands}{131}
  151. \contentsline {chapter}{\numberline {11}File Handling Commands}{133}
  152. \contentsline {section}{\numberline {11.1}IN Command}{133}
  153. \contentsline {section}{\numberline {11.2}OUT Command}{134}
  154. \contentsline {section}{\numberline {11.3}SHUT Command}{134}
  155. \contentsline {chapter}{\numberline {12}Commands for Interactive Use}{135}
  156. \contentsline {section}{\numberline {12.1}Referencing Previous Results}{135}
  157. \contentsline {section}{\numberline {12.2}Interactive Editing}{136}
  158. \contentsline {section}{\numberline {12.3}Interactive File Control}{137}
  159. \contentsline {chapter}{\numberline {13}Matrix Calculations}{139}
  160. \contentsline {section}{\numberline {13.1}MAT Operator}{139}
  161. \contentsline {section}{\numberline {13.2}Matrix Variables}{140}
  162. \contentsline {section}{\numberline {13.3}Matrix Expressions}{140}
  163. \contentsline {section}{\numberline {13.4}Operators with Matrix Arguments}{141}
  164. \contentsline {subsection}{\numberline {13.4.1}DET Operator}{141}
  165. \contentsline {subsection}{\numberline {13.4.2}MATEIGEN Operator}{142}
  166. \contentsline {subsection}{\numberline {13.4.3}TP Operator}{143}
  167. \contentsline {subsection}{\numberline {13.4.4}Trace Operator}{143}
  168. \contentsline {subsection}{\numberline {13.4.5}Matrix Cofactors}{143}
  169. \contentsline {subsection}{\numberline {13.4.6}NULLSPACE Operator}{143}
  170. \contentsline {subsection}{\numberline {13.4.7}RANK Operator}{144}
  171. \contentsline {section}{\numberline {13.5}Matrix Assignments}{145}
  172. \contentsline {section}{\numberline {13.6}Evaluating Matrix Elements}{145}
  173. \contentsline {chapter}{\numberline {14}Procedures}{147}
  174. \contentsline {section}{\numberline {14.1}Procedure Heading}{148}
  175. \contentsline {section}{\numberline {14.2}Procedure Body}{149}
  176. \contentsline {section}{\numberline {14.3}Using LET Inside Procedures}{151}
  177. \contentsline {section}{\numberline {14.4}LET Rules as Procedures}{152}
  178. \contentsline {section}{\numberline {14.5}REMEMBER Statement}{153}
  179. \contentsline {chapter}{\numberline {15}Symbolic Mode}{155}
  180. \contentsline {section}{\numberline {15.1}Symbolic Infix Operators}{157}
  181. \contentsline {section}{\numberline {15.2}Symbolic Expressions}{157}
  182. \contentsline {section}{\numberline {15.3}Quoted Expressions}{157}
  183. \contentsline {section}{\numberline {15.4}Lambda Expressions}{157}
  184. \contentsline {section}{\numberline {15.5}Symbolic Assignment Statements}{158}
  185. \contentsline {section}{\numberline {15.6}FOR EACH Statement}{159}
  186. \contentsline {section}{\numberline {15.7}Symbolic Procedures}{159}
  187. \contentsline {section}{\numberline {15.8}Standard Lisp Equivalent of Reduce Input}{160}
  188. \contentsline {section}{\numberline {15.9}Communicating with Algebraic Mode}{160}
  189. \contentsline {subsection}{\numberline {15.9.1}Passing Algebraic Mode Values to Symbolic Mode}{161}
  190. \contentsline {subsection}{\numberline {15.9.2}Passing Symbolic Mode Values to Algebraic Mode}{163}
  191. \contentsline {subsection}{\numberline {15.9.3}Complete Example}{164}
  192. \contentsline {subsection}{\numberline {15.9.4}Defining Procedures for Intermode Communication}{164}
  193. \contentsline {section}{\numberline {15.10}Rlisp '88}{165}
  194. \contentsline {section}{\numberline {15.11}References}{166}
  195. \contentsline {chapter}{\numberline {16}Calculations in High Energy Physics}{167}
  196. \contentsline {section}{\numberline {16.1}High Energy Physics Operators}{167}
  197. \contentsline {subsection}{\numberline {16.1.1}. (Cons) Operator}{167}
  198. \contentsline {subsection}{\numberline {16.1.2}G Operator for Gamma Matrices}{168}
  199. \contentsline {subsection}{\numberline {16.1.3}EPS Operator}{169}
  200. \contentsline {section}{\numberline {16.2}Vector Variables}{169}
  201. \contentsline {section}{\numberline {16.3}Additional Expression Types}{170}
  202. \contentsline {subsection}{\numberline {16.3.1}Vector Expressions}{170}
  203. \contentsline {subsection}{\numberline {16.3.2}Dirac Expressions}{170}
  204. \contentsline {section}{\numberline {16.4}Trace Calculations}{171}
  205. \contentsline {section}{\numberline {16.5}Mass Declarations}{171}
  206. \contentsline {section}{\numberline {16.6}Example}{172}
  207. \contentsline {section}{\numberline {16.7}Extensions to More Than Four Dimensions}{173}
  208. \contentsline {chapter}{\numberline {17}{REDUCE} and Rlisp Utilities}{175}
  209. \contentsline {section}{\numberline {17.1}The Standard Lisp Compiler}{175}
  210. \contentsline {section}{\numberline {17.2}Fast Loading Code Generation Program}{176}
  211. \contentsline {section}{\numberline {17.3}The Standard Lisp Cross Reference Program}{177}
  212. \contentsline {subsection}{\numberline {17.3.1}Restrictions}{178}
  213. \contentsline {subsection}{\numberline {17.3.2}Usage}{178}
  214. \contentsline {subsection}{\numberline {17.3.3}Options}{178}
  215. \contentsline {section}{\numberline {17.4}Prettyprinting Reduce Expressions}{179}
  216. \contentsline {section}{\numberline {17.5}Prettyprinting Standard Lisp S-Expressions}{179}
  217. \contentsline {chapter}{\numberline {18}Maintaining {REDUCE}}{181}
  218. \contentsline {chapter}{\numberline {A}Reserved Identifiers}{183}