2 <!-- ============ Commands ====================== -->
3 <chapter id="sec_commands">
4 <title>Other commands</title>
5 <sect1 id="command_alias">
7 <para><userinput>alias id "s" = "def"</userinput></para>
8 <para><userinput>alias symbol "s" (instance n) = "def"</userinput></para>
9 <para><userinput>alias num (instance n) = "def"</userinput></para>
12 <varlistentry role="tactic.synopsis">
13 <term>Synopsis:</term>
15 <para><emphasis role="bold">alias</emphasis>
16 [<emphasis role="bold">id</emphasis> <emphasis role="bold">"</emphasis>&string;<emphasis role="bold">"</emphasis> <emphasis role="bold">=</emphasis> <emphasis role="bold">"</emphasis>&string;<emphasis role="bold">"</emphasis>
17 | <emphasis role="bold">symbol</emphasis> <emphasis role="bold">"</emphasis>&string;<emphasis role="bold">"</emphasis> [<emphasis role="bold">(instance</emphasis> &nat;<emphasis role="bold">)</emphasis>] <emphasis role="bold">=</emphasis> <emphasis role="bold">"</emphasis>&string;<emphasis role="bold">"</emphasis>
18 | <emphasis role="bold">num</emphasis> [<emphasis role="bold">(instance</emphasis> &nat;<emphasis role="bold">)</emphasis>] <emphasis role="bold">=</emphasis> <emphasis role="bold">"</emphasis>&string;<emphasis role="bold">"</emphasis>
26 <para>Used to give an hint to the disambiguating parser.
27 When the parser is faced to the identifier (or symbol)
28 <command>s</command> or to any number, it will prefer
29 interpretations that "map <command>s</command> (or the
30 number) to <command>def</command>". For identifiers,
31 "def" is the URI of the interpretation.
32 E.g.: <command>cic:/matita/nat/nat.ind#xpointer(1/1/1)</command>
33 for the first constructor of the first inductive type defined
34 in the block of inductive type(s)
35 <command>cic:/matita/nat/nat.ind</command>.
36 For symbols and numbers, "def" is the label used to
38 <link linkend="interpretation">interpretation</link>.
40 <para>When a symbol or a number occurs several times in the
41 term to be parsed, it is possible to give an hint only for the
42 instance <command>n</command>. When the instance is omitted,
43 the hint is valid for every occurrence.
46 Hints are automatically inserted in the script by Matita every
47 time the user is interactively asked a question to disambiguate
48 a term. This way the user won't be posed the same question twice
49 when the script will be executed again.</para>
55 <sect1 id="command_check">
57 <para><userinput>check t</userinput></para>
60 <varlistentry role="tactic.synopsis">
61 <term>Synopsis:</term>
63 <para><emphasis role="bold">check &term;</emphasis>
70 <para>Opens a CIC browser window that shows <command>t</command>
71 together with its type. The command is immediately removed from
78 <sect1 id="command_coercion">
79 <title>coercion</title>
80 <para><userinput>coercion u</userinput></para>
83 <varlistentry role="tactic.synopsis">
84 <term>Synopsis:</term>
86 <para><emphasis role="bold">coercion &uri;</emphasis>
93 <para>Declares <command>u</command> as an implicit coercion
94 from the type of its last argument (source)
95 to its codomain (target). Every time a term <command>x</command>
96 of type source is used with expected type target, Matita
97 automatically replaces <command>x</command> with
98 <command>(u ? … ? x)</command> to avoid a typing error.</para>
99 <para>Implicit coercions are not displayed to the user:
100 <command>(u ? … ? x)</command> is rendered simply
101 as <command>x</command>.</para>
102 <para>When a coercion <command>u</command> is declared
103 from source <command>s</command> to target <command>t</command>
104 and there is already a coercion <command>u'</command> of
105 target <command>s</command> or source <command>t</command>,
106 a composite implicit coercion is automatically computed
113 <sect1 id="command_default">
114 <title>default</title>
115 <para><userinput></userinput></para>
118 <varlistentry role="tactic.synopsis">
119 <term>Synopsis:</term>
121 <para><emphasis role="bold">default</emphasis>
134 <sect1 id="command_hint">
136 <para><userinput>hint</userinput></para>
139 <varlistentry role="tactic.synopsis">
140 <term>Synopsis:</term>
142 <para><emphasis role="bold">hint</emphasis>
149 <para>Displays a list of theorems that can be successfully
150 applied to the current selected sequent. The command is
151 removed from the script, but the window that displays the
152 theorems allow to add to the script the application of the
160 <sect1 id="command_include">
161 <title>include</title>
162 <para><userinput></userinput></para>
165 <varlistentry role="tactic.synopsis">
166 <term>Synopsis:</term>
168 <para><emphasis role="bold">include</emphasis>
181 <sect1 id="command_include_first">
182 <title>include'</title>
183 <para><userinput></userinput></para>
186 <varlistentry role="tactic.synopsis">
187 <term>Synopsis:</term>
189 <para><emphasis role="bold">include'</emphasis>
202 <sect1 id="command_set">
204 <para><userinput></userinput></para>
207 <varlistentry role="tactic.synopsis">
208 <term>Synopsis:</term>
210 <para><emphasis role="bold">set</emphasis>
223 <sect1 id="command_whelp">
225 <para><userinput></userinput></para>
228 <varlistentry role="tactic.synopsis">
229 <term>Synopsis:</term>
231 <para><emphasis role="bold">whelp</emphasis>
244 <sect1 id="command_qed">
246 <para><userinput></userinput></para>
249 <varlistentry role="tactic.synopsis">
250 <term>Synopsis:</term>
252 <para><emphasis role="bold">qed</emphasis>
259 <para>Saves and indexes the current interactive theorem or
261 In order to do this, the set of sequents still to be proved
262 must be empty.</para>