doc-src/IsarRef/Thy/document/Inner_Syntax.tex
author Cezary Kaliszyk <cezarykaliszyk@gmail.com>
Fri, 10 Feb 2012 09:02:51 +0100
changeset 46447 f37da60a8cc6
parent 45703 c7a13ce60161
child 46282 83864b045a72
permissions -rw-r--r--
specification of the quotient package
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     1
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
     3
\def\isabellecontext{Inner{\isaliteral{5F}{\isacharunderscore}}Syntax}%
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     4
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     5
\isadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     6
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     7
\endisadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     8
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
     9
\isatagtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    10
\isacommand{theory}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    11
\ Inner{\isaliteral{5F}{\isacharunderscore}}Syntax\isanewline
42651
e3fdb7c96be5 formal Base theory;
wenzelm
parents: 42596
diff changeset
    12
\isakeyword{imports}\ Base\ Main\isanewline
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    13
\isakeyword{begin}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    14
\endisatagtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    15
{\isafoldtheory}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    16
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    17
\isadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    18
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    19
\endisadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    20
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    21
\isamarkupchapter{Inner syntax --- the term language \label{ch:inner-syntax}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    22
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    23
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    24
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    25
\isamarkupsection{Printing logical entities%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    26
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    27
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    28
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    29
\isamarkupsubsection{Diagnostic commands%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    30
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    31
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    32
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    33
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    34
\begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    35
    \indexdef{}{command}{typ}\hypertarget{command.typ}{\hyperlink{command.typ}{\mbox{\isa{\isacommand{typ}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    36
    \indexdef{}{command}{term}\hypertarget{command.term}{\hyperlink{command.term}{\mbox{\isa{\isacommand{term}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    37
    \indexdef{}{command}{prop}\hypertarget{command.prop}{\hyperlink{command.prop}{\mbox{\isa{\isacommand{prop}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    38
    \indexdef{}{command}{thm}\hypertarget{command.thm}{\hyperlink{command.thm}{\mbox{\isa{\isacommand{thm}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    39
    \indexdef{}{command}{prf}\hypertarget{command.prf}{\hyperlink{command.prf}{\mbox{\isa{\isacommand{prf}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    40
    \indexdef{}{command}{full\_prf}\hypertarget{command.full-prf}{\hyperlink{command.full-prf}{\mbox{\isa{\isacommand{full{\isaliteral{5F}{\isacharunderscore}}prf}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
    41
    \indexdef{}{command}{pr}\hypertarget{command.pr}{\hyperlink{command.pr}{\mbox{\isa{\isacommand{pr}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}any\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    42
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    43
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    44
  These diagnostic commands assist interactive development by printing
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    45
  internal logical entities in a human-readable fashion.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
    46
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    47
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    48
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    49
\rail@term{\hyperlink{command.typ}{\mbox{\isa{\isacommand{typ}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    50
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    51
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    52
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    53
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    54
\rail@nont{\hyperlink{syntax.type}{\mbox{\isa{type}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    55
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    56
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    57
\rail@term{\hyperlink{command.term}{\mbox{\isa{\isacommand{term}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    58
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    59
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    60
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    61
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    62
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    63
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    64
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    65
\rail@term{\hyperlink{command.prop}{\mbox{\isa{\isacommand{prop}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    66
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    67
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    68
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    69
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    70
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    71
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    72
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    73
\rail@term{\hyperlink{command.thm}{\mbox{\isa{\isacommand{thm}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    74
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    75
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    76
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    77
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    78
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    79
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    80
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    81
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    82
\rail@term{\hyperlink{command.prf}{\mbox{\isa{\isacommand{prf}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    83
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    84
\rail@term{\hyperlink{command.full-prf}{\mbox{\isa{\isacommand{full{\isaliteral{5F}{\isacharunderscore}}prf}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    85
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    86
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    87
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    88
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    89
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    90
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    91
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    92
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    93
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    94
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    95
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    96
\rail@term{\hyperlink{command.pr}{\mbox{\isa{\isacommand{pr}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    97
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    98
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
    99
\rail@nont{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   100
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   101
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   102
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   103
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   104
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   105
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   106
\rail@begin{2}{\indexdef{}{syntax}{modes}\hypertarget{syntax.modes}{\hyperlink{syntax.modes}{\mbox{\isa{modes}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   107
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   108
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   109
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   110
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   111
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   112
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   113
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   114
\end{railoutput}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   115
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   116
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   117
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   118
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   119
  \item \hyperlink{command.typ}{\mbox{\isa{\isacommand{typ}}}}~\isa{{\isaliteral{5C3C7461753E}{\isasymtau}}} reads and prints types of the
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   120
  meta-logic according to the current theory or proof context.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   121
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   122
  \item \hyperlink{command.term}{\mbox{\isa{\isacommand{term}}}}~\isa{t} and \hyperlink{command.prop}{\mbox{\isa{\isacommand{prop}}}}~\isa{{\isaliteral{5C3C7068693E}{\isasymphi}}}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   123
  read, type-check and print terms or propositions according to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   124
  current theory or proof context; the inferred type of \isa{t} is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   125
  output as well.  Note that these commands are also useful in
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   126
  inspecting the current environment of term abbreviations.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   127
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   128
  \item \hyperlink{command.thm}{\mbox{\isa{\isacommand{thm}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} retrieves
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   129
  theorems from the current theory or proof context.  Note that any
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   130
  attributes included in the theorem specifications are applied to a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   131
  temporary context derived from the current theory or proof; the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   132
  result is discarded, i.e.\ attributes involved in \isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} do not have any permanent effect.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   133
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   134
  \item \hyperlink{command.prf}{\mbox{\isa{\isacommand{prf}}}} displays the (compact) proof term of the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   135
  current proof state (if present), or of the given theorems. Note
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   136
  that this requires proof terms to be switched on for the current
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   137
  object logic (see the ``Proof terms'' section of the Isabelle
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   138
  reference manual for information on how to do this).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   139
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   140
  \item \hyperlink{command.full-prf}{\mbox{\isa{\isacommand{full{\isaliteral{5F}{\isacharunderscore}}prf}}}} is like \hyperlink{command.prf}{\mbox{\isa{\isacommand{prf}}}}, but displays
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   141
  the full proof term, i.e.\ also displays information omitted in the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   142
  compact proof term, which is denoted by ``\isa{{\isaliteral{5F}{\isacharunderscore}}}'' placeholders
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   143
  there.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   144
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   145
  \item \hyperlink{command.pr}{\mbox{\isa{\isacommand{pr}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}goals{\isaliteral{22}{\isachardoublequote}}} prints the current proof state
39165
e790a5560834 discontinued obsolete ProofContext.prems_limit;
wenzelm
parents: 39137
diff changeset
   146
  (if present), including current facts and goals.  The optional limit
e790a5560834 discontinued obsolete ProofContext.prems_limit;
wenzelm
parents: 39137
diff changeset
   147
  arguments affect the number of goals to be displayed, which is
e790a5560834 discontinued obsolete ProofContext.prems_limit;
wenzelm
parents: 39137
diff changeset
   148
  initially 10.  Omitting limit value leaves the current setting
e790a5560834 discontinued obsolete ProofContext.prems_limit;
wenzelm
parents: 39137
diff changeset
   149
  unchanged.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   150
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   151
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   152
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   153
  All of the diagnostic commands above admit a list of \isa{modes}
42926
a8b655d089ac tuned secref (still dangling);
wenzelm
parents: 42705
diff changeset
   154
  to be specified, which is appended to the current print mode; see
a8b655d089ac tuned secref (still dangling);
wenzelm
parents: 42705
diff changeset
   155
  \secref{sec:print-modes}.  Thus the output behavior may be modified
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   156
  according particular print mode features.  For example, \hyperlink{command.pr}{\mbox{\isa{\isacommand{pr}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}latex\ xsymbols{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} would print the current proof state
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   157
  with mathematical symbols and special characters represented in
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   158
  {\LaTeX} source, according to the Isabelle style
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   159
  \cite{isabelle-sys}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   160
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   161
  Note that antiquotations (cf.\ \secref{sec:antiq}) provide a more
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   162
  systematic way to include formal items into the printed text
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   163
  document.%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   164
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   165
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   166
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   167
\isamarkupsubsection{Details of printed content%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   168
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   169
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   170
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   171
\begin{isamarkuptext}%
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   172
\begin{tabular}{rcll}
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   173
    \indexdef{}{attribute}{show\_types}\hypertarget{attribute.show-types}{\hyperlink{attribute.show-types}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}types}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   174
    \indexdef{}{attribute}{show\_sorts}\hypertarget{attribute.show-sorts}{\hyperlink{attribute.show-sorts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}sorts}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   175
    \indexdef{}{attribute}{show\_consts}\hypertarget{attribute.show-consts}{\hyperlink{attribute.show-consts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}consts}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   176
    \indexdef{}{attribute}{show\_abbrevs}\hypertarget{attribute.show-abbrevs}{\hyperlink{attribute.show-abbrevs}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}abbrevs}}}} & : & \isa{attribute} & default \isa{true} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   177
    \indexdef{}{attribute}{show\_brackets}\hypertarget{attribute.show-brackets}{\hyperlink{attribute.show-brackets}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}brackets}}}} & : & \isa{attribute} & default \isa{false} \\
42669
04dfffda5671 more conventional naming scheme: names_long, names_short, names_unique;
wenzelm
parents: 42662
diff changeset
   178
    \indexdef{}{attribute}{names\_long}\hypertarget{attribute.names-long}{\hyperlink{attribute.names-long}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}long}}}} & : & \isa{attribute} & default \isa{false} \\
04dfffda5671 more conventional naming scheme: names_long, names_short, names_unique;
wenzelm
parents: 42662
diff changeset
   179
    \indexdef{}{attribute}{names\_short}\hypertarget{attribute.names-short}{\hyperlink{attribute.names-short}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}short}}}} & : & \isa{attribute} & default \isa{false} \\
04dfffda5671 more conventional naming scheme: names_long, names_short, names_unique;
wenzelm
parents: 42662
diff changeset
   180
    \indexdef{}{attribute}{names\_unique}\hypertarget{attribute.names-unique}{\hyperlink{attribute.names-unique}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}unique}}}} & : & \isa{attribute} & default \isa{true} \\
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   181
    \indexdef{}{attribute}{eta\_contract}\hypertarget{attribute.eta-contract}{\hyperlink{attribute.eta-contract}{\mbox{\isa{eta{\isaliteral{5F}{\isacharunderscore}}contract}}}} & : & \isa{attribute} & default \isa{true} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   182
    \indexdef{}{attribute}{goals\_limit}\hypertarget{attribute.goals-limit}{\hyperlink{attribute.goals-limit}{\mbox{\isa{goals{\isaliteral{5F}{\isacharunderscore}}limit}}}} & : & \isa{attribute} & default \isa{{\isadigit{1}}{\isadigit{0}}} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   183
    \indexdef{}{attribute}{show\_main\_goal}\hypertarget{attribute.show-main-goal}{\hyperlink{attribute.show-main-goal}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}main{\isaliteral{5F}{\isacharunderscore}}goal}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   184
    \indexdef{}{attribute}{show\_hyps}\hypertarget{attribute.show-hyps}{\hyperlink{attribute.show-hyps}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}hyps}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   185
    \indexdef{}{attribute}{show\_tags}\hypertarget{attribute.show-tags}{\hyperlink{attribute.show-tags}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}tags}}}} & : & \isa{attribute} & default \isa{false} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   186
    \indexdef{}{attribute}{show\_question\_marks}\hypertarget{attribute.show-question-marks}{\hyperlink{attribute.show-question-marks}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}question{\isaliteral{5F}{\isacharunderscore}}marks}}}} & : & \isa{attribute} & default \isa{true} \\
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   187
  \end{tabular}
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   188
  \medskip
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   189
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   190
  These configuration options control the detail of information that
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   191
  is displayed for types, terms, theorems, goals etc.  See also
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   192
  \secref{sec:config}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   193
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   194
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   195
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   196
  \item \hyperlink{attribute.show-types}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}types}}} and \hyperlink{attribute.show-sorts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}sorts}}} control
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   197
  printing of type constraints for term variables, and sort
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   198
  constraints for type variables.  By default, neither of these are
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   199
  shown in output.  If \hyperlink{attribute.show-sorts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}sorts}}} is enabled, types are
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   200
  always shown as well.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   201
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   202
  Note that displaying types and sorts may explain why a polymorphic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   203
  inference rule fails to resolve with some goal, or why a rewrite
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   204
  rule does not apply as expected.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   205
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   206
  \item \hyperlink{attribute.show-consts}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}consts}}} controls printing of types of
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   207
  constants when displaying a goal state.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   208
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   209
  Note that the output can be enormous, because polymorphic constants
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   210
  often occur at several different type instances.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   211
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   212
  \item \hyperlink{attribute.show-abbrevs}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}abbrevs}}} controls folding of constant
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   213
  abbreviations.
40879
ca132ef44944 configuration option "show_abbrevs" supersedes print mode "no_abbrevs", with inverted meaning;
wenzelm
parents: 40406
diff changeset
   214
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   215
  \item \hyperlink{attribute.show-brackets}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}brackets}}} controls bracketing in pretty
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   216
  printed output.  If enabled, all sub-expressions of the pretty
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   217
  printing tree will be parenthesized, even if this produces malformed
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   218
  term syntax!  This crude way of showing the internal structure of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   219
  pretty printed entities may occasionally help to diagnose problems
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   220
  with operator priorities, for example.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   221
42669
04dfffda5671 more conventional naming scheme: names_long, names_short, names_unique;
wenzelm
parents: 42662
diff changeset
   222
  \item \hyperlink{attribute.names-long}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}long}}}, \hyperlink{attribute.names-short}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}short}}}, and
04dfffda5671 more conventional naming scheme: names_long, names_short, names_unique;
wenzelm
parents: 42662
diff changeset
   223
  \hyperlink{attribute.names-unique}{\mbox{\isa{names{\isaliteral{5F}{\isacharunderscore}}unique}}} control the way of printing fully
42358
b47d41d9f4b5 Name_Space: proper configuration options long_names, short_names, unique_names instead of former unsynchronized references;
wenzelm
parents: 42279
diff changeset
   224
  qualified internal names in external form.  See also
b47d41d9f4b5 Name_Space: proper configuration options long_names, short_names, unique_names instead of former unsynchronized references;
wenzelm
parents: 42279
diff changeset
   225
  \secref{sec:antiq} for the document antiquotation options of the
b47d41d9f4b5 Name_Space: proper configuration options long_names, short_names, unique_names instead of former unsynchronized references;
wenzelm
parents: 42279
diff changeset
   226
  same names.
b47d41d9f4b5 Name_Space: proper configuration options long_names, short_names, unique_names instead of former unsynchronized references;
wenzelm
parents: 42279
diff changeset
   227
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   228
  \item \hyperlink{attribute.eta-contract}{\mbox{\isa{eta{\isaliteral{5F}{\isacharunderscore}}contract}}} controls \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6574613E}{\isasymeta}}{\isaliteral{22}{\isachardoublequote}}}-contracted
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   229
  printing of terms.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   230
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   231
  The \isa{{\isaliteral{5C3C6574613E}{\isasymeta}}}-contraction law asserts \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x{\isaliteral{2E}{\isachardot}}\ f\ x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ f{\isaliteral{22}{\isachardoublequote}}},
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   232
  provided \isa{x} is not free in \isa{f}.  It asserts
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   233
  \emph{extensionality} of functions: \isa{{\isaliteral{22}{\isachardoublequote}}f\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ g{\isaliteral{22}{\isachardoublequote}}} if \isa{{\isaliteral{22}{\isachardoublequote}}f\ x\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ g\ x{\isaliteral{22}{\isachardoublequote}}} for all \isa{x}.  Higher-order unification frequently puts
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   234
  terms into a fully \isa{{\isaliteral{5C3C6574613E}{\isasymeta}}}-expanded form.  For example, if \isa{F} has type \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C7461753E}{\isasymtau}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} then its expanded form is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}h{\isaliteral{2E}{\isachardot}}\ F\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x{\isaliteral{2E}{\isachardot}}\ h\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   235
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   236
  Enabling \hyperlink{attribute.eta-contract}{\mbox{\isa{eta{\isaliteral{5F}{\isacharunderscore}}contract}}} makes Isabelle perform \isa{{\isaliteral{5C3C6574613E}{\isasymeta}}}-contractions before printing, so that \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}h{\isaliteral{2E}{\isachardot}}\ F\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x{\isaliteral{2E}{\isachardot}}\ h\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   237
  appears simply as \isa{F}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   238
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   239
  Note that the distinction between a term and its \isa{{\isaliteral{5C3C6574613E}{\isasymeta}}}-expanded
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   240
  form occasionally matters.  While higher-order resolution and
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   241
  rewriting operate modulo \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{5C3C626574613E}{\isasymbeta}}{\isaliteral{5C3C6574613E}{\isasymeta}}{\isaliteral{22}{\isachardoublequote}}}-conversion, some other tools
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   242
  might look at terms more discretely.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   243
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   244
  \item \hyperlink{attribute.goals-limit}{\mbox{\isa{goals{\isaliteral{5F}{\isacharunderscore}}limit}}} controls the maximum number of
