diff -r 3480725c71d2 -r 0debd22f0c0e src/Doc/Isar_Ref/Quick_Reference.thy --- a/src/Doc/Isar_Ref/Quick_Reference.thy Tue Oct 20 23:03:46 2015 +0200 +++ b/src/Doc/Isar_Ref/Quick_Reference.thy Tue Oct 20 23:53:40 2015 +0200 @@ -10,39 +10,39 @@ text \ \begin{tabular}{ll} - @{command "fix"}~@{text x} & augment context by @{text "\x. \"} \\ - @{command "assume"}~@{text "a: \"} & augment context by @{text "\ \ \"} \\ + @{command "fix"}~\x\ & augment context by \\x. \\ \\ + @{command "assume"}~\a: \\ & augment context by \\ \ \\ \\ @{command "then"} & indicate forward chaining of facts \\ - @{command "have"}~@{text "a: \"} & prove local result \\ - @{command "show"}~@{text "a: \"} & prove local result, refining some goal \\ - @{command "using"}~@{text a} & indicate use of additional facts \\ - @{command "unfolding"}~@{text a} & unfold definitional equations \\ - @{command "proof"}~@{text "m\<^sub>1"}~\dots~@{command "qed"}~@{text "m\<^sub>2"} & indicate proof structure and refinements \\ - @{command "{"}~@{text "\"}~@{command "}"} & indicate explicit blocks \\ + @{command "have"}~\a: \\ & prove local result \\ + @{command "show"}~\a: \\ & prove local result, refining some goal \\ + @{command "using"}~\a\ & indicate use of additional facts \\ + @{command "unfolding"}~\a\ & unfold definitional equations \\ + @{command "proof"}~\m\<^sub>1\~\dots~@{command "qed"}~\m\<^sub>2\ & indicate proof structure and refinements \\ + @{command "{"}~\\\~@{command "}"} & indicate explicit blocks \\ @{command "next"} & switch blocks \\ - @{command "note"}~@{text "a = b"} & reconsider facts \\ - @{command "let"}~@{text "p = t"} & abbreviate terms by higher-order matching \\ - @{command "write"}~@{text "c (mx)"} & declare local mixfix syntax \\ + @{command "note"}~\a = b\ & reconsider facts \\ + @{command "let"}~\p = t\ & abbreviate terms by higher-order matching \\ + @{command "write"}~\c (mx)\ & declare local mixfix syntax \\ \end{tabular} \<^medskip> \begin{tabular}{rcl} - @{text "proof"} & = & @{text "prfx\<^sup>*"}~@{command "proof"}~@{text "method\<^sup>? stmt\<^sup>*"}~@{command "qed"}~@{text "method\<^sup>?"} \\ - & @{text "|"} & @{text "prfx\<^sup>*"}~@{command "done"} \\ - @{text prfx} & = & @{command "apply"}~@{text method} \\ - & @{text "|"} & @{command "using"}~@{text "facts"} \\ - & @{text "|"} & @{command "unfolding"}~@{text "facts"} \\ - @{text stmt} & = & @{command "{"}~@{text "stmt\<^sup>*"}~@{command "}"} \\ - & @{text "|"} & @{command "next"} \\ - & @{text "|"} & @{command "note"}~@{text "name = facts"} \\ - & @{text "|"} & @{command "let"}~@{text "term = term"} \\ - & @{text "|"} & @{command "write"}~@{text "name (mixfix)"} \\ - & @{text "|"} & @{command "fix"}~@{text "var\<^sup>+"} \\ - & @{text "|"} & @{command "assume"}~@{text "name: props"} \\ - & @{text "|"} & @{command "then"}@{text "\<^sup>?"}~@{text goal} \\ - @{text goal} & = & @{command "have"}~@{text "name: props proof"} \\ - & @{text "|"} & @{command "show"}~@{text "name: props proof"} \\ + \proof\ & = & \prfx\<^sup>*\~@{command "proof"}~\method\<^sup>? stmt\<^sup>*\~@{command "qed"}~\method\<^sup>?\ \\ + & \|\ & \prfx\<^sup>*\~@{command "done"} \\ + \prfx\ & = & @{command "apply"}~\method\ \\ + & \|\ & @{command "using"}~\facts\ \\ + & \|\ & @{command "unfolding"}~\facts\ \\ + \stmt\ & = & @{command "{"}~\stmt\<^sup>*\~@{command "}"} \\ + & \|\ & @{command "next"} \\ + & \|\ & @{command "note"}~\name = facts\ \\ + & \|\ & @{command "let"}~\term = term\ \\ + & \|\ & @{command "write"}~\name (mixfix)\ \\ + & \|\ & @{command "fix"}~\var\<^sup>+\ \\ + & \|\ & @{command "assume"}~\name: props\ \\ + & \|\ & @{command "then"}\\<^sup>?\~\goal\ \\ + \goal\ & = & @{command "have"}~\name: props proof\ \\ + & \|\ & @{command "show"}~\name: props proof\ \\ \end{tabular} \ @@ -51,17 +51,17 @@ text \ \begin{tabular}{rcl} - @{command "by"}~@{text "m\<^sub>1 m\<^sub>2"} & @{text "\"} & - @{command "proof"}~@{text "m\<^sub>1"}~@{command "qed"}~@{text "m\<^sub>2"} \\ - @{command ".."} & @{text "\"} & @{command "by"}~@{text standard} \\ - @{command "."} & @{text "\"} & @{command "by"}~@{text this} \\ - @{command "hence"} & @{text "\"} & @{command "then"}~@{command "have"} \\ - @{command "thus"} & @{text "\"} & @{command "then"}~@{command "show"} \\ - @{command "from"}~@{text a} & @{text "\"} & @{command "note"}~@{text a}~@{command "then"} \\ - @{command "with"}~@{text a} & @{text "\"} & @{command "from"}~@{text "a \ this"} \\ - @{command "from"}~@{text this} & @{text "\"} & @{command "then"} \\ - @{command "from"}~@{text this}~@{command "have"} & @{text "\"} & @{command "hence"} \\ - @{command "from"}~@{text this}~@{command "show"} & @{text "\"} & @{command "thus"} \\ + @{command "by"}~\m\<^sub>1 m\<^sub>2\ & \\\ & + @{command "proof"}~\m\<^sub>1\~@{command "qed"}~\m\<^sub>2\ \\ + @{command ".."} & \\\ & @{command "by"}~\standard\ \\ + @{command "."} & \\\ & @{command "by"}~\this\ \\ + @{command "hence"} & \\\ & @{command "then"}~@{command "have"} \\ + @{command "thus"} & \\\ & @{command "then"}~@{command "show"} \\ + @{command "from"}~\a\ & \\\ & @{command "note"}~\a\~@{command "then"} \\ + @{command "with"}~\a\ & \\\ & @{command "from"}~\a \ this\ \\ + @{command "from"}~\this\ & \\\ & @{command "then"} \\ + @{command "from"}~\this\~@{command "have"} & \\\ & @{command "hence"} \\ + @{command "from"}~\this\~@{command "show"} & \\\ & @{command "thus"} \\ \end{tabular} \ @@ -70,26 +70,26 @@ text \ \begin{tabular}{rcl} - @{command "also"}@{text "\<^sub>0"} & @{text "\"} & - @{command "note"}~@{text "calculation = this"} \\ - @{command "also"}@{text "\<^sub>n\<^sub>+\<^sub>1"} & @{text "\"} & - @{command "note"}~@{text "calculation = trans [OF calculation this]"} \\ - @{command "finally"} & @{text "\"} & - @{command "also"}~@{command "from"}~@{text calculation} \\[0.5ex] - @{command "moreover"} & @{text "\"} & - @{command "note"}~@{text "calculation = calculation this"} \\ - @{command "ultimately"} & @{text "\"} & - @{command "moreover"}~@{command "from"}~@{text calculation} \\[0.5ex] - @{command "presume"}~@{text "a: \"} & @{text "\"} & - @{command "assume"}~@{text "a: \"} \\ - @{command "def"}~@{text "a: x \ t"} & @{text "\"} & - @{command "fix"}~@{text x}~@{command "assume"}~@{text "a: x \ t"} \\ - @{command "obtain"}~@{text "x \ a: \"} & @{text "\"} & - @{text "\"}~@{command "fix"}~@{text x}~@{command "assume"}~@{text "a: \"} \\ - @{command "case"}~@{text c} & @{text "\"} & - @{command "fix"}~@{text x}~@{command "assume"}~@{text "c: \"} \\ - @{command "sorry"} & @{text "\"} & - @{command "by"}~@{text cheating} \\ + @{command "also"}\\<^sub>0\ & \\\ & + @{command "note"}~\calculation = this\ \\ + @{command "also"}\\<^sub>n\<^sub>+\<^sub>1\ & \\\ & + @{command "note"}~\calculation = trans [OF calculation this]\ \\ + @{command "finally"} & \\\ & + @{command "also"}~@{command "from"}~\calculation\ \\[0.5ex] + @{command "moreover"} & \\\ & + @{command "note"}~\calculation = calculation this\ \\ + @{command "ultimately"} & \\\ & + @{command "moreover"}~@{command "from"}~\calculation\ \\[0.5ex] + @{command "presume"}~\a: \\ & \\\ & + @{command "assume"}~\a: \\ \\ + @{command "def"}~\a: x \ t\ & \\\ & + @{command "fix"}~\x\~@{command "assume"}~\a: x \ t\ \\ + @{command "obtain"}~\x \ a: \\ & \\\ & + \\\~@{command "fix"}~\x\~@{command "assume"}~\a: \\ \\ + @{command "case"}~\c\ & \\\ & + @{command "fix"}~\x\~@{command "assume"}~\c: \\ \\ + @{command "sorry"} & \\\ & + @{command "by"}~\cheating\ \\ \end{tabular} \ @@ -100,10 +100,10 @@ \begin{tabular}{ll} @{command "print_state"} & print proof state \\ @{command "print_statement"} & print fact in long statement form \\ - @{command "thm"}~@{text a} & print fact \\ - @{command "prop"}~@{text \} & print proposition \\ - @{command "term"}~@{text t} & print term \\ - @{command "typ"}~@{text \} & print type \\ + @{command "thm"}~\a\ & print fact \\ + @{command "prop"}~\\\ & print proposition \\ + @{command "term"}~\t\ & print term \\ + @{command "typ"}~\\\ & print type \\ \end{tabular} \ @@ -115,18 +115,18 @@ \multicolumn{2}{l}{\<^bold>\Single steps (forward-chaining facts)\} \\[0.5ex] @{method assumption} & apply some assumption \\ @{method this} & apply current facts \\ - @{method rule}~@{text a} & apply some rule \\ + @{method rule}~\a\ & apply some rule \\ @{method standard} & apply standard rule (default for @{command "proof"}) \\ - @{method contradiction} & apply @{text "\"} elimination rule (any order) \\ - @{method cases}~@{text t} & case analysis (provides cases) \\ - @{method induct}~@{text x} & proof by induction (provides cases) \\[2ex] + @{method contradiction} & apply \\\ elimination rule (any order) \\ + @{method cases}~\t\ & case analysis (provides cases) \\ + @{method induct}~\x\ & proof by induction (provides cases) \\[2ex] \multicolumn{2}{l}{\<^bold>\Repeated steps (inserting facts)\} \\[0.5ex] @{method "-"} & no rules \\ - @{method intro}~@{text a} & introduction rules \\ + @{method intro}~\a\ & introduction rules \\ @{method intro_classes} & class introduction rules \\ - @{method elim}~@{text a} & elimination rules \\ - @{method unfold}~@{text a} & definitional rewrite rules \\[2ex] + @{method elim}~\a\ & elimination rules \\ + @{method unfold}~\a\ & definitional rewrite rules \\[2ex] \multicolumn{2}{l}{\<^bold>\Automated proof tools (inserting facts)\} \\[0.5ex] @{method iprover} & intuitionistic proof search \\ @@ -143,11 +143,11 @@ text \ \begin{tabular}{ll} \multicolumn{2}{l}{\<^bold>\Rules\} \\[0.5ex] - @{attribute OF}~@{text a} & rule resolved with facts (skipping ``@{text _}'') \\ - @{attribute of}~@{text t} & rule instantiated with terms (skipping ``@{text _}'') \\ - @{attribute "where"}~@{text "x = t"} & rule instantiated with terms, by variable name \\ + @{attribute OF}~\a\ & rule resolved with facts (skipping ``\_\'') \\ + @{attribute of}~\t\ & rule instantiated with terms (skipping ``\_\'') \\ + @{attribute "where"}~\x = t\ & rule instantiated with terms, by variable name \\ @{attribute symmetric} & resolution with symmetry rule \\ - @{attribute THEN}~@{text b} & resolution with another rule \\ + @{attribute THEN}~\b\ & resolution with another rule \\ @{attribute rule_format} & result put into standard rule format \\ @{attribute elim_format} & destruct rule turned into elimination rule format \\[1ex] @@ -169,26 +169,26 @@ & @{method rule} & @{method iprover} & @{method blast} & @{method simp} & @{method auto} \\ & & & @{method fast} & @{method simp_all} & @{method force} \\ \hline - @{attribute Pure.elim}@{text "!"} @{attribute Pure.intro}@{text "!"} - & @{text "\"} & @{text "\"} \\ + @{attribute Pure.elim}\!\ @{attribute Pure.intro}\!\ + & \\\ & \\\ \\ @{attribute Pure.elim} @{attribute Pure.intro} - & @{text "\"} & @{text "\"} \\ - @{attribute elim}@{text "!"} @{attribute intro}@{text "!"} - & @{text "\"} & & @{text "\"} & & @{text "\"} \\ + & \\\ & \\\ \\ + @{attribute elim}\!\ @{attribute intro}\!\ + & \\\ & & \\\ & & \\\ \\ @{attribute elim} @{attribute intro} - & @{text "\"} & & @{text "\"} & & @{text "\"} \\ + & \\\ & & \\\ & & \\\ \\ @{attribute iff} - & @{text "\"} & & @{text "\"} & @{text "\"} & @{text "\"} \\ - @{attribute iff}@{text "?"} - & @{text "\"} \\ - @{attribute elim}@{text "?"} @{attribute intro}@{text "?"} - & @{text "\"} \\ + & \\\ & & \\\ & \\\ & \\\ \\ + @{attribute iff}\?\ + & \\\ \\ + @{attribute elim}\?\ @{attribute intro}\?\ + & \\\ \\ @{attribute simp} - & & & & @{text "\"} & @{text "\"} \\ + & & & & \\\ & \\\ \\ @{attribute cong} - & & & & @{text "\"} & @{text "\"} \\ + & & & & \\\ & \\\ \\ @{attribute split} - & & & & @{text "\"} & @{text "\"} \\ + & & & & \\\ & \\\ \\ \end{tabular} \ @@ -199,11 +199,11 @@ text \ \begin{tabular}{ll} - @{command "apply"}~@{text m} & apply proof method at initial position \\ - @{command "apply_end"}~@{text m} & apply proof method near terminal position \\ + @{command "apply"}~\m\ & apply proof method at initial position \\ + @{command "apply_end"}~\m\ & apply proof method near terminal position \\ @{command "done"} & complete proof \\ - @{command "defer"}~@{text n} & move subgoal to end \\ - @{command "prefer"}~@{text n} & move subgoal to beginning \\ + @{command "defer"}~\n\ & move subgoal to end \\ + @{command "prefer"}~\n\ & move subgoal to beginning \\ @{command "back"} & backtrack last command \\ \end{tabular} \ @@ -213,19 +213,19 @@ text \ \begin{tabular}{ll} - @{method rule_tac}~@{text insts} & resolution (with instantiation) \\ - @{method erule_tac}~@{text insts} & elim-resolution (with instantiation) \\ - @{method drule_tac}~@{text insts} & destruct-resolution (with instantiation) \\ - @{method frule_tac}~@{text insts} & forward-resolution (with instantiation) \\ - @{method cut_tac}~@{text insts} & insert facts (with instantiation) \\ - @{method thin_tac}~@{text \} & delete assumptions \\ - @{method subgoal_tac}~@{text \} & new claims \\ - @{method rename_tac}~@{text x} & rename innermost goal parameters \\ - @{method rotate_tac}~@{text n} & rotate assumptions of goal \\ - @{method tactic}~@{text "text"} & arbitrary ML tactic \\ - @{method case_tac}~@{text t} & exhaustion (datatypes) \\ - @{method induct_tac}~@{text x} & induction (datatypes) \\ - @{method ind_cases}~@{text t} & exhaustion + simplification (inductive predicates) \\ + @{method rule_tac}~\insts\ & resolution (with instantiation) \\ + @{method erule_tac}~\insts\ & elim-resolution (with instantiation) \\ + @{method drule_tac}~\insts\ & destruct-resolution (with instantiation) \\ + @{method frule_tac}~\insts\ & forward-resolution (with instantiation) \\ + @{method cut_tac}~\insts\ & insert facts (with instantiation) \\ + @{method thin_tac}~\\\ & delete assumptions \\ + @{method subgoal_tac}~\\\ & new claims \\ + @{method rename_tac}~\x\ & rename innermost goal parameters \\ + @{method rotate_tac}~\n\ & rotate assumptions of goal \\ + @{method tactic}~\text\ & arbitrary ML tactic \\ + @{method case_tac}~\t\ & exhaustion (datatypes) \\ + @{method induct_tac}~\x\ & induction (datatypes) \\ + @{method ind_cases}~\t\ & exhaustion + simplification (inductive predicates) \\ \end{tabular} \