| author | nipkow | 
| Tue, 21 Feb 2006 16:37:54 +0100 | |
| changeset 19118 | 52f751b50716 | 
| parent 14175 | dbd16ebaf907 | 
| child 19990 | 837f1b10722c | 
| permissions | -rw-r--r-- | 
| 7897 | 1 | |
| 13048 | 2 | \chapter{Isabelle/Isar quick reference}\label{ap:refcard}
 | 
| 7897 | 3 | |
| 7974 | 4 | \section{Proof commands}
 | 
| 5 | ||
| 6 | \subsection{Primitives and basic syntax}
 | |
| 7 | ||
| 8 | \begin{tabular}{ll}
 | |
| 8511 | 9 |   $\FIX{\vec x}$ & augment context by $\All {\vec x} \Box$ \\
 | 
| 10 |   $\ASSUME{a}{\vec\phi}$ & augment context by $\vec\phi \Imp \Box$ \\
 | |
| 13017 | 11 | $\THEN$ & indicate forward chaining of facts \\ | 
| 7974 | 12 |   $\HAVE{a}{\phi}$ & prove local result \\
 | 
| 13 |   $\SHOW{a}{\phi}$ & prove local result, establishing some goal \\
 | |
| 13017 | 14 |   $\USING{\vec a}$ & indicate use of additional facts \\
 | 
| 7974 | 15 |   $\PROOF{m@1}~\dots~\QED{m@2}$ & apply proof methods \\
 | 
| 16 | $\BG~\dots~\EN$ & declare explicit blocks \\ | |
| 8447 | 17 | $\NEXT$ & switch implicit blocks \\ | 
| 8511 | 18 |   $\NOTE{a}{\vec b}$ & reconsider facts \\
 | 
| 9695 | 19 |   $\LET{p = t}$ & \Text{abbreviate terms by higher-order matching} \\
 | 
| 7974 | 20 | \end{tabular}
 | 
| 21 | ||
| 22 | \begin{matharray}{rcl}
 | |
| 7987 | 23 |   theory{\dsh}stmt & = & \THEOREM{name}{prop} ~proof \\
 | 
| 24 |   & \Or & \LEMMA{name}{prop}~proof \\
 | |
| 7974 | 25 | & \Or & \TYPES~\dots \Or \CONSTS~\dots \Or \DEFS~\dots \Or \dots \\[1ex] | 
| 13024 | 26 |   proof & = & prfx^*~\PROOF{method}~stmt^*~\QED{method} \\[1ex]
 | 
| 27 |   prfx & = & \APPLY{method} \\
 | |
| 28 |   & \Or & \USING{name^+} \\
 | |
| 7974 | 29 | stmt & = & \BG~stmt^*~\EN \\ | 
| 8447 | 30 | & \Or & \NEXT \\ | 
| 7974 | 31 |   & \Or & \NOTE{name}{name^+} \\
 | 
| 32 |   & \Or & \LET{term = term} \\[0.5ex]
 | |
| 33 |   & \Or & \FIX{var^+} \\
 | |
| 7987 | 34 |   & \Or & \ASSUME{name}{prop^+}\\
 | 
| 7974 | 35 |   & \Or & \THEN~goal{\dsh}stmt \\
 | 
| 13024 | 36 | & \Or & goal \\ | 
| 37 |   goal & = & \HAVE{name}{prop}~proof \\
 | |
| 7987 | 38 |   & \Or & \SHOW{name}{prop}~proof \\
 | 
| 7974 | 39 | \end{matharray}
 | 
| 40 | ||
| 41 | ||
| 42 | \subsection{Abbreviations and synonyms}
 | |
| 43 | ||
| 44 | \begin{matharray}{rcl}
 | |
| 45 |   \BYY{m@1}{m@2} & \equiv & \PROOF{m@1}~\QED{m@2} \\
 | |
| 46 |   \DDOT & \equiv & \BY{rule} \\
 | |