39130
12dac4b58df8 updated configuration options;
wenzelm
parents: 39050
diff changeset
   245
  subgoals to be shown in goal output.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   246
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   247
  \item \hyperlink{attribute.show-main-goal}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}main{\isaliteral{5F}{\isacharunderscore}}goal}}} controls whether the main result
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   248
  to be proven should be displayed.  This information might be
39130
12dac4b58df8 updated configuration options;
wenzelm
parents: 39050
diff changeset
   249
  relevant for schematic goals, to inspect the current claim that has
12dac4b58df8 updated configuration options;
wenzelm
parents: 39050
diff changeset
   250
  been synthesized so far.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   251
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   252
  \item \hyperlink{attribute.show-hyps}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}hyps}}} controls printing of implicit
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   253
  hypotheses of local facts.  Normally, only those hypotheses are
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   254
  displayed that are \emph{not} covered by the assumptions of the
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   255
  current context: this situation indicates a fault in some tool being
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   256
  used.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   257
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   258
  By enabling \hyperlink{attribute.show-hyps}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}hyps}}}, output of \emph{all} hypotheses
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   259
  can be enforced, which is occasionally useful for diagnostic
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   260
  purposes.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   261
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   262
  \item \hyperlink{attribute.show-tags}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}tags}}} controls printing of extra annotations
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   263
  within theorems, such as internal position information, or the case
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   264
  names being attached by the attribute \hyperlink{attribute.case-names}{\mbox{\isa{case{\isaliteral{5F}{\isacharunderscore}}names}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   265
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   266
  Note that the \hyperlink{attribute.tagged}{\mbox{\isa{tagged}}} and \hyperlink{attribute.untagged}{\mbox{\isa{untagged}}}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   267
  attributes provide low-level access to the collection of tags
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   268
  associated with a theorem.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   269
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   270
  \item \hyperlink{attribute.show-question-marks}{\mbox{\isa{show{\isaliteral{5F}{\isacharunderscore}}question{\isaliteral{5F}{\isacharunderscore}}marks}}} controls printing of question
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
   271
  marks for schematic variables, such as \isa{{\isaliteral{3F}{\isacharquery}}x}.  Only the leading
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   272
  question mark is affected, the remaining text is unchanged
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   273
  (including proper markup for schematic variables that might be
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   274
  relevant for user interfaces).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   275
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   276
  \end{description}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   277
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   278
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   279
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   280
\isamarkupsubsection{Printing limits%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   281
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   282
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   283
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   284
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   285
\begin{mldecls}
36745
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   286
    \indexdef{}{ML}{Pretty.margin\_default}\verb|Pretty.margin_default: int Unsynchronized.ref| \\
30121
5c7bcb296600 updated generated files;
wenzelm
parents: 29746
diff changeset
   287
    \indexdef{}{ML}{print\_depth}\verb|print_depth: int -> unit| \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   288
  \end{mldecls}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   289
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   290
  These ML functions set limits for pretty printed text.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   291
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   292
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   293
36745
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   294
  \item \verb|Pretty.margin_default| indicates the global default for
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   295
  the right margin of the built-in pretty printer, with initial value
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   296
  76.  Note that user-interfaces typically control margins
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   297
  automatically when resizing windows, or even bypass the formatting
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   298
  engine of Isabelle/ML altogether and do it within the front end via
403585a89772 unified/simplified Pretty.margin_default;
wenzelm
parents: 36508
diff changeset
   299
  Isabelle/Scala.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   300
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   301
  \item \verb|print_depth|~\isa{n} limits the printing depth of the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   302
  ML toplevel pretty printer; the precise effect depends on the ML
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   303
  compiler and run-time system.  Typically \isa{n} should be less
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   304
  than 10.  Bigger values such as 100--1000 are useful for debugging.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   305
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   306
  \end{description}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   307
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   308
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   309
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   310
\isamarkupsection{Mixfix annotations%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   311
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   312
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   313
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   314
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   315
Mixfix annotations specify concrete \emph{inner syntax} of
35351
7425aece4ee3 allow general mixfix syntax for type constructors;
wenzelm
parents: 32836
diff changeset
   316
  Isabelle types and terms.  Locally fixed parameters in toplevel
7425aece4ee3 allow general mixfix syntax for type constructors;
wenzelm
parents: 32836
diff changeset
   317
  theorem statements, locale specifications etc.\ also admit mixfix
7425aece4ee3 allow general mixfix syntax for type constructors;
wenzelm
parents: 32836
diff changeset
   318
  annotations.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   319
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   320
  \begin{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   321
\rail@begin{3}{\indexdef{}{syntax}{infix}\hypertarget{syntax.infix}{\hyperlink{syntax.infix}{\mbox{\isa{infix}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   322
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   323
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   324
\rail@term{\isa{\isakeyword{infix}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   325
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   326
\rail@term{\isa{\isakeyword{infixl}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   327
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   328
\rail@term{\isa{\isakeyword{infixr}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   329
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   330
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   331
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   332
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   333
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   334
\rail@begin{5}{\indexdef{}{syntax}{mixfix}\hypertarget{syntax.mixfix}{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   335
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   336
\rail@nont{\hyperlink{syntax.infix}{\mbox{\isa{infix}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   337
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   338
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   339
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   340
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   341
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   342
\rail@nont{\isa{prios}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   343
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   344
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   345
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   346
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   347
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   348
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   349
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   350
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   351
\rail@term{\isa{\isakeyword{binder}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   352
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   353
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   354
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   355
\rail@nont{\isa{prios}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   356
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   357
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   358
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   359
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   360
\rail@end
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42669
diff changeset
   361
\rail@begin{2}{\indexdef{}{syntax}{struct\_mixfix}\hypertarget{syntax.struct-mixfix}{\hyperlink{syntax.struct-mixfix}{\mbox{\isa{struct{\isaliteral{5F}{\isacharunderscore}}mixfix}}}}}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   362
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   363
\rail@nont{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   364
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   365
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   366
\rail@term{\isa{\isakeyword{structure}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   367
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   368
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   369
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   370
\rail@begin{2}{\isa{prios}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   371
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   372
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   373
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   374
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   375
\rail@cterm{\isa{{\isaliteral{2C}{\isacharcomma}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   376
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   377
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   378
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   379
\end{railoutput}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   380
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   381
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   382
  Here the \hyperlink{syntax.string}{\mbox{\isa{string}}} specifications refer to the actual mixfix
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   383
  template, which may include literal text, spacing, blocks, and
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   384
  arguments (denoted by ``\isa{{\isaliteral{5F}{\isacharunderscore}}}''); the special symbol
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   385
  ``\verb|\<index>|'' (printed as ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E6465783E}{\isasymindex}}{\isaliteral{22}{\isachardoublequote}}}'') represents an index
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   386
  argument that specifies an implicit structure reference (see also
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   387
  \secref{sec:locale}).  Infix and binder declarations provide common
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   388
  abbreviations for particular mixfix declarations.  So in practice,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   389
  mixfix templates mostly degenerate to literal text for concrete
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   390
  syntax, such as ``\verb|++|'' for an infix symbol.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   391
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   392
  \medskip In full generality, mixfix declarations work as follows.
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   393
  Suppose a constant \isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} is
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   394
  annotated by \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}mixfix\ {\isaliteral{5B}{\isacharbrackleft}}p\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ p\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{5D}{\isacharbrackright}}\ p{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, where \isa{{\isaliteral{22}{\isachardoublequote}}mixfix{\isaliteral{22}{\isachardoublequote}}} is a string \isa{{\isaliteral{22}{\isachardoublequote}}d\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{0}}\ {\isaliteral{5F}{\isacharunderscore}}\ d\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5F}{\isacharunderscore}}\ d\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} consisting of
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   395
  delimiters that surround argument positions as indicated by
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   396
  underscores.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   397
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   398
  Altogether this determines a production for a context-free priority
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   399
  grammar, where for each argument \isa{{\isaliteral{22}{\isachardoublequote}}i{\isaliteral{22}{\isachardoublequote}}} the syntactic category
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   400
  is determined by \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} (with priority \isa{{\isaliteral{22}{\isachardoublequote}}p\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}}), and
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   401
  the result category is determined from \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} (with
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   402
  priority \isa{{\isaliteral{22}{\isachardoublequote}}p{\isaliteral{22}{\isachardoublequote}}}).  Priority specifications are optional, with
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   403
  default 0 for arguments and 1000 for the result.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   404
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   405
  Since \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} may be again a function type, the constant
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   406
  type scheme may have more argument positions than the mixfix
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   407
  pattern.  Printing a nested application \isa{{\isaliteral{22}{\isachardoublequote}}c\ t\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ t\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{22}{\isachardoublequote}}} for
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   408
  \isa{{\isaliteral{22}{\isachardoublequote}}m\ {\isaliteral{3E}{\isachargreater}}\ n{\isaliteral{22}{\isachardoublequote}}} works by attaching concrete notation only to the
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   409
  innermost part, essentially by printing \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}c\ t\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ t\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ t\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{22}{\isachardoublequote}}}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   410
  instead.  If a term has fewer arguments than specified in the mixfix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   411
  template, the concrete syntax is ignored.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   412
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   413
  \medskip A mixfix template may also contain additional directives
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   414
  for pretty printing, notably spaces, blocks, and breaks.  The
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   415
  general template format is a sequence over any of the following
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   416
  entities.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   417
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   418
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   419
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   420
  \item \isa{{\isaliteral{22}{\isachardoublequote}}d{\isaliteral{22}{\isachardoublequote}}} is a delimiter, namely a non-empty sequence of
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   421
  characters other than the following special characters:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   422
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   423
  \smallskip
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   424
  \begin{tabular}{ll}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   425
    \verb|'| & single quote \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   426
    \verb|_| & underscore \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   427
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E6465783E}{\isasymindex}}{\isaliteral{22}{\isachardoublequote}}} & index symbol \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   428
    \verb|(| & open parenthesis \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   429
    \verb|)| & close parenthesis \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   430
    \verb|/| & slash \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   431
  \end{tabular}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   432
  \medskip
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   433
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   434
  \item \verb|'| escapes the special meaning of these
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   435
  meta-characters, producing a literal version of the following
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   436
  character, unless that is a blank.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   437
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   438
  A single quote followed by a blank separates delimiters, without
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   439
  affecting printing, but input tokens may have additional white space
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   440
  here.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   441
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   442
  \item \verb|_| is an argument position, which stands for a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   443
  certain syntactic category in the underlying grammar.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   444
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   445
  \item \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E6465783E}{\isasymindex}}{\isaliteral{22}{\isachardoublequote}}} is an indexed argument position; this is the place
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   446
  where implicit structure arguments can be attached.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   447
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   448
  \item \isa{{\isaliteral{22}{\isachardoublequote}}s{\isaliteral{22}{\isachardoublequote}}} is a non-empty sequence of spaces for printing.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   449
  This and the following specifications do not affect parsing at all.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   450
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   451
  \item \verb|(|\isa{n} opens a pretty printing block.  The
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   452
  optional number specifies how much indentation to add when a line
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   453
  break occurs within the block.  If the parenthesis is not followed
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   454
  by digits, the indentation defaults to 0.  A block specified via
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   455
  \verb|(00| is unbreakable.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   456
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   457
  \item \verb|)| closes a pretty printing block.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   458
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   459
  \item \verb|//| forces a line break.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   460
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   461
  \item \verb|/|\isa{s} allows a line break.  Here \isa{s}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   462
  stands for the string of spaces (zero or more) right after the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   463
  slash.  These spaces are printed if the break is \emph{not} taken.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   464
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   465
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   466
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   467
  For example, the template \verb|(_ +/ _)| specifies an infix
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   468
  operator.  There are two argument positions; the delimiter
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   469
  \verb|+| is preceded by a space and followed by a space or
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   470
  line break; the entire phrase is a pretty printing block.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   471
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   472
  The general idea of pretty printing with blocks and breaks is also
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   473
  described in \cite{paulson-ml2}.%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   474
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   475
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   476
%
35414
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   477
\isamarkupsection{Explicit notation%
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   478
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   479
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   480
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   481
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   482
\begin{matharray}{rcll}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   483
    \indexdef{}{command}{type\_notation}\hypertarget{command.type-notation}{\hyperlink{command.type-notation}{\mbox{\isa{\isacommand{type{\isaliteral{5F}{\isacharunderscore}}notation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   484
    \indexdef{}{command}{no\_type\_notation}\hypertarget{command.no-type-notation}{\hyperlink{command.no-type-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}type{\isaliteral{5F}{\isacharunderscore}}notation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   485
    \indexdef{}{command}{notation}\hypertarget{command.notation}{\hyperlink{command.notation}{\mbox{\isa{\isacommand{notation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   486
    \indexdef{}{command}{no\_notation}\hypertarget{command.no-notation}{\hyperlink{command.no-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}notation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   487
    \indexdef{}{command}{write}\hypertarget{command.write}{\hyperlink{command.write}{\mbox{\isa{\isacommand{write}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof{\isaliteral{28}{\isacharparenleft}}state{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}state{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   488
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   489
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   490
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   491
\rail@begin{5}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   492
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   493
\rail@term{\hyperlink{command.type-notation}{\mbox{\isa{\isacommand{type{\isaliteral{5F}{\isacharunderscore}}notation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   494
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   495
\rail@term{\hyperlink{command.no-type-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}type{\isaliteral{5F}{\isacharunderscore}}notation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   496
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   497
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   498
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   499
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   500
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   501
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   502
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   503
\rail@nont{\hyperlink{syntax.mode}{\mbox{\isa{mode}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   504
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   505
\rail@cr{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   506
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   507
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   508
\rail@nont{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   509
\rail@nextplus{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   510
\rail@cterm{\isa{\isakeyword{and}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   511
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   512
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   513
\rail@begin{5}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   514
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   515
\rail@term{\hyperlink{command.notation}{\mbox{\isa{\isacommand{notation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   516
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   517
\rail@term{\hyperlink{command.no-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}notation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   518
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   519
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   520
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   521
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   522
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   523
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   524
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   525
\rail@nont{\hyperlink{syntax.mode}{\mbox{\isa{mode}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   526
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   527
\rail@cr{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   528
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   529
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42669
diff changeset
   530
\rail@nont{\hyperlink{syntax.struct-mixfix}{\mbox{\isa{struct{\isaliteral{5F}{\isacharunderscore}}mixfix}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   531
\rail@nextplus{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   532
\rail@cterm{\isa{\isakeyword{and}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   533
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   534
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   535
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   536
\rail@term{\hyperlink{command.write}{\mbox{\isa{\isacommand{write}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   537
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   538
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   539
\rail@nont{\hyperlink{syntax.mode}{\mbox{\isa{mode}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   540
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   541
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   542
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42669
diff changeset
   543
\rail@nont{\hyperlink{syntax.struct-mixfix}{\mbox{\isa{struct{\isaliteral{5F}{\isacharunderscore}}mixfix}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   544
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   545
\rail@cterm{\isa{\isakeyword{and}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   546
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   547
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   548
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   549
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   550
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   551
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   552
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   553
  \item \hyperlink{command.type-notation}{\mbox{\isa{\isacommand{type{\isaliteral{5F}{\isacharunderscore}}notation}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{28}{\isacharparenleft}}mx{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} associates mixfix
35414
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   554
  syntax with an existing type constructor.  The arity of the
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   555
  constructor is retrieved from the context.
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   556
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   557
  \item \hyperlink{command.no-type-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}type{\isaliteral{5F}{\isacharunderscore}}notation}}}} is similar to \hyperlink{command.type-notation}{\mbox{\isa{\isacommand{type{\isaliteral{5F}{\isacharunderscore}}notation}}}}, but removes the specified syntax annotation from
35414
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   558
  the present context.
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   559
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   560
  \item \hyperlink{command.notation}{\mbox{\isa{\isacommand{notation}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{28}{\isacharparenleft}}mx{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} associates mixfix
35414
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   561
  syntax with an existing constant or fixed variable.  The type
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   562
  declaration of the given entity is retrieved from the context.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   563
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   564
  \item \hyperlink{command.no-notation}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}notation}}}} is similar to \hyperlink{command.notation}{\mbox{\isa{\isacommand{notation}}}},
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   565
  but removes the specified syntax annotation from the present
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   566
  context.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   567
36508
03d2a2d0ee4a allow concrete syntax for local entities within a proof body, either via regular mixfix annotations to 'fix' etc. or the separate 'write' command;
wenzelm
parents: 35414
diff changeset
   568
  \item \hyperlink{command.write}{\mbox{\isa{\isacommand{write}}}} is similar to \hyperlink{command.notation}{\mbox{\isa{\isacommand{notation}}}}, but
03d2a2d0ee4a allow concrete syntax for local entities within a proof body, either via regular mixfix annotations to 'fix' etc. or the separate 'write' command;
wenzelm
parents: 35414
diff changeset
   569
  works within an Isar proof body.
03d2a2d0ee4a allow concrete syntax for local entities within a proof body, either via regular mixfix annotations to 'fix' etc. or the separate 'write' command;
wenzelm
parents: 35414
diff changeset
   570
35414
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   571
  \end{description}
cc8e4276d093 updated generated files;
wenzelm
parents: 35351
diff changeset
   572
36508
03d2a2d0ee4a allow concrete syntax for local entities within a proof body, either via regular mixfix annotations to 'fix' etc. or the separate 'write' command;
wenzelm
parents: 35414
diff changeset
   573
  Note that the more primitive commands \hyperlink{command.syntax}{\mbox{\isa{\isacommand{syntax}}}} and
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   574
  \hyperlink{command.no-syntax}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}syntax}}}} (\secref{sec:syn-trans}) provide raw access
36508
03d2a2d0ee4a allow concrete syntax for local entities within a proof body, either via regular mixfix annotations to 'fix' etc. or the separate 'write' command;
wenzelm
parents: 35414
diff changeset
   575
  to the syntax tables of a global theory.%
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   576
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   577
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   578
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   579
\isamarkupsection{The Pure syntax \label{sec:pure-syntax}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   580
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   581
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   582
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   583
\isamarkupsubsection{Priority grammars \label{sec:priority-grammar}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   584
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   585
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   586
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   587
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   588
A context-free grammar consists of a set of \emph{terminal
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   589
  symbols}, a set of \emph{nonterminal symbols} and a set of
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   590
  \emph{productions}.  Productions have the form \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C67616D6D613E}{\isasymgamma}}{\isaliteral{22}{\isachardoublequote}}},
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   591
  where \isa{A} is a nonterminal and \isa{{\isaliteral{5C3C67616D6D613E}{\isasymgamma}}} is a string of
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   592
  terminals and nonterminals.  One designated nonterminal is called
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   593
  the \emph{root symbol}.  The language defined by the grammar
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   594
  consists of all strings of terminals that can be derived from the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   595
  root symbol by applying productions as rewrite rules.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   596
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   597
  The standard Isabelle parser for inner syntax uses a \emph{priority
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   598
  grammar}.  Each nonterminal is decorated by an integer priority:
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   599
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup p\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.  In a derivation, \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup p\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} may be rewritten
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   600
  using a production \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup q\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C67616D6D613E}{\isasymgamma}}{\isaliteral{22}{\isachardoublequote}}} only if \isa{{\isaliteral{22}{\isachardoublequote}}p\ {\isaliteral{5C3C6C653E}{\isasymle}}\ q{\isaliteral{22}{\isachardoublequote}}}.  Any
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   601
  priority grammar can be translated into a normal context-free
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   602
  grammar by introducing new nonterminals and productions.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   603
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   604
  \medskip Formally, a set of context free productions \isa{G}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   605
  induces a derivation relation \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\isaliteral{5C3C5E7375623E}{}\isactrlsub G{\isaliteral{22}{\isachardoublequote}}} as follows.  Let \isa{{\isaliteral{5C3C616C7068613E}{\isasymalpha}}} and \isa{{\isaliteral{5C3C626574613E}{\isasymbeta}}} denote strings of terminal or nonterminal symbols.
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   606
  Then \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup p\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C626574613E}{\isasymbeta}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\isaliteral{5C3C5E7375623E}{}\isactrlsub G\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ {\isaliteral{5C3C67616D6D613E}{\isasymgamma}}\ {\isaliteral{5C3C626574613E}{\isasymbeta}}{\isaliteral{22}{\isachardoublequote}}} holds if and only if \isa{G}
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   607
  contains some production \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup q\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C67616D6D613E}{\isasymgamma}}{\isaliteral{22}{\isachardoublequote}}} for \isa{{\isaliteral{22}{\isachardoublequote}}p\ {\isaliteral{5C3C6C653E}{\isasymle}}\ q{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   608
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   609
  \medskip The following grammar for arithmetic expressions
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   610
  demonstrates how binding power and associativity of operators can be
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   611
  enforced by priorities.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   612
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   613
  \begin{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   614
  \begin{tabular}{rclr}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   615
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \verb|(| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|)| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   616
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \verb|0| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   617
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|+| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   618
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|*| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   619
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \verb|-| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   620
  \end{tabular}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   621
  \end{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   622
  The choice of priorities determines that \verb|-| binds
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   623
  tighter than \verb|*|, which binds tighter than \verb|+|.  Furthermore \verb|+| associates to the left and
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   624
  \verb|*| to the right.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   625
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   626
  \medskip For clarity, grammars obey these conventions:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   627
  \begin{itemize}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   628
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   629
  \item All priorities must lie between 0 and 1000.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   630
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   631
  \item Priority 0 on the right-hand side and priority 1000 on the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   632
  left-hand side may be omitted.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   633
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   634
  \item The production \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup p\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{22}{\isachardoublequote}}} is written as \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ {\isaliteral{28}{\isacharparenleft}}p{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, i.e.\ the priority of the left-hand side actually appears in
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   635
  a column on the far right.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   636
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   637
  \item Alternatives are separated by \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   638
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   639
  \item Repetition is indicated by dots \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} in an informal
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   640
  but obvious way.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   641
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   642
  \end{itemize}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   643
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   644
  Using these conventions, the example grammar specification above
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   645
  takes the form:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   646
  \begin{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   647
  \begin{tabular}{rclc}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   648
    \isa{A} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} & \verb|(| \isa{A} \verb|)| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   649
              & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|0| & \qquad\qquad \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   650
              & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{A} \verb|+| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   651
              & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|*| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   652
              & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|-| \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   653
  \end{tabular}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   654
  \end{center}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   655
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   656
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   657
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   658
\isamarkupsubsection{The Pure grammar%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   659
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   660
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   661
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   662
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   663
The priority grammar of the \isa{{\isaliteral{22}{\isachardoublequote}}Pure{\isaliteral{22}{\isachardoublequote}}} theory is defined as follows:
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   664
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   665
  %FIXME syntax for "index" (?)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   666
  %FIXME "op" versions of ==> etc. (?)
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   667
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   668
  \begin{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   669
  \begin{supertabular}{rclr}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   670
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   671
  \indexdef{inner}{syntax}{any}\hypertarget{syntax.inner.any}{\hyperlink{syntax.inner.any}{\mbox{\isa{any}}}} & = & \isa{{\isaliteral{22}{\isachardoublequote}}prop\ \ {\isaliteral{7C}{\isacharbar}}\ \ logic{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   672
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   673
  \indexdef{inner}{syntax}{prop}\hypertarget{syntax.inner.prop}{\hyperlink{syntax.inner.prop}{\mbox{\isa{prop}}}} & = & \verb|(| \isa{prop} \verb|)| \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   674
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{4}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|::| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   675
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|==| \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   676
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   677
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|&&&| \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   678
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|==>| \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{1}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   679
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{2}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{1}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   680
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|[|\verb,|,\verb|| \isa{prop} \verb|;| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|;| \isa{prop} \verb||\verb,|,\verb|]| \verb|==>| \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{1}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   681
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C6272616B6B3E}{\isasymlbrakk}}{\isaliteral{22}{\isachardoublequote}}} \isa{prop} \verb|;| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|;| \isa{prop} \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C726272616B6B3E}{\isasymrbrakk}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}prop\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{1}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   682
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|!!| \isa{idts} \verb|.| \isa{prop} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   683
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} \isa{idts} \verb|.| \isa{prop} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   684
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|OFCLASS| \verb|(| \isa{type} \verb|,| \isa{logic} \verb|)| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   685
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|SORT_CONSTRAINT| \verb|(| \isa{type} \verb|)| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   686
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|TERM| \isa{logic} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   687
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|PROP| \isa{aprop} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   688
28857
87d638a4ee67 updated generated files;
wenzelm
parents: 28762
diff changeset
   689
  \indexdef{inner}{syntax}{aprop}\hypertarget{syntax.inner.aprop}{\hyperlink{syntax.inner.aprop}{\mbox{\isa{aprop}}}} & = & \verb|(| \isa{aprop} \verb|)| \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   690
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ longid\ \ {\isaliteral{7C}{\isacharbar}}\ \ var\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|_|\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|...| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   691
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|CONST| \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|CONST| \isa{{\isaliteral{22}{\isachardoublequote}}longid{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   692
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}logic\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ \ any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{9}}{\isadigit{9}}{\isadigit{9}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   693
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   694
  \indexdef{inner}{syntax}{logic}\hypertarget{syntax.inner.logic}{\hyperlink{syntax.inner.logic}{\mbox{\isa{logic}}}} & = & \verb|(| \isa{logic} \verb|)| \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   695
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}logic\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{4}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|::| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   696
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ longid\ \ {\isaliteral{7C}{\isacharbar}}\ \ var\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|_|\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|...| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   697
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|CONST| \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|CONST| \isa{{\isaliteral{22}{\isachardoublequote}}longid{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   698
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}logic\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ \ any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{9}}{\isadigit{9}}{\isadigit{9}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   699
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|%| \isa{pttrns} \verb|.| \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   700
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}} \isa{pttrns} \verb|.| \isa{{\isaliteral{22}{\isachardoublequote}}any\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{3}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   701
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|TYPE| \verb|(| \isa{type} \verb|)| \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   702
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   703
  \indexdef{inner}{syntax}{idt}\hypertarget{syntax.inner.idt}{\hyperlink{syntax.inner.idt}{\mbox{\isa{idt}}}} & = & \verb|(| \isa{idt} \verb|)|\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ id\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|_| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   704
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{id} \verb|::| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   705
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|_| \verb|::| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   706
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   707
  \indexdef{inner}{syntax}{idts}\hypertarget{syntax.inner.idts}{\hyperlink{syntax.inner.idts}{\mbox{\isa{idts}}}} & = & \isa{{\isaliteral{22}{\isachardoublequote}}idt\ \ {\isaliteral{7C}{\isacharbar}}\ \ idt\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ idts{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   708
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   709
  \indexdef{inner}{syntax}{pttrn}\hypertarget{syntax.inner.pttrn}{\hyperlink{syntax.inner.pttrn}{\mbox{\isa{pttrn}}}} & = & \isa{idt} \\\\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   710
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   711
  \indexdef{inner}{syntax}{pttrns}\hypertarget{syntax.inner.pttrns}{\hyperlink{syntax.inner.pttrns}{\mbox{\isa{pttrns}}}} & = & \isa{{\isaliteral{22}{\isachardoublequote}}pttrn\ \ {\isaliteral{7C}{\isacharbar}}\ \ pttrn\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ pttrns{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   712
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   713
  \indexdef{inner}{syntax}{type}\hypertarget{syntax.inner.type}{\hyperlink{syntax.inner.type}{\mbox{\isa{type}}}} & = & \verb|(| \isa{type} \verb|)| \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   714
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}tid\ \ {\isaliteral{7C}{\isacharbar}}\ \ tvar\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|_| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   715
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}tid{\isaliteral{22}{\isachardoublequote}}} \verb|::| \isa{{\isaliteral{22}{\isachardoublequote}}sort\ \ {\isaliteral{7C}{\isacharbar}}\ \ tvar\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|::| \isa{{\isaliteral{22}{\isachardoublequote}}sort\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|_| \verb|::| \isa{{\isaliteral{22}{\isachardoublequote}}sort{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   716
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ type\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ id\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|(| \isa{type} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{type} \verb|)| \isa{id} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   717
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}longid\ \ {\isaliteral{7C}{\isacharbar}}\ \ type\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{0}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}\ longid{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   718
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|(| \isa{type} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{type} \verb|)| \isa{longid} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   719
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}type\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|=>| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   720
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}type\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isadigit{1}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}{\isaliteral{22}{\isachardoublequote}}} \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   721
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|[| \isa{type} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{type} \verb|]| \verb|=>| \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   722
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|[| \isa{type} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{type} \verb|]| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}{\isaliteral{22}{\isachardoublequote}}} \isa{type} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{0}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\\\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   723
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   724
  \indexdef{inner}{syntax}{sort}\hypertarget{syntax.inner.sort}{\hyperlink{syntax.inner.sort}{\mbox{\isa{sort}}}} & = & \isa{{\isaliteral{22}{\isachardoublequote}}id\ \ {\isaliteral{7C}{\isacharbar}}\ \ longid\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|{}| \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   725
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \verb|{| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}id\ {\isaliteral{7C}{\isacharbar}}\ longid{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|,| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}id\ {\isaliteral{7C}{\isacharbar}}\ longid{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \verb|}| \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   726
  \end{supertabular}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   727
  \end{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   728
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   729
  \medskip Here literal terminals are printed \verb|verbatim|;
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   730
  see also \secref{sec:inner-lex} for further token categories of the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   731
  inner syntax.  The meaning of the nonterminals defined by the above
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   732
  grammar is as follows:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   733
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   734
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   735
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   736
  \item \indexref{inner}{syntax}{any}\hyperlink{syntax.inner.any}{\mbox{\isa{any}}} denotes any term.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   737
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   738
  \item \indexref{inner}{syntax}{prop}\hyperlink{syntax.inner.prop}{\mbox{\isa{prop}}} denotes meta-level propositions,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   739
  which are terms of type \isa{prop}.  The syntax of such formulae of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   740
  the meta-logic is carefully distinguished from usual conventions for
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   741
  object-logics.  In particular, plain \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}}-term notation is
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   742
  \emph{not} recognized as \hyperlink{syntax.inner.prop}{\mbox{\isa{prop}}}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   743
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   744
  \item \indexref{inner}{syntax}{aprop}\hyperlink{syntax.inner.aprop}{\mbox{\isa{aprop}}} denotes atomic propositions, which
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   745
  are embedded into regular \hyperlink{syntax.inner.prop}{\mbox{\isa{prop}}} by means of an
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   746
  explicit \verb|PROP| token.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   747
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   748
  Terms of type \isa{prop} with non-constant head, e.g.\ a plain
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   749
  variable, are printed in this form.  Constants that yield type \isa{prop} are expected to provide their own concrete syntax; otherwise
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   750
  the printed version will appear like \hyperlink{syntax.inner.logic}{\mbox{\isa{logic}}} and
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   751
  cannot be parsed again as \hyperlink{syntax.inner.prop}{\mbox{\isa{prop}}}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   752
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   753
  \item \indexref{inner}{syntax}{logic}\hyperlink{syntax.inner.logic}{\mbox{\isa{logic}}} denotes arbitrary terms of a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   754
  logical type, excluding type \isa{prop}.  This is the main
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   755
  syntactic category of object-logic entities, covering plain \isa{{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}}-term notation (variables, abstraction, application), plus
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   756
  anything defined by the user.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   757
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   758
  When specifying notation for logical entities, all logical types
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   759
  (excluding \isa{prop}) are \emph{collapsed} to this single category
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   760
  of \hyperlink{syntax.inner.logic}{\mbox{\isa{logic}}}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   761
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   762
  \item \indexref{inner}{syntax}{idt}\hyperlink{syntax.inner.idt}{\mbox{\isa{idt}}} denotes identifiers, possibly
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   763
  constrained by types.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   764
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   765
  \item \indexref{inner}{syntax}{idts}\hyperlink{syntax.inner.idts}{\mbox{\isa{idts}}} denotes a sequence of \indexref{inner}{syntax}{idt}\hyperlink{syntax.inner.idt}{\mbox{\isa{idt}}}.  This is the most basic category for variables in
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   766
  iterated binders, such as \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}} or \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   767
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   768
  \item \indexref{inner}{syntax}{pttrn}\hyperlink{syntax.inner.pttrn}{\mbox{\isa{pttrn}}} and \indexref{inner}{syntax}{pttrns}\hyperlink{syntax.inner.pttrns}{\mbox{\isa{pttrns}}}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   769
  denote patterns for abstraction, cases bindings etc.  In Pure, these
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   770
  categories start as a merely copy of \hyperlink{syntax.inner.idt}{\mbox{\isa{idt}}} and
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   771
  \hyperlink{syntax.inner.idts}{\mbox{\isa{idts}}}, respectively.  Object-logics may add
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   772
  additional productions for binding forms.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   773
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   774
  \item \indexref{inner}{syntax}{type}\hyperlink{syntax.inner.type}{\mbox{\isa{type}}} denotes types of the meta-logic.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   775
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   776
  \item \indexref{inner}{syntax}{sort}\hyperlink{syntax.inner.sort}{\mbox{\isa{sort}}} denotes meta-level sorts.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   777
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   778
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   779
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   780
  Here are some further explanations of certain syntax features.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   781
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   782
  \begin{itemize}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   783
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   784
  \item In \hyperlink{syntax.inner.idts}{\mbox{\isa{idts}}}, note that \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat\ y{\isaliteral{22}{\isachardoublequote}}} is
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   785
  parsed as \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{28}{\isacharparenleft}}nat\ y{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, treating \isa{y} like a type
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   786
  constructor applied to \isa{nat}.  To avoid this interpretation,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   787
  write \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}\ y{\isaliteral{22}{\isachardoublequote}}} with explicit parentheses.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   788
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   789
  \item Similarly, \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{22}{\isachardoublequote}}} is parsed as \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{28}{\isacharparenleft}}nat\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.  The correct form is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{28}{\isacharparenleft}}y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, or \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{22}{\isachardoublequote}}} if \isa{y} is last in the
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   790
  sequence of identifiers.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   791
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   792
  \item Type constraints for terms bind very weakly.  For example,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   793
  \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3C}{\isacharless}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{22}{\isachardoublequote}}} is normally parsed as \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}x\ {\isaliteral{3C}{\isacharless}}\ y{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{22}{\isachardoublequote}}}, unless \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3C}{\isacharless}}{\isaliteral{22}{\isachardoublequote}}} has a very low priority, in which case the
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   794
  input is likely to be ambiguous.  The correct form is \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3C}{\isacharless}}\ {\isaliteral{28}{\isacharparenleft}}y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ nat{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   795
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   796
  \item Constraints may be either written with two literal colons
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   797
  ``\verb|::|'' or the double-colon symbol \verb|\<Colon>|,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   798
  which actually looks exactly the same in some {\LaTeX} styles.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   799
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   800
  \item Dummy variables (written as underscore) may occur in different
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   801
  roles.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   802
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   803
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   804
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   805
  \item A type ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{22}{\isachardoublequote}}}'' or ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ sort{\isaliteral{22}{\isachardoublequote}}}'' acts like an
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   806
  anonymous inference parameter, which is filled-in according to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   807
  most general type produced by the type-checking phase.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   808
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   809
  \item A bound ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{22}{\isachardoublequote}}}'' refers to a vacuous abstraction, where
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   810
  the body does not refer to the binding introduced here.  As in the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   811
  term \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x\ {\isaliteral{5F}{\isacharunderscore}}{\isaliteral{2E}{\isachardot}}\ x{\isaliteral{22}{\isachardoublequote}}}, which is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{22}{\isachardoublequote}}}-equivalent to \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x\ y{\isaliteral{2E}{\isachardot}}\ x{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   812
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   813
  \item A free ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{22}{\isachardoublequote}}}'' refers to an implicit outer binding.
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   814
  Higher definitional packages usually allow forms like \isa{{\isaliteral{22}{\isachardoublequote}}f\ x\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3D}{\isacharequal}}\ x{\isaliteral{22}{\isachardoublequote}}}.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   815
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   816
  \item A schematic ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{22}{\isachardoublequote}}}'' (within a term pattern, see
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   817
  \secref{sec:term-decls}) refers to an anonymous variable that is
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   818
  implicitly abstracted over its context of locally bound variables.
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   819
  For example, this allows pattern matching of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7B}{\isacharbraceleft}}x{\isaliteral{2E}{\isachardot}}\ f\ x\ {\isaliteral{3D}{\isacharequal}}\ g\ x{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} against \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7B}{\isacharbraceleft}}x{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5F}{\isacharunderscore}}{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}}, or even \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7B}{\isacharbraceleft}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5F}{\isacharunderscore}}{\isaliteral{7D}{\isacharbraceright}}{\isaliteral{22}{\isachardoublequote}}} by
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   820
  using both bound and schematic dummies.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   821
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   822
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   823
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   824
  \item The three literal dots ``\verb|...|'' may be also
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   825
  written as ellipsis symbol \verb|\<dots>|.  In both cases this
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   826
  refers to a special schematic variable, which is bound in the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   827
  context.  This special term abbreviation works nicely with
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   828
  calculational reasoning (\secref{sec:calculation}).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   829
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   830
  \end{itemize}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   831
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   832
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   833
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   834
\isamarkupsection{Lexical matters \label{sec:inner-lex}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   835
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   836
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   837
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   838
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   839
The inner lexical syntax vaguely resembles the outer one
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   840
  (\secref{sec:outer-lex}), but some details are different.  There are
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   841
  two main categories of inner syntax tokens:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   842
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   843
  \begin{enumerate}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   844
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   845
  \item \emph{delimiters} --- the literal tokens occurring in
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   846
  productions of the given priority grammar (cf.\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   847
  \secref{sec:priority-grammar});
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   848
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   849
  \item \emph{named tokens} --- various categories of identifiers etc.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   850
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   851
  \end{enumerate}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   852
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   853
  Delimiters override named tokens and may thus render certain
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   854
  identifiers inaccessible.  Sometimes the logical context admits
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   855
  alternative ways to refer to the same entity, potentially via
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   856
  qualified names.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   857
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   858
  \medskip The categories for named tokens are defined once and for
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   859
  all as follows, reusing some categories of the outer token syntax
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   860
  (\secref{sec:outer-lex}).
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   861
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   862
  \begin{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   863
  \begin{supertabular}{rcl}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   864
    \indexdef{inner}{syntax}{id}\hypertarget{syntax.inner.id}{\hyperlink{syntax.inner.id}{\mbox{\isa{id}}}} & = & \indexref{}{syntax}{ident}\hyperlink{syntax.ident}{\mbox{\isa{ident}}} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   865
    \indexdef{inner}{syntax}{longid}\hypertarget{syntax.inner.longid}{\hyperlink{syntax.inner.longid}{\mbox{\isa{longid}}}} & = & \indexref{}{syntax}{longident}\hyperlink{syntax.longident}{\mbox{\isa{longident}}} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   866
    \indexdef{inner}{syntax}{var}\hypertarget{syntax.inner.var}{\hyperlink{syntax.inner.var}{\mbox{\isa{var}}}} & = & \indexref{}{syntax}{var}\hyperlink{syntax.var}{\mbox{\isa{var}}} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   867
    \indexdef{inner}{syntax}{tid}\hypertarget{syntax.inner.tid}{\hyperlink{syntax.inner.tid}{\mbox{\isa{tid}}}} & = & \indexref{}{syntax}{typefree}\hyperlink{syntax.typefree}{\mbox{\isa{typefree}}} \\
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   868
    \indexdef{inner}{syntax}{tvar}\hypertarget{syntax.inner.tvar}{\hyperlink{syntax.inner.tvar}{\mbox{\isa{tvar}}}} & = & \indexref{}{syntax}{typevar}\hyperlink{syntax.typevar}{\mbox{\isa{typevar}}} \\
45703
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   869
    \indexdef{inner}{syntax}{num\_token}\hypertarget{syntax.inner.num-token}{\hyperlink{syntax.inner.num-token}{\mbox{\isa{num{\isaliteral{5F}{\isacharunderscore}}token}}}} & = & \indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}}\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|-|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   870
    \indexdef{inner}{syntax}{float\_token}\hypertarget{syntax.inner.float-token}{\hyperlink{syntax.inner.float-token}{\mbox{\isa{float{\isaliteral{5F}{\isacharunderscore}}token}}}} & = & \indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}}\verb|.|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}}\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|-|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}}\verb|.|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}} \\
