2 <!-- ============= Getting started ============================== -->
4 <chapter id="sec_gettingstarted">
5 <title>Getting started</title>
6 <para> If you are already familiar with the Calculus of (Co)Inductive
7 Constructions (CIC) and with interactive theorem provers with procedural
8 proof languages (expecially Coq), getting started with Matita is relatively
9 easy. You just need to learn how to type Unicode symbols, how to browse
10 and search the library and how to author a proof script.</para>
13 <title>How to type Unicode symbols</title>
14 <para>Unicode characters can be typed in several ways:</para>
16 <listitem><para>Using the "Ctrl+Shift+Unicode code" standard Gnome shortcut. E.g. Ctrl+Shift+3a9 generates "Ω".</para>
18 <listitem><para>Typing the ligature "\name" where "name"
19 is a standard Unicode or LaTeX name for the character or an
20 ASCII art resembling the shape of the character. Pressing
21 "Alt+L" or Space or Enter just after the last character
23 the ligature to the Unicode symbol.
24 E.g. "\Delta" followed by Alt+L generates
25 "Δ", while pressing Alt-L after "=>" generates
29 <para>Typing a symbol and rotating trough its equivalence class
30 with Alt-L. E.g. pressing Alt-L after an "l"
31 generates a "λ", while pressing Alt-L after an
32 "→" once generates "⇉" and pressing
33 Alt-L again generates "⇒".
38 The comprehensive list of symbols names or shortcuts and their equivalence
39 classes is available clicking on the "TeX/UTF-8 table" item
40 of the "View" menu.
43 There is a memory mechanism related to equivalence classes that
44 remembers your last choice, making it the default one. For example,
45 if you use "_" to generate "⎻"
46 (that is the third choice, after "⎽" and "⎼"),
47 the next time you type Alt-L
48 after "_" you immediately get "⎻".
51 <sect1 id="cicbrowser">
52 <title>Browsing and searching</title>
53 <para>The CIC browser is used to browse and search the library.
54 You can open a new CIC browser selecting "New Cic Browser"
55 from the "View" menu of Matita, or by pressing "F3".
56 The CIC browser is similar to a traditional Web browser.</para>
57 <sect2 id="browsinglib">
58 <title>Browsing the library</title>
59 <para>To browse the library, type in the location bar the absolute URI of
60 the theorem, definition or library fragment you are interested in.
61 "cic:/" is the root of the library. Contributions developed
62 in Matita are under "cic:/matita"; all the others are
63 part of the library of Coq.</para>
64 <para>Following the hyperlinks it is possible to navigate in the Web
65 of mathematical notions. Proof are rendered in pseudo-natural language
66 and mathematical notation is used for formulae. For now, mathematical
67 notation must be included in the current script to be activated, but we
68 plan to remove this limitation.</para>
70 <sect2 id="aboutproof">
71 <title>Looking at a proof under development</title>
72 <para>A proof under development is not yet part of the library.
73 The special URI "about:proof" can be used to browse the
74 proof currently under development, if there is one.
75 The "home" button of the CIC browser sets the location bar to
76 "about:proof".
81 <title>Searching the library</title>
82 <para>The query bar of the CIC browser can be used to search the library
83 of Matita for theorems or definitions that match certain criteria.
84 The criteria is given by typing a term in the query bar and selecting
85 an action in the drop down menu right of it.</para>
87 <title>Searching by name</title>
91 <title>List of lemmas that can be applied</title>
95 <title>Searching by exact match</title>
99 <title>List of elimination principles for a given type</title>
102 <sect3 id="instance">
103 <title>Searching by instantiation</title>
108 <sect1 id="authoring">
109 <title>Authoring</title>
110 <sect2 id="compilation">
111 <title>How to compile a script</title>
113 Scripts are compiled to base URIs. Base URIs are of the form
114 "cic:/matita/path" and are given once for all for a set
115 of scripts using the "root" file.
118 A "root" file has to be placed in the root of a script set,
119 for example, consider the following files and directories, and
120 assume you keep files in "list" separated from files
121 in "sort" (for example the former directory may contain
122 functions and proofs about lists, while latter sorting algorithms
124 <programlisting><![CDATA[
126 list.ma (* depending just on the standard library *)
128 swap.ma (* including list.ma *)
130 qsort.ma (* including utils/swap.ma *)
132 To be able to compile properly the contents of "list"
133 a file called root has to be placed in it. The file should be like
134 the following snippet.
135 <programlisting><![CDATA[
136 baseuri=cic:/matita/mydatastructures
138 This file tells &appname; that objects generated by
139 "list.ma" have to be placed in
140 "cic:/matita/mydatastructures/list" while
142 "swap.ma" have to be placed in
143 "cic:/matita/mydatastructures/utils/swap".
146 Once you created the root file, you must generate a depend file.
147 Enter the "list" directory (the root of yuor file set)
148 and type "matitadep". Remember to regenerate the depend file
149 every time you alter the dependencies of your files (for example
150 including other scripts).
151 You can now compile you files typing "matitac".
154 To compile the "sort" directory, create a root file
155 in "sort/" like the following one and then run
156 "matitadep".
157 <programlisting><![CDATA[
158 baseuri=cic:/matita/myalgorithms
159 include_paths=../list
161 The include_paths field can declare a list of paths separated by space.
162 Please omit any "/" from the end of base URIs or paths.
165 <sect2 id="authoringinterface">
166 <title>The authoring interface</title>