| 8195 | 47 |   \DOT & \equiv & \BY{this} \\
 | 
| 7974 | 48 | \HENCENAME & \equiv & \THEN~\HAVENAME \\ | 
| 49 | \THUSNAME & \equiv & \THEN~\SHOWNAME \\ | |
| 8511 | 50 |   \FROM{\vec a} & \equiv & \NOTE{this}{\vec a}~\THEN \\
 | 
| 13041 | 51 |   \WITH{\vec a} & \equiv & \FROM{\vec a~\AND~this} \\[1ex]
 | 
| 7974 | 52 |   \FROM{this} & \equiv & \THEN \\
 | 
| 53 |   \FROM{this}~\HAVENAME & \equiv & \HENCENAME \\
 | |
| 54 |   \FROM{this}~\SHOWNAME & \equiv & \THUSNAME \\
 | |
| 55 | \end{matharray}
 | |
| 56 | ||
| 57 | ||
| 58 | \subsection{Derived elements}
 | |
| 59 | ||
| 60 | \begin{matharray}{rcl}
 | |
| 61 |   \ALSO@0 & \approx & \NOTE{calculation}{this} \\
 | |
| 62 |   \ALSO@{n+1} & \approx & \NOTE{calculation}{trans~[OF~calculation~this]} \\
 | |
| 8511 | 63 |   \FINALLY & \approx & \ALSO~\FROM{calculation} \\[0.5ex]
 | 
| 8619 | 64 |   \MOREOVER & \approx & \NOTE{calculation}{calculation~this} \\
 | 
| 65 |   \ULTIMATELY & \approx & \MOREOVER~\FROM{calculation} \\[0.5ex]
 | |
| 66 |   \PRESUME{a}{\vec\phi} & \approx & \ASSUME{a}{\vec\phi} \\
 | |
| 9695 | 67 | %  & & \Text{(permissive assumption)} \\
 | 
| 8619 | 68 |   \DEF{a}{x \equiv t} & \approx & \FIX{x}~\ASSUME{a}{x \equiv t} \\
 | 
| 9695 | 69 | %  & & \Text{(definitional assumption)} \\
 | 
| 8619 | 70 |   \OBTAIN{\vec x}{a}{\vec\phi} & \approx & \dots~\FIX{\vec x}~\ASSUME{a}{\vec\phi} \\
 | 
| 9695 | 71 | %  & & \Text{(generalized existence)} \\
 | 
| 8619 | 72 |   \CASE{c} & \approx & \FIX{\vec x}~\ASSUME{c}{\vec\phi} \\
 | 
| 9695 | 73 | %  & & \Text{(named context)} \\[0.5ex]
 | 
| 8511 | 74 |   \SORRY & \approx & \BY{cheating} \\
 | 
| 7974 | 75 | \end{matharray}
 | 
| 76 | ||
| 77 | ||
| 78 | \subsection{Diagnostic commands}
 | |
| 79 | ||
| 80 | \begin{matharray}{ll}
 | |
| 9695 | 81 |   \isarkeyword{pr} & \Text{print current state} \\
 | 
| 82 |   \isarkeyword{thm}~\vec a & \Text{print theorems} \\
 | |
| 83 |   \isarkeyword{term}~t & \Text{print term} \\
 | |
| 84 |   \isarkeyword{prop}~\phi & \Text{print meta-level proposition} \\
 | |
| 85 |   \isarkeyword{typ}~\tau & \Text{print meta-level type} \\
 | |
| 7974 | 86 | \end{matharray}
 | 
| 87 | ||
| 88 | ||
| 89 | \section{Proof methods}
 | |
| 90 | ||
| 91 | \begin{tabular}{ll}
 | |
| 7976 | 92 |   \multicolumn{2}{l}{\textbf{Single steps (forward-chaining facts)}} \\[0.5ex]
 | 
