X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fhelp%2FC%2Fsec_terms.xml;h=fbf8dd4ef9cb614c7dfb52eb4c2fa80e1ab210b2;hb=871ed1c297e8c929a8c4460162e8521c9656bbc0;hp=45459572bfc20affb08754727e141ba99d7f8474;hpb=b4fb4fa6c17945b70d821e2b31e6aca727bcf9d5;p=helm.git
diff --git a/helm/software/matita/help/C/sec_terms.xml b/helm/software/matita/help/C/sec_terms.xml
index 45459572b..fbf8dd4ef 100644
--- a/helm/software/matita/help/C/sec_terms.xml
+++ b/helm/software/matita/help/C/sec_terms.xml
@@ -5,62 +5,67 @@
Syntax
To describe syntax in this manual we use the following conventions:
- Non terminal symbols are emphasized and have a link to their definition. E.g.: &term;
- Terminal symbols are in bold. E.g.: theorem
- Optional sequences of elements are put in square brackets.
- E.g.: [in &term;]
- Alternatives are put in square brakets and they are separated
- by vertical bars. E.g.: [<|>]
- Repetition of sequences of elements are given by putting the
+ Non terminal symbols are emphasized and have a link to their
+ definition. E.g.: &term;
+ Terminal symbols are in bold. E.g.:
+ theorem
+ Optional sequences of elements are put in square brackets.
+ E.g.: [in &term;]
+ Alternatives are put in square brakets and they are
+ separated by vertical bars. E.g.: [<|>]
+ Repetition of sequences of elements are given by putting the
first sequence in square brackets, that are followed by three dots.
- E.g.: [and &term;]â¦
+ E.g.: [and &term;]â¦
Terms & co.
Lexical conventions
-
-
-
-
-
- &id;
- ::=
- â©â©&TODO;âªâª
-
-
-
-
-
-
-
-
-
- &nat;
- ::=
- â©â©&TODO;âªâª
-
-
-
-
-
-
-
-
-
- &uri;
- ::=
- â©â©&TODO;âªâª
-
-
-
-
+
+
+ id
+
+
+
+ &id;
+ ::=
+ â©â©&TODO;âªâª
+
+
+
+
+
+ nat
+
+
+
+ &nat;
+ ::=
+ â©â©&TODO;âªâª
+
+
+
+
+
+ uri
+
+
+
+ &uri;
+ ::=
+ â©â©&TODO;âªâª
+
+
+
+
+
Terms
-
-
-
+
+
+ Terms
+
&term;
@@ -144,9 +149,9 @@
-
-
-
+
+ Simple terms
+
&sterm;
@@ -158,8 +163,8 @@
|
&id;[\subst[
- &id;â&term;
- [;&id;â&term;]â¦
+ &id;â&term;
+ [;&id;â&term;]â¦
]]
identifier with optional explicit named substitution
@@ -241,31 +246,65 @@
-
-
-
+
+ Arguments
+
&args;
::=
- [(]_[: &term;][)]
+ _[: &term;]
ignored argument
|
- [(]&id;[,&id;]â¦[: &term;][)]
+
+ (_[: &term;])
+
+ ignored argument
+
+
+
+ |
+ &id;[,&id;]â¦[: &term;]
+
+
+ |
+ (&id;[,&id;]â¦[: &term;])
+
+
+
+
+
+
+
+ Miscellaneous arguments
+
+
+
+ &args2;
+ ::=
+ &id;
+
+
+
+
+ |
+ (&id;[,&id;]â¦: &term;)
+
+
-
-
-
+
+ Pattern matching
+
&match_pattern;
@@ -282,6 +321,7 @@
+
@@ -289,13 +329,13 @@
Definitions and declarations
- axiom &id;: &term;
+ axiom &id;: &term;
axiom
axiom H: P
H is declared as an axiom that states P
- definition &id;[: &term;] [â &term;]
+ definition &id;[: &term;] [â &term;]
definition
definition f: T â t
f is defined as t;
@@ -309,16 +349,63 @@
Notice that the command is equivalent to theorem f: T â t.
- [co]inductive &id; (of inductive types)
+ [inductive|coinductive] &id; [&args2;]⦠: &term; â [|] [&id;:&term;] [| &id;:&term;]â¦
+[with &id; : &term; â [|] [&id;:&term;] [| &id;:&term;]â¦]â¦
+
(co)inductive types declaration
- &TODO;
+ inductive i x y z: S â k1:T1 | ⦠| kn:Tn with i' : S' â k1':T1' | ⦠| km':Tm'
+ Declares a family of two mutually inductive types
+ i and i' whose types are
+ S and S', which must be convertible
+ to sorts.
+ The constructors ki of type Ti
+ and ki' of type Ti' are also
+ simultaneously declared. The declared types i and
+ i' may occur in the types of the constructors, but
+ only in strongly positive positions according to the rules of the
+ calculus.
+ The whole family is parameterized over the arguments x,y,z.
+ If the keyword coinductive is used, the declared
+ types are considered mutually coinductive.
+ Elimination principles for the record are automatically generated
+ by Matita, if allowed by the typing rules of the calculus according to
+ the sort S. If generated,
+ they are named i_ind, i_rec and
+ i_rect according to the sort of their induction
+ predicate.
+
+
+ record &id; [&args2;]⦠: &term; â{[&id; [:|:>] &term;] [;&id; [:|:>] &term;]â¦}
+ record
+ record id x y z: S â { f1: T1; â¦; fn:Tn }
+ Declares a new record family id parameterized over
+ x,y,z.
+ S is the type of the record
+ and it must be convertible to a sort.
+ Each field fi is declared by giving its type
+ Ti. A record without any field is admitted.
+ Elimination principles for the record are automatically generated
+ by Matita, if allowed by the typing rules of the calculus according to
+ the sort S. If generated,
+ they are named i_ind, i_rec and
+ i_rect according to the sort of their induction
+ predicate.
+ For each field fi a record projection
+ fi is also automatically generated if projection
+ is allowed by the typing rules of the calculus according to the
+ sort S, the type T1 and
+ the definability of depending record projections.
+ If the type of a field is declared with :>,
+ the corresponding record projection becomes an implicit coercion.
+ This is just syntactic sugar and it has the same effect of declaring the
+ record projection as a coercion later on.
Proofs
- theorem &id;[: &term;] [â &term;]
+ theorem &id;[: &term;] [â &term;]
theorem
theorem f: P â p
Proves a new theorem f whose thesis is
@@ -335,7 +422,7 @@
Notice that the command is equivalent to definition f: T â t.
- variant &id;[: &term;] [â &term;]
+ variant &id;[: &term;] [â &term;]
variant
variant f: T â t
Same as theorem f: T â t, but it does not
@@ -343,19 +430,19 @@
an alternative name or proof to a theorem.
- lemma &id;[: &term;] [â &term;]
+ lemma &id;[: &term;] [â &term;]
lemma
lemma f: T â t
Same as theorem f: T â t
- fact &id;[: &term;] [â &term;]
+ fact &id;[: &term;] [â &term;]
fact
fact f: T â t
Same as theorem f: T â t