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".
80 <title>Searching the library</title>
81 <para>The query bar of the CIC browser can be used to search the library
82 of Matita for theorems or definitions that match certain criteria.
83 The criteria is given by typing a term in the query bar and selecting
84 an action in the drop down menu right of it.</para>
86 <title>Searching by name</title>
90 <title>List of lemmas that can be applied</title>
94 <title>Searching by exact match</title>
98 <title>List of elimination principles for a given type</title>
101 <sect3 id="instance">
102 <title>Searching by instantiation</title>
107 <sect1 id="authoring">
108 <title>Authoring</title>
109 <sect2 id="compilation">
110 <title>How to compile a script</title>
112 Scripts are compiled to base URIs. Base URIs are of the form
113 "cic:/matita/path" and are given once for all for a set
114 of scripts using the "root" file.
117 A "root" file has to be placed in the root of a script set,
118 for example, consider the following files and directories, and
119 assume you keep files in "list" separated from files
120 in "sort" (for example the former directory may contain
121 functions and proofs about lists, while latter sorting algorithms
123 <programlisting><![CDATA[
125 list.ma (* depending just on the standard library *)
127 swap.ma (* including list.ma *)
129 qsort.ma (* including utils/swap.ma *)
131 To be able to compile properly the contents of "list"
132 a file called root has to be placed in it. The file should be like
133 the following snippet.
134 <programlisting><![CDATA[
135 baseuri=cic:/matita/mydatastructures
137 This file tells &appname; that objects generated by
138 "list.ma" have to be placed in
139 "cic:/matita/mydatastructures/list" while
141 "swap.ma" have to be placed in
142 "cic:/matita/mydatastructures/utils/swap".
145 Once you created the root file, you must generate a depend file.
146 Enter the "list" directory (the root of yuor file set)
147 and type "matitadep". Remember to regenerate the depend file
148 every time you alter the dependencies of your files (for example
149 including other scripts).
150 You can now compile you files typing "matitac".
153 To compile the "sort" directory, create a root file
154 in "sort/" like the following one and then run
155 "matitadep".
156 <programlisting><![CDATA[
157 baseuri=cic:/matita/myalgorithms
158 include_paths=../list
160 The include_paths field can declare a list of paths separated by space.
161 Please omit any "/" from the end of base URIs or paths.
164 <sect2 id="authoringinterface">
165 <title>The authoring interface</title>