| 7987 | 93 | $assumption$ & apply some assumption \\ | 
| 8195 | 94 | $this$ & apply current facts \\ | 
| 8513 | 95 | $rule~\vec a$ & apply some rule \\ | 
| 7974 | 96 | $rule$ & apply standard rule (default for $\PROOFNAME$) \\ | 
| 8447 | 97 |   $contradiction$ & apply $\neg{}$ elimination rule (any order) \\
 | 
| 8547 | 98 | $cases~t$ & case analysis (provides cases) \\ | 
| 99 | $induct~\vec x$ & proof by induction (provides cases) \\[2ex] | |
| 7974 | 100 | |
| 7976 | 101 |   \multicolumn{2}{l}{\textbf{Repeated steps (inserting facts)}} \\[0.5ex]
 | 
| 9695 | 102 |   $-$ & \Text{no rules} \\
 | 
| 103 |   $intro~\vec a$ & \Text{introduction rules} \\
 | |
| 104 |   $intro_classes$ & \Text{class introduction rules} \\
 | |
| 105 |   $elim~\vec a$ & \Text{elimination rules} \\
 | |
| 106 |   $unfold~\vec a$ & \Text{definitions} \\[2ex]
 | |
| 7974 | 107 | |
| 108 |   \multicolumn{2}{l}{\textbf{Automated proof tools (inserting facts, or even prems!)}} \\[0.5ex]
 | |
| 13024 | 109 |   $rules$ & \Text{intuitionistic proof search} \\
 | 
| 13472 | 110 | $blast$, $fast$ & Classical Reasoner \\ | 
| 9603 | 111 | $simp$, $simp_all$ & Simplifier (+ Splitter) \\ | 
| 112 | $auto$, $force$ & Simplifier + Classical Reasoner \\ | |
| 7974 | 113 | $arith$ & Arithmetic procedure \\ | 
| 114 | \end{tabular}
 | |
| 115 | ||
| 116 | ||
| 117 | \section{Attributes}
 | |
| 118 | ||
| 119 | \begin{tabular}{ll}
 | |
| 9905 | 120 |   \multicolumn{2}{l}{\textbf{Operations}} \\[0.5ex]
 | 
| 14175 
dbd16ebaf907
Method rule_tac understands Isar contexts: documentation.
 ballarin parents: 
13472diff
changeset | 121 | $OF~\vec a$ & rule resolved with facts (skipping ``$_$'') \\ | 
| 
dbd16ebaf907
Method rule_tac understands Isar contexts: documentation.
 ballarin parents: 
13472diff
changeset | 122 | $of~\vec t$ & rule instantiated with terms (skipping ``$_$'') \\ | 
| 
dbd16ebaf907
Method rule_tac understands Isar contexts: documentation.
 ballarin parents: 
13472diff
changeset | 123 | $where~\vec x = \vec t$ & rule instantiated with terms, by variable name \\ | 
| 13041 | 124 | $symmetric$ & resolution with symmetry rule \\ | 
| 125 | $THEN~b$ & resolution with another rule \\ | |
| 9941 
fe05af7ec816
renamed atts: rulify to rule_format, elimify to elim_format;
 wenzelm parents: 
9905diff
changeset | 126 | $rule_format$ & result put into standard rule format \\ | 
| 13041 | 127 | $elim_format$ & destruct rule turned into elimination rule format \\[1ex] | 
| 7974 | 128 | |
| 9905 | 129 |   \multicolumn{2}{l}{\textbf{Declarations}} \\[0.5ex]
 | 
| 130 | $simp$ & Simplifier rule \\ | |
| 13041 | 131 | $intro$, $elim$, $dest$ & Pure or Classical Reasoner rule \\ | 
| 9905 | 132 | $iff$ & Simplifier + Classical Reasoner rule \\ | 
| 133 | $split$ & case split rule \\ | |
| 134 | $trans$ & transitivity rule \\ | |
| 13041 | 135 | $sym$ & symmetry rule \\ | 
| 7974 | 136 | \end{tabular}
 | 
