doc-src/IsarRef/refcard.tex
author wenzelm
Fri, 17 Mar 2000 22:52:29 +0100
changeset 8511 72188cd6bbfc
parent 8486 85f504900ed5
child 8513 26323568fe73
permissions -rw-r--r--
tuned; some more stuff;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7897
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
     1
7981
wenzelm
parents: 7976
diff changeset
     2
\chapter{Isabelle/Isar Quick Reference}\label{ap:refcard}
7897
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
     3
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
     4
\section{Proof commands}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
     5
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
     6
\subsection{Primitives and basic syntax}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
     7
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
     8
\begin{tabular}{ll}
8511
wenzelm
parents: 8486
diff changeset
     9
  $\FIX{\vec x}$ & augment context by $\All {\vec x} \Box$ \\
wenzelm
parents: 8486
diff changeset
    10
  $\ASSUME{a}{\vec\phi}$ & augment context by $\vec\phi \Imp \Box$ \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    11
  $\THEN$ & indicate forward chaining \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    12
  $\HAVE{a}{\phi}$ & prove local result \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    13
  $\SHOW{a}{\phi}$ & prove local result, establishing some goal \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    14
  $\PROOF{m@1}~\dots~\QED{m@2}$ & apply proof methods \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    15
  $\BG~\dots~\EN$ & declare explicit blocks \\
8447
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    16
  $\NEXT$ & switch implicit blocks \\
8511
wenzelm
parents: 8486
diff changeset
    17
  $\NOTE{a}{\vec b}$ & reconsider facts \\
7987
wenzelm
parents: 7981
diff changeset
    18
  $\LET{p = t}$ & \text{abbreviate terms by higher-order matching} \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    19
\end{tabular}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    20
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    21
\begin{matharray}{rcl}
7987
wenzelm
parents: 7981
diff changeset
    22
  theory{\dsh}stmt & = & \THEOREM{name}{prop} ~proof \\
wenzelm
parents: 7981
diff changeset
    23
  & \Or & \LEMMA{name}{prop}~proof \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    24
  & \Or & \TYPES~\dots \Or \CONSTS~\dots \Or \DEFS~\dots \Or \dots \\[1ex]
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    25
  proof & = & \PROOF{method}~stmt^*~\QED{method} \\[1ex]
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    26
  stmt & = & \BG~stmt^*~\EN \\
8447
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    27
  & \Or & \NEXT \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    28
  & \Or & \NOTE{name}{name^+} \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    29
  & \Or & \LET{term = term} \\[0.5ex]
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    30
  & \Or & \FIX{var^+} \\
7987
wenzelm
parents: 7981
diff changeset
    31
  & \Or & \ASSUME{name}{prop^+}\\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    32
  & \Or & \THEN~goal{\dsh}stmt \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    33
  & \Or & goal{\dsh}stmt \\
7987
wenzelm
parents: 7981
diff changeset
    34
  goal{\dsh}stmt & = & \HAVE{name}{prop}~proof \\
wenzelm
parents: 7981
diff changeset
    35
  & \Or & \SHOW{name}{prop}~proof \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    36
\end{matharray}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    37
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    38
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    39
\subsection{Abbreviations and synonyms}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    40
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    41
\begin{matharray}{rcl}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    42
  \BYY{m@1}{m@2} & \equiv & \PROOF{m@1}~\QED{m@2} \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    43
  \DDOT & \equiv & \BY{rule} \\
8195
af2575a5c5ae '.' == by this;
wenzelm
parents: 7987
diff changeset
    44
  \DOT & \equiv & \BY{this} \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    45
  \HENCENAME & \equiv & \THEN~\HAVENAME \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    46
  \THUSNAME & \equiv & \THEN~\SHOWNAME \\
8511
wenzelm
parents: 8486
diff changeset
    47
  \FROM{\vec a} & \equiv & \NOTE{this}{\vec a}~\THEN \\
wenzelm
parents: 8486
diff changeset
    48
  \WITH{\vec a} & \equiv & \FROM{\vec a~this} \\[1ex]
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    49
  \FROM{this} & \equiv & \THEN \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    50
  \FROM{this}~\HAVENAME & \equiv & \HENCENAME \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    51
  \FROM{this}~\SHOWNAME & \equiv & \THUSNAME \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    52
