]> matita.cs.unibo.it Git - helm.git/blob - matita/help/C/sec_commands.xml
More commands documented.
[helm.git] / matita / help / C / sec_commands.xml
1
2 <!-- ============ Commands ====================== -->
3 <chapter id="sec_commands">
4  <title>Other commands</title>
5  <sect1 id="command_alias">
6    <title>alias</title>
7    <para><userinput>alias id &quot;s&quot; = &quot;def&quot;</userinput></para>
8    <para><userinput>alias symbol &quot;s&quot; (instance n) = &quot;def&quot;</userinput></para>
9    <para><userinput>alias num (instance n) = &quot;def&quot;</userinput></para>
10    <para>
11      <variablelist>
12        <varlistentry role="tactic.synopsis">
13          <term>Synopsis:</term>
14          <listitem>
15            <para><emphasis role="bold">alias</emphasis>
16             [<emphasis role="bold">id</emphasis> &qstring; <emphasis role="bold">=</emphasis> &qstring;
17             | <emphasis role="bold">symbol</emphasis> &qstring; [<emphasis role="bold">(instance</emphasis> &nat;<emphasis role="bold">)</emphasis>] <emphasis role="bold">=</emphasis> &qstring;
18             | <emphasis role="bold">num</emphasis> [<emphasis role="bold">(instance</emphasis> &nat;<emphasis role="bold">)</emphasis>] <emphasis role="bold">=</emphasis> &qstring;
19             ]
20            </para>
21          </listitem>
22        </varlistentry>
23        <varlistentry>
24          <term>Action:</term>
25          <listitem>
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 &quot;map <command>s</command> (or the
30             number) to <command>def</command>&quot;. For identifiers,
31             &quot;def&quot; 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, &quot;def&quot; is the label used to
37             mark the wanted
38             <link linkend="interpretation">interpretation</link>.
39            </para>
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.
44           </para>
45           <para>
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>
50          </listitem>
51        </varlistentry>
52      </variablelist>
53    </para>
54  </sect1>
55  <sect1 id="command_check">
56    <title>check</title>
57    <para><userinput>check t</userinput></para>
58    <para>
59      <variablelist>
60        <varlistentry role="tactic.synopsis">
61          <term>Synopsis:</term>
62          <listitem>
63            <para><emphasis role="bold">check</emphasis> &term;</para>
64          </listitem>
65        </varlistentry>
66        <varlistentry>
67          <term>Action:</term>
68          <listitem>
69            <para>Opens a CIC browser window that shows <command>t</command>
70             together with its type. The command is immediately removed from
71             the script.</para>
72          </listitem>
73        </varlistentry>
74      </variablelist>
75    </para>
76  </sect1>
77  <sect1 id="command_coercion">
78    <title>coercion</title>
79    <para><userinput>coercion u</userinput></para>
80    <para>
81      <variablelist>
82        <varlistentry role="tactic.synopsis">
83          <term>Synopsis:</term>
84          <listitem>
85            <para><emphasis role="bold">coercion</emphasis> &uri;</para>
86          </listitem>
87        </varlistentry>
88        <varlistentry>
89          <term>Action:</term>
90          <listitem>
91            <para>Declares <command>u</command> as an implicit coercion
92             from the type of its last argument (source)
93             to its codomain (target). Every time a term <command>x</command>
94             of type source is used with expected type target, Matita
95             automatically replaces <command>x</command> with
96             <command>(u ? … ? x)</command> to avoid a typing error.</para>
97            <para>Implicit coercions are not displayed to the user:
98             <command>(u ? … ? x)</command> is rendered simply
99             as <command>x</command>.</para>
100            <para>When a coercion <command>u</command> is declared
101             from source <command>s</command> to target <command>t</command>
102             and there is already a coercion <command>u'</command> of
103             target <command>s</command> or source <command>t</command>,
104             a composite implicit coercion is automatically computed
105             by Matita.</para>
106          </listitem>
107        </varlistentry>
108      </variablelist>
109    </para>
110  </sect1>
111  <sect1 id="command_default">
112    <title>default</title>
113    <para><userinput></userinput></para>
114    <para>
115      <variablelist>
116        <varlistentry role="tactic.synopsis">
117          <term>Synopsis:</term>
118          <listitem>
119            <para><emphasis role="bold">default</emphasis>
120            </para>
121          </listitem>
122        </varlistentry>
123        <varlistentry>
124          <term>Action:</term>
125          <listitem>
126            <para>&TODO;</para>
127          </listitem>
128        </varlistentry>
129      </variablelist>
130    </para>
131  </sect1>
132  <sect1 id="command_hint">
133    <title>hint</title>
134    <para><userinput>hint</userinput></para>
135    <para>
136      <variablelist>
137        <varlistentry role="tactic.synopsis">
138          <term>Synopsis:</term>
139          <listitem>
140            <para><emphasis role="bold">hint</emphasis>
141            </para>
142          </listitem>
143        </varlistentry>
144        <varlistentry>
145          <term>Action:</term>
146          <listitem>
147            <para>Displays a list of theorems that can be successfully
148             applied to the current selected sequent. The command is
149             removed from the script, but the window that displays the
150             theorems allow to add to the script the application of the
151             selected theorem.
152            </para>
153          </listitem>
154        </varlistentry>
155      </variablelist>
156    </para>
157  </sect1>
158  <sect1 id="command_include">
159    <title>include</title>
160    <para><userinput>include &quot;s&quot;</userinput></para>
161    <para>
162      <variablelist>
163        <varlistentry role="tactic.synopsis">
164          <term>Synopsis:</term>
165          <listitem>
166            <para><emphasis role="bold">include</emphasis> &qstring;</para>
167          </listitem>
168        </varlistentry>
169        <varlistentry>
170          <term>Action:</term>
171          <listitem>
172            <para>Every <link linkend="command_coercion">coercion</link>,
173             <link linkend="notation">notation</link> and
174             <link linkend="interpretation">interpretation</link> that was active
175             when the file <command>s</command> was compiled last time
176             is made active. The same happens for declarations of
177             <link linkend="command_default">default definitions and
178             theorems</link> and disambiguation
179             hints (<link linkend="command_alias">aliases</link>).
180             On the contrary, theorem and definitions declared in a file can be
181            immediately used without including it.</para>
182           <para>The file <command>s</command> is automatically compiled
183            if it is not compiled yet and if it is handled by a
184            <link linkend="developments">development</link>.
185           </para>
186          </listitem>
187        </varlistentry>
188      </variablelist>
189    </para>
190  </sect1>
191  <sect1 id="command_include_first">
192    <title>include' &quot;s&quot;</title>
193    <para><userinput></userinput></para>
194    <para>
195      <variablelist>
196        <varlistentry role="tactic.synopsis">
197          <term>Synopsis:</term>
198          <listitem>
199            <para><emphasis role="bold">include'</emphasis> &qstring;</para>
200          </listitem>
201        </varlistentry>
202        <varlistentry>
203          <term>Action:</term>
204          <listitem>
205            <para>Not documented (&TODO;), do not use it.</para>
206          </listitem>
207        </varlistentry>
208      </variablelist>
209    </para>
210  </sect1>
211  <sect1 id="command_set">
212    <title>set</title>
213    <para><userinput>set &quot;baseuri&quot; &quot;s&quot;</userinput></para>
214    <para>
215      <variablelist>
216        <varlistentry role="tactic.synopsis">
217          <term>Synopsis:</term>
218          <listitem>
219            <para><emphasis role="bold">set</emphasis> &qstring; &qstring;</para>
220          </listitem>
221        </varlistentry>
222        <varlistentry>
223          <term>Action:</term>
224          <listitem>
225            <para>Sets to <command>s</command> the baseuri of all the
226             theorems and definitions stated in the current file.
227             The baseuri should be <command>a/b/c/foo</command>
228             if the file is named <command>foo</command> and it is in
229             the subtree <command>a/b/c</command> of the current
230             <link linkend="developments">development</link>.
231             This requirement is not enforced, but it could be in the future.
232            </para>
233            <para>Currently, <command>baseuri</command> is the only
234             property that can be set even if the parser accepts
235             arbitrary property names.</para>
236          </listitem>
237        </varlistentry>
238      </variablelist>
239    </para>
240  </sect1>
241  <sect1 id="command_whelp">
242    <title>whelp</title>
243    <para><userinput></userinput></para>
244    <para>
245      <variablelist>
246        <varlistentry role="tactic.synopsis">
247          <term>Synopsis:</term>
248          <listitem>
249            <para><emphasis role="bold">whelp</emphasis>
250            </para>
251          </listitem>
252        </varlistentry>
253        <varlistentry>
254          <term>Action:</term>
255          <listitem>
256            <para>&TODO;</para>
257          </listitem>
258        </varlistentry>
259      </variablelist>
260    </para>
261  </sect1>
262  <sect1 id="command_qed">
263    <title>qed</title>
264    <para><userinput></userinput></para>
265    <para>
266      <variablelist>
267        <varlistentry role="tactic.synopsis">
268          <term>Synopsis:</term>
269          <listitem>
270            <para><emphasis role="bold">qed</emphasis>
271            </para>
272          </listitem>
273        </varlistentry>
274        <varlistentry>
275          <term>Action:</term>
276          <listitem>
277            <para>Saves and indexes the current interactive theorem or
278             definition.
279             In order to do this, the set of sequents still to be proved
280             must be empty.</para>
281          </listitem>
282        </varlistentry>
283      </variablelist>
284    </para>
285  </sect1>
286 </chapter>
287