X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fhelp%2FC%2Fsec_terms.xml;h=11b06b21cab7269c8bd3bd2867ed8bc48b31f1c5;hb=c18c9b640779d96fea7d43d6bc4562e21b5112b3;hp=3171544a22c2773a7295dad6374e62ce3b08f7a1;hpb=606b4dbe57c4ccbf4c25f3eac4576b98977885c8;p=helm.git
diff --git a/helm/software/matita/help/C/sec_terms.xml b/helm/software/matita/help/C/sec_terms.xml
index 3171544a2..11b06b21c 100644
--- a/helm/software/matita/help/C/sec_terms.xml
+++ b/helm/software/matita/help/C/sec_terms.xml
@@ -5,128 +5,263 @@
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
- first sequence in square brackets, that are followed by three dots.
- E.g.: [and &term;]â¦
+ 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.: [<|>]
+ Repetitions of a sequence of elements are given by putting the
+ sequence in square brackets, that are followed by three dots. The empty
+ sequence is a valid repetition.
+ E.g.: [and &term;]â¦
+ Characters belonging to a set of characters are given
+ by listing the set elements in square brackets. Hyphens are used to
+ specify ranges of characters in the set.
+ E.g.: [a-zA-Z0-9_-]
Terms & co.
Lexical conventions
-
-
-
+
+ id
+
+
+
+ &id;
+ ::=
+ â©â©any sequence of letters, underscores or valid XML digits prefixed by a latin letter ([a-zA-Z]) and post-fixed by a possible empty sequence of decorators ([?'`])âªâª
+
+
+
+
+
+ nat
+
+
+
+ &nat;
+ ::=
+ â©â©any sequence of valid XML digitsâªâª
+
+
+
+
+
+ char
+
+
+
+ &char;
+ ::=
+ [a-zA-Z0-9_-]
+
+
+
+
+
+ uri-step
+
+
+
+ &uri-step;
+ ::=
+ &char;[&char;]â¦
+
+
+
+
+
+ uri
+
+
+
+ &uri;
+ ::=
+ [cic:/|theory:/]&uri-step;[/&uri-step;]â¦.&id;[.&id;]â¦[#xpointer(&nat;/&nat;[/&nat;]â¦)]
+
+
+
+
+
+
+ Terms
+
+
+
+
+
+
+ Terms
+
- &id;
+ &term;
::=
- â©â©&TODO;âªâª
+ &sterm;
+ simple or delimited term
-
-
-
-
-
-
-
- &nat;
- ::=
- â©â©&TODO;âªâª
+
+ |
+ &term; &term;
+ application
-
-
-
-
-
-
-
- &uri;
- ::=
- â©â©&TODO;âªâª
+
+ |
+ λ&args;.&term;
+ λ-abstraction
-
-
-
-
-
- Terms
-
-
-
-
- &term;
- ::=
- &id;
- identifier
+
+ |
+ Î &args;.&term;
+ dependent product meant to define a datatype
|
- &uri;
- a qualified reference
+ â&args;.&term;
+ dependent product meant to define a proposition
|
- Prop
- the impredicative sort of propositions
+ &term; â &term;
+ non-dependent product (logical implication or function space)
|
- Set
- the impredicate sort of datatypes
+ let [&id;|(&id;: &term;)] â &term; in &term;
+ local definition
|
- Type
- one predicative sort of datatypes
+
+ let
+ [co]rec
+ &rec_def;
+
+ (co)recursive definitions
+
+
+
+
+
+ [and &rec_def;]â¦
+
+
+
+
+
+
+
+ in &term;
+
+
|
- &term; &term;
- application
+ â¦
+ user provided notation
+
+
+ &rec_def;
+ ::=
+
+ &id; [&id;|(&id;[,&term;]⦠:&term;)]â¦
+
+
+
+
+
+
+
+ [on &nat;]
+ [: &term;]
+ â &term;]
+
+
+
+
+
+
+
+
+ Simple terms
+
+
+
+ &sterm;
+ ::=
+ (&term;)
+
|
- λ&id;[: &term;].&term;
- λ-abstraction
+ &id;[\subst[
+ &id;â&term;
+ [;&id;â&term;]â¦
+ ]]
+
+ identifier with optional explicit named substitution
|
- Î &id;[: &term;].&term;
- dependent product meant to define a datatype
+ &uri;
+ a qualified reference
|
- â&id;[: &term;].&term;
- dependent product meant to define a proposition
+ Prop
+ the impredicative sort of propositions
|
- &term; â &term;
- non-dependent product (logical implication or function space)
+ Set
+ the impredicate sort of datatypes
|
- let [&id;|(&id;: &term;)] â &term; in &term;
- local definition
+ Type
+ one predicative sort of datatypes
+
+
+
+ |
+ ?
+ implicit argument
+
+
+
+ |
+ ?n
+ [[
+ [_|&term;]â¦
+ ]]
+ metavariable
@@ -143,53 +278,87 @@
[
- &term_pattern; â &term;
- [
- |
- &term_pattern; â &term;
- ]â¦]
+ &match_branch;[|&match_branch;]â¦
+ ]
+
|
- let
- [co]rec
- &id; [&id;]⦠[on &nat;]
- [: &term;]
- â &term;
-
- (co)recursive definitions
+ (&term;:&term;)
+ cast
+ |
+ â¦
+ user provided notation at precedence 90
+
+
+
+
+
+
+ Arguments
+
+
+
+ &args;
+ ::=
+
+ _[: &term;]
+
+ ignored argument
+
+
+ |
- [and
- &id; [&id;]⦠[on &nat;]
- [: &term;]
- â &term;]â¦
+ (_[: &term;])
+ ignored argument
+
+
+ |
+ &id;[,&id;]â¦[: &term;]
+
+ |
+ (&id;[,&id;]â¦[: &term;])
-
- in &term;
-
+
+
+ &args2;
+ ::=
+ &id;
+
+
+
+
+ |
+ (&id;[,&id;]â¦: &term;)
-
-
-
+
+ Pattern matching
+
+
+ &match_branch;
+ ::=
+ &match_pattern; â &term;
+
+
- &term_pattern;
+ &match_pattern;
::=
&id;
0-ary constructor
@@ -203,19 +372,21 @@
+
+
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;
@@ -229,16 +400,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
@@ -255,7 +473,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
@@ -263,24 +481,114 @@
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
+
+ Tactic arguments
+ This section documents the syntax of some recurring arguments for
+ tactics.
+
+
+ intros-spec
+
+ intros-spec
+
+
+
+ &intros-spec;
+ ::=
+ [&nat;] [([&id;]â¦)]
+
+
+
+
+ The natural number is the number of new hypotheses to be introduced. The list of identifiers gives the name for the first hypotheses.
+
+
+
+ pattern
+
+ pattern
+
+
+
+ &pattern;
+ ::=
+ &TODO;
+
+
+
+
+ &TODO;
+
+
+
+ reduction-kind
+ Reduction kinds are normalization functions that transform a term
+ to a convertible but simpler one. Each reduction kind can be used both
+ as a tactic argument and as a stand-alone tactic.
+
+ reduction-kind
+
+
+
+ &reduction-kind;
+ ::=
+ demodulate
+
+
+
+ |
+ normalize
+ Computes the βδιζ-normal form
+
+
+
+ |
+ reduce
+ Computes the βδιζ-normal form
+
+
+
+ |
+ simplify
+ Computes a form supposed to be simpler
+
+
+
+ |
+ unfold [&sterm;]
+ δ-reduces the constant or variable if specified, or that
+ in head position
+
+
+
+ |
+ whd
+ Computes the βδιζ-weak-head normal form
+
+
+
+
+
+
+