# HG changeset patch # User wenzelm # Date 1445379791 -7200 # Node ID 63b18f75887434800ff6712c437cab4387f0ff50 # Parent 0debd22f0c0e4a08e7421784fdd2f08124211857 proper spaces around @{text}; diff -r 0debd22f0c0e -r 63b18f758874 NEWS --- a/NEWS Tue Oct 20 23:53:40 2015 +0200 +++ b/NEWS Wed Oct 21 00:23:11 2015 +0200 @@ -73,7 +73,8 @@ * The @{text} antiquotation now ignores the antiquotation option "source". The given text content is output unconditionally, without any surrounding quotes etc. Subtle INCOMPATIBILITY, put quotes into the -argument where they are really intended, e.g. @{text \"foo"\}. +argument where they are really intended, e.g. @{text \"foo"\}. Initial +or terminal spaces are ignored. * HTML presentation uses the standard IsabelleText font and Unicode rendering of Isabelle symbols like Isabelle/Scala/jEdit. The former diff -r 0debd22f0c0e -r 63b18f758874 src/Doc/Isar_Ref/Document_Preparation.thy --- a/src/Doc/Isar_Ref/Document_Preparation.thy Tue Oct 20 23:53:40 2015 +0200 +++ b/src/Doc/Isar_Ref/Document_Preparation.thy Wed Oct 21 00:23:11 2015 +0200 @@ -109,7 +109,7 @@ @{antiquotation_def "file"} & : & \antiquotation\ \\ @{antiquotation_def "url"} & : & \antiquotation\ \\ @{antiquotation_def "cite"} & : & \antiquotation\ \\ - @{command_def "print_antiquotations"}\\<^sup>*\ & : & \context \ \ \\ + @{command_def "print_antiquotations"}\\<^sup>*\ & : & \context \\ \\ \end{matharray} The overall content of an Isabelle/Isar theory may alternate between diff -r 0debd22f0c0e -r 63b18f758874 src/Doc/Isar_Ref/Inner_Syntax.thy --- a/src/Doc/Isar_Ref/Inner_Syntax.thy Tue Oct 20 23:53:40 2015 +0200 +++ b/src/Doc/Isar_Ref/Inner_Syntax.thy Wed Oct 21 00:23:11 2015 +0200 @@ -452,7 +452,7 @@ as follows: \begin{center} - \c :: \@{verbatim \"\}\(\\<^sub>1 \ \\<^sub>2) \ \\<^sub>3\@{verbatim \" (\}@{keyword "binder"}~@{verbatim \"\}\sy\@{verbatim \" [\}\p\@{verbatim "]"}~\q\@{verbatim ")"} + \c ::\~@{verbatim \"\}\(\\<^sub>1 \ \\<^sub>2) \ \\<^sub>3\@{verbatim \" (\}@{keyword "binder"}~@{verbatim \"\}\sy\@{verbatim \" [\}\p\@{verbatim "]"}~\q\@{verbatim ")"} \end{center} This introduces concrete binder syntax \sy x. b\, where @@ -463,7 +463,7 @@ Internally, the binder syntax is expanded to something like this: \begin{center} - \c_binder :: \@{verbatim \"\}\idts \ \\<^sub>2 \ \\<^sub>3\@{verbatim \" ("(3\}\sy\@{verbatim \_./ _)" [0,\}~\p\@{verbatim "]"}~\q\@{verbatim ")"} + \c_binder ::\~@{verbatim \"\}\idts \ \\<^sub>2 \ \\<^sub>3\@{verbatim \" ("(3\}\sy\@{verbatim \_./ _)" [0,\}~\p\@{verbatim "]"}~\q\@{verbatim ")"} \end{center} Here @{syntax (inner) idts} is the nonterminal symbol for a list of @@ -685,29 +685,29 @@ & \|\ & @{verbatim PROP} \aprop\ \\\\ @{syntax_def (inner) aprop} & = & @{verbatim "("} \aprop\ @{verbatim ")"} \\ - & \|\ & \id | longid | var | \@{verbatim "_"}\ | \@{verbatim "..."} \\ - & \|\ & @{verbatim CONST} \id | \@{verbatim CONST} \longid\ \\ - & \|\ & @{verbatim XCONST} \id | \@{verbatim XCONST} \longid\ \\ + & \|\ & \id | longid | var |\~~@{verbatim "_"}~~\|\~~@{verbatim "..."} \\ + & \|\ & @{verbatim CONST} \id |\~~@{verbatim CONST} \longid\ \\ + & \|\ & @{verbatim XCONST} \id |\~~@{verbatim XCONST} \longid\ \\ & \|\ & \logic\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) any\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) \ any\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>)\ & \(999)\ \\\\ @{syntax_def (inner) logic} & = & @{verbatim "("} \logic\ @{verbatim ")"} \\ & \|\ & \logic\<^sup>(\<^sup>4\<^sup>)\ @{verbatim "::"} \type\ & \(3)\ \\ - & \|\ & \id | longid | var | \@{verbatim "_"}\ | \@{verbatim "..."} \\ - & \|\ & @{verbatim CONST} \id | \@{verbatim CONST} \longid\ \\ - & \|\ & @{verbatim XCONST} \id | \@{verbatim XCONST} \longid\ \\ + & \|\ & \id | longid | var |\~~@{verbatim "_"}~~\|\~~@{verbatim "..."} \\ + & \|\ & @{verbatim CONST} \id |\~~@{verbatim CONST} \longid\ \\ + & \|\ & @{verbatim XCONST} \id |\~~@{verbatim XCONST} \longid\ \\ & \|\ & \logic\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) any\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) \ any\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>)\ & \(999)\ \\ & \|\ & \\ index\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>)\ \\ & \|\ & @{verbatim "%"} \pttrns\ @{verbatim "."} \any\<^sup>(\<^sup>3\<^sup>)\ & \(3)\ \\ & \|\ & \\\ \pttrns\ @{verbatim "."} \any\<^sup>(\<^sup>3\<^sup>)\ & \(3)\ \\ - & \|\ & @{verbatim op} @{verbatim "=="}\ | \@{verbatim op} \\\\ | \@{verbatim op} @{verbatim "&&&"} \\ - & \|\ & @{verbatim op} @{verbatim "==>"}\ | \@{verbatim op} \\\ \\ + & \|\ & @{verbatim op} @{verbatim "=="}~~\|\~~@{verbatim op} \\\~~\|\~~@{verbatim op} @{verbatim "&&&"} \\ + & \|\ & @{verbatim op} @{verbatim "==>"}~~\|\~~@{verbatim op} \\\ \\ & \|\ & @{verbatim TYPE} @{verbatim "("} \type\ @{verbatim ")"} \\\\ - @{syntax_def (inner) idt} & = & @{verbatim "("} \idt\ @{verbatim ")"}\ | id | \@{verbatim "_"} \\ + @{syntax_def (inner) idt} & = & @{verbatim "("} \idt\ @{verbatim ")"}~~\| id |\~~@{verbatim "_"} \\ & \|\ & \id\ @{verbatim "::"} \type\ & \(0)\ \\ & \|\ & @{verbatim "_"} @{verbatim "::"} \type\ & \(0)\ \\\\ - @{syntax_def (inner) index} & = & @{verbatim "\<^bsub>"} \logic\<^sup>(\<^sup>0\<^sup>)\ @{verbatim "\<^esub>"}\ | | \\ \\\\ + @{syntax_def (inner) index} & = & @{verbatim "\<^bsub>"} \logic\<^sup>(\<^sup>0\<^sup>)\ @{verbatim "\<^esub>"}~~\| | \\ \\\\ @{syntax_def (inner) idts} & = & \idt | idt\<^sup>(\<^sup>1\<^sup>) idts\ & \(0)\ \\\\ @@ -716,8 +716,8 @@ @{syntax_def (inner) pttrns} & = & \pttrn | pttrn\<^sup>(\<^sup>1\<^sup>) pttrns\ & \(0)\ \\\\ @{syntax_def (inner) type} & = & @{verbatim "("} \type\ @{verbatim ")"} \\ - & \|\ & \tid | tvar | \@{verbatim "_"} \\ - & \|\ & \tid\ @{verbatim "::"} \sort | tvar \@{verbatim "::"} \sort | \@{verbatim "_"} @{verbatim "::"} \sort\ \\ + & \|\ & \tid | tvar |\~~@{verbatim "_"} \\ + & \|\ & \tid\ @{verbatim "::"} \sort | tvar\~~@{verbatim "::"} \sort |\~~@{verbatim "_"} @{verbatim "::"} \sort\ \\ & \|\ & \type_name | type\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) type_name\ \\ & \|\ & @{verbatim "("} \type\ @{verbatim ","} \\\ @{verbatim ","} \type\ @{verbatim ")"} \type_name\ \\ & \|\ & \type\<^sup>(\<^sup>1\<^sup>)\ @{verbatim "=>"} \type\ & \(0)\ \\ @@ -726,7 +726,7 @@ & \|\ & @{verbatim "["} \type\ @{verbatim ","} \\\ @{verbatim ","} \type\ @{verbatim "]"} \\\ \type\ & \(0)\ \\ @{syntax_def (inner) type_name} & = & \id | longid\ \\\\ - @{syntax_def (inner) sort} & = & @{syntax class_name}~\ | \@{verbatim "{}"} \\ + @{syntax_def (inner) sort} & = & @{syntax class_name}~~\|\~~@{verbatim "{}"} \\ & \|\ & @{verbatim "{"} @{syntax class_name} @{verbatim ","} \\\ @{verbatim ","} @{syntax class_name} @{verbatim "}"} \\ @{syntax_def (inner) class_name} & = & \id | longid\ \\ \end{supertabular} @@ -1173,7 +1173,7 @@ with other syntax declarations. \<^medskip> - The special case of copy production is specified by \c = \@{verbatim \""\} (empty string). It means that the + The special case of copy production is specified by \c =\~@{verbatim \""\} (empty string). It means that the resulting parse tree \t\ is copied directly, without any further decoration. diff -r 0debd22f0c0e -r 63b18f758874 src/Doc/Isar_Ref/Outer_Syntax.thy --- a/src/Doc/Isar_Ref/Outer_Syntax.thy Tue Oct 20 23:53:40 2015 +0200 +++ b/src/Doc/Isar_Ref/Outer_Syntax.thy Wed Oct 21 00:23:11 2015 +0200 @@ -103,32 +103,32 @@ \begin{supertabular}{rcl} @{syntax_def ident} & = & \letter (subscript\<^sup>? quasiletter)\<^sup>*\ \\ @{syntax_def longident} & = & \ident(\@{verbatim "."}\ident)\<^sup>+\ \\ - @{syntax_def symident} & = & \sym\<^sup>+ | \@{verbatim \\\}@{verbatim "<"}\ident\@{verbatim ">"} \\ + @{syntax_def symident} & = & \sym\<^sup>+ |\~~@{verbatim \\\}@{verbatim "<"}\ident\@{verbatim ">"} \\ @{syntax_def nat} & = & \digit\<^sup>+\ \\ - @{syntax_def float} & = & @{syntax_ref nat}@{verbatim "."}@{syntax_ref nat}\ | \@{verbatim "-"}@{syntax_ref nat}@{verbatim "."}@{syntax_ref nat} \\ - @{syntax_def var} & = & @{verbatim "?"}\ident | \@{verbatim "?"}\ident\@{verbatim "."}\nat\ \\ + @{syntax_def float} & = & @{syntax_ref nat}@{verbatim "."}@{syntax_ref nat}~~\|\~~@{verbatim "-"}@{syntax_ref nat}@{verbatim "."}@{syntax_ref nat} \\ + @{syntax_def var} & = & @{verbatim "?"}\ident |\~~@{verbatim "?"}\ident\@{verbatim "."}\nat\ \\ @{syntax_def typefree} & = & @{verbatim "'"}\ident\ \\ - @{syntax_def typevar} & = & @{verbatim "?"}\typefree | \@{verbatim "?"}\typefree\@{verbatim "."}\nat\ \\ + @{syntax_def typevar} & = & @{verbatim "?"}\typefree |\~~@{verbatim "?"}\typefree\@{verbatim "."}\nat\ \\ @{syntax_def string} & = & @{verbatim \"\} \\\ @{verbatim \"\} \\ @{syntax_def altstring} & = & @{verbatim "`"} \\\ @{verbatim "`"} \\ @{syntax_def cartouche} & = & @{verbatim "\"} \\\ @{verbatim "\"} \\ @{syntax_def verbatim} & = & @{verbatim "{*"} \\\ @{verbatim "*}"} \\[1ex] - \letter\ & = & \latin | \@{verbatim \\\}@{verbatim "<"}\latin\@{verbatim ">"}\ | \@{verbatim \\\}@{verbatim "<"}\latin latin\@{verbatim ">"}\ | greek |\ \\ + \letter\ & = & \latin |\~~@{verbatim \\\}@{verbatim "<"}\latin\@{verbatim ">"}~~\|\~~@{verbatim \\\}@{verbatim "<"}\latin latin\@{verbatim ">"}~~\| greek |\ \\ \subscript\ & = & @{verbatim "\<^sub>"} \\ - \quasiletter\ & = & \letter | digit | \@{verbatim "_"}\ | \@{verbatim "'"} \\ - \latin\ & = & @{verbatim a}\ | \ | \@{verbatim z}\ | \@{verbatim A}\ | \ | \@{verbatim Z} \\ - \digit\ & = & @{verbatim "0"}\ | \ | \@{verbatim "9"} \\ - \sym\ & = & @{verbatim "!"}\ | \@{verbatim "#"}\ | \@{verbatim "$"}\ | \@{verbatim "%"}\ | \@{verbatim "&"}\ | \@{verbatim "*"}\ | \@{verbatim "+"}\ | \@{verbatim "-"}\ | \@{verbatim "/"}\ |\ \\ - & & @{verbatim "<"}\ | \@{verbatim "="}\ | \@{verbatim ">"}\ | \@{verbatim "?"}\ | \@{verbatim "@"}\ | \@{verbatim "^"}\ | \@{verbatim "_"}\ | \@{verbatim "|"}\ | \@{verbatim "~"} \\ - \greek\ & = & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ |\ \\ - & & @{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"}\ | \@{verbatim "\"} \\ + \quasiletter\ & = & \letter | digit |\~~@{verbatim "_"}~~\|\~~@{verbatim "'"} \\ + \latin\ & = & @{verbatim a}~~\| \ |\~~@{verbatim z}~~\|\~~@{verbatim A}~~\| \ |\~~@{verbatim Z} \\ + \digit\ & = & @{verbatim "0"}~~\| \ |\~~@{verbatim "9"} \\ + \sym\ & = & @{verbatim "!"}~~\|\~~@{verbatim "#"}~~\|\~~@{verbatim "$"}~~\|\~~@{verbatim "%"}~~\|\~~@{verbatim "&"}~~\|\~~@{verbatim "*"}~~\|\~~@{verbatim "+"}~~\|\~~@{verbatim "-"}~~\|\~~@{verbatim "/"}~~\|\ \\ + & & @{verbatim "<"}~~\|\~~@{verbatim "="}~~\|\~~@{verbatim ">"}~~\|\~~@{verbatim "?"}~~\|\~~@{verbatim "@"}~~\|\~~@{verbatim "^"}~~\|\~~@{verbatim "_"}~~\|\~~@{verbatim "|"}~~\|\~~@{verbatim "~"} \\ + \greek\ & = & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\ \\ + & & @{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"}~~\|\~~@{verbatim "\"} \\ \end{supertabular} \end{center} diff -r 0debd22f0c0e -r 63b18f758874 src/Doc/Isar_Ref/Proof.thy --- a/src/Doc/Isar_Ref/Proof.thy Tue Oct 20 23:53:40 2015 +0200 +++ b/src/Doc/Isar_Ref/Proof.thy Wed Oct 21 00:23:11 2015 +0200 @@ -1398,7 +1398,7 @@ \} \<^descr> @{command consider}~\(a) \<^vec>x \ \<^vec>A \<^vec>x - | (b) \<^vec>y \ \<^vec>B \<^vec>y | \ \ states a rule for case + | (b) \<^vec>y \ \<^vec>B \<^vec>y | \\ states a rule for case splitting into separate subgoals, such that each case involves new parameters and premises. After the proof is finished, the resulting rule may be used directly with the @{method cases} proof method diff -r 0debd22f0c0e -r 63b18f758874 src/Doc/Isar_Ref/Spec.thy --- a/src/Doc/Isar_Ref/Spec.thy Tue Oct 20 23:53:40 2015 +0200 +++ b/src/Doc/Isar_Ref/Spec.thy Wed Oct 21 00:23:11 2015 +0200 @@ -217,7 +217,7 @@ text \ \begin{matharray}{rcl} @{command_def "bundle"} & : & \local_theory \ local_theory\ \\ - @{command_def "print_bundles"}\\<^sup>*\ & : & \context \ \ \\ + @{command_def "print_bundles"}\\<^sup>*\ & : & \context \\ \\ @{command_def "include"} & : & \proof(state) \ proof(state)\ \\ @{command_def "including"} & : & \proof(prove) \ proof(prove)\ \\ @{keyword_def "includes"} & : & syntax \\ @@ -292,9 +292,9 @@ \begin{matharray}{rcll} @{command_def "definition"} & : & \local_theory \ local_theory\ \\ @{attribute_def "defn"} & : & \attribute\ \\ - @{command_def "print_defn_rules"}\\<^sup>*\ & : & \context \ \ \\ + @{command_def "print_defn_rules"}\\<^sup>*\ & : & \context \\ \\ @{command_def "abbreviation"} & : & \local_theory \ local_theory\ \\ - @{command_def "print_abbrevs"}\\<^sup>*\ & : & \context \ \ \\ + @{command_def "print_abbrevs"}\\<^sup>*\ & : & \context \\ \\ \end{matharray} Term definitions may either happen within the logic (as equational axioms