\end{matharray}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    53
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    54
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    55
\subsection{Derived elements}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    56
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    57
\begin{matharray}{rcl}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    58
  \ALSO@0 & \approx & \NOTE{calculation}{this} \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    59
  \ALSO@{n+1} & \approx & \NOTE{calculation}{trans~[OF~calculation~this]} \\
8511
wenzelm
parents: 8486
diff changeset
    60
  \FINALLY & \approx & \ALSO~\FROM{calculation} \\[0.5ex]
wenzelm
parents: 8486
diff changeset
    61
  \PRESUME{a}{\vec\phi} & \approx & \ASSUME{a}{\vec\phi}~~\text{(permissive assumption)} \\
wenzelm
parents: 8486
diff changeset
    62
  \DEF{a}{x \equiv t} & \approx & \FIX{x}~\ASSUME{a}{x \equiv t}~~\text{(definitional assumption)} \\
wenzelm
parents: 8486
diff changeset
    63
  \OBTAIN{\vec x}{a}{\vec\phi} & \approx & \FIX{\vec x}~\ASSUME{a}{\vec\phi}~~\text{(generalized elimination)} \\
wenzelm
parents: 8486
diff changeset
    64
  \CASE{a} & \approx & \FIX{\vec x}~\ASSUME{a}{\vec\phi}~~\text{(named context)} \\[0.5ex]
wenzelm
parents: 8486
diff changeset
    65
  \SORRY & \approx & \BY{cheating} \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    66
\end{matharray}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    67
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    68
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    69
\subsection{Diagnostic commands}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    70
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    71
\begin{matharray}{ll}
8486
85f504900ed5 Splitter support;
wenzelm
parents: 8447
diff changeset
    72
  \isarkeyword{pr} & \text{print current state} \\
8447
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    73
  \isarkeyword{thm}~a@1\;\dots\;a@n & \text{print theorems} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    74
  \isarkeyword{term}~t & \text{print term} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    75
  \isarkeyword{prop}~\phi & \text{print meta-level proposition} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    76
  \isarkeyword{typ}~\tau & \text{print meta-level type} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    77
  \isarkeyword{print_facts} & \text{print named facts} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    78
  \isarkeyword{print_binds} & \text{print term abbreviations} \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    79
  \isarkeyword{print_cases} & \text{print named cases} \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    80
\end{matharray}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    81
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    82
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    83
\section{Proof methods}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    84
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    85
\begin{tabular}{ll}
7976
wenzelm
parents: 7974
diff changeset
    86
  \multicolumn{2}{l}{\textbf{Single steps (forward-chaining facts)}} \\[0.5ex]
7987
wenzelm
parents: 7981
diff changeset
    87
  $assumption$ & apply some assumption \\
8195
af2575a5c5ae '.' == by this;
wenzelm
parents: 7987
diff changeset
    88
  $this$ & apply current facts \\
7987
wenzelm
parents: 7981
diff changeset
    89
  $rule~a@1\;\dots\;a@n$ & apply some rule  \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    90
  $rule$ & apply standard rule (default for $\PROOFNAME$) \\
8447
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    91
  $contradiction$ & apply $\neg{}$ elimination rule (any order) \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    92
  $cases~x$ & case analysis (emits named cases) \\
1181723cf835 added 'case' command;
wenzelm
parents: 8203
diff changeset
    93
  $induct~x$ & proof by induction (emits named cases) \\[2ex]
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    94
7976
wenzelm
parents: 7974
diff changeset
    95
  \multicolumn{2}{l}{\textbf{Repeated steps (inserting facts)}} \\[0.5ex]
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
    96
  $-$ & \text{no rules} \\
7987
wenzelm
parents: 7981
diff changeset
    97
  $intro~a@1\;\dots\;a@n$ & \text{introduction rules} \\
wenzelm
parents: 7981
diff changeset
    98
  $elim~a@1\;\dots\;a@n$ & \text{elimination rules} \\
wenzelm
parents: 7981
diff changeset
    99
  $unfold~a@1\;\dots\;a@n$ & \text{definitions} \\[2ex]
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   100
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   101
  \multicolumn{2}{l}{\textbf{Automated proof tools (inserting facts, or even prems!)}} \\[0.5ex]
8486
85f504900ed5 Splitter support;
wenzelm
parents: 8447
diff changeset
   102
  $simp$ & Simplifier (+ Splitter) \\
7987
wenzelm
parents: 7981
diff changeset
   103
  $blast$, $fast$ & Classical Reasoner \\
