(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 
starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     92559,       2671]*)
(*NotebookOutlinePosition[    125173,       3635]*)
(*  CellTagsIndexPosition[    121923,       3505]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[TextData[{
  "2.13 Global Aspects of ",
  StyleBox["Mathematica", "SBO"],
  " Sessions"
}], "Section",
  CellTags->{"S2.13.0", "0.1"}],

Cell["2.13.1 The Main Loop", "Subsection",
  CellTags->{"S2.13.1", "1.1"}],

Cell[TextData[{
  "In any interactive session, ",
  StyleBox["Mathematica", "TI"],
  " effectively operates in a loop. It waits for your input, processes the \
input, prints the result, then goes back to waiting for input again. As part \
of this \[OpenCurlyDoubleQuote]main loop\[CloseCurlyDoubleQuote], ",
  StyleBox["Mathematica", "TI"],
  " maintains and uses various global objects. You will often find it useful \
to work with these objects. \nYou should realize, however, that if you use ",
  StyleBox["Mathematica", "TI"],
  " through a special front end, your front end may set up its own main loop, \
and what is said in this section may not apply. "
}], "Text",
  CellTags->{"S2.13.1", "1.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"In[\\\\\\\"\\\", \\\"MR\\\
\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  
                  RowBox[{"\<\"the expression on the \\!\\(\\*StyleBox[\\\"\\\
\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" input line \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"InString[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\
\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"the textual form of the \\!\\(\\*StyleBox[\\\"\
\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" input line \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"%\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\) \
\[ThinSpace]or \[ThinSpace]\\!\\(\\*StyleBox[\\\"\\\\\\\"Out[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\
\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"the expression on the \\!\\(\\*StyleBox[\\\"\\\
\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" output line \"\>"}]},
                {
                  
                  RowBox[{"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Out[\\\\\\\"\\\",\
 \\\"MR\\\"]\\)\"\>", 
                    StyleBox["{",
                      "InlineFormula"], 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "1"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "2"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \[Ellipsis] \
\"\>", 
                    StyleBox["}",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"}], "\<\
\"a list of output expressions \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"%%\\\\\\\"\\\", \
\\\"MR\\\"]\\) \[Ellipsis] \\!\\(\\*StyleBox[\\\"\\\\\\\"%\\\\\\\"\\\", \
\\\"MR\\\"]\\) (\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\) \
times) \[ThinSpace]or \[ThinSpace]\\!\\(\\*StyleBox[\\\"\\\\\\\"Out[-\\\\\\\"\
\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  
                  RowBox[{"\<\"the expression on the \\!\\(\\*StyleBox[\\\"\\\
\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" previous output line \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"MessageList[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  
                  RowBox[{"\<\"a list of messages produced while processing \
the \\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" line \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Line\\\\\\\"\\\", \\\"MR\
\\\"]\\) \"\>", "\<\"the current line number (resettable) \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.3"}],

Cell["Input and output expressions. ", "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "In a standard interactive session, there is a sequence of input and output \
lines. ",
  StyleBox["Mathematica", "TI"],
  " stores the values of the expressions on these lines in ",
  StyleBox["In[", "MR"],
  StyleBox["n", "TI"],
  StyleBox["]", "MR"],
  " and ",
  StyleBox["Out[", "MR"],
  StyleBox["n", "TI"],
  StyleBox["]", "MR"],
  ". \nAs indicated by the usual ",
  StyleBox["In[", "MR"],
  StyleBox["n", "TI"],
  StyleBox["]:=", "MR"],
  " prompt, the input expressions are stored with delayed assignments. This \
means that whenever you ask for ",
  StyleBox["In[", "MR"],
  StyleBox["n", "TI"],
  StyleBox["]", "MR"],
  ", the input expression will always be re\[Hyphen]evaluated in your current \
environment. "
}], "Text",
  CellTags->{"S2.13.1", "1.4"}],

Cell[TextData[{
  "This assigns a value to ",
  StyleBox["x", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.5"}],

Cell[CellGroupData[{

Cell["x = 7", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(7\)], "Output",
  CellLabel->"Out[1]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "Now the value for ",
  StyleBox["x", "MR"],
  " is used. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.6"}],

Cell[CellGroupData[{

Cell["x - x^2 + 5x - 1", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(\(-8\)\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "This removes the value assigned to ",
  StyleBox["x", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.7"}],

Cell["x =.", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "This is re\[Hyphen]evaluated in your current environment, where there is \
no value assigned to ",
  StyleBox["x", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.8"}],

Cell[CellGroupData[{

Cell["In[2]", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(\(-1\) + 6\ x - x\^2\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell["\<\
This gives the textual form of the second input line, appropriate \
for editing or other textual manipulation. \
\>", "MathCaption",
  CellTags->{"S2.13.1", "1.9"}],

Cell[CellGroupData[{

Cell["InString[2] // InputForm", "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S2.13.1"],

Cell["\"x - x^2 + 5x - 1\"", "Output",
  CellLabel->"Out[5]//InputForm= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$HistoryLength\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", "\<\"the number of previous lines of input and output \
to keep \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.10"}],

Cell["Specifying the length of session history to keep. ", "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " by default stores ",
  StyleBox["all", "TI"],
  " your input and output lines for the duration of the session. In a very \
long session, this may take up a large amount of computer memory. You can \
nevertheless get rid of the input and output lines by explicitly clearing the \
values of ",
  StyleBox["In", "MR"],
  " and ",
  StyleBox["Out", "MR"],
  ", using ",
  StyleBox["Unprotect[In,", "MR"],
  " ",
  StyleBox["Out]", "MR"],
  ", followed by ",
  StyleBox["Clear[In,", "MR"],
  " ",
  StyleBox["Out]", "MR"],
  ". You can also tell ",
  StyleBox["Mathematica", "TI"],
  " to keep only a limited number of lines of history by setting the global \
variable ",
  StyleBox["$HistoryLength", "MR"],
  ".  \nNote that at any point in a session, you can reset the line number \
counter ",
  StyleBox["$Line", "MR"],
  ", so that for example new lines are numbered so as to overwrite previous \
ones. "
}], "Text",
  CellTags->{"S2.13.1", "1.11"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$PreRead\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"a function applied to each input string before \
being fed to \\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \
\\\"TI\\\"]\\)\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Pre\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", \("a function applied to each input expression before \
evaluation "\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Post\\\\\\\"\\\", \\\"MR\
\\\"]\\) \"\>", "\<\"a function applied to each expression after evaluation \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$PrePrint\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"a function applied after \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Out[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) is \
assigned, but before the result is printed \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$SyntaxHandler\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", \("a function applied to any input line that yields a \
syntax error "\)}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.12"}],

Cell["Global functions used in the main loop. ", "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " provides a variety of \
\[OpenCurlyDoubleQuote]hooks\[CloseCurlyDoubleQuote] that allow you to insert \
functions to be applied to expressions at various stages in the main loop. \
Thus, for example, any function you assign as the value of the global \
variable ",
  StyleBox["$Pre", "MR"],
  " will automatically be applied before evaluation to any expression you \
give as input. \nFor a particular input line, the standard main loop begins \
by getting a text string of input. Particularly if you need to deal with \
special characters, you may want to modify this text string before it is \
further processed by ",
  StyleBox["Mathematica", "TI"],
  ". You can do this by assigning a function as the value of the global \
variable ",
  StyleBox["$PreRead", "MR"],
  ". This function will be applied to the text string, and the result will be \
used as the actual input string for the particular input line. "
}], "Text",
  CellTags->{"S2.13.1", "1.13"}],

Cell[TextData[{
  "This tells ",
  StyleBox["Mathematica", "TI"],
  " to replace ",
  StyleBox["<<", "MR"],
  " \[Ellipsis] ",
  StyleBox[">>", "MR"],
  " by ",
  Cell[BoxData[
      \(TraditionalForm\`{\)], "InlineFormula"],
  " \[Ellipsis] ",
  Cell[BoxData[
      \(TraditionalForm\`}\)], "InlineFormula"],
  " in every input string. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.14"}],

Cell[CellGroupData[{

Cell["$PreRead = StringReplace[#, {\"<<\" -> \"{\", \">>\" -> \"}\"}]&", \
"Input",
  CellLabel->"In[6]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(StringReplace[#1, {"<<" \[Rule] "{", ">>" \[Rule] "}"}] &\)], "Output",
  CellLabel->"Out[6]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell["You can now enter braces as double angle brackets. ", "MathCaption",
  CellTags->{"S2.13.1", "1.15"}],

Cell[CellGroupData[{

Cell["<<4, 5, 6>>", "Input",
  CellLabel->"In[7]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \({4, 5, 6}\)], "Output",
  CellLabel->"Out[7]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "You can remove the value for ",
  StyleBox["$PreRead", "MR"],
  " like this, at least so long as your definition for ",
  StyleBox["$PreRead", "MR"],
  " does not modify this very input string. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.16"}],

Cell["$PreRead =.", "Input",
  CellLabel->"In[8]:= ",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "Once any ",
  StyleBox["$PreRead", "MR"],
  " processing on an input string is finished, the string is read by ",
  StyleBox["Mathematica", "TI"],
  ". At this point, ",
  StyleBox["Mathematica", "TI"],
  " may find that there is a syntax error in the string. If this happens, \
then ",
  StyleBox["Mathematica", "TI"],
  " calls whatever function you have specified as the value of ",
  StyleBox["$SyntaxHandler", "MR"],
  ". It supplies two arguments: the input string, and the character position \
at which the syntax error was detected. With ",
  StyleBox["$SyntaxHandler", "MR"],
  " you can, for example, generate an analysis of the syntax error, or call \
an editor. If your function returns a string, then ",
  StyleBox["Mathematica", "TI"],
  " will use this string as a new input string. "
}], "Text",
  CellTags->{"S2.13.1", "1.17"}],

Cell[TextData[{
  "This specifies what ",
  StyleBox["Mathematica", "TI"],
  " should do when it gets a syntax error. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.18"}],

Cell[CellGroupData[{

Cell["\<\
$SyntaxHandler =
 (Print[StringForm[\"Error at char `1` in `2`\",
                                #2, #1]]; $Failed)&\
\>", "Input",
  CellLabel->"In[9]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    RowBox[{
      RowBox[{"(", 
        RowBox[{
          RowBox[{"Print", "[", 
            
            InterpretationBox["\<\"Error at char \\!\\(#2\\) in \\!\\(#1\\)\"\
\>",
              StringForm[ "Error at char `1` in `2`", #2, #],
              Editable->False], "]"}], ";", "$Failed"}], ")"}], 
      "&"}]], "Output",
  CellLabel->"Out[9]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell["This input generates a syntax error. ", "MathCaption",
  CellTags->{"S2.13.1", "1.19"}],

Cell[CellGroupData[{

Cell["3 +/+ 5", "Input",
  CellLabel->"In[10]:= ",
  CellTags->"S2.13.1"],

Cell["Syntax::sntxf: \"3 +\" cannot be followed by \"/+ 5\". ", "Message",
  CellTags->"S2.13.1"],

Cell[BoxData[
    InterpretationBox["\<\"Error at char \\!\\(4\\) in 3 +/+ 5\\n\"\>",
      StringForm[ "Error at char `1` in `2`", 4, "3 +/+ 5 "],
      Editable->False]], "Print",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "Once ",
  StyleBox["Mathematica", "TI"],
  " has successfully read an input expression, it then evaluates this \
expression. Before doing the evaluation, ",
  StyleBox["Mathematica", "TI"],
  " applies any function you have specified as the value of ",
  StyleBox["$Pre", "MR"],
  ", and after the evaluation, it applies any function specified as the value \
of ",
  StyleBox["$Post", "MR"],
  ". Note that unless the ",
  StyleBox["$Pre", "MR"],
  " function holds its arguments unevaluated, the function will have exactly \
the same effect as ",
  StyleBox["$Post", "MR"],
  ". \n",
  StyleBox["$Post", "MR"],
  " allows you to specify arbitrary \[OpenCurlyDoubleQuote]post processing\
\[CloseCurlyDoubleQuote] to be done on results obtained from ",
  StyleBox["Mathematica", "TI"],
  ". Thus, for example, to make ",
  StyleBox["Mathematica", "TI"],
  " get a numerical approximation to every result it generates, all you need \
do is to set ",
  StyleBox["$Post", "MR"],
  " ",
  StyleBox["=", "MR"],
  " ",
  StyleBox["N", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.1", "1.20"}],

Cell[TextData[{
  "This tells ",
  StyleBox["Mathematica", "TI"],
  " to apply ",
  StyleBox["N", "MR"],
  " to every result it generates. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.21"}],

Cell[CellGroupData[{

Cell["$Post = N", "Input",
  CellLabel->"In[11]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(N\)], "Output",
  CellLabel->"Out[10]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "Now ",
  StyleBox["Mathematica", "TI"],
  " gets a numerical approximation to anything you type in. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.22"}],

Cell[CellGroupData[{

Cell["Sqrt[7]", "Input",
  CellLabel->"In[12]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    \(2.6457513110645907`\)], "Output",
  CellLabel->"Out[11]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell["This removes the post\[Hyphen]processing function you specified. ", \
"MathCaption",
  CellTags->{"S2.13.1", "1.23"}],

Cell["$Post =.", "Input",
  CellLabel->"In[13]:= ",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "As soon as ",
  StyleBox["Mathematica", "TI"],
  " has generated a result, and applied any ",
  StyleBox["$Post", "MR"],
  " function you have specified, it takes the result, and assigns it as the \
value of ",
  StyleBox["Out[$Line]", "MR"],
  ". The next step is for ",
  StyleBox["Mathematica", "TI"],
  " to print the result. However, before doing this, it applies any function \
you have specified as the value of ",
  StyleBox["$PrePrint", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.1", "1.24"}],

Cell[TextData[{
  "This tells ",
  StyleBox["Mathematica", "TI"],
  " to shorten all output to two lines. "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.25"}],

Cell["$PrePrint = Short[#, 2]& ;", "Input",
  CellLabel->"In[14]:= ",
  CellTags->"S2.13.1"],

Cell["Only a two\[Hyphen]line version of the output is now shown. ", \
"MathCaption",
  CellTags->{"S2.13.1", "1.26"}],

Cell[CellGroupData[{

Cell["Expand[(x + y)^40]", "Input",
  CellLabel->"In[15]:= ",
  CellTags->"S2.13.1"],

Cell[BoxData[
    TagBox[\(x\^40 + 40\ x\^39\ y + 
        780\ x\^38\ y\^2 + \[LeftSkeleton]36\[RightSkeleton] + 40\ x\ y\^39 + 
        y\^40\),
      (Short[ #, 2]&)]], "Output",
  CellLabel->"Out[14]= ",
  CellTags->"S2.13.1"]
}, Open  ]],

Cell[TextData[{
  "This removes the value you assigned to ",
  StyleBox["$PrePrint", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.1", "1.27"}],

Cell["$PrePrint =.", "Input",
  CellLabel->"In[16]:= ",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "There are various kinds of output generated in a typical ",
  StyleBox["Mathematica", "TI"],
  " session. In general, each kind of output is sent to a definite ",
  StyleBox["output channel", "TI"],
  ", as discussed in Section\[NonBreakingSpace]",
  ButtonBox["2.11.3",
    ButtonData:>{"2.11.3", "3.21"},
    ButtonStyle->"MainBookLink"],
  ". Associated with each output channel, there is a global variable which \
gives a list of the output streams to be included in that output channel. "
}], "Text",
  CellTags->{"S2.13.1", "1.28"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Output\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"standard output and text generated by \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Print\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Echo\\\\\\\"\\\", \\\"MR\
\\\"]\\) \"\>", "\<\"an echo of each input line (as stored in \
\\!\\(\\*StyleBox[\\\"\\\\\\\"InString[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\)) \"\
\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Urgent\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"input prompts and other urgent output \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Messages\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"standard messages and output generated by \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Message\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Display\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"graphics output generated by the default \
\\!\\(\\*StyleBox[\\\"\\\\\\\"$DisplayFunction\\\\\\\"\\\", \
\\\"MR\\\"]\\)\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$SoundDisplay\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \"\>", "\<\"sound output generated by the default \
\\!\\(\\*StyleBox[\\\"\\\\\\\"$SoundDisplayFunction\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.29"}],

Cell[TextData[{
  "Output channels in a standard ",
  StyleBox["Mathematica", "SO"],
  " session. "
}], "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "By modifying the list of streams in a given output channel, you can \
redirect or copy particular kinds of ",
  StyleBox["Mathematica", "TI"],
  " output. Thus, for example, by opening an output stream to a file, and \
including that stream in the ",
  StyleBox["$Echo", "MR"],
  " list, you can get each piece of input you give to ",
  StyleBox["Mathematica", "TI"],
  " saved in a file. "
}], "Text",
  CellTags->{"S2.13.1", "1.30"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Streams[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"list of all open streams \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Streams[\\\\\\\\\\\\\\\"\\\
\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"name\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"list of all open streams with the specified name \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Input\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the name of the current input stream \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.31"}],

Cell[TextData[{
  "Open streams in a ",
  StyleBox["Mathematica", "SO"],
  " session. "
}], "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "The function ",
  StyleBox["Streams", "MR"],
  " shows you all the input, output and other streams that are open at a \
particular point in a ",
  StyleBox["Mathematica", "TI"],
  " session. The variable ",
  StyleBox["$Input", "MR"],
  " gives the name of the current stream from which ",
  StyleBox["Mathematica", "TI"],
  " input is being taken at a particular point. ",
  StyleBox["$Input", "MR"],
  " is reset, for example, during the execution of a ",
  StyleBox["Get", "MR"],
  " command. "
}], "Text",
  CellTags->{"S2.13.1", "1.32"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MessagePrePrint\\\\\\\"\\\
\", \\\"MR\\\"]\\) \"\>", \("a function to be applied to expressions that are \
given in messages "\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Language\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"list of default languages to use for messages \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.33"}],

Cell["Parameters for messages. ", "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "There are various global parameters which determine the form of messages \
generated by ",
  StyleBox["Mathematica", "TI"],
  ". \nAs discussed in Section ",
  ButtonBox["2.8.21",
    ButtonData:>{"2.8.21", "21.1"},
    ButtonStyle->"MainBookLink"],
  ", typical messages include a sequence of expressions which are combined \
with the text of the message through ",
  StyleBox["StringForm", "MR"],
  ". ",
  StyleBox["$MessagePrePrint", "MR"],
  " gives a function to be applied to the expressions before they are \
printed. The default value of ",
  StyleBox["$MessagePrePrint", "MR"],
  " is ",
  StyleBox["Short", "MR"],
  ".\nAs discussed in Section ",
  ButtonBox["2.8.22",
    ButtonData:>{"2.8.22", "22.1"},
    ButtonStyle->"MainBookLink"],
  ", ",
  StyleBox["Mathematica", "TI"],
  " allows you to specify the language in which you want messages to be \
produced. In a particular ",
  StyleBox["Mathematica", "TI"],
  " session, you can assign a list of language names as the value of ",
  StyleBox["$Language", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.1", "1.34"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Exit[\\\\\\\"\\\", \\\"MR\
\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\[ThinSpace]or \[ThinSpace]\\!\\(\\*StyleBox[\\\"\\\\\\\"Quit[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"terminate your \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) session \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Epilog\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"a global variable to be evaluated before \
termination \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.35"}],

Cell[TextData[{
  "Terminating ",
  StyleBox["Mathematica", "SO"],
  " sessions. "
}], "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " will continue in its main loop until you explicitly tell it to exit. Most \
",
  StyleBox["Mathematica", "TI"],
  " interfaces provide special ways to do this. Nevertheless, you can always \
do it by explicitly calling ",
  StyleBox["Exit", "MR"],
  " or ",
  StyleBox["Quit", "MR"],
  ". \n",
  StyleBox["Mathematica", "TI"],
  " allows you to give a value to the global variable ",
  StyleBox["$Epilog", "MR"],
  " to specify operations to perform just before ",
  StyleBox["Mathematica", "TI"],
  " actually exits. In this way, you can for example make ",
  StyleBox["Mathematica", "TI"],
  " always save certain objects before exiting. "
}], "Text",
  CellTags->{"S2.13.1", "1.36"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$IgnoreEOF\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"whether to ignore the end\[Hyphen]of\[Hyphen]file \
character \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.1", "1.37"}],

Cell["\<\
A global variable that determines the treatment of end\[Hyphen]of\
\[Hyphen]file characters. \
\>", "Caption",
  CellTags->"S2.13.1"],

Cell[TextData[{
  "As discussed in Section ",
  ButtonBox["2.7.5",
    ButtonData:>{"2.7.5", "5.1"},
    ButtonStyle->"MainBookLink"],
  ", ",
  StyleBox["Mathematica", "TI"],
  " usually does not treat special characters in a special way. There is one \
potential exception, however. With the default setting ",
  StyleBox["$IgnoreEOF", "MR"],
  " ",
  StyleBox["=", "MR"],
  " ",
  StyleBox["False", "MR"],
  ", ",
  StyleBox["Mathematica", "TI"],
  " recognizes end\[Hyphen]of\[Hyphen]file characters. If ",
  StyleBox["Mathematica", "TI"],
  " receives an end\[Hyphen]of\[Hyphen]file character as the only thing on a \
particular input line in a standard interactive ",
  StyleBox["Mathematica", "TI"],
  " session, then it will exit the session. \nExactly how you enter an end\
\[Hyphen]of\[Hyphen]file character depends on the computer system you are \
using. Under Unix, for example, you typically press Control\[Hyphen]D. \nNote \
that if you use ",
  StyleBox["Mathematica", "TI"],
  " in a \[OpenCurlyDoubleQuote]batch mode\[CloseCurlyDoubleQuote], with all \
its input coming from a file, then it will automatically exit when it reaches \
the end of the file, regardless of the value of ",
  StyleBox["$IgnoreEOF", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.1", "1.38"}],

Cell["2.13.2 Dialogs", "Subsection",
  CellTags->{"S2.13.2", "2.1"}],

Cell[TextData[{
  "Within a standard interactive session, you can create \
\[OpenCurlyDoubleQuote]subsessions\[CloseCurlyDoubleQuote] or ",
  StyleBox["dialogs", "TI"],
  " using the ",
  StyleBox["Mathematica", "TI"],
  " command ",
  StyleBox["Dialog", "MR"],
  ". Dialogs are often useful if you want to interact with ",
  StyleBox["Mathematica", "TI"],
  " while it is in the middle of doing a calculation. As mentioned in Section \
",
  ButtonBox["2.5.10",
    ButtonData:>{"2.5.10", "10.1"},
    ButtonStyle->"MainBookLink"],
  ", ",
  StyleBox["TraceDialog", "MR"],
  " for example automatically calls ",
  StyleBox["Dialog", "MR"],
  " at specified points in the evaluation of a particular expression. In \
addition, if you interrupt ",
  StyleBox["Mathematica", "TI"],
  " during a computation, you can typically \[OpenCurlyDoubleQuote]inspect\
\[CloseCurlyDoubleQuote] its state using a dialog. "
}], "Text",
  CellTags->{"S2.13.2", "2.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Dialog[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"initiate a \\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \
\\\"TI\\\"]\\) dialog \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Dialog[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"initiate a dialog with \\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\
\\\", \\\"TI\\\"]\\) as the current value of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"%\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Return[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"return from a dialog, taking the current value of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"%\\\\\\\"\\\", \\\"MR\\\"]\\) as the return \
value \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Return[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"return from a dialog, taking \\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\
\\\\\"\\\", \\\"TI\\\"]\\) as the return value \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.2", "2.3"}],

Cell["Initiating and returning from dialogs. ", "Caption",
  CellTags->"S2.13.2"],

Cell["This initiates a dialog. ", "MathCaption",
  CellTags->{"S2.13.2", "2.4"}],

Cell["Dialog[ ]", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S2.13.2"],

Cell[TextData[{
  "You can do computations in a dialog just as you would in any ",
  StyleBox["Mathematica", "TI"],
  " session. "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.5"}],

Cell[CellGroupData[{

Cell["2^41", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(2199023255552\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  "You can use ",
  StyleBox["Return", "MR"],
  " to exit from a dialog. "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.6"}],

Cell[CellGroupData[{

Cell["Return[ ]", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(2199023255552\)], "Output",
  CellLabel->"Out[1]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  "When you exit a dialog, you can return a value for the dialog using ",
  StyleBox["Return[", "MR"],
  StyleBox["expr", "TI"],
  StyleBox["]", "MR"],
  ". If you do not want to return a value, and you have set ",
  StyleBox["$IgnoreEOF", "MR"],
  " ",
  StyleBox["=", "MR"],
  " ",
  StyleBox["False", "MR"],
  ", then you can also exit a dialog simply by giving an end\[Hyphen]of\
\[Hyphen]file character, at least on systems with text\[Hyphen]based \
interfaces. "
}], "Text",
  CellTags->{"S2.13.2", "2.7"}],

Cell[TextData[{
  "To evaluate this expression, ",
  StyleBox["Mathematica", "TI"],
  " initiates a dialog. "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.8"}],

Cell["1 + Dialog[ ]^2", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S2.13.2"],

Cell[TextData[{
  "The value ",
  StyleBox["a", "MR"],
  " ",
  StyleBox["+", "MR"],
  " ",
  StyleBox["b", "MR"],
  " returned from the dialog is now inserted in the original expression. "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.9"}],

Cell[CellGroupData[{

Cell["Return[a + b]", "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(1 + \((a + b)\)\^2\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  "In starting a dialog, you will often find it useful to have some \
\[OpenCurlyDoubleQuote]initial expression\[CloseCurlyDoubleQuote]. If you use \
",
  StyleBox["Dialog[", "MR"],
  StyleBox["expr", "TI"],
  StyleBox["]", "MR"],
  ", then ",
  StyleBox["Mathematica", "TI"],
  " will start a dialog, using ",
  StyleBox["expr", "TI"],
  " as the initial expression, accessible for example as the value of ",
  StyleBox["%", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.2", "2.10"}],

Cell[TextData[{
  "This first starts a dialog with initial expression ",
  StyleBox["a^2", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.11"}],

Cell[CellGroupData[{

Cell["Map[Dialog, {a^2, b + c}]", "Input",
  CellLabel->"In[6]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(a\^2\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  StyleBox["%", "MR"],
  " is the initial expression in the dialog. "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.12"}],

Cell[CellGroupData[{

Cell["%^2 + 1", "Input",
  CellLabel->"In[7]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(1 + a\^4\)], "Output",
  CellLabel->"Out[5]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  "This returns a value from the first dialog, and starts the second dialog, \
with initial expression ",
  StyleBox["b", "MR"],
  " ",
  StyleBox["+", "MR"],
  " ",
  StyleBox["c", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.2", "2.13"}],

Cell[CellGroupData[{

Cell["Return[%]", "Input",
  CellLabel->"In[8]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \(b + c\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell["\<\
This returns a value from the second dialog. The final result is \
the original expression, with values from the two dialogs inserted. \
\>", \
"MathCaption",
  CellTags->{"S2.13.2", "2.14"}],

Cell[CellGroupData[{

Cell["Return[444]", "Input",
  CellLabel->"In[9]:= ",
  CellTags->"S2.13.2"],

Cell[BoxData[
    \({1 + a\^4, 444}\)], "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S2.13.2"]
}, Open  ]],

Cell[TextData[{
  StyleBox["Dialog", "MR"],
  " effectively works by running a subsidiary version of the standard ",
  StyleBox["Mathematica", "TI"],
  " main loop. Each dialog you start effectively \
\[OpenCurlyDoubleQuote]inherits\[CloseCurlyDoubleQuote] various values from \
the overall main loop. Some of the values are, however, local to the dialog, \
so their original values are restored when you exit the dialog.\nThus, for \
example, dialogs inherit the current line number ",
  StyleBox["$Line", "MR"],
  " when they start. This means that the lines in a dialog have numbers that \
follow the sequence used in the main loop. Nevertheless, the value of ",
  StyleBox["$Line", "MR"],
  " is local to the dialog. As a result, when you exit the dialog, the value \
of ",
  StyleBox["$Line", "MR"],
  " reverts to what it was in the main loop. \nIf you start a dialog on line \
",
  StyleBox["10", "MR"],
  " of your ",
  StyleBox["Mathematica", "TI"],
  " session, then the first line of the dialog will be labeled ",
  StyleBox["In[11]", "MB"],
  ". Successive lines of the dialog will be labeled ",
  StyleBox["In[12]", "MB"],
  ", ",
  StyleBox["In[13]", "MB"],
  " and so on. Then, when you exit the dialog, the next line in your main \
loop will be labeled ",
  StyleBox["In[11]", "MB"],
  ". At this point, you can still refer to results generated within the \
dialog as ",
  StyleBox["Out[11]", "MB"],
  ", ",
  StyleBox["Out[12]", "MB"],
  " and so on. These results will be overwritten, however, when you reach \
lines ",
  StyleBox["In[12]", "MB"],
  ", ",
  StyleBox["In[13]", "MB"],
  ", and so on in the main loop. \nIn a standard ",
  StyleBox["Mathematica", "TI"],
  " session, you can tell whether you are in a dialog by seeing whether your \
input and output lines are indented. If you call a dialog from within a \
dialog, you will get two levels of indentation. In general, the indentation \
you get inside ",
  StyleBox["d", "TI"],
  " nested dialogs is determined by the output form of the object ",
  StyleBox["DialogIndent[", "MR"],
  StyleBox["d", "TI"],
  StyleBox["]", "MR"],
  ". By defining the format for this object, you can specify how dialogs \
should be indicated in your ",
  StyleBox["Mathematica", "TI"],
  " session. "
}], "Text",
  CellTags->{"S2.13.2", "2.15"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {
                  
                  RowBox[{"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"DialogSymbols\\\\\
\\\"\\\", \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\":>\\\\\\\"\\\", \\\"MR\
\\\"]\\) \"\>", 
                    StyleBox["{",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"y\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\[Ellipsis] \"\>", 
                    StyleBox["}",
                      
                      "InlineFormula"], "\<\" \"\>"}], \("symbols whose \
values should be treated as local to the dialog "\)},
                {
                  
                  RowBox[{"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"DialogSymbols\\\\\
\\\"\\\", \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\":>\\\\\\\"\\\", \\\"MR\
\\\"]\\) \"\>", 
                    StyleBox["{",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\\\"\\\", \\\"TI\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"=\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "0"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"y\\\\\\\"\\\", \\\"TI\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"=\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"y\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "0"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \[Ellipsis] \
\"\>", 
                    StyleBox["}",
                      
                      "InlineFormula"], "\<\" \"\>"}], "\<\"symbols with \
initial values \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"DialogProlog\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\":>\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\) \"\>", "\<\"an \
expression to evaluate before starting the dialog \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.2", "2.16"}],

Cell[TextData[{
  "Options for ",
  StyleBox["Dialog", "MR"],
  ". "
}], "Caption",
  CellTags->"S2.13.2"],

Cell[TextData[{
  "Whatever setting you give for ",
  StyleBox["DialogSymbols", "MR"],
  ", ",
  StyleBox["Dialog", "MR"],
  " will always treat the values of ",
  StyleBox["$Line", "MR"],
  ", ",
  StyleBox["$Epilog", "MR"],
  " and ",
  StyleBox["$MessageList", "MR"],
  " as local. Note that if you give a value for ",
  StyleBox["$Epilog", "MR"],
  ", it will automatically be evaluated when you exit the dialog. \nWhen you \
call ",
  StyleBox["Dialog", "MR"],
  ", its first step is to localize the values of variables. Then it evaluates \
any expression you have set for the option ",
  StyleBox["DialogProlog", "MR"],
  ". If you have given an explicit argument to the ",
  StyleBox["Dialog", "MR"],
  " function, this is then evaluated next. Finally, the actual dialog is \
started. \nWhen you exit the dialog, you can explicitly specify the return \
value using ",
  StyleBox["Return[", "MR"],
  StyleBox["expr", "TI"],
  StyleBox["]", "MR"],
  ". If you do not do this, the return value will be taken to be the last \
value generated in the dialog. "
}], "Text",
  CellTags->{"S2.13.2", "2.17"}],

Cell["2.13.3 Date and Time Functions", "Subsection",
  CellTags->{"S2.13.3", "3.1"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Date[\\\\\\\"\\\", \\\"MR\
\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"give the current local date and time in the \
form \"\>", 
                    StyleBox["{",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"year\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"month\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"day\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"hour\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"minute\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"second\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>", 
                    StyleBox["}",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Date[\\\\\\\"\\\", \\\"MR\
\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"z\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"give the current date and time in time zone \
\\!\\(\\*StyleBox[\\\"\\\\\\\"z\\\\\\\"\\\", \\\"TI\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"TimeZone[\\\\\\\"\\\", \\\
\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"give the time zone assumed by your computer system \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.2"}],

Cell["Finding the date and time. ", "Caption",
  CellTags->"S2.13.3"],

Cell["This gives the current date and time. ", "MathCaption",
  CellTags->{"S2.13.3", "3.3"}],

Cell[CellGroupData[{

Cell["Date[ ]", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({1999, 3, 2, 0, 47, 47}\)], "Output",
  CellLabel->"Out[1]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[TextData[{
  "The ",
  StyleBox["Mathematica", "TI"],
  " ",
  StyleBox["Date", "MR"],
  " function returns whatever your computer system gives as the current date \
and time. It assumes that any corrections for daylight saving time and so on \
have already been done by your computer system. In addition, it assumes that \
your computer system has been set for the appropriate time zone. \nThe \
function ",
  StyleBox["TimeZone[", "MR"],
  " ",
  StyleBox["]", "MR"],
  " returns the current time zone assumed by your computer system. The time \
zone is given as the number of hours which must be added to Greenwich mean \
time (GMT) to obtain the correct local time. Thus, for example, U.S. eastern \
standard time (EST) corresponds to time zone ",
  Cell[BoxData[
      \(TraditionalForm\`\(-5\)\)], "InlineFormula"],
  ". Note that daylight saving time corrections must be included in the time \
zone, so U.S. eastern daylight time (EDT) corresponds to time zone ",
  Cell[BoxData[
      \(TraditionalForm\`\(-4\)\)], "InlineFormula"],
  ". "
}], "Text",
  CellTags->{"S2.13.3", "3.4"}],

Cell["\<\
This gives the current time zone assumed by your computer system. \
\
\>", "MathCaption",
  CellTags->{"S2.13.3", "3.5"}],

Cell[CellGroupData[{

Cell["TimeZone[ ]", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \(\(-6.`\)\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell["\<\
This gives the current date and time in time zone +9, the time zone \
for Japan. \
\>", "MathCaption",
  CellTags->{"S2.13.3", "3.6"}],

Cell[CellGroupData[{

Cell["Date[9]", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({1999, 3, 2, 15, 47, 47}\)], "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"AbsoluteTime[\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", \("total number of seconds since the beginning of January 1, 1900 \
"\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"SessionTime[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"total number of seconds elapsed since the beginning of your current \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) session \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"TimeUsed[\\\\\\\"\\\", \\\
\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"total number of seconds of CPU time used in your current \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) session \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$TimeUnit\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", \("the minimum time interval recorded on your computer \
system "\)}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.7"}],

Cell["Time functions. ", "Caption",
  CellTags->"S2.13.3"],

Cell[TextData[{
  "You should realize that on any computer system, there is a certain \
\[OpenCurlyDoubleQuote]granularity\[CloseCurlyDoubleQuote] in the times that \
can be measured. This granularity is given as the value of the global \
variable ",
  StyleBox["$TimeUnit", "MR"],
  ". Typically it is about ",
  Cell[BoxData[
      \(TraditionalForm\`1\/60\)], "InlineFormula"],
  " of a second. "
}], "Text",
  CellTags->{"S2.13.3", "3.8"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Pause[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"pause for at least \\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\) seconds \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.9"}],

Cell["Pausing during a calculation. ", "Caption",
  CellTags->"S2.13.3"],

Cell["This gives various time functions. ", "MathCaption",
  CellTags->{"S2.13.3", "3.10"}],

Cell[CellGroupData[{

Cell["{AbsoluteTime[ ], SessionTime[ ], TimeUsed[ ]}", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({3.129324467`15.5161*^9, 3.`, 0.48`}\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[TextData[{
  "This pauses for 10 seconds, then re\[Hyphen]evaluates the time functions. \
Note that ",
  StyleBox["TimeUsed[", "MR"],
  " ",
  StyleBox["]", "MR"],
  " is not affected by the pause. "
}], "MathCaption",
  CellTags->{"S2.13.3", "3.11"}],

Cell[CellGroupData[{

Cell["\<\
Pause[10]; {AbsoluteTime[ ], SessionTime[ ],
                                    TimeUsed[ ]}\
\>", "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({3.129324477`15.5161*^9, 13.`, 0.48`}\)], "Output",
  CellLabel->"Out[5]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"FromDate[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"date\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", "\<\"convert \
from date to absolute time \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"ToDate[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"time\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"convert from absolute time to date \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.12"}],

Cell["Converting between dates and absolute times. ", "Caption",
  CellTags->"S2.13.3"],

Cell[TextData[{
  "This sets ",
  StyleBox["d", "MR"],
  " to be the current date. "
}], "MathCaption",
  CellTags->{"S2.13.3", "3.13"}],

Cell[CellGroupData[{

Cell["d = Date[ ]", "Input",
  CellLabel->"In[6]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({1999, 3, 2, 0, 47, 57}\)], "Output",
  CellLabel->"Out[6]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell["This adds one month to the current date. ", "MathCaption",
  CellTags->{"S2.13.3", "3.14"}],

Cell[CellGroupData[{

Cell["Date[ ] + {0, 1, 0, 0, 0, 0}", "Input",
  CellLabel->"In[7]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({1999, 4, 2, 0, 47, 57}\)], "Output",
  CellLabel->"Out[7]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell["This gives the number of seconds in the additional month. ", \
"MathCaption",
  CellTags->{"S2.13.3", "3.15"}],

Cell[CellGroupData[{

Cell["FromDate[%] - FromDate[d]", "Input",
  CellLabel->"In[8]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \(2678400\)], "Output",
  CellLabel->"Out[8]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Timing[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"evaluate \\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\
\"]\\), and return a list of the CPU time needed, together with the result \
obtained \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.16"}],

Cell[TextData[{
  "Timing ",
  StyleBox["Mathematica", "SO"],
  " operations. "
}], "Caption",
  CellTags->"S2.13.3"],

Cell[TextData[{
  StyleBox["Timing", "MR"],
  " allows you to measure the CPU time, corresponding to the increase in ",
  StyleBox["TimeUsed", "MR"],
  ", associated with the evaluation of a single ",
  StyleBox["Mathematica", "TI"],
  " expression. Note that only CPU time associated with the actual evaluation \
of the expression within the ",
  StyleBox["Mathematica", "TI"],
  " kernel is included. The time needed to format the expression for output, \
and any time associated with external programs, is not included. \nYou should \
realize that the time reported by ",
  StyleBox["Timing", "MR"],
  " for a particular calculation depends on many factors. \nFirst, the time \
depends in detail on the computer system you are using. It depends not only \
on instruction times, but also on memory caching, as well as on the details \
of the optimization done in compiling the parts of the internal code of ",
  StyleBox["Mathematica", "TI"],
  " used in the calculation. \nThe time also depends on the precise state of \
your ",
  StyleBox["Mathematica", "TI"],
  " session when the calculation was done. Many of the internal optimizations \
used by ",
  StyleBox["Mathematica", "TI"],
  " depend on details of preceding calculations. For example, ",
  StyleBox["Mathematica", "TI"],
  " often uses previous results it has obtained, and avoids unnecessarily re\
\[Hyphen]evaluating expressions. In addition, some ",
  StyleBox["Mathematica", "TI"],
  " functions build internal tables when they are first called in a \
particular way, so that if they are called in that way again, they run much \
faster. For all of these kinds of reasons, it is often the case that a \
particular calculation may not take the same amount of time if you run it at \
different points in the same ",
  StyleBox["Mathematica", "TI"],
  " session. "
}], "Text",
  CellTags->{"S2.13.3", "3.17"}],

Cell[TextData[{
  "This gives the CPU time needed for the calculation. The semicolon causes \
the result of the calculation to be given as ",
  StyleBox["Null", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.3", "3.18"}],

Cell[CellGroupData[{

Cell["Timing[1000!;]", "Input",
  CellLabel->"In[9]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({0.010000000000000009`\ Second, Null}\)], "Output",
  CellLabel->"Out[9]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[TextData[{
  "Now ",
  StyleBox["Mathematica", "TI"],
  " has built internal tables for factorial functions, and the calculation \
takes much less time. "
}], "MathCaption",
  CellTags->{"S2.13.3", "3.19"}],

Cell[CellGroupData[{

Cell["Timing[1000!;]", "Input",
  CellLabel->"In[10]:= ",
  CellTags->"S2.13.3"],

Cell[BoxData[
    \({0.`\ Second, Null}\)], "Output",
  CellLabel->"Out[10]= ",
  CellTags->"S2.13.3"]
}, Open  ]],

Cell[TextData[{
  "Note that the results you get from ",
  StyleBox["Timing", "MR"],
  " are only accurate to the timing granularity ",
  StyleBox["$TimeUnit", "MR"],
  " of your computer system. Thus, for example, a timing reported as ",
  StyleBox["0", "MR"],
  " could in fact be as much as ",
  StyleBox["$TimeUnit", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.3", "3.20"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"TimeConstrained[\\\\\\\"\\\
\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\
\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"t\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", "\<\"try to evaluate \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\), aborting the \
calculation after \\!\\(\\*StyleBox[\\\"\\\\\\\"t\\\\\\\"\\\", \\\"TI\\\"]\\) \
seconds \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"TimeConstrained[\\\\\\\"\\\
\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\
\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"t\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"failexpr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"return \\!\\(\\*StyleBox[\\\"\\\\\\\"failexpr\\\\\\\"\\\", \\\"TI\
\\\"]\\) if the time constraint is not met \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.3", "3.21"}],

Cell["Time\[Hyphen]constrained calculation. ", "Caption",
  CellTags->"S2.13.3"],

Cell[TextData[{
  "When you use ",
  StyleBox["Mathematica", "TI"],
  " interactively, it is quite common to try doing a calculation, but to \
abort the calculation if it seems to be taking too long. You can emulate this \
behavior inside a program by using ",
  StyleBox["TimeConstrained", "MR"],
  ". ",
  StyleBox["TimeConstrained", "MR"],
  " tries to evaluate a particular expression for a specified amount of time. \
If it does not succeed, then it aborts the evaluation, and returns either ",
  StyleBox["$Aborted", "MR"],
  ", or an expression you specify. \nYou can use ",
  StyleBox["TimeConstrained", "MR"],
  ", for example, to have ",
  StyleBox["Mathematica", "TI"],
  " try a particular approach to a problem for a certain amount of time, and \
then to switch to another approach if the first one has not yet succeeded. \
You should realize however that ",
  StyleBox["TimeConstrained", "MR"],
  " may overrun the time you specify if ",
  StyleBox["Mathematica", "TI"],
  " cannot be interrupted during a particular part of a calculation. In \
addition, you should realize that because different computer systems run at \
different speeds, programs that use ",
  StyleBox["TimeConstrained", "MR"],
  " will often give different results on different systems. "
}], "Text",
  CellTags->{"S2.13.3", "3.22"}],

Cell["2.13.4 Memory Management", "Subsection",
  CellTags->{"S2.13.4", "4.1"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"MemoryInUse[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"number of bytes of memory currently being used by \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"MaxMemoryUsed[\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"maximum number of bytes of memory used by \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) in this \
session \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.4", "4.2"}],

Cell["Finding memory usage. ", "Caption",
  CellTags->"S2.13.4"],

Cell[TextData[{
  "Particularly for symbolic computations, memory is usually the primary \
resource which limits the size of computations you can do. If a computation \
runs slowly, you can always potentially let it run longer. But if the \
computation generates intermediate expressions which simply cannot fit in the \
memory of your computer system, then you cannot proceed with the computation. \
\n",
  StyleBox["Mathematica", "TI"],
  " is careful about the way it uses memory. Every time an intermediate \
expression you have generated is no longer needed, ",
  StyleBox["Mathematica", "TI"],
  " immediately reclaims the memory allocated to it. This means that at any \
point in a session, ",
  StyleBox["Mathematica", "TI"],
  " stores only those expressions that are actually needed; it does not keep \
unnecessary objects which have to be \[OpenCurlyDoubleQuote]garbage collected\
\[CloseCurlyDoubleQuote] later. "
}], "Text",
  CellTags->{"S2.13.4", "4.3"}],

Cell[TextData[{
  "This gives the number of bytes of memory currently being used by ",
  StyleBox["Mathematica", "TI"],
  ". "
}], "MathCaption",
  CellTags->{"S2.13.4", "4.4"}],

Cell[CellGroupData[{

Cell[TextData[{
  "MemoryInUse[",
  StyleBox[" ", "TR"],
  "]"
}], "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S2.13.4"],

Cell[BoxData[
    \(947712\)], "Output",
  CellLabel->"Out[1]= ",
  CellTags->"S2.13.4"]
}, Open  ]],

Cell["This generates a 10000\[Hyphen]element list. ", "MathCaption",
  CellTags->{"S2.13.4", "4.5"}],

Cell[CellGroupData[{

Cell[TextData[{
  "Range[10000]",
  StyleBox[" ", "TR"],
  "//",
  StyleBox[" ", "TR"],
  "Short"
}], "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S2.13.4"],

Cell[BoxData[
    \({1, 2, 3, 4, 5, 6, 7, 8, \[LeftSkeleton]9985\[RightSkeleton], 9994, 
      9995, 9996, 9997, 9998, 9999, 10000}\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S2.13.4"]
}, Open  ]],

Cell["Additional memory is needed to store the list. ", "MathCaption",
  CellTags->{"S2.13.4", "4.6"}],

Cell[CellGroupData[{

Cell[TextData[{
  "MemoryInUse[",
  StyleBox[" ", "TR"],
  "]"
}], "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S2.13.4"],

Cell[BoxData[
    \(989616\)], "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S2.13.4"]
}, Open  ]],

Cell[TextData[{
  "This list is kept because it is the value of ",
  StyleBox["Out[2]", "MR"],
  ". If you clear ",
  StyleBox["Out[2]", "MR"],
  ", the list is no longer needed. "
}], "MathCaption",
  CellTags->{"S2.13.4", "4.7"}],

Cell["Unprotect[Out]; Out[2]=.", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S2.13.4"],

Cell["The memory in use goes down again. ", "MathCaption",
  CellTags->{"S2.13.4", "4.8"}],

Cell[CellGroupData[{

Cell[TextData[{
  "MemoryInUse[",
  StyleBox[" ", "TR"],
  "]"
}], "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S2.13.4"],

Cell[BoxData[
    \(954408\)], "Output",
  CellLabel->"Out[5]= ",
  CellTags->"S2.13.4"]
}, Open  ]],

Cell["\<\
This shows the maximum memory needed at any point in the session. \
\
\>", "MathCaption",
  CellTags->{"S2.13.4", "4.9"}],

Cell[CellGroupData[{

Cell[TextData[{
  "MaxMemoryUsed[",
  StyleBox[" ", "TR"],
  "]"
}], "Input",
  CellLabel->"In[6]:= ",
  CellTags->"S2.13.4"],

Cell[BoxData[
    \(1467536\)], "Output",
  CellLabel->"Out[6]= ",
  CellTags->"S2.13.4"]
}, Open  ]],

Cell[TextData[{
  "One issue that often comes up is exactly how much memory ",
  StyleBox["Mathematica", "TI"],
  " can actually use on a particular computer system. Usually there is a \
certain amount of memory available for ",
  StyleBox["all", "TI"],
  " processes running on the computer at a particular time. Sometimes this \
amount of memory is equal to the physical number of bytes of RAM in the \
computer. Often, it includes a certain amount of \
\[OpenCurlyDoubleQuote]virtual memory\[CloseCurlyDoubleQuote], obtained by \
swapping data on and off a mass storage device. \nWhen ",
  StyleBox["Mathematica", "TI"],
  " runs, it needs space both for data and for code. The complete code of ",
  StyleBox["Mathematica", "TI"],
  " is typically several megabytes in size. For any particular calculation, \
only a small fraction of this code is usually used. However, in trying to \
work out the total amount of space available for ",
  StyleBox["Mathematica", "TI"],
  " data, you should not forget what is needed for ",
  StyleBox["Mathematica", "TI"],
  " code. In addition, you must include the space that is taken up by other \
processes running in the computer. If there are fewer jobs running, you will \
usually find that your job can use more memory. \nIt is also worth realizing \
that the time needed to do a calculation can depend very greatly on how much \
physical memory you have. Although virtual memory allows you in principle to \
use large amounts of memory space, it is usually hundreds or even thousands \
of times slower to access than physical memory. As a result, if your \
calculation becomes so large that it needs to make use of virtual memory, it \
may run ",
  StyleBox["much", "TI"],
  " more slowly. "
}], "Text",
  CellTags->{"S2.13.4", "4.10"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"MemoryConstrained[\\\\\\\"\
\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"b\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"try to evaluate \\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\), aborting if more than \\!\\(\\*StyleBox[\\\"\\\\\\\"b\\\\\\\"\
\\\", \\\"TI\\\"]\\) additional bytes of memory are requested \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"MemoryConstrained[\\\\\\\"\
\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"b\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"failexpr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"return \\!\\(\\*StyleBox[\\\"\\\\\\\"failexpr\\\\\\\"\\\", \\\"TI\
\\\"]\\) if the memory constraint is not met \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.4", "4.11"}],

Cell["Memory\[Hyphen]constrained computation. ", "Caption",
  CellTags->"S2.13.4"],

Cell[TextData[{
  StyleBox["MemoryConstrained", "MR"],
  " works much like ",
  StyleBox["TimeConstrained", "MR"],
  ". If more than the specified amount of memory is requested, ",
  StyleBox["MemoryConstrained", "MR"],
  " attempts to abort your computation. As with ",
  StyleBox["TimeConstrained", "MR"],
  ", there may be some overshoot in the actual amount of memory used before \
the computation is aborted. "
}], "Text",
  CellTags->{"S2.13.4", "4.12"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"ByteCount[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"the maximum number of bytes of memory needed to store \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"LeafCount[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"the number of terminal nodes in the expression tree for \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\) \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.4", "4.13"}],

Cell["Finding the size of expressions. ", "Caption",
  CellTags->"S2.13.4"],

Cell[TextData[{
  "Although you may find ",
  StyleBox["ByteCount", "MR"],
  " useful in estimating how large an expression of a particular kind you can \
handle, you should realize that the specific results given by ",
  StyleBox["ByteCount", "MR"],
  " can differ substantially from one version of ",
  StyleBox["Mathematica", "TI"],
  " to another. \nAnother important point is that ",
  StyleBox["ByteCount", "MR"],
  " always gives you the ",
  StyleBox["maximum", "TI"],
  " amount of memory needed to store a particular expression. Often ",
  StyleBox["Mathematica", "TI"],
  " will actually use a much smaller amount of memory to store the \
expression. The main issue is how many of the subexpressions in the \
expression can be ",
  StyleBox["shared", "TI"],
  ". \nIn an expression like ",
  StyleBox["f[1", "MR"],
  " ",
  StyleBox["+", "MR"],
  " ",
  StyleBox["x,", "MR"],
  " ",
  StyleBox["1", "MR"],
  " ",
  StyleBox["+", "MR"],
  " ",
  StyleBox["x]", "MR"],
  ", the two subexpressions ",
  StyleBox["1", "MR"],
  " ",
  StyleBox["+", "MR"],
  " ",
  StyleBox["x", "MR"],
  " are identical, but they may or may not actually be stored in the same \
piece of computer memory. ",
  StyleBox["ByteCount", "MR"],
  " gives you the number of bytes needed to store expressions with the \
assumption that no subexpressions are shared. You should realize that the \
sharing of subexpressions is often destroyed as soon as you use an operation \
like the ",
  StyleBox["/.", "MR"],
  " operator. \nNevertheless, you can explicitly tell ",
  StyleBox["Mathematica", "TI"],
  " to share subexpressions using the function ",
  StyleBox["Share", "MR"],
  ". In this way, you can significantly reduce the actual amount of memory \
needed to store a particular expression. "
}], "Text",
  CellTags->{"S2.13.4", "4.14"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Share[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"share common subexpressions in the storage of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Share[\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\
\>", "\<\"share common subexpressions throughout memory \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.4", "4.15"}],

Cell["Optimizing memory usage. ", "Caption",
  CellTags->"S2.13.4"],

Cell[TextData[{
  "On most computer systems, the memory used by a running program is divided \
into two parts: memory explicitly allocated by the program, and \
\[OpenCurlyDoubleQuote]stack space\[CloseCurlyDoubleQuote]. Every time an \
internal routine is called in the program, a certain amount of stack space is \
used to store parameters associated with the call. On many computer systems, \
the maximum amount of stack space that can be used by a program must be \
specified in advance. If the specified stack space limit is exceeded, the \
program usually just exits. \nIn ",
  StyleBox["Mathematica", "TI"],
  ", one of the primary uses of stack space is in handling the calling of one \
",
  StyleBox["Mathematica", "TI"],
  " function by another. All such calls are explicitly recorded in the ",
  StyleBox["Mathematica", "TI"],
  " ",
  StyleBox["Stack", "MR"],
  " discussed in Section ",
  ButtonBox["2.5.11",
    ButtonData:>{"2.5.11", "11.1"},
    ButtonStyle->"MainBookLink"],
  ". You can control the size of this stack by setting the global parameter \
",
  StyleBox["$RecursionLimit", "MR"],
  ". You should be sure that this parameter is set small enough that you do \
not run out of stack space on your particular computer system. "
}], "Text",
  CellTags->{"S2.13.4", "4.16"}],

Cell["2.13.5 Advanced Topic: Global System Information", "Subsection",
  CellTags->{"S2.13.5", "5.1"}],

Cell[TextData[{
  "In order to write the most general ",
  StyleBox["Mathematica", "TI"],
  " programs you will sometimes need to find out global information about the \
setup under which your program is being run. \nThus, for example, to tell \
whether your program should be calling functions like ",
  StyleBox["NotebookWrite", "MR"],
  ", you need to find out whether the program is being run in a ",
  StyleBox["Mathematica", "TI"],
  " session that is using the notebook front end. You can do this by testing \
the global variable ",
  StyleBox["$Notebooks", "MR"],
  ". "
}], "Text",
  CellTags->{"S2.13.5", "5.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Notebooks\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"whether a notebook front end is being used \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.3"}],

Cell["Determining whether a notebook front end is being used. ", "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " is usually used interactively, but it can also operate in a batch mode\
\[LongDash]say taking input from a file and writing output to a file. In such \
a case, a program cannot for example expect to get interactive input from the \
user. "
}], "Text",
  CellTags->{"S2.13.5", "5.4"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$BatchInput\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"whether input is being given in batch mode \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$BatchOutput\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", \("whether output should be given in batch mode, \
without labeling, etc. "\)}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.5"}],

Cell["Variables specifying batch mode operation. ", "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  "The ",
  StyleBox["Mathematica", "TI"],
  " kernel is a process that runs under the operating system on your \
computer. Within ",
  StyleBox["Mathematica", "TI"],
  " there are several global variables that allow you to find the \
characteristics of this process and its environment. "
}], "Text",
  CellTags->{"S2.13.5", "5.6"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$CommandLine\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the original command line used to invoke the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ParentLink\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the \\!\\(\\*StyleBox[\\\"\\\\\\\"MathLink\\\\\\\"\
\\\", \\\"TI\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"LinkObject\\\\\\\"\\\", \\\
\"MR\\\"]\\) specifying the program that invoked the kernel (or \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Null\\\\\\\"\\\", \\\"MR\\\"]\\) if the kernel \
was invoked directly) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ProcessID\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the ID assigned to the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
process by the operating system \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ParentProcessID\\\\\\\"\\\
\", \\\"MR\\\"]\\) \"\>", "\<\"the ID of the process that invoked the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$UserName\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"the login name of the user running the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Environment[\\\\\\\\\\\\\\\
\"\\\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"var\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"the value of a variable defined by the operating \
system \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.7"}],

Cell[TextData[{
  "Variables associated with the ",
  StyleBox["Mathematica", "SO"],
  " kernel process. "
}], "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  "If you have a variable such as ",
  StyleBox["x", "MR"],
  " in a particular ",
  StyleBox["Mathematica", "TI"],
  " session, you may or may not want that variable to be the same as an ",
  StyleBox["x", "MR"],
  " in another ",
  StyleBox["Mathematica", "TI"],
  " session. In order to make it possible to maintain distinct objects in \
different sessions, ",
  StyleBox["Mathematica", "TI"],
  " supports the variable ",
  StyleBox["$SessionID", "MR"],
  ", which uses information such as starting time, process ID and machine ID \
to try to give a different value for every single ",
  StyleBox["Mathematica", "TI"],
  " session, whether it is run on the same computer or a different one. "
}], "Text",
  CellTags->{"S2.13.5", "5.8"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$SessionID\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"a number set up to be different for every \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) session \
\"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.9"}],

Cell[TextData[{
  "A unique number different for every ",
  StyleBox["Mathematica", "SO"],
  " session. "
}], "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " provides various global variables that allow you to tell which version of \
the kernel you are running. This is important if you write programs that make \
use of features that are, say, new in Version 4. You can then check ",
  StyleBox["$VersionNumber", "MR"],
  " to find out if these features will be available. "
}], "Text",
  CellTags->{"S2.13.5", "5.10"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$Version\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"a string giving the complete version of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) in use \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$VersionNumber\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", "\<\"the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
version number (e.g. \\!\\(\\*StyleBox[\\\"\\\\\\\"3.0\\\\\\\"\\\", \
\\\"MR\\\"]\\)) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ReleaseNumber\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", "\<\"the release number for your version of the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) kernel \
on your particular computer system \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$CreationDate\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \"\>", "\<\"the date, in \\!\\(\\*StyleBox[\\\"\\\\\\\"Date\\\
\\\\\"\\\", \\\"MR\\\"]\\) format, on which your particular \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) release \
was created \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$InstallationDate\\\\\\\"\
\\\", \\\"MR\\\"]\\) \"\>", "\<\"the date on which your copy of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) was \
installed \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.11"}],

Cell[TextData[{
  "Variables specifying the version of ",
  StyleBox["Mathematica", "SO"],
  " used. "
}], "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " itself is set up to be as independent of the details of the particular \
computer system on which it is run as possible. However, if you want to \
access external aspects of your computer system, then you will often need to \
find out its characteristics. "
}], "Text",
  CellTags->{"S2.13.5", "5.12"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$System\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"a full string describing the computer system in \
use \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$SystemID\\\\\\\"\\\", \\\
\"MR\\\"]\\) \"\>", "\<\"a short string specifying the computer system in use \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ProcessorType\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", \("the architecture of the processor in your computer \
system "\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MachineType\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the general type of your computer system \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$ByteOrdering\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \"\>", \("the native byte ordering convention on your \
computer system "\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$OperatingSystem\\\\\\\"\\\
\", \\\"MR\\\"]\\) \"\>", "\<\"the basic operating system in use \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$SystemCharacterEncoding\\\
\\\\\"\\\", \\\"MR\\\"]\\) \"\>", \("the default raw character encoding used \
by your operating system "\)}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.13"}],

Cell["\<\
Variables specifying the characteristics of your computer system. \
\
\>", "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " uses the values of ",
  StyleBox["$SystemID", "MR"],
  " to label directories that contain versions of files for different \
computer systems, as discussed in Sections\[NonBreakingSpace]",
  ButtonBox["2.11.1",
    ButtonData:>{"2.11.1", "1.38"},
    ButtonStyle->"MainBookLink"],
  " and\[NonBreakingSpace]",
  ButtonBox["2.12.5",
    ButtonData:>{"2.12.5", "5.3"},
    ButtonStyle->"MainBookLink"],
  ". Computer systems for which ",
  StyleBox["$SystemID", "MR"],
  " is the same will normally be binary compatible. \n",
  StyleBox["$OperatingSystem", "MR"],
  " has values such as ",
  StyleBox["\"Unix\"", "MR"],
  " and ",
  StyleBox["\"MacOS\"", "MR"],
  ". By testing ",
  StyleBox["$OperatingSystem", "MR"],
  " you can determine whether a particular external program is likely to be \
available on your computer system. "
}], "Text",
  CellTags->{"S2.13.5", "5.14"}],

Cell["\<\
This gives some characteristics of the computer system used to \
generate the examples for this book. \
\>", "MathCaption",
  CellTags->{"S2.13.5", "5.15"}],

Cell[CellGroupData[{

Cell["{$System, $ProcessorType, $OperatingSystem}", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S2.13.5"],

Cell[BoxData[
    \({"Linux", "x86", "Unix"}\)], "Output",
  CellLabel->"Out[1]= ",
  CellTags->"S2.13.5"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MachineName\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the name of the computer on which \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) is \
running \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MachineDomain\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", "\<\"the network domain for the computer \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MachineID\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the unique ID assigned by \\!\\(\\*StyleBox[\\\"\\\
\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) to the computer \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.16"}],

Cell[TextData[{
  "Variables identifying the computer on which ",
  StyleBox["Mathematica", "SO"],
  " is running. "
}], "Caption",
  CellTags->"S2.13.5"],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$LicenseID\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"the ID for the license under which \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) is \
running \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$LicenseExpirationDate\\\\\
\\\"\\\", \\\"MR\\\"]\\) \"\>", "\<\"the date on which the license expires \"\
\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$NetworkLicense\\\\\\\"\\\
\", \\\"MR\\\"]\\) \"\>", "\<\"whether this is a network license \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$LicenseServer\\\\\\\"\\\"\
, \\\"MR\\\"]\\) \"\>", "\<\"the full name of the machine serving the license \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$LicenseProcesses\\\\\\\"\
\\\", \\\"MR\\\"]\\) \"\>", "\<\"the number of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) \
processes currently being run under the license \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$MaxLicenseProcesses\\\\\\\
\"\\\", \\\"MR\\\"]\\) \"\>", \("the maximum number of processes provided by \
the license "\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"$PasswordFile\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \"\>", "\<\"password file used when the kernel was started \"\
\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.5", "5.17"}],

Cell["Variables associated with license management. ", "Caption",
  CellTags->"S2.13.5"],

Cell[TextData[{
  "2.13.6 Advanced Topic: Customizing Your ",
  StyleBox["Mathematica", "SBO"],
  " Configuration"
}], "Subsection",
  CellTags->{"S2.13.6", "6.1"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\[FilledSmallSquare] Load system\[Hyphen]wide \
\\!\\(\\*StyleBox[\\\"\\\\\\\"init.m\\\\\\\"\\\", \\\"MR\\\"]\\) \
initialization files \"\>"},
                {"\<\"\[FilledSmallSquare] Load \
\\!\\(\\*StyleBox[\\\"\\\\\\\"init.m\\\\\\\"\\\", \\\"MR\\\"]\\), \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Kernel/init.m\\\\\\\"\\\", \\\"MR\\\"]\\) and \
\\!\\(\\*StyleBox[\\\"\\\\\\\"FrontEnd/init.m\\\\\\\"\\\", \\\"MR\\\"]\\) \
files in subdirectories of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Autoload\\\\\\\"\\\", \\\"MR\\\"]\\) \
directories \"\>"}
                },
              ColumnAlignments->{Left}],
            GridBoxOptions->{RowLines->False}]],
        "1ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.6", "6.2"}],

Cell[TextData[{
  "Operations performed whenever ",
  StyleBox["Mathematica", "SO"],
  " starts up. "
}], "Caption",
  CellTags->"S2.13.6"],

Cell[TextData[{
  "You will often find it convenient to customize your copy of ",
  StyleBox["Mathematica", "TI"],
  " by having ",
  StyleBox["Mathematica", "TI"],
  " execute particular commands or load specific packages every time it \
starts up. You can do this by setting up system\[Hyphen]wide ",
  StyleBox["init.m", "MR"],
  " files, or by placing items in an ",
  StyleBox["Autoload", "MR"],
  " directory. "
}], "Text",
  CellTags->{"S2.13.6", "6.3"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\[FilledSmallSquare] Load special or \
user\[Hyphen]specific customization files \"\>"},
                {"\<\"\[FilledSmallSquare] Load customization files shared by \
all users of this copy of \\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\
\", \\\"TI\\\"]\\)\"\>"}
                },
              ColumnAlignments->{Left}],
            GridBoxOptions->{RowLines->False}]],
        "1ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.6", "6.4"}],

Cell["The order of loading customization files. ", "Caption",
  CellTags->"S2.13.6"],

Cell[TextData[{
  "All versions of ",
  StyleBox["Mathematica", "TI"],
  " allow shared customization files to be placed in a central ",
  StyleBox["Configuration", "MR"],
  " directory. However, special or user\[Hyphen]specific customization files \
are typically placed in directories that differ from one computer system to \
another. "
}], "Text",
  CellTags->{"S2.13.6", "6.5"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"Microsoft Windows \"\>", \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Config\\\\\\\"\\\", \\\"MR\\\"]\\) \
subdirectory of main \\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \
\\\"TI\\\"]\\) folder \"\>"},
                {"\<\"Macintosh \"\>", \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"4.0\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Prefs\\\\\\\"\\\", \\\"MR\\\"]\\) folder in the \
\\!\\(\\*StyleBox[\\\"\\\\\\\"System\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Folder\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"},
                {"\<\"Unix \"\>", \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\".Mathematica4.0\\\\\\\"\\\", \
\\\"MR\\\"]\\) subdirectory of each user's home directory \"\>"},
                {"\<\"all systems \"\>", \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Configuration\\\\\\\"\\\", \\\"MR\\\"]\\) \
subdirectory of the main \
\\!\\(\\*StyleBox[\\\"\\\\\\\"Mathematica\\\\\\\"\\\", \\\"TI\\\"]\\) \
directory \"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->{False, False, True}}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S2.13.6", "6.6"}],

Cell["Typical locations for customization files. ", "Caption",
  CellTags->"S2.13.6"],

Cell[TextData[{
  "Section ",
  ButtonBox["A.8",
    ButtonData:>{"A.8"},
    ButtonStyle->"MainBookLink"],
  " describes the arrangement of customization files for the ",
  StyleBox["Mathematica", "TI"],
  " kernel and front end in more detail. "
}], "Text",
  CellTags->{"S2.13.6", "6.7"}]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 800}, {0, 600}},
WindowSize->{520, 455},
WindowMargins->{{140, Automatic}, {Automatic, 72}},
StyleDefinitions -> "HelpBrowser.nb"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S2.13.0"->{
    Cell[1717, 49, 139, 5, 70, "Section",
      CellTags->{"S2.13.0", "0.1"}]},
  "0.1"->{
    Cell[1717, 49, 139, 5, 70, "Section",
      CellTags->{"S2.13.0", "0.1"}]},
  "S2.13.1"->{
    Cell[1859, 56, 74, 1, 70, "Subsection",
      CellTags->{"S2.13.1", "1.1"}],
    Cell[1936, 59, 704, 13, 70, "Text",
      CellTags->{"S2.13.1", "1.2"}],
    Cell[2643, 74, 4279, 85, 70, "Text",
      CellTags->{"S2.13.1", "1.3"}],
    Cell[6925, 161, 72, 1, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[7000, 164, 786, 24, 70, "Text",
      CellTags->{"S2.13.1", "1.4"}],
    Cell[7789, 190, 126, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.5"}],
    Cell[7940, 199, 70, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[8013, 203, 83, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[8111, 209, 128, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.6"}],
    Cell[8264, 218, 81, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[8348, 222, 88, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[8451, 228, 137, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.7"}],
    Cell[8591, 235, 69, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[8663, 239, 198, 6, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.8"}],
    Cell[8886, 249, 70, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[8959, 253, 102, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[9076, 259, 174, 4, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.9"}],
    Cell[9275, 267, 89, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[9367, 271, 97, 2, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[9479, 276, 463, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.10"}],
    Cell[9945, 290, 92, 1, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[10040, 293, 1001, 30, 70, "Text",
      CellTags->{"S2.13.1", "1.11"}],
    Cell[11044, 325, 1414, 28, 70, "Text",
      CellTags->{"S2.13.1", "1.12"}],
    Cell[12461, 355, 82, 1, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[12546, 358, 1010, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.13"}],
    Cell[13559, 380, 390, 15, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.14"}],
    Cell[13974, 399, 131, 3, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[14108, 404, 139, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[14262, 410, 107, 1, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.15"}],
    Cell[14394, 415, 76, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[14473, 419, 91, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[14579, 425, 266, 7, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.16"}],
    Cell[14848, 434, 76, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[14927, 438, 863, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.17"}],
    Cell[15793, 460, 171, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.18"}],
    Cell[15989, 469, 190, 6, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[16182, 477, 392, 12, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[16589, 492, 93, 1, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.19"}],
    Cell[16707, 497, 73, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[16783, 501, 97, 1, 70, "Message",
      CellTags->"S2.13.1"],
    Cell[16883, 504, 204, 4, 70, "Print",
      CellTags->"S2.13.1"],
    Cell[17102, 511, 1105, 32, 70, "Text",
      CellTags->{"S2.13.1", "1.20"}],
    Cell[18210, 545, 192, 7, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.21"}],
    Cell[18427, 556, 75, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[18505, 560, 84, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[18604, 566, 172, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.22"}],
    Cell[18801, 575, 73, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[18877, 579, 102, 3, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[18994, 585, 123, 2, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.23"}],
    Cell[19120, 589, 74, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[19197, 593, 523, 15, 70, "Text",
      CellTags->{"S2.13.1", "1.24"}],
    Cell[19723, 610, 159, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.25"}],
    Cell[19885, 617, 92, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[19980, 621, 118, 2, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.26"}],
    Cell[20123, 627, 84, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[20210, 631, 230, 6, 70, "Output",
      CellTags->"S2.13.1"],
    Cell[20455, 640, 150, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.27"}],
    Cell[20608, 647, 78, 2, 70, "Input",
      CellTags->"S2.13.1"],
    Cell[20689, 651, 557, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.28"}],
    Cell[21249, 665, 1683, 31, 70, "Text",
      CellTags->{"S2.13.1", "1.29"}],
    Cell[22935, 698, 137, 5, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[23075, 705, 454, 11, 70, "Text",
      CellTags->{"S2.13.1", "1.30"}],
    Cell[23532, 718, 950, 19, 70, "Text",
      CellTags->{"S2.13.1", "1.31"}],
    Cell[24485, 739, 125, 5, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[24613, 746, 561, 16, 70, "Text",
      CellTags->{"S2.13.1", "1.32"}],
    Cell[25177, 764, 629, 14, 70, "Text",
      CellTags->{"S2.13.1", "1.33"}],
    Cell[25809, 780, 67, 1, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[25879, 783, 1100, 31, 70, "Text",
      CellTags->{"S2.13.1", "1.34"}],
    Cell[26982, 816, 874, 19, 70, "Text",
      CellTags->{"S2.13.1", "1.35"}],
    Cell[27859, 837, 120, 5, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[27982, 844, 739, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.36"}],
    Cell[28724, 866, 462, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.37"}],
    Cell[29189, 880, 143, 4, 70, "Caption",
      CellTags->"S2.13.1"],
    Cell[29335, 886, 1284, 32, 70, "Text",
      CellTags->{"S2.13.1", "1.38"}]},
  "1.1"->{
    Cell[1859, 56, 74, 1, 70, "Subsection",
      CellTags->{"S2.13.1", "1.1"}]},
  "1.2"->{
    Cell[1936, 59, 704, 13, 70, "Text",
      CellTags->{"S2.13.1", "1.2"}]},
  "1.3"->{
    Cell[2643, 74, 4279, 85, 70, "Text",
      CellTags->{"S2.13.1", "1.3"}]},
  "1.4"->{
    Cell[7000, 164, 786, 24, 70, "Text",
      CellTags->{"S2.13.1", "1.4"}]},
  "1.5"->{
    Cell[7789, 190, 126, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.5"}]},
  "1.6"->{
    Cell[8111, 209, 128, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.6"}]},
  "1.7"->{
    Cell[8451, 228, 137, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.7"}]},
  "1.8"->{
    Cell[8663, 239, 198, 6, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.8"}]},
  "1.9"->{
    Cell[9076, 259, 174, 4, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.9"}]},
  "1.10"->{
    Cell[9479, 276, 463, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.10"}]},
  "1.11"->{
    Cell[10040, 293, 1001, 30, 70, "Text",
      CellTags->{"S2.13.1", "1.11"}]},
  "1.12"->{
    Cell[11044, 325, 1414, 28, 70, "Text",
      CellTags->{"S2.13.1", "1.12"}]},
  "1.13"->{
    Cell[12546, 358, 1010, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.13"}]},
  "1.14"->{
    Cell[13559, 380, 390, 15, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.14"}]},
  "1.15"->{
    Cell[14262, 410, 107, 1, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.15"}]},
  "1.16"->{
    Cell[14579, 425, 266, 7, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.16"}]},
  "1.17"->{
    Cell[14927, 438, 863, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.17"}]},
  "1.18"->{
    Cell[15793, 460, 171, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.18"}]},
  "1.19"->{
    Cell[16589, 492, 93, 1, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.19"}]},
  "1.20"->{
    Cell[17102, 511, 1105, 32, 70, "Text",
      CellTags->{"S2.13.1", "1.20"}]},
  "1.21"->{
    Cell[18210, 545, 192, 7, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.21"}]},
  "1.22"->{
    Cell[18604, 566, 172, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.22"}]},
  "1.23"->{
    Cell[18994, 585, 123, 2, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.23"}]},
  "1.24"->{
    Cell[19197, 593, 523, 15, 70, "Text",
      CellTags->{"S2.13.1", "1.24"}]},
  "1.25"->{
    Cell[19723, 610, 159, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.25"}]},
  "1.26"->{
    Cell[19980, 621, 118, 2, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.26"}]},
  "1.27"->{
    Cell[20455, 640, 150, 5, 70, "MathCaption",
      CellTags->{"S2.13.1", "1.27"}]},
  "1.28"->{
    Cell[20689, 651, 557, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.28"}]},
  "1.29"->{
    Cell[21249, 665, 1683, 31, 70, "Text",
      CellTags->{"S2.13.1", "1.29"}]},
  "1.30"->{
    Cell[23075, 705, 454, 11, 70, "Text",
      CellTags->{"S2.13.1", "1.30"}]},
  "1.31"->{
    Cell[23532, 718, 950, 19, 70, "Text",
      CellTags->{"S2.13.1", "1.31"}]},
  "1.32"->{
    Cell[24613, 746, 561, 16, 70, "Text",
      CellTags->{"S2.13.1", "1.32"}]},
  "1.33"->{
    Cell[25177, 764, 629, 14, 70, "Text",
      CellTags->{"S2.13.1", "1.33"}]},
  "1.34"->{
    Cell[25879, 783, 1100, 31, 70, "Text",
      CellTags->{"S2.13.1", "1.34"}]},
  "1.35"->{
    Cell[26982, 816, 874, 19, 70, "Text",
      CellTags->{"S2.13.1", "1.35"}]},
  "1.36"->{
    Cell[27982, 844, 739, 20, 70, "Text",
      CellTags->{"S2.13.1", "1.36"}]},
  "1.37"->{
    Cell[28724, 866, 462, 12, 70, "Text",
      CellTags->{"S2.13.1", "1.37"}]},
  "1.38"->{
    Cell[29335, 886, 1284, 32, 70, "Text",
      CellTags->{"S2.13.1", "1.38"}]},
  "S2.13.2"->{
    Cell[30622, 920, 68, 1, 70, "Subsection",
      CellTags->{"S2.13.2", "2.1"}],
    Cell[30693, 923, 950, 25, 70, "Text",
      CellTags->{"S2.13.2", "2.2"}],
    Cell[31646, 950, 1612, 29, 70, "Text",
      CellTags->{"S2.13.2", "2.3"}],
    Cell[33261, 981, 81, 1, 70, "Caption",
      CellTags->"S2.13.2"],
    Cell[33345, 984, 80, 1, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.4"}],
    Cell[33428, 987, 74, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[33505, 991, 181, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.5"}],
    Cell[33711, 1000, 69, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[33783, 1004, 95, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[33893, 1010, 141, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.6"}],
    Cell[34059, 1019, 74, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[34136, 1023, 95, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[34246, 1029, 528, 15, 70, "Text",
      CellTags->{"S2.13.2", "2.7"}],
    Cell[34777, 1046, 160, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.8"}],
    Cell[34940, 1053, 80, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[35023, 1057, 240, 9, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.9"}],
    Cell[35288, 1070, 78, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[35369, 1074, 100, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[35484, 1080, 500, 15, 70, "Text",
      CellTags->{"S2.13.2", "2.10"}],
    Cell[35987, 1097, 156, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.11"}],
    Cell[36168, 1106, 90, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[36261, 1110, 86, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[36362, 1116, 137, 4, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.12"}],
    Cell[36524, 1124, 72, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[36599, 1128, 90, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[36704, 1134, 263, 10, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.13"}],
    Cell[36992, 1148, 74, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[37069, 1152, 87, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[37171, 1158, 201, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.14"}],
    Cell[37397, 1167, 76, 2, 70, "Input",
      CellTags->"S2.13.2"],
    Cell[37476, 1171, 97, 3, 70, "Output",
      CellTags->"S2.13.2"],
    Cell[37588, 1177, 2307, 56, 70, "Text",
      CellTags->{"S2.13.2", "2.15"}],
    Cell[39898, 1235, 2701, 61, 70, "Text",
      CellTags->{"S2.13.2", "2.16"}],
    Cell[42602, 1298, 106, 5, 70, "Caption",
      CellTags->"S2.13.2"],
    Cell[42711, 1305, 1106, 30, 70, "Text",
      CellTags->{"S2.13.2", "2.17"}]},
  "2.1"->{
    Cell[30622, 920, 68, 1, 70, "Subsection",
      CellTags->{"S2.13.2", "2.1"}]},
  "2.2"->{
    Cell[30693, 923, 950, 25, 70, "Text",
      CellTags->{"S2.13.2", "2.2"}]},
  "2.3"->{
    Cell[31646, 950, 1612, 29, 70, "Text",
      CellTags->{"S2.13.2", "2.3"}]},
  "2.4"->{
    Cell[33345, 984, 80, 1, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.4"}]},
  "2.5"->{
    Cell[33505, 991, 181, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.5"}]},
  "2.6"->{
    Cell[33893, 1010, 141, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.6"}]},
  "2.7"->{
    Cell[34246, 1029, 528, 15, 70, "Text",
      CellTags->{"S2.13.2", "2.7"}]},
  "2.8"->{
    Cell[34777, 1046, 160, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.8"}]},
  "2.9"->{
    Cell[35023, 1057, 240, 9, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.9"}]},
  "2.10"->{
    Cell[35484, 1080, 500, 15, 70, "Text",
      CellTags->{"S2.13.2", "2.10"}]},
  "2.11"->{
    Cell[35987, 1097, 156, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.11"}]},
  "2.12"->{
    Cell[36362, 1116, 137, 4, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.12"}]},
  "2.13"->{
    Cell[36704, 1134, 263, 10, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.13"}]},
  "2.14"->{
    Cell[37171, 1158, 201, 5, 70, "MathCaption",
      CellTags->{"S2.13.2", "2.14"}]},
  "2.15"->{
    Cell[37588, 1177, 2307, 56, 70, "Text",
      CellTags->{"S2.13.2", "2.15"}]},
  "2.16"->{
    Cell[39898, 1235, 2701, 61, 70, "Text",
      CellTags->{"S2.13.2", "2.16"}]},
  "2.17"->{
    Cell[42711, 1305, 1106, 30, 70, "Text",
      CellTags->{"S2.13.2", "2.17"}]},
  "S2.13.3"->{
    Cell[43820, 1337, 84, 1, 70, "Subsection",
      CellTags->{"S2.13.3", "3.1"}],
    Cell[43907, 1340, 2010, 38, 70, "Text",
      CellTags->{"S2.13.3", "3.2"}],
    Cell[45920, 1380, 69, 1, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[45992, 1383, 93, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.3"}],
    Cell[46110, 1388, 72, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[46185, 1392, 105, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[46305, 1398, 1096, 25, 70, "Text",
      CellTags->{"S2.13.3", "3.4"}],
    Cell[47404, 1425, 131, 4, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.5"}],
    Cell[47560, 1433, 76, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[47639, 1437, 90, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[47744, 1443, 144, 4, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.6"}],
    Cell[47913, 1451, 72, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[47988, 1455, 106, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[48109, 1461, 1334, 26, 70, "Text",
      CellTags->{"S2.13.3", "3.7"}],
    Cell[49446, 1489, 58, 1, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[49507, 1492, 443, 11, 70, "Text",
      CellTags->{"S2.13.3", "3.8"}],
    Cell[49953, 1505, 606, 14, 70, "Text",
      CellTags->{"S2.13.3", "3.9"}],
    Cell[50562, 1521, 72, 1, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[50637, 1524, 91, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.10"}],
    Cell[50753, 1529, 111, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[50867, 1533, 118, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[51000, 1539, 256, 8, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.11"}],
    Cell[51281, 1551, 166, 5, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[51450, 1558, 119, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[51584, 1564, 829, 17, 70, "Text",
      CellTags->{"S2.13.3", "3.12"}],
    Cell[52416, 1583, 87, 1, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[52506, 1586, 136, 5, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.13"}],
    Cell[52667, 1595, 76, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[52746, 1599, 105, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[52866, 1605, 97, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.14"}],
    Cell[52988, 1610, 93, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[53084, 1614, 105, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[53204, 1620, 116, 2, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.15"}],
    Cell[53345, 1626, 90, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[53438, 1630, 89, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[53542, 1636, 675, 15, 70, "Text",
      CellTags->{"S2.13.3", "3.16"}],
    Cell[54220, 1653, 117, 5, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[54340, 1660, 1876, 37, 70, "Text",
      CellTags->{"S2.13.3", "3.17"}],
    Cell[56219, 1699, 226, 6, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.18"}],
    Cell[56470, 1709, 79, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[56552, 1713, 119, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[56686, 1719, 211, 6, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.19"}],
    Cell[56922, 1729, 80, 2, 70, "Input",
      CellTags->"S2.13.3"],
    Cell[57005, 1733, 102, 3, 70, "Output",
      CellTags->"S2.13.3"],
    Cell[57122, 1739, 379, 11, 70, "Text",
      CellTags->{"S2.13.3", "3.20"}],
    Cell[57504, 1752, 1444, 26, 70, "Text",
      CellTags->{"S2.13.3", "3.21"}],
    Cell[58951, 1780, 80, 1, 70, "Caption",
      CellTags->"S2.13.3"],
    Cell[59034, 1783, 1319, 28, 70, "Text",
      CellTags->{"S2.13.3", "3.22"}]},
  "3.1"->{
    Cell[43820, 1337, 84, 1, 70, "Subsection",
      CellTags->{"S2.13.3", "3.1"}]},
  "3.2"->{
    Cell[43907, 1340, 2010, 38, 70, "Text",
      CellTags->{"S2.13.3", "3.2"}]},
  "3.3"->{
    Cell[45992, 1383, 93, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.3"}]},
  "3.4"->{
    Cell[46305, 1398, 1096, 25, 70, "Text",
      CellTags->{"S2.13.3", "3.4"}]},
  "3.5"->{
    Cell[47404, 1425, 131, 4, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.5"}]},
  "3.6"->{
    Cell[47744, 1443, 144, 4, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.6"}]},
  "3.7"->{
    Cell[48109, 1461, 1334, 26, 70, "Text",
      CellTags->{"S2.13.3", "3.7"}]},
  "3.8"->{
    Cell[49507, 1492, 443, 11, 70, "Text",
      CellTags->{"S2.13.3", "3.8"}]},
  "3.9"->{
    Cell[49953, 1505, 606, 14, 70, "Text",
      CellTags->{"S2.13.3", "3.9"}]},
  "3.10"->{
    Cell[50637, 1524, 91, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.10"}]},
  "3.11"->{
    Cell[51000, 1539, 256, 8, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.11"}]},
  "3.12"->{
    Cell[51584, 1564, 829, 17, 70, "Text",
      CellTags->{"S2.13.3", "3.12"}]},
  "3.13"->{
    Cell[52506, 1586, 136, 5, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.13"}]},
  "3.14"->{
    Cell[52866, 1605, 97, 1, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.14"}]},
  "3.15"->{
    Cell[53204, 1620, 116, 2, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.15"}]},
  "3.16"->{
    Cell[53542, 1636, 675, 15, 70, "Text",
      CellTags->{"S2.13.3", "3.16"}]},
  "3.17"->{
    Cell[54340, 1660, 1876, 37, 70, "Text",
      CellTags->{"S2.13.3", "3.17"}]},
  "3.18"->{
    Cell[56219, 1699, 226, 6, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.18"}]},
  "3.19"->{
    Cell[56686, 1719, 211, 6, 70, "MathCaption",
      CellTags->{"S2.13.3", "3.19"}]},
  "3.20"->{
    Cell[57122, 1739, 379, 11, 70, "Text",
      CellTags->{"S2.13.3", "3.20"}]},
  "3.21"->{
    Cell[57504, 1752, 1444, 26, 70, "Text",
      CellTags->{"S2.13.3", "3.21"}]},
  "3.22"->{
    Cell[59034, 1783, 1319, 28, 70, "Text",
      CellTags->{"S2.13.3", "3.22"}]},
  "S2.13.4"->{
    Cell[60356, 1813, 78, 1, 70, "Subsection",
      CellTags->{"S2.13.4", "4.1"}],
    Cell[60437, 1816, 895, 18, 70, "Text",
      CellTags->{"S2.13.4", "4.2"}],
    Cell[61335, 1836, 64, 1, 70, "Caption",
      CellTags->"S2.13.4"],
    Cell[61402, 1839, 969, 18, 70, "Text",
      CellTags->{"S2.13.4", "4.3"}],
    Cell[62374, 1859, 177, 5, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.4"}],
    Cell[62576, 1868, 123, 6, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[62702, 1876, 88, 3, 70, "Output",
      CellTags->"S2.13.4"],
    Cell[62805, 1882, 100, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.5"}],
    Cell[62930, 1887, 158, 8, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[63091, 1897, 193, 4, 70, "Output",
      CellTags->"S2.13.4"],
    Cell[63299, 1904, 102, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.6"}],
    Cell[63426, 1909, 123, 6, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[63552, 1917, 88, 3, 70, "Output",
      CellTags->"S2.13.4"],
    Cell[63655, 1923, 231, 7, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.7"}],
    Cell[63889, 1932, 89, 2, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[63981, 1936, 90, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.8"}],
    Cell[64096, 1941, 123, 6, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[64222, 1949, 88, 3, 70, "Output",
      CellTags->"S2.13.4"],
    Cell[64325, 1955, 131, 4, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.9"}],
    Cell[64481, 1963, 125, 6, 70, "Input",
      CellTags->"S2.13.4"],
    Cell[64609, 1971, 89, 3, 70, "Output",
      CellTags->"S2.13.4"],
    Cell[64713, 1977, 1782, 32, 70, "Text",
      CellTags->{"S2.13.4", "4.10"}],
    Cell[66498, 2011, 1474, 26, 70, "Text",
      CellTags->{"S2.13.4", "4.11"}],
    Cell[67975, 2039, 82, 1, 70, "Caption",
      CellTags->"S2.13.4"],
    Cell[68060, 2042, 460, 11, 70, "Text",
      CellTags->{"S2.13.4", "4.12"}],
    Cell[68523, 2055, 1003, 19, 70, "Text",
      CellTags->{"S2.13.4", "4.13"}],
    Cell[69529, 2076, 75, 1, 70, "Caption",
      CellTags->"S2.13.4"],
    Cell[69607, 2079, 1823, 51, 70, "Text",
      CellTags->{"S2.13.4", "4.14"}],
    Cell[71433, 2132, 848, 17, 70, "Text",
      CellTags->{"S2.13.4", "4.15"}],
    Cell[72284, 2151, 67, 1, 70, "Caption",
      CellTags->"S2.13.4"],
    Cell[72354, 2154, 1297, 27, 70, "Text",
      CellTags->{"S2.13.4", "4.16"}]},
  "4.1"->{
    Cell[60356, 1813, 78, 1, 70, "Subsection",
      CellTags->{"S2.13.4", "4.1"}]},
  "4.2"->{
    Cell[60437, 1816, 895, 18, 70, "Text",
      CellTags->{"S2.13.4", "4.2"}]},
  "4.3"->{
    Cell[61402, 1839, 969, 18, 70, "Text",
      CellTags->{"S2.13.4", "4.3"}]},
  "4.4"->{
    Cell[62374, 1859, 177, 5, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.4"}]},
  "4.5"->{
    Cell[62805, 1882, 100, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.5"}]},
  "4.6"->{
    Cell[63299, 1904, 102, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.6"}]},
  "4.7"->{
    Cell[63655, 1923, 231, 7, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.7"}]},
  "4.8"->{
    Cell[63981, 1936, 90, 1, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.8"}]},
  "4.9"->{
    Cell[64325, 1955, 131, 4, 70, "MathCaption",
      CellTags->{"S2.13.4", "4.9"}]},
  "4.10"->{
    Cell[64713, 1977, 1782, 32, 70, "Text",
      CellTags->{"S2.13.4", "4.10"}]},
  "4.11"->{
    Cell[66498, 2011, 1474, 26, 70, "Text",
      CellTags->{"S2.13.4", "4.11"}]},
  "4.12"->{
    Cell[68060, 2042, 460, 11, 70, "Text",
      CellTags->{"S2.13.4", "4.12"}]},
  "4.13"->{
    Cell[68523, 2055, 1003, 19, 70, "Text",
      CellTags->{"S2.13.4", "4.13"}]},
  "4.14"->{
    Cell[69607, 2079, 1823, 51, 70, "Text",
      CellTags->{"S2.13.4", "4.14"}]},
  "4.15"->{
    Cell[71433, 2132, 848, 17, 70, "Text",
      CellTags->{"S2.13.4", "4.15"}]},
  "4.16"->{
    Cell[72354, 2154, 1297, 27, 70, "Text",
      CellTags->{"S2.13.4", "4.16"}]},
  "S2.13.5"->{
    Cell[73654, 2183, 102, 1, 70, "Subsection",
      CellTags->{"S2.13.5", "5.1"}],
    Cell[73759, 2186, 622, 14, 70, "Text",
      CellTags->{"S2.13.5", "5.2"}],
    Cell[74384, 2202, 442, 11, 70, "Text",
      CellTags->{"S2.13.5", "5.3"}],
    Cell[74829, 2215, 98, 1, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[74930, 2218, 336, 7, 70, "Text",
      CellTags->{"S2.13.5", "5.4"}],
    Cell[75269, 2227, 625, 14, 70, "Text",
      CellTags->{"S2.13.5", "5.5"}],
    Cell[75897, 2243, 85, 1, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[75985, 2246, 349, 9, 70, "Text",
      CellTags->{"S2.13.5", "5.6"}],
    Cell[76337, 2257, 1988, 36, 70, "Text",
      CellTags->{"S2.13.5", "5.7"}],
    Cell[78328, 2295, 144, 5, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[78475, 2302, 756, 19, 70, "Text",
      CellTags->{"S2.13.5", "5.8"}],
    Cell[79234, 2323, 523, 13, 70, "Text",
      CellTags->{"S2.13.5", "5.9"}],
    Cell[79760, 2338, 143, 5, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[79906, 2345, 415, 8, 70, "Text",
      CellTags->{"S2.13.5", "5.10"}],
    Cell[80324, 2355, 1643, 31, 70, "Text",
      CellTags->{"S2.13.5", "5.11"}],
    Cell[81970, 2388, 140, 5, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[82113, 2395, 355, 7, 70, "Text",
      CellTags->{"S2.13.5", "5.12"}],
    Cell[82471, 2404, 1464, 28, 70, "Text",
      CellTags->{"S2.13.5", "5.13"}],
    Cell[83938, 2434, 118, 4, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[84059, 2440, 929, 26, 70, "Text",
      CellTags->{"S2.13.5", "5.14"}],
    Cell[84991, 2468, 166, 4, 70, "MathCaption",
      CellTags->{"S2.13.5", "5.15"}],
    Cell[85182, 2476, 108, 2, 70, "Input",
      CellTags->"S2.13.5"],
    Cell[85293, 2480, 106, 3, 70, "Output",
      CellTags->"S2.13.5"],
    Cell[85414, 2486, 901, 18, 70, "Text",
      CellTags->{"S2.13.5", "5.16"}],
    Cell[86318, 2506, 154, 5, 70, "Caption",
      CellTags->"S2.13.5"],
    Cell[86475, 2513, 1603, 31, 70, "Text",
      CellTags->{"S2.13.5", "5.17"}],
    Cell[88081, 2546, 88, 1, 70, "Caption",
      CellTags->"S2.13.5"]},
  "5.1"->{
    Cell[73654, 2183, 102, 1, 70, "Subsection",
      CellTags->{"S2.13.5", "5.1"}]},
  "5.2"->{
    Cell[73759, 2186, 622, 14, 70, "Text",
      CellTags->{"S2.13.5", "5.2"}]},
  "5.3"->{
    Cell[74384, 2202, 442, 11, 70, "Text",
      CellTags->{"S2.13.5", "5.3"}]},
  "5.4"->{
    Cell[74930, 2218, 336, 7, 70, "Text",
      CellTags->{"S2.13.5", "5.4"}]},
  "5.5"->{
    Cell[75269, 2227, 625, 14, 70, "Text",
      CellTags->{"S2.13.5", "5.5"}]},
  "5.6"->{
    Cell[75985, 2246, 349, 9, 70, "Text",
      CellTags->{"S2.13.5", "5.6"}]},
  "5.7"->{
    Cell[76337, 2257, 1988, 36, 70, "Text",
      CellTags->{"S2.13.5", "5.7"}]},
  "5.8"->{
    Cell[78475, 2302, 756, 19, 70, "Text",
      CellTags->{"S2.13.5", "5.8"}]},
  "5.9"->{
    Cell[79234, 2323, 523, 13, 70, "Text",
      CellTags->{"S2.13.5", "5.9"}]},
  "5.10"->{
    Cell[79906, 2345, 415, 8, 70, "Text",
      CellTags->{"S2.13.5", "5.10"}]},
  "5.11"->{
    Cell[80324, 2355, 1643, 31, 70, "Text",
      CellTags->{"S2.13.5", "5.11"}]},
  "5.12"->{
    Cell[82113, 2395, 355, 7, 70, "Text",
      CellTags->{"S2.13.5", "5.12"}]},
  "5.13"->{
    Cell[82471, 2404, 1464, 28, 70, "Text",
      CellTags->{"S2.13.5", "5.13"}]},
  "5.14"->{
    Cell[84059, 2440, 929, 26, 70, "Text",
      CellTags->{"S2.13.5", "5.14"}]},
  "5.15"->{
    Cell[84991, 2468, 166, 4, 70, "MathCaption",
      CellTags->{"S2.13.5", "5.15"}]},
  "5.16"->{
    Cell[85414, 2486, 901, 18, 70, "Text",
      CellTags->{"S2.13.5", "5.16"}]},
  "5.17"->{
    Cell[86475, 2513, 1603, 31, 70, "Text",
      CellTags->{"S2.13.5", "5.17"}]},
  "S2.13.6"->{
    Cell[88172, 2549, 164, 5, 70, "Subsection",
      CellTags->{"S2.13.6", "6.1"}],
    Cell[88339, 2556, 835, 19, 70, "Text",
      CellTags->{"S2.13.6", "6.2"}],
    Cell[89177, 2577, 139, 5, 70, "Caption",
      CellTags->"S2.13.6"],
    Cell[89319, 2584, 461, 12, 70, "Text",
      CellTags->{"S2.13.6", "6.3"}],
    Cell[89783, 2598, 575, 14, 70, "Text",
      CellTags->{"S2.13.6", "6.4"}],
    Cell[90361, 2614, 84, 1, 70, "Caption",
      CellTags->"S2.13.6"],
    Cell[90448, 2617, 383, 9, 70, "Text",
      CellTags->{"S2.13.6", "6.5"}],
    Cell[90834, 2628, 1339, 27, 70, "Text",
      CellTags->{"S2.13.6", "6.6"}],
    Cell[92176, 2657, 85, 1, 70, "Caption",
      CellTags->"S2.13.6"],
    Cell[92264, 2660, 291, 9, 70, "Text",
      CellTags->{"S2.13.6", "6.7"}]},
  "6.1"->{
    Cell[88172, 2549, 164, 5, 70, "Subsection",
      CellTags->{"S2.13.6", "6.1"}]},
  "6.2"->{
    Cell[88339, 2556, 835, 19, 70, "Text",
      CellTags->{"S2.13.6", "6.2"}]},
  "6.3"->{
    Cell[89319, 2584, 461, 12, 70, "Text",
      CellTags->{"S2.13.6", "6.3"}]},
  "6.4"->{
    Cell[89783, 2598, 575, 14, 70, "Text",
      CellTags->{"S2.13.6", "6.4"}]},
  "6.5"->{
    Cell[90448, 2617, 383, 9, 70, "Text",
      CellTags->{"S2.13.6", "6.5"}]},
  "6.6"->{
    Cell[90834, 2628, 1339, 27, 70, "Text",
      CellTags->{"S2.13.6", "6.6"}]},
  "6.7"->{
    Cell[92264, 2660, 291, 9, 70, "Text",
      CellTags->{"S2.13.6", "6.7"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S2.13.0", 93184, 2688},
  {"0.1", 93275, 2691},
  {"S2.13.1", 93370, 2694},
  {"1.1", 99022, 2843},
  {"1.2", 99115, 2846},
  {"1.3", 99204, 2849},
  {"1.4", 99294, 2852},
  {"1.5", 99384, 2855},
  {"1.6", 99480, 2858},
  {"1.7", 99576, 2861},
  {"1.8", 99672, 2864},
  {"1.9", 99768, 2867},
  {"1.10", 99865, 2870},
  {"1.11", 99957, 2873},
  {"1.12", 100051, 2876},
  {"1.13", 100145, 2879},
  {"1.14", 100239, 2882},
  {"1.15", 100339, 2885},
  {"1.16", 100438, 2888},
  {"1.17", 100537, 2891},
  {"1.18", 100630, 2894},
  {"1.19", 100729, 2897},
  {"1.20", 100827, 2900},
  {"1.21", 100921, 2903},
  {"1.22", 101020, 2906},
  {"1.23", 101119, 2909},
  {"1.24", 101218, 2912},
  {"1.25", 101311, 2915},
  {"1.26", 101410, 2918},
  {"1.27", 101509, 2921},
  {"1.28", 101608, 2924},
  {"1.29", 101701, 2927},
  {"1.30", 101795, 2930},
  {"1.31", 101888, 2933},
  {"1.32", 101981, 2936},
  {"1.33", 102074, 2939},
  {"1.34", 102167, 2942},
  {"1.35", 102261, 2945},
  {"1.36", 102354, 2948},
  {"1.37", 102447, 2951},
  {"1.38", 102540, 2954},
  {"S2.13.2", 102637, 2957},
  {"2.1", 105345, 3028},
  {"2.2", 105440, 3031},
  {"2.3", 105531, 3034},
  {"2.4", 105623, 3037},
  {"2.5", 105719, 3040},
  {"2.6", 105816, 3043},
  {"2.7", 105914, 3046},
  {"2.8", 106006, 3049},
  {"2.9", 106104, 3052},
  {"2.10", 106203, 3055},
  {"2.11", 106297, 3058},
  {"2.12", 106397, 3061},
  {"2.13", 106497, 3064},
  {"2.14", 106598, 3067},
  {"2.15", 106698, 3070},
  {"2.16", 106793, 3073},
  {"2.17", 106888, 3076},
  {"S2.13.3", 106986, 3079},
  {"3.1", 110691, 3176},
  {"3.2", 110787, 3179},
  {"3.3", 110880, 3182},
  {"3.4", 110977, 3185},
  {"3.5", 111070, 3188},
  {"3.6", 111168, 3191},
  {"3.7", 111266, 3194},
  {"3.8", 111359, 3197},
  {"3.9", 111451, 3200},
  {"3.10", 111544, 3203},
  {"3.11", 111643, 3206},
  {"3.12", 111743, 3209},
  {"3.13", 111837, 3212},
  {"3.14", 111937, 3215},
  {"3.15", 112036, 3218},
  {"3.16", 112136, 3221},
  {"3.17", 112230, 3224},
  {"3.18", 112325, 3227},
  {"3.19", 112425, 3230},
  {"3.20", 112525, 3233},
  {"3.21", 112619, 3236},
  {"3.22", 112714, 3239},
  {"S2.13.4", 112812, 3242},
  {"4.1", 115224, 3305},
  {"4.2", 115320, 3308},
  {"4.3", 115412, 3311},
  {"4.4", 115504, 3314},
  {"4.5", 115602, 3317},
  {"4.6", 115700, 3320},
  {"4.7", 115798, 3323},
  {"4.8", 115896, 3326},
  {"4.9", 115993, 3329},
  {"4.10", 116092, 3332},
  {"4.11", 116187, 3335},
  {"4.12", 116282, 3338},
  {"4.13", 116376, 3341},
  {"4.14", 116471, 3344},
  {"4.15", 116566, 3347},
  {"4.16", 116660, 3350},
  {"S2.13.5", 116758, 3353},
  {"5.1", 118873, 3408},
  {"5.2", 118970, 3411},
  {"5.3", 119062, 3414},
  {"5.4", 119154, 3417},
  {"5.5", 119245, 3420},
  {"5.6", 119337, 3423},
  {"5.7", 119428, 3426},
  {"5.8", 119521, 3429},
  {"5.9", 119613, 3432},
  {"5.10", 119706, 3435},
  {"5.11", 119799, 3438},
  {"5.12", 119894, 3441},
  {"5.13", 119987, 3444},
  {"5.14", 120082, 3447},
  {"5.15", 120176, 3450},
  {"5.16", 120276, 3453},
  {"5.17", 120370, 3456},
  {"S2.13.6", 120468, 3459},
  {"6.1", 121261, 3480},
  {"6.2", 121358, 3483},
  {"6.3", 121450, 3486},
  {"6.4", 121542, 3489},
  {"6.5", 121634, 3492},
  {"6.6", 121725, 3495},
  {"6.7", 121818, 3498}
  }
*)

(*NotebookFileOutline
Notebook[{
Cell[1717, 49, 139, 5, 70, "Section",
  CellTags->{"S2.13.0", "0.1"}],
Cell[1859, 56, 74, 1, 70, "Subsection",
  CellTags->{"S2.13.1", "1.1"}],
Cell[1936, 59, 704, 13, 70, "Text",
  CellTags->{"S2.13.1", "1.2"}],
Cell[2643, 74, 4279, 85, 70, "Text",
  CellTags->{"S2.13.1", "1.3"}],
Cell[6925, 161, 72, 1, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[7000, 164, 786, 24, 70, "Text",
  CellTags->{"S2.13.1", "1.4"}],
Cell[7789, 190, 126, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.5"}],

Cell[CellGroupData[{
Cell[7940, 199, 70, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[8013, 203, 83, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[8111, 209, 128, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.6"}],

Cell[CellGroupData[{
Cell[8264, 218, 81, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[8348, 222, 88, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[8451, 228, 137, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.7"}],
Cell[8591, 235, 69, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[8663, 239, 198, 6, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.8"}],

Cell[CellGroupData[{
Cell[8886, 249, 70, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[8959, 253, 102, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[9076, 259, 174, 4, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.9"}],

Cell[CellGroupData[{
Cell[9275, 267, 89, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[9367, 271, 97, 2, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[9479, 276, 463, 12, 70, "Text",
  CellTags->{"S2.13.1", "1.10"}],
Cell[9945, 290, 92, 1, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[10040, 293, 1001, 30, 70, "Text",
  CellTags->{"S2.13.1", "1.11"}],
Cell[11044, 325, 1414, 28, 70, "Text",
  CellTags->{"S2.13.1", "1.12"}],
Cell[12461, 355, 82, 1, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[12546, 358, 1010, 20, 70, "Text",
  CellTags->{"S2.13.1", "1.13"}],
Cell[13559, 380, 390, 15, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.14"}],

Cell[CellGroupData[{
Cell[13974, 399, 131, 3, 70, "Input",
  CellTags->"S2.13.1"],
Cell[14108, 404, 139, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[14262, 410, 107, 1, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.15"}],

Cell[CellGroupData[{
Cell[14394, 415, 76, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[14473, 419, 91, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[14579, 425, 266, 7, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.16"}],
Cell[14848, 434, 76, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[14927, 438, 863, 20, 70, "Text",
  CellTags->{"S2.13.1", "1.17"}],
Cell[15793, 460, 171, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.18"}],

Cell[CellGroupData[{
Cell[15989, 469, 190, 6, 70, "Input",
  CellTags->"S2.13.1"],
Cell[16182, 477, 392, 12, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[16589, 492, 93, 1, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.19"}],

Cell[CellGroupData[{
Cell[16707, 497, 73, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[16783, 501, 97, 1, 70, "Message",
  CellTags->"S2.13.1"],
Cell[16883, 504, 204, 4, 70, "Print",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[17102, 511, 1105, 32, 70, "Text",
  CellTags->{"S2.13.1", "1.20"}],
Cell[18210, 545, 192, 7, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.21"}],

Cell[CellGroupData[{
Cell[18427, 556, 75, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[18505, 560, 84, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[18604, 566, 172, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.22"}],

Cell[CellGroupData[{
Cell[18801, 575, 73, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[18877, 579, 102, 3, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[18994, 585, 123, 2, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.23"}],
Cell[19120, 589, 74, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[19197, 593, 523, 15, 70, "Text",
  CellTags->{"S2.13.1", "1.24"}],
Cell[19723, 610, 159, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.25"}],
Cell[19885, 617, 92, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[19980, 621, 118, 2, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.26"}],

Cell[CellGroupData[{
Cell[20123, 627, 84, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[20210, 631, 230, 6, 70, "Output",
  CellTags->"S2.13.1"]
}, Open  ]],
Cell[20455, 640, 150, 5, 70, "MathCaption",
  CellTags->{"S2.13.1", "1.27"}],
Cell[20608, 647, 78, 2, 70, "Input",
  CellTags->"S2.13.1"],
Cell[20689, 651, 557, 12, 70, "Text",
  CellTags->{"S2.13.1", "1.28"}],
Cell[21249, 665, 1683, 31, 70, "Text",
  CellTags->{"S2.13.1", "1.29"}],
Cell[22935, 698, 137, 5, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[23075, 705, 454, 11, 70, "Text",
  CellTags->{"S2.13.1", "1.30"}],
Cell[23532, 718, 950, 19, 70, "Text",
  CellTags->{"S2.13.1", "1.31"}],
Cell[24485, 739, 125, 5, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[24613, 746, 561, 16, 70, "Text",
  CellTags->{"S2.13.1", "1.32"}],
Cell[25177, 764, 629, 14, 70, "Text",
  CellTags->{"S2.13.1", "1.33"}],
Cell[25809, 780, 67, 1, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[25879, 783, 1100, 31, 70, "Text",
  CellTags->{"S2.13.1", "1.34"}],
Cell[26982, 816, 874, 19, 70, "Text",
  CellTags->{"S2.13.1", "1.35"}],
Cell[27859, 837, 120, 5, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[27982, 844, 739, 20, 70, "Text",
  CellTags->{"S2.13.1", "1.36"}],
Cell[28724, 866, 462, 12, 70, "Text",
  CellTags->{"S2.13.1", "1.37"}],
Cell[29189, 880, 143, 4, 70, "Caption",
  CellTags->"S2.13.1"],
Cell[29335, 886, 1284, 32, 70, "Text",
  CellTags->{"S2.13.1", "1.38"}],
Cell[30622, 920, 68, 1, 70, "Subsection",
  CellTags->{"S2.13.2", "2.1"}],
Cell[30693, 923, 950, 25, 70, "Text",
  CellTags->{"S2.13.2", "2.2"}],
Cell[31646, 950, 1612, 29, 70, "Text",
  CellTags->{"S2.13.2", "2.3"}],
Cell[33261, 981, 81, 1, 70, "Caption",
  CellTags->"S2.13.2"],
Cell[33345, 984, 80, 1, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.4"}],
Cell[33428, 987, 74, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[33505, 991, 181, 5, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.5"}],

Cell[CellGroupData[{
Cell[33711, 1000, 69, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[33783, 1004, 95, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[33893, 1010, 141, 5, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.6"}],

Cell[CellGroupData[{
Cell[34059, 1019, 74, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[34136, 1023, 95, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[34246, 1029, 528, 15, 70, "Text",
  CellTags->{"S2.13.2", "2.7"}],
Cell[34777, 1046, 160, 5, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.8"}],
Cell[34940, 1053, 80, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[35023, 1057, 240, 9, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.9"}],

Cell[CellGroupData[{
Cell[35288, 1070, 78, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[35369, 1074, 100, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[35484, 1080, 500, 15, 70, "Text",
  CellTags->{"S2.13.2", "2.10"}],
Cell[35987, 1097, 156, 5, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.11"}],

Cell[CellGroupData[{
Cell[36168, 1106, 90, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[36261, 1110, 86, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[36362, 1116, 137, 4, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.12"}],

Cell[CellGroupData[{
Cell[36524, 1124, 72, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[36599, 1128, 90, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[36704, 1134, 263, 10, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.13"}],

Cell[CellGroupData[{
Cell[36992, 1148, 74, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[37069, 1152, 87, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[37171, 1158, 201, 5, 70, "MathCaption",
  CellTags->{"S2.13.2", "2.14"}],

Cell[CellGroupData[{
Cell[37397, 1167, 76, 2, 70, "Input",
  CellTags->"S2.13.2"],
Cell[37476, 1171, 97, 3, 70, "Output",
  CellTags->"S2.13.2"]
}, Open  ]],
Cell[37588, 1177, 2307, 56, 70, "Text",
  CellTags->{"S2.13.2", "2.15"}],
Cell[39898, 1235, 2701, 61, 70, "Text",
  CellTags->{"S2.13.2", "2.16"}],
Cell[42602, 1298, 106, 5, 70, "Caption",
  CellTags->"S2.13.2"],
Cell[42711, 1305, 1106, 30, 70, "Text",
  CellTags->{"S2.13.2", "2.17"}],
Cell[43820, 1337, 84, 1, 70, "Subsection",
  CellTags->{"S2.13.3", "3.1"}],
Cell[43907, 1340, 2010, 38, 70, "Text",
  CellTags->{"S2.13.3", "3.2"}],
Cell[45920, 1380, 69, 1, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[45992, 1383, 93, 1, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.3"}],

Cell[CellGroupData[{
Cell[46110, 1388, 72, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[46185, 1392, 105, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[46305, 1398, 1096, 25, 70, "Text",
  CellTags->{"S2.13.3", "3.4"}],
Cell[47404, 1425, 131, 4, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.5"}],

Cell[CellGroupData[{
Cell[47560, 1433, 76, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[47639, 1437, 90, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[47744, 1443, 144, 4, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.6"}],

Cell[CellGroupData[{
Cell[47913, 1451, 72, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[47988, 1455, 106, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[48109, 1461, 1334, 26, 70, "Text",
  CellTags->{"S2.13.3", "3.7"}],
Cell[49446, 1489, 58, 1, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[49507, 1492, 443, 11, 70, "Text",
  CellTags->{"S2.13.3", "3.8"}],
Cell[49953, 1505, 606, 14, 70, "Text",
  CellTags->{"S2.13.3", "3.9"}],
Cell[50562, 1521, 72, 1, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[50637, 1524, 91, 1, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.10"}],

Cell[CellGroupData[{
Cell[50753, 1529, 111, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[50867, 1533, 118, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[51000, 1539, 256, 8, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.11"}],

Cell[CellGroupData[{
Cell[51281, 1551, 166, 5, 70, "Input",
  CellTags->"S2.13.3"],
Cell[51450, 1558, 119, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[51584, 1564, 829, 17, 70, "Text",
  CellTags->{"S2.13.3", "3.12"}],
Cell[52416, 1583, 87, 1, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[52506, 1586, 136, 5, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.13"}],

Cell[CellGroupData[{
Cell[52667, 1595, 76, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[52746, 1599, 105, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[52866, 1605, 97, 1, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.14"}],

Cell[CellGroupData[{
Cell[52988, 1610, 93, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[53084, 1614, 105, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[53204, 1620, 116, 2, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.15"}],

Cell[CellGroupData[{
Cell[53345, 1626, 90, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[53438, 1630, 89, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[53542, 1636, 675, 15, 70, "Text",
  CellTags->{"S2.13.3", "3.16"}],
Cell[54220, 1653, 117, 5, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[54340, 1660, 1876, 37, 70, "Text",
  CellTags->{"S2.13.3", "3.17"}],
Cell[56219, 1699, 226, 6, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.18"}],

Cell[CellGroupData[{
Cell[56470, 1709, 79, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[56552, 1713, 119, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[56686, 1719, 211, 6, 70, "MathCaption",
  CellTags->{"S2.13.3", "3.19"}],

Cell[CellGroupData[{
Cell[56922, 1729, 80, 2, 70, "Input",
  CellTags->"S2.13.3"],
Cell[57005, 1733, 102, 3, 70, "Output",
  CellTags->"S2.13.3"]
}, Open  ]],
Cell[57122, 1739, 379, 11, 70, "Text",
  CellTags->{"S2.13.3", "3.20"}],
Cell[57504, 1752, 1444, 26, 70, "Text",
  CellTags->{"S2.13.3", "3.21"}],
Cell[58951, 1780, 80, 1, 70, "Caption",
  CellTags->"S2.13.3"],
Cell[59034, 1783, 1319, 28, 70, "Text",
  CellTags->{"S2.13.3", "3.22"}],
Cell[60356, 1813, 78, 1, 70, "Subsection",
  CellTags->{"S2.13.4", "4.1"}],
Cell[60437, 1816, 895, 18, 70, "Text",
  CellTags->{"S2.13.4", "4.2"}],
Cell[61335, 1836, 64, 1, 70, "Caption",
  CellTags->"S2.13.4"],
Cell[61402, 1839, 969, 18, 70, "Text",
  CellTags->{"S2.13.4", "4.3"}],
Cell[62374, 1859, 177, 5, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.4"}],

Cell[CellGroupData[{
Cell[62576, 1868, 123, 6, 70, "Input",
  CellTags->"S2.13.4"],
Cell[62702, 1876, 88, 3, 70, "Output",
  CellTags->"S2.13.4"]
}, Open  ]],
Cell[62805, 1882, 100, 1, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.5"}],

Cell[CellGroupData[{
Cell[62930, 1887, 158, 8, 70, "Input",
  CellTags->"S2.13.4"],
Cell[63091, 1897, 193, 4, 70, "Output",
  CellTags->"S2.13.4"]
}, Open  ]],
Cell[63299, 1904, 102, 1, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.6"}],

Cell[CellGroupData[{
Cell[63426, 1909, 123, 6, 70, "Input",
  CellTags->"S2.13.4"],
Cell[63552, 1917, 88, 3, 70, "Output",
  CellTags->"S2.13.4"]
}, Open  ]],
Cell[63655, 1923, 231, 7, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.7"}],
Cell[63889, 1932, 89, 2, 70, "Input",
  CellTags->"S2.13.4"],
Cell[63981, 1936, 90, 1, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.8"}],

Cell[CellGroupData[{
Cell[64096, 1941, 123, 6, 70, "Input",
  CellTags->"S2.13.4"],
Cell[64222, 1949, 88, 3, 70, "Output",
  CellTags->"S2.13.4"]
}, Open  ]],
Cell[64325, 1955, 131, 4, 70, "MathCaption",
  CellTags->{"S2.13.4", "4.9"}],

Cell[CellGroupData[{
Cell[64481, 1963, 125, 6, 70, "Input",
  CellTags->"S2.13.4"],
Cell[64609, 1971, 89, 3, 70, "Output",
  CellTags->"S2.13.4"]
}, Open  ]],
Cell[64713, 1977, 1782, 32, 70, "Text",
  CellTags->{"S2.13.4", "4.10"}],
Cell[66498, 2011, 1474, 26, 70, "Text",
  CellTags->{"S2.13.4", "4.11"}],
Cell[67975, 2039, 82, 1, 70, "Caption",
  CellTags->"S2.13.4"],
Cell[68060, 2042, 460, 11, 70, "Text",
  CellTags->{"S2.13.4", "4.12"}],
Cell[68523, 2055, 1003, 19, 70, "Text",
  CellTags->{"S2.13.4", "4.13"}],
Cell[69529, 2076, 75, 1, 70, "Caption",
  CellTags->"S2.13.4"],
Cell[69607, 2079, 1823, 51, 70, "Text",
  CellTags->{"S2.13.4", "4.14"}],
Cell[71433, 2132, 848, 17, 70, "Text",
  CellTags->{"S2.13.4", "4.15"}],
Cell[72284, 2151, 67, 1, 70, "Caption",
  CellTags->"S2.13.4"],
Cell[72354, 2154, 1297, 27, 70, "Text",
  CellTags->{"S2.13.4", "4.16"}],
Cell[73654, 2183, 102, 1, 70, "Subsection",
  CellTags->{"S2.13.5", "5.1"}],
Cell[73759, 2186, 622, 14, 70, "Text",
  CellTags->{"S2.13.5", "5.2"}],
Cell[74384, 2202, 442, 11, 70, "Text",
  CellTags->{"S2.13.5", "5.3"}],
Cell[74829, 2215, 98, 1, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[74930, 2218, 336, 7, 70, "Text",
  CellTags->{"S2.13.5", "5.4"}],
Cell[75269, 2227, 625, 14, 70, "Text",
  CellTags->{"S2.13.5", "5.5"}],
Cell[75897, 2243, 85, 1, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[75985, 2246, 349, 9, 70, "Text",
  CellTags->{"S2.13.5", "5.6"}],
Cell[76337, 2257, 1988, 36, 70, "Text",
  CellTags->{"S2.13.5", "5.7"}],
Cell[78328, 2295, 144, 5, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[78475, 2302, 756, 19, 70, "Text",
  CellTags->{"S2.13.5", "5.8"}],
Cell[79234, 2323, 523, 13, 70, "Text",
  CellTags->{"S2.13.5", "5.9"}],
Cell[79760, 2338, 143, 5, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[79906, 2345, 415, 8, 70, "Text",
  CellTags->{"S2.13.5", "5.10"}],
Cell[80324, 2355, 1643, 31, 70, "Text",
  CellTags->{"S2.13.5", "5.11"}],
Cell[81970, 2388, 140, 5, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[82113, 2395, 355, 7, 70, "Text",
  CellTags->{"S2.13.5", "5.12"}],
Cell[82471, 2404, 1464, 28, 70, "Text",
  CellTags->{"S2.13.5", "5.13"}],
Cell[83938, 2434, 118, 4, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[84059, 2440, 929, 26, 70, "Text",
  CellTags->{"S2.13.5", "5.14"}],
Cell[84991, 2468, 166, 4, 70, "MathCaption",
  CellTags->{"S2.13.5", "5.15"}],

Cell[CellGroupData[{
Cell[85182, 2476, 108, 2, 70, "Input",
  CellTags->"S2.13.5"],
Cell[85293, 2480, 106, 3, 70, "Output",
  CellTags->"S2.13.5"]
}, Open  ]],
Cell[85414, 2486, 901, 18, 70, "Text",
  CellTags->{"S2.13.5", "5.16"}],
Cell[86318, 2506, 154, 5, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[86475, 2513, 1603, 31, 70, "Text",
  CellTags->{"S2.13.5", "5.17"}],
Cell[88081, 2546, 88, 1, 70, "Caption",
  CellTags->"S2.13.5"],
Cell[88172, 2549, 164, 5, 70, "Subsection",
  CellTags->{"S2.13.6", "6.1"}],
Cell[88339, 2556, 835, 19, 70, "Text",
  CellTags->{"S2.13.6", "6.2"}],
Cell[89177, 2577, 139, 5, 70, "Caption",
  CellTags->"S2.13.6"],
Cell[89319, 2584, 461, 12, 70, "Text",
  CellTags->{"S2.13.6", "6.3"}],
Cell[89783, 2598, 575, 14, 70, "Text",
  CellTags->{"S2.13.6", "6.4"}],
Cell[90361, 2614, 84, 1, 70, "Caption",
  CellTags->"S2.13.6"],
Cell[90448, 2617, 383, 9, 70, "Text",
  CellTags->{"S2.13.6", "6.5"}],
Cell[90834, 2628, 1339, 27, 70, "Text",
  CellTags->{"S2.13.6", "6.6"}],
Cell[92176, 2657, 85, 1, 70, "Caption",
  CellTags->"S2.13.6"],
Cell[92264, 2660, 291, 9, 70, "Text",
  CellTags->{"S2.13.6", "6.7"}]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