| 137 | ||
| 8511 | 138 | |
| 13472 | 139 | \section{Rule declarations and methods}
 | 
| 140 | ||
| 141 | \begin{tabular}{l|lllll}
 | |
| 142 | & $rule$ & $rules$ & $blast$ etc. & $simp$ etc. & $auto$ etc. \\ | |
| 143 | \hline | |
| 144 | $elim!$ $intro!$ (Pure) & $\times$ & $\times$ \\ | |
| 145 | $elim$ $intro$ (Pure) & $\times$ & $\times$ \\ | |
| 146 | $elim!$ $intro!$ & $\times$ & & $\times$ & & $\times$ \\ | |
| 147 | $elim$ $intro$ & $\times$ & & $\times$ & & $\times$ \\ | |
| 148 | $iff$ & $\times$ & & $\times$ & $\times$ & $\times$ \\ | |
| 149 | $iff?$ & $\times$ \\ | |
| 150 | $elim?$ $intro?$ & $\times$ \\ | |
| 151 | $simp$ & & & & $\times$ & $\times$ \\ | |
| 152 | $cong$ & & & & $\times$ & $\times$ \\ | |
| 153 | $split$ & & & & $\times$ & $\times$ \\ | |
| 154 | \end{tabular}
 | |
| 155 | ||
| 156 | ||
| 8511 | 157 | \section{Emulating tactic scripts}
 | 
| 158 | ||
| 8547 | 159 | \subsection{Commands}
 | 
| 8511 | 160 | |
| 161 | \begin{tabular}{ll}
 | |
| 10223 | 162 |   $\APPLY{m}$ & apply proof method at initial position \\
 | 
| 8547 | 163 |   $\isarkeyword{apply_end}~(m)$ & apply proof method near terminal position \\
 | 
| 9615 | 164 |   $\isarkeyword{done}$ & complete proof \\
 | 
| 8511 | 165 |   $\isarkeyword{defer}~n$ & move subgoal to end \\
 | 
| 166 |   $\isarkeyword{prefer}~n$ & move subgoal to beginning \\
 | |
| 167 |   $\isarkeyword{back}$ & backtrack last command \\
 | |
| 9615 | 168 |   $\isarkeyword{declare}$ & declare rules in current theory \\
 | 
| 8511 | 169 | \end{tabular}
 | 
| 170 | ||
| 8547 | 171 | \subsection{Methods}
 | 
| 8511 | 172 | |
| 173 | \begin{tabular}{ll}
 | |
| 9615 | 174 | $rule_tac~insts$ & resolution (with instantiation) \\ | 
| 175 | $erule_tac~insts$ & elim-resolution (with instantiation) \\ | |
| 176 | $drule_tac~insts$ & destruct-resolution (with instantiation) \\ | |
| 177 | $frule_tac~insts$ & forward-resolution (with instantiation) \\ | |
| 178 | $cut_tac~insts$ & insert facts (with instantiation) \\ | |
| 179 | $thin_tac~\phi$ & delete assumptions \\ | |
| 180 | $subgoal_tac~\phi$ & new claims \\ | |
| 181 | $rename_tac~\vec x$ & rename suffix of goal parameters \\ | |
| 182 | $rotate_tac~n$ & rotate assumptions of goal \\ | |
| 183 | $tactic~text$ & arbitrary ML tactic \\ | |
| 8691 | 184 | $case_tac~t$ & exhaustion (datatypes) \\ | 
| 185 | $induct_tac~\vec x$ & induction (datatypes) \\ | |
| 9615 | 186 | $ind_cases~t$ & exhaustion + simplification (inductive sets) \\ | 
| 8511 | 187 | \end{tabular}
 | 
| 188 | ||
| 189 | ||
| 9615 | 190 | %%% Local Variables: | 
| 7897 | 191 | %%% mode: latex | 
| 192 | %%% TeX-master: "isar-ref" | |
| 9615 | 193 | %%% End: |