wenzelm
parents: 7981
diff changeset
   104
  $force$, $auto$ & Simplifier + Classical Reasoner \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   105
  $arith$ & Arithmetic procedure \\
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   106
\end{tabular}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   107
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   108
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   109
\section{Attributes}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   110
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   111
\begin{tabular}{ll}
8511
wenzelm
parents: 8486
diff changeset
   112
  \multicolumn{2}{l}{\textbf{Manipulate rules}} \\[0.5ex]
7987
wenzelm
parents: 7981
diff changeset
   113
  $OF~a@1\;\dots\;a@n$ & apply rule to facts (skipping ``$_$'') \\
wenzelm
parents: 7981
diff changeset
   114
  $of~t@1\;\dots\;t@n$ & apply rule to terms (skipping ``$_$'') \\
7976
wenzelm
parents: 7974
diff changeset
   115
  $RS~b$ & resolve fact with rule \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   116
  $standard$ & put into standard result form \\
7976
wenzelm
parents: 7974
diff changeset
   117
  $rulify$ & put into object-rule form \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   118
  $elimify$ & put destruction rule into elimination form \\[1ex]
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   119
8486
85f504900ed5 Splitter support;
wenzelm
parents: 8447
diff changeset
   120
  \multicolumn{2}{l}{\textbf{Declare rules}} \\[0.5ex]
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   121
  $simp$ & declare Simplifier rules \\
8486
85f504900ed5 Splitter support;
wenzelm
parents: 8447
diff changeset
   122
  $split$ & declare Splitter rules \\
8203
2fcc6017cb72 intro/elim/dest attributes: changed ! / !! flags to ? / ??;
wenzelm
parents: 8195
diff changeset
   123
  $intro$, $elim$, $dest$ & declare Classical Reasoner rules (also ``?'' or ``??'') \\
7987
wenzelm
parents: 7981
diff changeset
   124
  $iff$ & declare Simplifier + Classical Reasoner rules \\
wenzelm
parents: 7981
diff changeset
   125
  $trans$ & declare calculational rules (general transitivity) \\
7974
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   126
\end{tabular}
34245feb6e82 improved;
wenzelm
parents: 7897
diff changeset
   127
8511
wenzelm
parents: 8486
diff changeset
   128
wenzelm
parents: 8486
diff changeset
   129
\section{Emulating tactic scripts}
wenzelm
parents: 8486
diff changeset
   130
wenzelm
parents: 8486
diff changeset
   131
\subsection{Proof commands}
wenzelm
parents: 8486
diff changeset
   132
wenzelm
parents: 8486
diff changeset
   133
\begin{tabular}{ll}
wenzelm
parents: 8486
diff changeset
   134
  $\isarkeyword{apply}~(m)$ & apply proof method (at initial position) \\
wenzelm
parents: 8486
diff changeset
   135
  $\isarkeyword{apply_end}~(m)$ & apply proof method (near terminal position) \\
wenzelm
parents: 8486
diff changeset
   136
  $\isarkeyword{defer}~n$ & move subgoal to end \\
wenzelm
parents: 8486
diff changeset
   137
  $\isarkeyword{prefer}~n$ & move subgoal to beginning \\
wenzelm
parents: 8486
diff changeset
   138
  $\isarkeyword{back}$ & backtrack last command \\
wenzelm
parents: 8486
diff changeset
   139
\end{tabular}
wenzelm
parents: 8486
diff changeset
   140
wenzelm
parents: 8486
diff changeset
   141
\subsection{Proof methods}
wenzelm
parents: 8486
diff changeset
   142
wenzelm
parents: 8486
diff changeset
   143
\begin{tabular}{ll}
wenzelm
parents: 8486
diff changeset
   144
  $tactic~text$ & method from ML tactic \\
wenzelm
parents: 8486
diff changeset
   145
\end{tabular}
wenzelm
parents: 8486
diff changeset
   146
wenzelm
parents: 8486
diff changeset
   147
wenzelm
parents: 8486
diff changeset
   148
wenzelm
parents: 8486
diff changeset
   149
wenzelm
parents: 8486
diff changeset
   150
wenzelm
parents: 8486
diff changeset
   151
7897
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
   152
%%% Local Variables: 
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
   153
%%% mode: latex
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
   154
%%% TeX-master: "isar-ref"
7f18f5ffbb92 *** empty log message ***
wenzelm
parents:
diff changeset
   155
%%% End: