equal
deleted
inserted
replaced
55 |
55 |
56 The predefined constructs @{text"if"}, @{text"let"} and |
56 The predefined constructs @{text"if"}, @{text"let"} and |
57 @{text"case"} are set in sans serif font to distinguish them from |
57 @{text"case"} are set in sans serif font to distinguish them from |
58 other functions. This improves readability: |
58 other functions. This improves readability: |
59 \begin{itemize} |
59 \begin{itemize} |
60 \item @{term"if b then e\<^isub>1 else e\<^isub>2"} instead of @{text"if b then e\<^isub>1 else e\<^isub>2"}. |
60 \item @{term"if b then e\<^sub>1 else e\<^sub>2"} instead of @{text"if b then e\<^sub>1 else e\<^sub>2"}. |
61 \item @{term"let x = e\<^isub>1 in e\<^isub>2"} instead of @{text"let x = e\<^isub>1 in e\<^isub>2"}. |
61 \item @{term"let x = e\<^sub>1 in e\<^sub>2"} instead of @{text"let x = e\<^sub>1 in e\<^sub>2"}. |
62 \item @{term"case x of True \<Rightarrow> e\<^isub>1 | False \<Rightarrow> e\<^isub>2"} instead of\\ |
62 \item @{term"case x of True \<Rightarrow> e\<^sub>1 | False \<Rightarrow> e\<^sub>2"} instead of\\ |
63 @{text"case x of True \<Rightarrow> e\<^isub>1 | False \<Rightarrow> e\<^isub>2"}. |
63 @{text"case x of True \<Rightarrow> e\<^sub>1 | False \<Rightarrow> e\<^sub>2"}. |
64 \end{itemize} |
64 \end{itemize} |
65 |
65 |
66 \subsection{Sets} |
66 \subsection{Sets} |
67 |
67 |
68 Although set syntax in HOL is already close to |
68 Although set syntax in HOL is already close to |
97 \item The @{text"@"} operation associates implicitly to the right, |
97 \item The @{text"@"} operation associates implicitly to the right, |
98 which leads to unpleasant line breaks if the term is too long for one |
98 which leads to unpleasant line breaks if the term is too long for one |
99 line. To avoid this, \texttt{OptionalSugar} contains syntax to group |
99 line. To avoid this, \texttt{OptionalSugar} contains syntax to group |
100 @{text"@"}-terms to the left before printing, which leads to better |
100 @{text"@"}-terms to the left before printing, which leads to better |
101 line breaking behaviour: |
101 line breaking behaviour: |
102 @{term[display]"term\<^isub>0 @ term\<^isub>1 @ term\<^isub>2 @ term\<^isub>3 @ term\<^isub>4 @ term\<^isub>5 @ term\<^isub>6 @ term\<^isub>7 @ term\<^isub>8 @ term\<^isub>9 @ term\<^isub>1\<^isub>0"} |
102 @{term[display]"term\<^sub>0 @ term\<^sub>1 @ term\<^sub>2 @ term\<^sub>3 @ term\<^sub>4 @ term\<^sub>5 @ term\<^sub>6 @ term\<^sub>7 @ term\<^sub>8 @ term\<^sub>9 @ term\<^sub>1\<^sub>0"} |
103 |
103 |
104 \end{itemize} |
104 \end{itemize} |
105 |
105 |
106 |
106 |
107 \subsection{Numbers} |
107 \subsection{Numbers} |
138 |
138 |
139 Hint: Setting \verb!show_question_marks! to \texttt{false} only |
139 Hint: Setting \verb!show_question_marks! to \texttt{false} only |
140 suppresses question marks; variables that end in digits, |
140 suppresses question marks; variables that end in digits, |
141 e.g. @{text"x1"}, are still printed with a trailing @{text".0"}, |
141 e.g. @{text"x1"}, are still printed with a trailing @{text".0"}, |
142 e.g. @{text"x1.0"}, their internal index. This can be avoided by |
142 e.g. @{text"x1.0"}, their internal index. This can be avoided by |
143 turning the last digit into a subscript: write \verb!x\<^isub>1! and |
143 turning the last digit into a subscript: write \verb!x\<^sub>1! and |
144 obtain the much nicer @{text"x\<^isub>1"}. *} |
144 obtain the much nicer @{text"x\<^sub>1"}. *} |
145 |
145 |
146 (*<*)declare [[show_question_marks = false]](*>*) |
146 (*<*)declare [[show_question_marks = false]](*>*) |
147 |
147 |
148 subsection {*Qualified names*} |
148 subsection {*Qualified names*} |
149 |
149 |