45703
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   871
    \indexdef{inner}{syntax}{xnum\_token}\hypertarget{syntax.inner.xnum-token}{\hyperlink{syntax.inner.xnum-token}{\mbox{\isa{xnum{\isaliteral{5F}{\isacharunderscore}}token}}}} & = & \verb|#|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}}\isa{{\isaliteral{22}{\isachardoublequote}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{22}{\isachardoublequote}}}\verb|#-|\indexref{}{syntax}{nat}\hyperlink{syntax.nat}{\mbox{\isa{nat}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   872
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   873
    \indexdef{inner}{syntax}{xstr}\hypertarget{syntax.inner.xstr}{\hyperlink{syntax.inner.xstr}{\mbox{\isa{xstr}}}} & = & \verb|''| \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \verb|''| \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   874
  \end{supertabular}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   875
  \end{center}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   876
45703
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   877
  The token categories \hyperlink{syntax.inner.num-token}{\mbox{\isa{num{\isaliteral{5F}{\isacharunderscore}}token}}}, \hyperlink{syntax.inner.float-token}{\mbox{\isa{float{\isaliteral{5F}{\isacharunderscore}}token}}}, \hyperlink{syntax.inner.xnum-token}{\mbox{\isa{xnum{\isaliteral{5F}{\isacharunderscore}}token}}}, and \hyperlink{syntax.inner.xstr}{\mbox{\isa{xstr}}} are not used in Pure.  Object-logics may implement numerals
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   878
  and string constants by adding appropriate syntax declarations,
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   879
  together with some translation functions (e.g.\ see Isabelle/HOL).
29158
f9b3e508c27f updated generated file;
wenzelm
parents: 28857
diff changeset
   880
45703
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   881
  The derived categories \indexdef{inner}{syntax}{num\_const}\hypertarget{syntax.inner.num-const}{\hyperlink{syntax.inner.num-const}{\mbox{\isa{num{\isaliteral{5F}{\isacharunderscore}}const}}}}, \indexdef{inner}{syntax}{float\_const}\hypertarget{syntax.inner.float-const}{\hyperlink{syntax.inner.float-const}{\mbox{\isa{float{\isaliteral{5F}{\isacharunderscore}}const}}}}, and \indexdef{inner}{syntax}{num\_const}\hypertarget{syntax.inner.num-const}{\hyperlink{syntax.inner.num-const}{\mbox{\isa{num{\isaliteral{5F}{\isacharunderscore}}const}}}} provide
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   882
  robust access to the respective tokens: the syntax tree holds a
c7a13ce60161 renamed inner syntax categories "num" to "num_token" and "xnum" to "xnum_token";
wenzelm
parents: 42926
diff changeset
   883
  syntactic constant instead of a free variable.%
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   884
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   885
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   886
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   887
\isamarkupsection{Syntax and translations \label{sec:syn-trans}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   888
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   889
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   890
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   891
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   892
\begin{matharray}{rcl}
41229
d797baa3d57c replaced command 'nonterminals' by slightly modernized version 'nonterminal';
wenzelm
parents: 40879
diff changeset
   893
    \indexdef{}{command}{nonterminal}\hypertarget{command.nonterminal}{\hyperlink{command.nonterminal}{\mbox{\isa{\isacommand{nonterminal}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   894
    \indexdef{}{command}{syntax}\hypertarget{command.syntax}{\hyperlink{command.syntax}{\mbox{\isa{\isacommand{syntax}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   895
    \indexdef{}{command}{no\_syntax}\hypertarget{command.no-syntax}{\hyperlink{command.no-syntax}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}syntax}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   896
    \indexdef{}{command}{translations}\hypertarget{command.translations}{\hyperlink{command.translations}{\mbox{\isa{\isacommand{translations}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   897
    \indexdef{}{command}{no\_translations}\hypertarget{command.no-translations}{\hyperlink{command.no-translations}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}translations}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   898
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   899
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   900
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   901
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   902
\rail@term{\hyperlink{command.nonterminal}{\mbox{\isa{\isacommand{nonterminal}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   903
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   904
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   905
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   906
\rail@cterm{\isa{\isakeyword{and}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   907
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   908
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   909
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   910
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   911
\rail@term{\hyperlink{command.syntax}{\mbox{\isa{\isacommand{syntax}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   912
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   913
\rail@term{\hyperlink{command.no-syntax}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}syntax}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   914
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   915
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   916
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   917
\rail@nont{\hyperlink{syntax.mode}{\mbox{\isa{mode}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   918
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   919
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   920
\rail@nont{\hyperlink{syntax.constdecl}{\mbox{\isa{constdecl}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   921
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   922
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   923
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   924
\rail@begin{7}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   925
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   926
\rail@term{\hyperlink{command.translations}{\mbox{\isa{\isacommand{translations}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   927
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   928
\rail@term{\hyperlink{command.no-translations}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}translations}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   929
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   930
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   931
\rail@nont{\isa{transpat}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   932
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   933
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}{\isaliteral{3D}{\isacharequal}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   934
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   935
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}{\isaliteral{3E}{\isachargreater}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   936
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   937
\rail@term{\isa{{\isaliteral{3C}{\isacharless}}{\isaliteral{3D}{\isacharequal}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   938
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   939
\rail@term{\isa{{\isaliteral{5C3C72696768746C656674686172706F6F6E733E}{\isasymrightleftharpoons}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   940
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   941
\rail@term{\isa{{\isaliteral{5C3C7269676874686172706F6F6E75703E}{\isasymrightharpoonup}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   942
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   943
\rail@term{\isa{{\isaliteral{5C3C6C656674686172706F6F6E646F776E3E}{\isasymleftharpoondown}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   944
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   945
\rail@nont{\isa{transpat}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   946
\rail@nextplus{6}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   947
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   948
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   949
\rail@begin{3}{\isa{mode}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   950
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   951
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   952
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   953
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   954
\rail@term{\isa{\isakeyword{output}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   955
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   956
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   957
\rail@term{\isa{\isakeyword{output}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   958
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   959
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   960
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   961
\rail@begin{2}{\isa{transpat}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   962
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   963
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   964
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   965
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   966
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   967
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   968
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   969
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
   970
\end{railoutput}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   971
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   972
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   973
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   974
  
41229
d797baa3d57c replaced command 'nonterminals' by slightly modernized version 'nonterminal';
wenzelm
parents: 40879
diff changeset
   975
  \item \hyperlink{command.nonterminal}{\mbox{\isa{\isacommand{nonterminal}}}}~\isa{c} declares a type
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   976
  constructor \isa{c} (without arguments) to act as purely syntactic
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   977
  type: a nonterminal symbol of the inner syntax.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   978
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   979
  \item \hyperlink{command.syntax}{\mbox{\isa{\isacommand{syntax}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}mode{\isaliteral{29}{\isacharparenright}}\ decls{\isaliteral{22}{\isachardoublequote}}} is similar to
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   980
  \hyperlink{command.consts}{\mbox{\isa{\isacommand{consts}}}}~\isa{decls}, except that the actual logical
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   981
  signature extension is omitted.  Thus the context free grammar of
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   982
  Isabelle's inner syntax may be augmented in arbitrary ways,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   983
  independently of the logic.  The \isa{mode} argument refers to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   984
  print mode that the grammar rules belong; unless the \indexref{}{keyword}{output}\hyperlink{keyword.output}{\mbox{\isa{\isakeyword{output}}}} indicator is given, all productions are added both to the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   985
  input and output grammar.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   986
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   987
  \item \hyperlink{command.no-syntax}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}syntax}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}mode{\isaliteral{29}{\isacharparenright}}\ decls{\isaliteral{22}{\isachardoublequote}}} removes grammar
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   988
  declarations (and translations) resulting from \isa{decls}, which
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   989
  are interpreted in the same manner as for \hyperlink{command.syntax}{\mbox{\isa{\isacommand{syntax}}}} above.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   990
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   991
  \item \hyperlink{command.translations}{\mbox{\isa{\isacommand{translations}}}}~\isa{rules} specifies syntactic
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   992
  translation rules (i.e.\ macros): parse~/ print rules (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C72696768746C656674686172706F6F6E733E}{\isasymrightleftharpoons}}{\isaliteral{22}{\isachardoublequote}}}),
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   993
  parse rules (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7269676874686172706F6F6E75703E}{\isasymrightharpoonup}}{\isaliteral{22}{\isachardoublequote}}}), or print rules (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C656674686172706F6F6E646F776E3E}{\isasymleftharpoondown}}{\isaliteral{22}{\isachardoublequote}}}).
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   994
  Translation patterns may be prefixed by the syntactic category to be
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   995
  used for parsing; the default is \isa{logic}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   996
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
   997
  \item \hyperlink{command.no-translations}{\mbox{\isa{\isacommand{no{\isaliteral{5F}{\isacharunderscore}}translations}}}}~\isa{rules} removes syntactic
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   998
  translation rules, which are interpreted in the same manner as for
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
   999
  \hyperlink{command.translations}{\mbox{\isa{\isacommand{translations}}}} above.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1000
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1001
  \end{description}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1002
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1003
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1004
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1005
\isamarkupsection{Syntax translation functions \label{sec:tr-funs}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1006
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1007
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1008
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1009
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1010
\begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1011
    \indexdef{}{command}{parse\_ast\_translation}\hypertarget{command.parse-ast-translation}{\hyperlink{command.parse-ast-translation}{\mbox{\isa{\isacommand{parse{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1012
    \indexdef{}{command}{parse\_translation}\hypertarget{command.parse-translation}{\hyperlink{command.parse-translation}{\mbox{\isa{\isacommand{parse{\isaliteral{5F}{\isacharunderscore}}translation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1013
    \indexdef{}{command}{print\_translation}\hypertarget{command.print-translation}{\hyperlink{command.print-translation}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}translation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1014
    \indexdef{}{command}{typed\_print\_translation}\hypertarget{command.typed-print-translation}{\hyperlink{command.typed-print-translation}{\mbox{\isa{\isacommand{typed{\isaliteral{5F}{\isacharunderscore}}print{\isaliteral{5F}{\isacharunderscore}}translation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1015
    \indexdef{}{command}{print\_ast\_translation}\hypertarget{command.print-ast-translation}{\hyperlink{command.print-ast-translation}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1016
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1017
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1018
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
  1019
\rail@begin{5}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1020
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1021
\rail@term{\hyperlink{command.parse-ast-translation}{\mbox{\isa{\isacommand{parse{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1022
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1023
\rail@term{\hyperlink{command.parse-translation}{\mbox{\isa{\isacommand{parse{\isaliteral{5F}{\isacharunderscore}}translation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1024
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1025
\rail@term{\hyperlink{command.print-translation}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}translation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1026
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1027
\rail@term{\hyperlink{command.typed-print-translation}{\mbox{\isa{\isacommand{typed{\isaliteral{5F}{\isacharunderscore}}print{\isaliteral{5F}{\isacharunderscore}}translation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1028
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1029
\rail@term{\hyperlink{command.print-ast-translation}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1030
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1031
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1032
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1033
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1034
\rail@term{\isa{\isakeyword{advanced}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1035
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1036
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1037
\rail@nont{\hyperlink{syntax.text}{\mbox{\isa{text}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1038
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1039
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1040
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1041
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1042
  Syntax translation functions written in ML admit almost arbitrary
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1043
  manipulations of Isabelle's inner syntax.  Any of the above commands
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 42358
diff changeset
  1044
  have a single \hyperlink{syntax.text}{\mbox{\isa{text}}} argument that refers to an ML
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1045
  expression of appropriate type, which are as follows by default:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1046
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1047
%FIXME proper antiquotations
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1048
\begin{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1049
val parse_ast_translation   : (string * (ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1050
val parse_translation       : (string * (term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1051
val print_translation       : (string * (term list -> term)) list
42247
12fe41a92cd5 typed_print_translation: discontinued show_sorts argument;
wenzelm
parents: 41229
diff changeset
  1052
val typed_print_translation : (string * (typ -> term list -> term)) list
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1053
val print_ast_translation   : (string * (ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1054
\end{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1055
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1056
  If the \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}advanced{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} option is given, the corresponding
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1057
  translation functions may depend on the current theory or proof
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1058
  context.  This allows to implement advanced syntax mechanisms, as
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1059
  translations functions may refer to specific theory declarations or
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1060
  auxiliary proof data.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1061
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30242
diff changeset
  1062
  See also \cite{isabelle-ref} for more information on the general
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30242
diff changeset
  1063
  concept of syntax transformations in Isabelle.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1064
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1065
%FIXME proper antiquotations
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1066
\begin{ttbox}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1067
val parse_ast_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1068
  (string * (Proof.context -> ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1069
val parse_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1070
  (string * (Proof.context -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1071
val print_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1072
  (string * (Proof.context -> term list -> term)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1073
val typed_print_translation:
42247
12fe41a92cd5 typed_print_translation: discontinued show_sorts argument;
wenzelm
parents: 41229
diff changeset
  1074
  (string * (Proof.context -> typ -> term list -> term)) list
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1075
val print_ast_translation:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1076
  (string * (Proof.context -> ast list -> ast)) list
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1077
\end{ttbox}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1078
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1079
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1080
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1081
\isamarkupsection{Inspecting the syntax%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1082
}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1083
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1084
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1085
\begin{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1086
\begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1087
    \indexdef{}{command}{print\_syntax}\hypertarget{command.print-syntax}{\hyperlink{command.print-syntax}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}syntax}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1088
  \end{matharray}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1089
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1090
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1091
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1092
  \item \hyperlink{command.print-syntax}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}syntax}}}} prints the inner syntax of the
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1093
  current context.  The output can be quite large; the most important
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1094
  sections are explained below.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1095
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1096
  \begin{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1097
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1098
  \item \isa{{\isaliteral{22}{\isachardoublequote}}lexicon{\isaliteral{22}{\isachardoublequote}}} lists the delimiters of the inner token
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1099
  language; see \secref{sec:inner-lex}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1100
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1101
  \item \isa{{\isaliteral{22}{\isachardoublequote}}prods{\isaliteral{22}{\isachardoublequote}}} lists the productions of the underlying
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1102
  priority grammar; see \secref{sec:priority-grammar}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1103
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1104
  The nonterminal \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7375703E}{}\isactrlsup p\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} is rendered in plain text as \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{5B}{\isacharbrackleft}}p{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}; delimiters are quoted.  Many productions have an extra
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1105
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}{\isaliteral{3E}{\isachargreater}}\ name{\isaliteral{22}{\isachardoublequote}}}.  These names later become the heads of parse
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1106
  trees; they also guide the pretty printer.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1107
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1108
  Productions without such parse tree names are called \emph{copy
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1109
  productions}.  Their right-hand side must have exactly one
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1110
  nonterminal symbol (or named token).  The parser does not create a
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1111
  new parse tree node for copy productions, but simply returns the
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1112
  parse tree of the right-hand symbol.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1113
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1114
  If the right-hand side of a copy production consists of a single
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1115
  nonterminal without any delimiters, then it is called a \emph{chain
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1116
  production}.  Chain productions act as abbreviations: conceptually,
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1117
  they are removed from the grammar by adding new productions.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1118
  Priority information attached to chain productions is ignored; only
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1119
  the dummy value \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2D}{\isacharminus}}{\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}} is displayed.
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1120
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1121
  \item \isa{{\isaliteral{22}{\isachardoublequote}}print\ modes{\isaliteral{22}{\isachardoublequote}}} lists the alternative print modes
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1122
  provided by this grammar; see \secref{sec:print-modes}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1123
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1124
  \item \isa{{\isaliteral{22}{\isachardoublequote}}parse{\isaliteral{5F}{\isacharunderscore}}rules{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}print{\isaliteral{5F}{\isacharunderscore}}rules{\isaliteral{22}{\isachardoublequote}}} relate to
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1125
  syntax translations (macros); see \secref{sec:syn-trans}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1126
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1127
  \item \isa{{\isaliteral{22}{\isachardoublequote}}parse{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}print{\isaliteral{5F}{\isacharunderscore}}ast{\isaliteral{5F}{\isacharunderscore}}translation{\isaliteral{22}{\isachardoublequote}}} list sets of constants that invoke
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1128
  translation functions for abstract syntax trees, which are only
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1129
  required in very special situations; see \secref{sec:tr-funs}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1130
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40255
diff changeset
  1131
  \item \isa{{\isaliteral{22}{\isachardoublequote}}parse{\isaliteral{5F}{\isacharunderscore}}translation{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}print{\isaliteral{5F}{\isacharunderscore}}translation{\isaliteral{22}{\isachardoublequote}}}
28762
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1132
  list the sets of constants that invoke regular translation
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1133
  functions; see \secref{sec:tr-funs}.
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1134
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1135
  \end{description}
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1136
  
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1137
  \end{description}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1138
\end{isamarkuptext}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1139
\isamarkuptrue%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1140
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1141
\isadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1142
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1143
\endisadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1144
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1145
\isatagtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1146
\isacommand{end}\isamarkupfalse%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1147
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1148
\endisatagtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1149
{\isafoldtheory}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1150
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1151
\isadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1152
%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1153
\endisadelimtheory
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1154
\isanewline
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1155
\end{isabellebody}%
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1156
%%% Local Variables:
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1157
%%% mode: latex
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1158
%%% TeX-master: "root"
f5d79aeffd81 separate chapter "Inner syntax --- the term language";
wenzelm
parents:
diff changeset
  1159
%%% End: