| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% MACROS FOR THE REFERENCE MANUAL OF COQ % |
| 3 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 4 |
|
| 5 |
% For commentaries (define \com as {} for the release manual) |
| 6 |
%\newcommand{\com}[1]{{\it(* #1 *)}} |
| 7 |
%\newcommand{\com}[1]{} |
| 8 |
|
| 9 |
%%OPTIONS for HACHA |
| 10 |
%\renewcommand{\cuttingunit}{section} |
| 11 |
|
| 12 |
|
| 13 |
%BEGIN LATEX |
| 14 |
\newenvironment{centerframe}% |
| 15 |
{\bgroup |
| 16 |
\dimen0=\textwidth |
| 17 |
\advance\dimen0 by -2\fboxrule |
| 18 |
\advance\dimen0 by -2\fboxsep |
| 19 |
\setbox0=\hbox\bgroup |
| 20 |
\begin{minipage}{\dimen0}% |
| 21 |
\begin{center}}% |
| 22 |
{\end{center}% |
| 23 |
\end{minipage}\egroup |
| 24 |
\centerline{\fbox{\box0}}\egroup |
| 25 |
} |
| 26 |
%END LATEX |
| 27 |
%HEVEA \newenvironment{centerframe}{\begin{center}}{\end{center}} |
| 28 |
|
| 29 |
%HEVEA \renewcommand{\vec}[1]{\mathbf{#1}} |
| 30 |
%\renewcommand{\ominus}{-} % Hevea does a good job translating these commands |
| 31 |
%\renewcommand{\oplus}{+} |
| 32 |
%\renewcommand{\otimes}{\times} |
| 33 |
%\newcommand{\land}{\wedge} |
| 34 |
%\newcommand{\lor}{\vee} |
| 35 |
%HEVEA \renewcommand{\k}[1]{#1} % \k{a} is supposed to produce a with a little stroke |
| 36 |
%HEVEA \newcommand{\phantom}[1]{\qquad} |
| 37 |
|
| 38 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 39 |
% Formatting commands % |
| 40 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 41 |
|
| 42 |
\newcommand{\ErrMsg}{\medskip \noindent {\bf Error message: }} |
| 43 |
\newcommand{\ErrMsgx}{\medskip \noindent {\bf Error messages: }} |
| 44 |
\newcommand{\variant}{\medskip \noindent {\bf Variant: }} |
| 45 |
\newcommand{\variants}{\medskip \noindent {\bf Variants: }} |
| 46 |
\newcommand{\SeeAlso}{\medskip \noindent {\bf See also: }} |
| 47 |
\newcommand{\Rem}{\medskip \noindent {\bf Remark: }} |
| 48 |
\newcommand{\Rems}{\medskip \noindent {\bf Remarks: }} |
| 49 |
\newcommand{\Example}{\medskip \noindent {\bf Example: }} |
| 50 |
\newcommand{\examples}{\medskip \noindent {\bf Examples: }} |
| 51 |
\newcommand{\Warning}{\medskip \noindent {\bf Warning: }} |
| 52 |
\newcommand{\Warns}{\medskip \noindent {\bf Warnings: }} |
| 53 |
\newcounter{ex} |
| 54 |
\newcommand{\firstexample}{\setcounter{ex}{1}} |
| 55 |
\newcommand{\example}[1]{ |
| 56 |
\medskip \noindent \textbf{Example \arabic{ex}: }\textit{#1} |
| 57 |
\addtocounter{ex}{1}} |
| 58 |
|
| 59 |
\newenvironment{Variant}{\variant\begin{enumerate}}{\end{enumerate}} |
| 60 |
\newenvironment{Variants}{\variants\begin{enumerate}}{\end{enumerate}} |
| 61 |
\newenvironment{ErrMsgs}{\ErrMsgx\begin{enumerate}}{\end{enumerate}} |
| 62 |
\newenvironment{Remarks}{\Rems\begin{enumerate}}{\end{enumerate}} |
| 63 |
\newenvironment{Warnings}{\Warns\begin{enumerate}}{\end{enumerate}} |
| 64 |
\newenvironment{Examples}{\medskip\noindent{\bf Examples:} |
| 65 |
\begin{enumerate}}{\end{enumerate}} |
| 66 |
|
| 67 |
%\newcommand{\bd}{\noindent\bf} |
| 68 |
%\newcommand{\sbd}{\vspace{8pt}\noindent\bf} |
| 69 |
%\newcommand{\sdoll}[1]{\begin{small}$ #1~ $\end{small}} |
| 70 |
%\newcommand{\sdollnb}[1]{\begin{small}$ #1 $\end{small}} |
| 71 |
\newcommand{\kw}[1]{\textsf{#1}} |
| 72 |
%\newcommand{\spec}[1]{\{\,#1\,\}} |
| 73 |
|
| 74 |
% Building regular expressions |
| 75 |
\newcommand{\zeroone}[1]{\mbox{\sl [}{#1}\mbox{\sl ]}} |
| 76 |
\newcommand{\zeroonelax}[1]{\mbox{\sl [}#1\mbox{\sl ]}} |
| 77 |
%\newcommand{\zeroonemany}[1]{$\{$#1$\}$*} |
| 78 |
%\newcommand{\onemany}[1]{$\{$#1$\}$+} |
| 79 |
\newcommand{\nelistnosep}[1]{{#1} \mbox{\dots} {#1}} |
| 80 |
\newcommand{\nelist}[2]{{#1} {\tt #2} \mbox{\dots} {\tt #2} {#1}} |
| 81 |
\newcommand{\sequence}[2]{{\sl [}{#1} {\tt #2} \mbox{\dots} {\tt #2} {#1}{\sl ]}} |
| 82 |
\newcommand{\nelistwithoutblank}[2]{#1{\tt #2}\mbox{\dots}{\tt #2}#1} |
| 83 |
\newcommand{\sequencewithoutblank}[2]{$[$#1{\tt #2}\mbox{\dots}{\tt #2}#1$]$} |
| 84 |
|
| 85 |
% Used for RefMan-gal |
| 86 |
%\newcommand{\ml}[1]{\hbox{\tt{#1}}} |
| 87 |
%\newcommand{\op}{\,|\,} |
| 88 |
|
| 89 |
%%%%%%%%%%%%%%%%%%%%%%%% |
| 90 |
% Trademarks and so on % |
| 91 |
%%%%%%%%%%%%%%%%%%%%%%%% |
| 92 |
|
| 93 |
\newcommand{\Coq}{\textsc{Coq}} |
| 94 |
\newcommand{\gallina}{\textsc{Gallina}} |
| 95 |
\newcommand{\Gallina}{\textsc{Gallina}} |
| 96 |
\newcommand{\RocqIDE}{\textsc{RocqIDE}} |
| 97 |
\newcommand{\ocaml}{\textsc{OCaml}} |
| 98 |
\newcommand{\camlpppp}{\textsc{Camlp5}} |
| 99 |
\newcommand{\emacs}{\textsc{GNU Emacs}} |
| 100 |
\newcommand{\ProofGeneral}{\textsc{Proof General}} |
| 101 |
\newcommand{\CIC}{\textsc{Cic}} |
| 102 |
\newcommand{\iCIC}{\textsc{Cic}} |
| 103 |
\newcommand{\FW}{\ensuremath{F_{\omega}}} |
| 104 |
\newcommand{\Program}{\textsc{Program}} |
| 105 |
\newcommand{\Russell}{\textsc{Russell}} |
| 106 |
\newcommand{\PVS}{\textsc{PVS}} |
| 107 |
%\newcommand{\bn}{{\sf BNF}} |
| 108 |
|
| 109 |
%%%%%%%%%%%%%%%%%%% |
| 110 |
% Name of tactics % |
| 111 |
%%%%%%%%%%%%%%%%%%% |
| 112 |
|
| 113 |
%\newcommand{\Natural}{\mbox{\tt Natural}} |
| 114 |
|
| 115 |
%%%%%%%%%%%%%%%%% |
| 116 |
% \rm\sl series % |
| 117 |
%%%%%%%%%%%%%%%%% |
| 118 |
|
| 119 |
\newcommand{\nterm}[1]{\textrm{\textsl{#1}}} |
| 120 |
|
| 121 |
\newcommand{\qstring}{\nterm{string}} |
| 122 |
|
| 123 |
%% New syntax specific entries |
| 124 |
\newcommand{\annotation}{\nterm{annotation}} |
| 125 |
\newcommand{\assums}{\nterm{assums}} % vernac |
| 126 |
\newcommand{\simpleassums}{\nterm{simple\_assums}} % assumptions |
| 127 |
\newcommand{\binder}{\nterm{binder}} |
| 128 |
\newcommand{\binders}{\nterm{binders}} |
| 129 |
\newcommand{\caseitems}{\nterm{match\_items}} |
| 130 |
\newcommand{\caseitem}{\nterm{match\_item}} |
| 131 |
\newcommand{\eqn}{\nterm{equation}} |
| 132 |
\newcommand{\ifitem}{\nterm{dep\_ret\_type}} |
| 133 |
\newcommand{\hyplocation}{\nterm{hyp\_location}} |
| 134 |
\newcommand{\convclause}{\nterm{conversion\_clause}} |
| 135 |
\newcommand{\occclause}{\nterm{occurrence\_clause}} |
| 136 |
\newcommand{\occgoalset}{\nterm{goal\_occurrences}} |
| 137 |
\newcommand{\atoccurrences}{\nterm{at\_occurrences}} |
| 138 |
\newcommand{\occlist}{\nterm{occurrences}} |
| 139 |
\newcommand{\params}{\nterm{params}} % vernac |
| 140 |
\newcommand{\returntype}{\nterm{return\_type}} |
| 141 |
\newcommand{\idparams}{\nterm{ident\_with\_params}} |
| 142 |
\newcommand{\statkwd}{\nterm{assertion\_keyword}} % vernac |
| 143 |
\newcommand{\termarg}{\nterm{arg}} |
| 144 |
\newcommand{\hintdef}{\nterm{hint\_definition}} |
| 145 |
|
| 146 |
\newcommand{\typecstr}{\zeroone{{\tt :}~{\term}}} |
| 147 |
\newcommand{\typecstrwithoutblank}{\zeroone{{\tt :}{\term}}} |
| 148 |
\newcommand{\typecstrtype}{\zeroone{{\tt :}~{\type}}} |
| 149 |
|
| 150 |
\newcommand{\Fwterm}{\nterm{Fwterm}} |
| 151 |
\newcommand{\Index}{\nterm{index}} |
| 152 |
\newcommand{\abbrev}{\nterm{abbreviation}} |
| 153 |
\newcommand{\atomictac}{\nterm{atomic\_tactic}} |
| 154 |
\newcommand{\bindinglist}{\nterm{bindings\_list}} |
| 155 |
\newcommand{\cast}{\nterm{cast}} |
| 156 |
\newcommand{\cofixpointbodies}{\nterm{cofix\_bodies}} |
| 157 |
\newcommand{\cofixpointbody}{\nterm{cofix\_body}} |
| 158 |
\newcommand{\commandtac}{\nterm{tactic\_invocation}} |
| 159 |
\newcommand{\constructor}{\nterm{constructor}} |
| 160 |
\newcommand{\convtactic}{\nterm{conv\_tactic}} |
| 161 |
\newcommand{\assumptionkeyword}{\nterm{assumption\_keyword}} |
| 162 |
\newcommand{\assumption}{\nterm{assumption}} |
| 163 |
\newcommand{\definition}{\nterm{definition}} |
| 164 |
\newcommand{\digit}{\nterm{digit}} |
| 165 |
\newcommand{\exteqn}{\nterm{ext\_eqn}} |
| 166 |
\newcommand{\field}{\nterm{field}} |
| 167 |
\newcommand{\fielddef}{\nterm{field\_def}} |
| 168 |
\newcommand{\firstletter}{\nterm{first\_letter}} |
| 169 |
\newcommand{\fixpg}{\nterm{fix\_pgm}} |
| 170 |
\newcommand{\fixpointbodies}{\nterm{fix\_bodies}} |
| 171 |
\newcommand{\fixpointbody}{\nterm{fix\_body}} |
| 172 |
\newcommand{\fixpoint}{\nterm{fixpoint}} |
| 173 |
\newcommand{\flag}{\nterm{flag}} |
| 174 |
\newcommand{\form}{\nterm{form}} |
| 175 |
\newcommand{\entry}{\nterm{entry}} |
| 176 |
\newcommand{\proditem}{\nterm{prod\_item}} |
| 177 |
\newcommand{\taclevel}{\nterm{tactic\_level}} |
| 178 |
\newcommand{\tacargtype}{\nterm{tactic\_argument\_type}} |
| 179 |
\newcommand{\scope}{\nterm{scope}} |
| 180 |
\newcommand{\delimkey}{\nterm{key}} |
| 181 |
\newcommand{\optscope}{\nterm{opt\_scope}} |
| 182 |
\newcommand{\declnotation}{\nterm{decl\_notation}} |
| 183 |
\newcommand{\symbolentry}{\nterm{symbol}} |
| 184 |
\newcommand{\modifiers}{\nterm{modifiers}} |
| 185 |
\newcommand{\binderinterp}{\nterm{binder\_interp}} |
| 186 |
\newcommand{\localdef}{\nterm{local\_def}} |
| 187 |
\newcommand{\localdecls}{\nterm{local\_decls}} |
| 188 |
\newcommand{\ident}{\nterm{ident}} |
| 189 |
\newcommand{\accessident}{\nterm{access\_ident}} |
| 190 |
\newcommand{\possiblybracketedident}{\nterm{possibly\_bracketed\_ident}} |
| 191 |
\newcommand{\inductivebody}{\nterm{ind\_body}} |
| 192 |
\newcommand{\inductive}{\nterm{inductive}} |
| 193 |
\newcommand{\naturalnumber}{\nterm{natural}} |
| 194 |
\newcommand{\integer}{\nterm{integer}} |
| 195 |
\newcommand{\multpattern}{\nterm{mult\_pattern}} |
| 196 |
\newcommand{\mutualcoinductive}{\nterm{mutual\_coinductive}} |
| 197 |
\newcommand{\mutualinductive}{\nterm{mutual\_inductive}} |
| 198 |
\newcommand{\nestedpattern}{\nterm{nested\_pattern}} |
| 199 |
\newcommand{\name}{\nterm{name}} |
| 200 |
\newcommand{\num}{\nterm{num}} |
| 201 |
\newcommand{\pattern}{\nterm{pattern}} % pattern for pattern-matching |
| 202 |
\newcommand{\orpattern}{\nterm{or\_pattern}} |
| 203 |
\newcommand{\intropattern}{\nterm{intro\_pattern}} |
| 204 |
\newcommand{\intropatternlist}{\nterm{intro\_pattern\_list}} |
| 205 |
\newcommand{\disjconjintropattern}{\nterm{disj\_conj\_intro\_pattern}} |
| 206 |
\newcommand{\namingintropattern}{\nterm{naming\_intro\_pattern}} |
| 207 |
\newcommand{\termpattern}{\nterm{term\_pattern}} % term with holes |
| 208 |
\newcommand{\pat}{\nterm{pat}} |
| 209 |
\newcommand{\pgs}{\nterm{pgms}} |
| 210 |
\newcommand{\pg}{\nterm{pgm}} |
| 211 |
\newcommand{\abullet}{\nterm{bullet}} |
| 212 |
%BEGIN LATEX |
| 213 |
\newcommand{\proof}{\nterm{proof}} |
| 214 |
%END LATEX |
| 215 |
%HEVEA \renewcommand{\proof}{\nterm{proof}} |
| 216 |
\newcommand{\record}{\nterm{record}} |
| 217 |
\newcommand{\recordkw}{\nterm{record\_keyword}} |
| 218 |
\newcommand{\rewrule}{\nterm{rewriting\_rule}} |
| 219 |
\newcommand{\sentence}{\nterm{sentence}} |
| 220 |
\newcommand{\simplepattern}{\nterm{simple\_pattern}} |
| 221 |
\newcommand{\sort}{\nterm{sort}} |
| 222 |
\newcommand{\specif}{\nterm{specif}} |
| 223 |
\newcommand{\assertion}{\nterm{assertion}} |
| 224 |
\newcommand{\str}{\nterm{string}} |
| 225 |
\newcommand{\subsequentletter}{\nterm{subsequent\_letter}} |
| 226 |
\newcommand{\switch}{\nterm{switch}} |
| 227 |
\newcommand{\messagetoken}{\nterm{message\_token}} |
| 228 |
\newcommand{\tac}{\nterm{tactic}} |
| 229 |
\newcommand{\terms}{\nterm{terms}} |
| 230 |
\newcommand{\term}{\nterm{term}} |
| 231 |
\newcommand{\module}{\nterm{module}} |
| 232 |
\newcommand{\modexpr}{\nterm{module\_expression}} |
| 233 |
\newcommand{\modtype}{\nterm{module\_type}} |
| 234 |
\newcommand{\onemodbinding}{\nterm{module\_binding}} |
| 235 |
\newcommand{\modbindings}{\nterm{module\_bindings}} |
| 236 |
\newcommand{\qualid}{\nterm{qualid}} |
| 237 |
\newcommand{\qualidorstring}{\nterm{qualid\_or\_string}} |
| 238 |
\newcommand{\class}{\nterm{class}} |
| 239 |
\newcommand{\dirpath}{\nterm{dirpath}} |
| 240 |
\newcommand{\typedidents}{\nterm{typed\_idents}} |
| 241 |
\newcommand{\type}{\nterm{type}} |
| 242 |
\newcommand{\vref}{\nterm{ref}} |
| 243 |
\newcommand{\zarithformula}{\nterm{zarith\_formula}} |
| 244 |
\newcommand{\zarith}{\nterm{zarith}} |
| 245 |
\newcommand{\ltac}{\mbox{${\mathcal{L}}_{tac}$}} |
| 246 |
|
| 247 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 248 |
% \mbox{\sf } series for roman text in maths formulas % |
| 249 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 250 |
|
| 251 |
\newcommand{\alors}{\mbox{\textsf{then}}} |
| 252 |
\newcommand{\alter}{\mbox{\textsf{alter}}} |
| 253 |
\newcommand{\bool}{\mbox{\textsf{bool}}} |
| 254 |
\newcommand{\conc}{\mbox{\textsf{conc}}} |
| 255 |
\newcommand{\cons}{\mbox{\textsf{cons}}} |
| 256 |
\newcommand{\consf}{\mbox{\textsf{consf}}} |
| 257 |
\newcommand{\emptyf}{\mbox{\textsf{emptyf}}} |
| 258 |
\newcommand{\EqSt}{\mbox{\textsf{EqSt}}} |
| 259 |
\newcommand{\false}{\mbox{\textsf{false}}} |
| 260 |
\newcommand{\filter}{\mbox{\textsf{filter}}} |
| 261 |
\newcommand{\forest}{\mbox{\textsf{forest}}} |
| 262 |
\newcommand{\from}{\mbox{\textsf{from}}} |
| 263 |
\newcommand{\hd}{\mbox{\textsf{hd}}} |
| 264 |
\newcommand{\haslength}{\mbox{\textsf{has\_length}}} |
| 265 |
\newcommand{\length}{\mbox{\textsf{length}}} |
| 266 |
\newcommand{\haslengthA}{\mbox {\textsf{has\_length~A}}} |
| 267 |
\newcommand{\List}{\mbox{\textsf{list}}} |
| 268 |
\newcommand{\ListA}{\mbox{\textsf{list}}~\ensuremath{A}} |
| 269 |
\newcommand{\nilhl}{\mbox{\textsf{nil\_hl}}} |
| 270 |
\newcommand{\conshl}{\mbox{\textsf{cons\_hl}}} |
| 271 |
\newcommand{\nat}{\mbox{\textsf{nat}}} |
| 272 |
\newcommand{\nO}{\mbox{\textsf{O}}} |
| 273 |
\newcommand{\nS}{\mbox{\textsf{S}}} |
| 274 |
\newcommand{\node}{\mbox{\textsf{node}}} |
| 275 |
\newcommand{\Nil}{\mbox{\textsf{nil}}} |
| 276 |
\newcommand{\SProp}{\mbox{\textsf{SProp}}} |
| 277 |
\newcommand{\Prop}{\mbox{\textsf{Prop}}} |
| 278 |
\newcommand{\Set}{\mbox{\textsf{Set}}} |
| 279 |
\newcommand{\si}{\mbox{\textsf{if}}} |
| 280 |
\newcommand{\sinon}{\mbox{\textsf{else}}} |
| 281 |
\newcommand{\Str}{\mbox{\textsf{Stream}}} |
| 282 |
\newcommand{\tl}{\mbox{\textsf{tl}}} |
| 283 |
\newcommand{\tree}{\mbox{\textsf{tree}}} |
| 284 |
\newcommand{\true}{\mbox{\textsf{true}}} |
| 285 |
\newcommand{\Type}{\mbox{\textsf{Type}}} |
| 286 |
\newcommand{\unfold}{\mbox{\textsf{unfold}}} |
| 287 |
\newcommand{\zeros}{\mbox{\textsf{zeros}}} |
| 288 |
\newcommand{\even}{\mbox{\textsf{even}}} |
| 289 |
\newcommand{\odd}{\mbox{\textsf{odd}}} |
| 290 |
\newcommand{\evenO}{\mbox{\textsf{even\_O}}} |
| 291 |
\newcommand{\evenS}{\mbox{\textsf{even\_S}}} |
| 292 |
\newcommand{\oddS}{\mbox{\textsf{odd\_S}}} |
| 293 |
\newcommand{\Prod}{\mbox{\textsf{prod}}} |
| 294 |
\newcommand{\Pair}{\mbox{\textsf{pair}}} |
| 295 |
|
| 296 |
%%%%%%%%% |
| 297 |
% Misc. % |
| 298 |
%%%%%%%%% |
| 299 |
\newcommand{\T}{\texttt{T}} |
| 300 |
\newcommand{\U}{\texttt{U}} |
| 301 |
\newcommand{\real}{\textsf{Real}} |
| 302 |
\newcommand{\Data}{\textit{Data}} |
| 303 |
\newcommand{\In} {{\textbf{in }}} |
| 304 |
\newcommand{\AND} {{\textbf{and}}} |
| 305 |
\newcommand{\If}{{\textbf{if }}} |
| 306 |
\newcommand{\Else}{{\textbf{else }}} |
| 307 |
\newcommand{\Then} {{\textbf{then }}} |
| 308 |
%\newcommand{\Let}{{\textbf{let }}} % looks like this is never used |
| 309 |
\newcommand{\Where}{{\textbf{where rec }}} |
| 310 |
\newcommand{\Function}{{\textbf{function }}} |
| 311 |
\newcommand{\Rec}{{\textbf{rec }}} |
| 312 |
%\newcommand{\cn}{\centering} |
| 313 |
\newcommand{\nth}{\mbox{$^{\mbox{\scriptsize th}}$}} |
| 314 |
|
| 315 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 316 |
% Math commands and symbols % |
| 317 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 318 |
|
| 319 |
\newcommand{\la}{\leftarrow} |
| 320 |
\newcommand{\ra}{\rightarrow} |
| 321 |
\newcommand{\Ra}{\Rightarrow} |
| 322 |
\newcommand{\rt}{\Rightarrow} |
| 323 |
\newcommand{\lla}{\longleftarrow} |
| 324 |
\newcommand{\lra}{\longrightarrow} |
| 325 |
\newcommand{\Llra}{\Longleftrightarrow} |
| 326 |
\newcommand{\mt}{\mapsto} |
| 327 |
\newcommand{\ov}{\overrightarrow} |
| 328 |
\newcommand{\wh}{\widehat} |
| 329 |
\newcommand{\up}{\uparrow} |
| 330 |
\newcommand{\dw}{\downarrow} |
| 331 |
\newcommand{\nr}{\nearrow} |
| 332 |
\newcommand{\se}{\searrow} |
| 333 |
\newcommand{\sw}{\swarrow} |
| 334 |
\newcommand{\nw}{\nwarrow} |
| 335 |
\newcommand{\mto}{.\;} |
| 336 |
|
| 337 |
\newcommand{\vm}[1]{\vspace{#1em}} |
| 338 |
\newcommand{\vx}[1]{\vspace{#1ex}} |
| 339 |
\newcommand{\hm}[1]{\hspace{#1em}} |
| 340 |
\newcommand{\hx}[1]{\hspace{#1ex}} |
| 341 |
\newcommand{\sm}{\mbox{ }} |
| 342 |
\newcommand{\mx}{\mbox} |
| 343 |
|
| 344 |
%\newcommand{\nq}{\neq} |
| 345 |
%\newcommand{\eq}{\equiv} |
| 346 |
\newcommand{\fa}{\forall} |
| 347 |
%\newcommand{\ex}{\exists} |
| 348 |
\newcommand{\impl}{\rightarrow} |
| 349 |
%\newcommand{\Or}{\vee} |
| 350 |
%\newcommand{\And}{\wedge} |
| 351 |
\newcommand{\ms}{\models} |
| 352 |
\newcommand{\bw}{\bigwedge} |
| 353 |
\newcommand{\ts}{\times} |
| 354 |
\newcommand{\cc}{\circ} |
| 355 |
%\newcommand{\es}{\emptyset} |
| 356 |
%\newcommand{\bs}{\backslash} |
| 357 |
\newcommand{\vd}{\vdash} |
| 358 |
%\newcommand{\lan}{{\langle }} |
| 359 |
%\newcommand{\ran}{{\rangle }} |
| 360 |
|
| 361 |
%\newcommand{\al}{\alpha} |
| 362 |
\newcommand{\bt}{\beta} |
| 363 |
%\newcommand{\io}{\iota} |
| 364 |
\newcommand{\lb}{\lambda} |
| 365 |
%\newcommand{\sg}{\sigma} |
| 366 |
%\newcommand{\sa}{\Sigma} |
| 367 |
%\newcommand{\om}{\Omega} |
| 368 |
%\newcommand{\tu}{\tau} |
| 369 |
|
| 370 |
%%%%%%%%%%%%%%%%%%%%%%%%% |
| 371 |
% Custom maths commands % |
| 372 |
%%%%%%%%%%%%%%%%%%%%%%%%% |
| 373 |
|
| 374 |
\newcommand{\sumbool}[2]{\{#1\}+\{#2\}} |
| 375 |
\newcommand{\myifthenelse}[3]{\kw{if} ~ #1 ~\kw{then} ~ #2 ~ \kw{else} ~ #3} |
| 376 |
\newcommand{\fun}[2]{\item[]{\tt {#1}}. \quad\\ #2} |
| 377 |
\newcommand{\WF}[2]{\ensuremath{{\mathcal{W\!F}}(#1)[#2]}} |
| 378 |
\newcommand{\WFTWOLINES}[2]{\ensuremath{{\mathcal{W\!F}}\begin{array}{l}(#1)\\\mbox{}[{#2}]\end{array}}} |
| 379 |
\newcommand{\WFE}[1]{\WF{E}{#1}} |
| 380 |
\newcommand{\WT}[4]{\ensuremath{#1[#2] \vdash #3 : #4}} |
| 381 |
\newcommand{\WTE}[3]{\WT{E}{#1}{#2}{#3}} |
| 382 |
\newcommand{\WTEG}[2]{\WTE{\Gamma}{#1}{#2}} |
| 383 |
|
| 384 |
\newcommand{\WTM}[3]{\WT{#1}{}{#2}{#3}} |
| 385 |
\newcommand{\WFT}[2]{\ensuremath{#1[] \vdash {\mathcal{W\!F}}(#2)}} |
| 386 |
\newcommand{\WS}[3]{\ensuremath{#1[] \vdash #2 <: #3}} |
| 387 |
\newcommand{\WSE}[2]{\WS{E}{#1}{#2}} |
| 388 |
\newcommand{\WEV}[3]{\mbox{$#1[] \vdash #2 \lra #3$}} |
| 389 |
\newcommand{\WEVT}[3]{\mbox{$#1[] \vdash #2 \lra$}\\ \mbox{$ #3$}} |
| 390 |
|
| 391 |
\newcommand{\WTRED}[5]{\mbox{$#1[#2] \vdash #3 #4 #5$}} |
| 392 |
\newcommand{\WTERED}[4]{\mbox{$E[#1] \vdash #2 #3 #4$}} |
| 393 |
\newcommand{\WTELECONV}[3]{\WTERED{#1}{#2}{\leconvert}{#3}} |
| 394 |
\newcommand{\WTEGRED}[3]{\WTERED{\Gamma}{#1}{#2}{#3}} |
| 395 |
\newcommand{\WTECONV}[3]{\WTERED{#1}{#2}{\convert}{#3}} |
| 396 |
\newcommand{\WTEGCONV}[2]{\WTERED{\Gamma}{#1}{\convert}{#2}} |
| 397 |
\newcommand{\WTEGLECONV}[2]{\WTERED{\Gamma}{#1}{\leconvert}{#2}} |
| 398 |
|
| 399 |
\newcommand{\lab}[1]{\mathit{labels}(#1)} |
| 400 |
\newcommand{\dom}[1]{\mathit{dom}(#1)} |
| 401 |
|
| 402 |
\newcommand{\CI}[2]{\mbox{$\{#1\}^{#2}$}} |
| 403 |
\newcommand{\CIP}[3]{\mbox{$\{#1\}_{#2}^{#3}$}} |
| 404 |
\newcommand{\CIPV}[1]{\CIP{#1}{I_1.. I_k}{P_1.. P_k}} |
| 405 |
\newcommand{\CIPI}[1]{\CIP{#1}{I}{P}} |
| 406 |
\newcommand{\CIF}[1]{\mbox{$\{#1\}_{f_1.. f_n}$}} |
| 407 |
%BEGIN LATEX |
| 408 |
\newcommand{\NInd}[3]{\mbox{{\sf Ind}$(\begin{array}[t]{@{}l}#2:=#3 |
| 409 |
\,)\end{array}$}} |
| 410 |
\newcommand{\Ind}[4]{\mbox{{\sf Ind}$[#2](\begin{array}[t]{@{}l@{}}#3:=#4 |
| 411 |
\,)\end{array}$}} |
| 412 |
%END LATEX |
| 413 |
%HEVEA \newcommand{\NInd}[3]{\mbox{{\sf Ind}$(#2\,:=\,#3)$}} |
| 414 |
%HEVEA \newcommand{\Ind}[4]{\mbox{{\sf Ind}$[#2](#3\,:=\,#4)$}} |
| 415 |
|
| 416 |
\newcommand{\Indp}[5]{\mbox{{\sf Ind}$_{#5}(#1)[#2](\begin{array}[t]{@{}l}#3:=#4 |
| 417 |
\,)\end{array}$}} |
| 418 |
\newcommand{\Indpstr}[6]{\mbox{{\sf Ind}$_{#5}(#1)[#2](\begin{array}[t]{@{}l}#3:=#4 |
| 419 |
\,)/{#6}\end{array}$}} |
| 420 |
\newcommand{\Def}[4]{\mbox{{\sf Def}$(#1)(#2:=#3:#4)$}} |
| 421 |
\newcommand{\Assum}[3]{\mbox{{\sf Assum}$(#1)(#2:#3)$}} |
| 422 |
\newcommand{\Match}[3]{\mbox{$<\!#1\!>\!{\mbox{\tt Match}}~#2~{\mbox{\tt with}}~#3~{\mbox{\tt end}}$}} |
| 423 |
\newcommand{\Case}[3]{\mbox{$\kw{case}(#2,#1,#3)$}} |
| 424 |
\newcommand{\match}[3]{\mbox{$\kw{match}~ #2 ~\kw{with}~ #3 ~\kw{end}$}} |
| 425 |
\newcommand{\Fix}[2]{\mbox{\tt Fix}~#1\{#2\}} |
| 426 |
\newcommand{\CoFix}[2]{\mbox{\tt CoFix}~#1\{#2\}} |
| 427 |
\newcommand{\With}[2]{\mbox{\tt ~with~}} |
| 428 |
\newcommand{\letin}[3]{\kw{let}~#1:=#2~\kw{in}~#3} |
| 429 |
\newcommand{\subst}[3]{#1\{#2/#3\}} |
| 430 |
\newcommand{\substs}[4]{#1\{(#2/#3)_{#4}\}} |
| 431 |
\newcommand{\Sort}{\mbox{$\mathcal{S}$}} |
| 432 |
\newcommand{\convert}{=_{\beta\delta\iota\zeta\eta}} |
| 433 |
\newcommand{\leconvert}{\leq_{\beta\delta\iota\zeta\eta}} |
| 434 |
\newcommand{\NN}{\mathbb{N}} |
| 435 |
\newcommand{\inference}[1]{$${#1}$$} |
| 436 |
|
| 437 |
\newcommand{\compat}[2]{\mbox{$[#1|#2]$}} |
| 438 |
\newcommand{\tristackrel}[3]{\mathrel{\mathop{#2}\limits_{#3}^{#1}}} |
| 439 |
|
| 440 |
\newcommand{\Impl}{{\it Impl}} |
| 441 |
\newcommand{\elem}{{\it e}} |
| 442 |
\newcommand{\Mod}[3]{{\sf Mod}({#1}:{#2}\,\zeroone{:={#3}})} |
| 443 |
\newcommand{\ModS}[2]{{\sf Mod}({#1}:{#2})} |
| 444 |
\newcommand{\ModType}[2]{{\sf ModType}({#1}:={#2})} |
| 445 |
\newcommand{\ModA}[2]{{\sf ModA}({#1}=={#2})} |
| 446 |
\newcommand{\functor}[3]{\ensuremath{{\sf Functor}(#1:#2)\;#3}} |
| 447 |
\newcommand{\funsig}[3]{\ensuremath{{\sf Funsig}(#1:#2)\;#3}} |
| 448 |
\newcommand{\sig}[1]{\ensuremath{{\sf Sig}~#1~{\sf End}}} |
| 449 |
\newcommand{\struct}[1]{\ensuremath{{\sf Struct}~#1~{\sf End}}} |
| 450 |
\newcommand{\structe}[1]{\ensuremath{ |
| 451 |
{\sf Struct}~\elem_1;\ldots;\elem_i;#1;\elem_{i+2};\ldots |
| 452 |
;\elem_n~{\sf End}}} |
| 453 |
\newcommand{\structes}[2]{\ensuremath{ |
| 454 |
{\sf Struct}~\elem_1;\ldots;\elem_i;#1;\elem_{i+2}\{#2\} |
| 455 |
;\ldots;\elem_n\{#2\}~{\sf End}}} |
| 456 |
\newcommand{\with}[3]{\ensuremath{#1~{\sf with}~#2 := #3}} |
| 457 |
|
| 458 |
\newcommand{\Spec}{{\it Spec}} |
| 459 |
\newcommand{\ModSEq}[3]{{\sf Mod}({#1}:{#2}:={#3})} |
| 460 |
|
| 461 |
|
| 462 |
%\newbox\tempa |
| 463 |
%\newbox\tempb |
| 464 |
%\newdimen\tempc |
| 465 |
%\newcommand{\mud}[1]{\hfil $\displaystyle{\mathstrut #1}$\hfil} |
| 466 |
%\newcommand{\rig}[1]{\hfil $\displaystyle{#1}$} |
| 467 |
% \newcommand{\irulehelp}[3]{\setbox\tempa=\hbox{$\displaystyle{\mathstrut #2}$}% |
| 468 |
% \setbox\tempb=\vbox{\halign{##\cr |
| 469 |
% \mud{#1}\cr |
| 470 |
% \noalign{\vskip\the\lineskip} |
| 471 |
% \noalign{\hrule height 0pt} |
| 472 |
% \rig{\vbox to 0pt{\vss\hbox to 0pt{${\; #3}$\hss}\vss}}\cr |
| 473 |
% \noalign{\hrule} |
| 474 |
% \noalign{\vskip\the\lineskip} |
| 475 |
% \mud{\copy\tempa}\cr}} |
| 476 |
% \tempc=\wd\tempb |
| 477 |
% \advance\tempc by \wd\tempa |
| 478 |
% \divide\tempc by 2 } |
| 479 |
% \newcommand{\irule}[3]{{\irulehelp{#1}{#2}{#3} |
| 480 |
% \hbox to \wd\tempa{\hss \box\tempb \hss}}} |
| 481 |
|
| 482 |
\newcommand{\sverb}[1]{{\tt #1}} |
| 483 |
\newcommand{\mover}[2]{{#1\over #2}} |
| 484 |
\newcommand{\jd}[2]{#1 \vdash #2} |
| 485 |
\newcommand{\mathline}[1]{\[#1\]} |
| 486 |
\newcommand{\zrule}[2]{#2: #1} |
| 487 |
\newcommand{\orule}[3]{#3: {\mover{#1}{#2}}} |
| 488 |
\newcommand{\trule}[4]{#4: \mover{#1 \qquad #2} {#3}} |
| 489 |
\newcommand{\thrule}[5]{#5: {\mover{#1 \qquad #2 \qquad #3}{#4}}} |
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
% placement of figures |
| 494 |
|
| 495 |
%BEGIN LATEX |
| 496 |
\renewcommand{\topfraction}{.99} |
| 497 |
\renewcommand{\bottomfraction}{.99} |
| 498 |
\renewcommand{\textfraction}{.01} |
| 499 |
\renewcommand{\floatpagefraction}{.9} |
| 500 |
%END LATEX |
| 501 |
|
| 502 |
% Macros Bruno pour description de la syntaxe |
| 503 |
|
| 504 |
\def\bfbar{\ensuremath{|\hskip -0.22em{}|\hskip -0.24em{}|}} |
| 505 |
\def\TERMbar{\bfbar} |
| 506 |
\def\TERMbarbar{\bfbar\bfbar} |
| 507 |
|
| 508 |
|
| 509 |
%% Macros pour les grammaires |
| 510 |
\def\GR#1{\text{\large(}#1\text{\large)}} |
| 511 |
\def\NT#1{\langle\textit{#1}\rangle} |
| 512 |
\def\NTL#1#2{\langle\textit{#1}\rangle_{#2}} |
| 513 |
\def\TERM#1{{\bf\textrm{\bf #1}}} |
| 514 |
%\def\TERM#1{{\bf\textsf{#1}}} |
| 515 |
\def\KWD#1{\TERM{#1}} |
| 516 |
\def\ETERM#1{\TERM{#1}} |
| 517 |
\def\CHAR#1{\TERM{#1}} |
| 518 |
|
| 519 |
\def\STAR#1{#1*} |
| 520 |
\def\STARGR#1{\GR{#1}*} |
| 521 |
\def\PLUS#1{#1+} |
| 522 |
\def\PLUSGR#1{\GR{#1}+} |
| 523 |
\def\OPT#1{#1?} |
| 524 |
\def\OPTGR#1{\GR{#1}?} |
| 525 |
%% Tableaux de definition de non-terminaux |
| 526 |
\newenvironment{cadre} |
| 527 |
{\begin{array}{|c|}\hline\\} |
| 528 |
{\\\\\hline\end{array}} |
| 529 |
\newenvironment{rulebox} |
| 530 |
{$$\begin{cadre}\begin{array}{r@{~}c@{~}l@{}l@{}r}} |
| 531 |
{\end{array}\end{cadre}$$} |
| 532 |
\def\DEFNT#1{\NT{#1} & ::= &} |
| 533 |
\def\EXTNT#1{\NT{#1} & ::= & ... \\&|&} |
| 534 |
\def\RNAME#1{(\textsc{#1})} |
| 535 |
\def\SEPDEF{\\\\} |
| 536 |
\def\nlsep{\\&|&} |
| 537 |
\def\nlcont{\\&&} |
| 538 |
\newenvironment{rules} |
| 539 |
{\begin{center}\begin{rulebox}} |
| 540 |
{\end{rulebox}\end{center}} |
| 541 |
|
| 542 |
|
| 543 |
%%% Local Variables: |
| 544 |
%%% mode: latex |
| 545 |
%%% TeX-master: "Reference-Manual" |
| 546 |
%%% End: |