X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fhelp%2FC%2Fsec_terms.xml;h=a1353b2f021aac59be2fe0896c2fbd827ab2795d;hb=ede1e31f13510c51d42d7b0448d3cbff132ec70c;hp=c50e590b0636ecbdc9132e17da5d2383372e2d26;hpb=9efaf66294d18446b7cd960f9ed4203799073e62;p=helm.git
diff --git a/helm/software/matita/help/C/sec_terms.xml b/helm/software/matita/help/C/sec_terms.xml
index c50e590b0..a1353b2f0 100644
--- a/helm/software/matita/help/C/sec_terms.xml
+++ b/helm/software/matita/help/C/sec_terms.xml
@@ -26,78 +26,126 @@
Terms & co.
Lexical conventions
-
-
+
+ qstring
+
+
+
+ &qstring;
+ ::=
+ "â©â©any sequence of characters excluded "âªâª"
+
+
+
+
+
id
- &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 ([?'`])âªâª
+ â©â©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;
+ &nat;
::=
- â©â©any sequence of valid XML digits
+ â©â©any sequence of valid XML digitsâªâª
-
+
char
- &char;
+ &char;
::=
[a-zA-Z0-9_-]
-
+
uri-step
- &uri-step;
+ &uri-step;
::=
&char;[&char;]â¦
-
+
uri
- &uri;
+ &uri;
::=
[cic:/|theory:/]&uri-step;[/&uri-step;]â¦.&id;[.&id;]â¦[#xpointer(&nat;/&nat;[/&nat;]â¦)]
-
+
+ csymbol
+
+
+
+ &csymbol;
+ ::=
+ '&id;
+
+
+
+
+
+ symbol
+
+
+
+ &symbol;
+ ::=
+ â©â©None of the aboveâªâª
+
+
+
+
Terms
+
+
+
+
-
+
Terms
- &term;
+ &term;
::=
&sterm;
simple or delimited term
@@ -141,11 +189,10 @@
|
- let
- [co]rec
- &id; [&id;|(&id;[,&term;]⦠:&term;)]⦠[on &nat;]
- [: &term;]
- â &term;
+
+ let
+ [co]rec
+ &rec_def;
(co)recursive definitions
@@ -153,10 +200,7 @@
- [and
- [&id;|(&id;[,&term;]⦠:&term;)]⦠[on &nat;]
- [: &term;]
- â &term;]â¦
+ [and &rec_def;]â¦
@@ -174,16 +218,34 @@
â¦
user provided notation
+
+ &rec_def;
+ ::=
+
+ &id; [&id;|_|(&id;[,&id;]⦠:&term;)]â¦
+
+
+
+
+
+
+
+ [on &id;]
+ [: &term;]
+ â &term;]
+
+
+
-
+
Simple terms
- &sterm;
+ &sterm;
::=
(&term;)
@@ -216,6 +278,12 @@
Set
the impredicate sort of datatypes
+
+
+ |
+ CProp
+ one fixed predicative sort of constructive propositions
+
|
@@ -241,7 +309,7 @@
|
match &term;
- [ in &term; ]
+ [ in &id; ]
[ return &term; ]
with
@@ -252,11 +320,9 @@
[
- &match_pattern; â &term;
- [
- |
- &match_pattern; â &term;
- ]â¦]
+ &match_branch;[|&match_branch;]â¦
+ ]
+
@@ -275,12 +341,12 @@
-
+
Arguments
- &args;
+ &args;
::=
_[: &term;]
@@ -307,16 +373,8 @@
(&id;[,&id;]â¦[: &term;])
-
-
-
-
-
- Miscellaneous arguments
-
-
- &args2;
+ &args2;
::=
&id;
@@ -331,12 +389,18 @@
-
+
Pattern matching
+
+ &match_branch;
+ ::=
+ &match_pattern; â &term;
+
+
- &match_pattern;
+ &match_pattern;
::=
&id;
0-ary constructor
@@ -347,6 +411,18 @@
(&id; &id; [&id;]â¦)
n-ary constructor (binds the n arguments)
+
+
+ |
+ &id; &id; [&id;]â¦
+ n-ary constructor (binds the n arguments)
+
+
+
+ |
+ _
+ any remaining constructor (ignoring its arguments)
+
@@ -377,6 +453,11 @@
f must be defined by means of tactics.
Notice that the command is equivalent to theorem f: T â t.
+
+ letrec &TODO;
+ &TODO;
+ &TODO;
+
[inductive|coinductive] &id; [&args2;]⦠: &term; â [|] [&id;:&term;] [| &id;:&term;]â¦
[with &id; : &term; â [|] [&id;:&term;] [| &id;:&term;]â¦]â¦
@@ -451,7 +532,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
@@ -478,5 +559,285 @@
+
+ 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;
+ ::=
+ in
+ [&id;[: &path;]]â¦
+ [⢠&path;]]
+ simple pattern
+
+
+
+ |
+ in match &path;
+ [in
+ [&id;[: &path;]]â¦
+ [⢠&path;]]
+ full pattern
+
+
+
+
+
+ path
+
+
+
+ &path;
+ ::=
+ â©â©any &sterm; without occurrences of Set, Prop, CProp, Type, &id;, &uri; and user provided notation; however, % is now an additional production for &sterm;âªâª
+
+
+
+
+ A path locates zero or more subterms of a given term by mimicking the term structure up to:
+
+ Occurrences of the subterms to locate that are
+ represented by %.
+ Subterms without any occurrence of subterms to locate
+ that can be represented by ?.
+
+
+ Warning: the format for a path for a match ⦠with
+ expression is restricted to: match &path;
+ with
+ [
+ _
+ â
+ &path;
+ | â¦
+ |
+ _
+ â
+ &path;
+ ]
+ Its semantics is the following: the n-th
+ "_
+ â
+ &path;" branch is matched against the n-th constructor of the
+ inductive data type. The head λ-abstractions of &path; are matched
+ against the corresponding constructor arguments.
+
+ For instance, the path
+ â_,_:?.(? ? % ?)â(? ? ? %)
+ locates at once the subterms
+ x+y and x*y in the
+ term âx,y:nat.x+y=1â0=x*y
+ (where the notation A=B hides the term
+ (eq T A B) for some type T).
+
+ A simple pattern extends paths to locate
+ subterms in a whole sequent. In particular, the pattern
+ in H: p K: q ⢠r locates at once all the subterms
+ located by the pattern r in the conclusion of the
+ sequent and by the patterns p and
+ q in the hypotheses H
+ and K of the sequent.
+
+ If no list of hypotheses is provided in a simple pattern, no subterm
+ is selected in the hypothesis. If the ⢠p
+ part of the pattern is not provided, no subterm will be matched in the
+ conclusion if at least one hypothesis is provided; otherwise the whole
+ conclusion is selected.
+
+ Finally, a full pattern is interpreted in three
+ steps. In the first step the match T in
+ part is ignored and a set S of subterms is
+ located as for the case of
+ simple patterns. In the second step the term T
+ is parsed and interpreted in the context of each subterm
+ s â S. In the last term for each
+ s â S the interpreted term T
+ computed in the previous step is looked for. The final set of subterms
+ located by the full pattern is the set of occurrences of
+ the interpreted T in the subterms s.
+
+ A full pattern can always be replaced by a simple pattern,
+ often at the cost of increased verbosity or decreased readability.
+ Example: the pattern
+ ⢠in match x+y in â_,_:?.(? ? % ?)
+ locates only the first occurrence of x+y
+ in the sequent x,y: nat ⢠âz,w:nat. (x+y) * (z+w) =
+ z * (x+y) + w * (x+y). The corresponding simple pattern
+ is ⢠â_,_:?.(? ? (? % ?) ?).
+
+ Every tactic that acts on subterms of the selected sequents have
+ a pattern argument for uniformity. To automatically generate a simple
+ pattern:
+
+ Select in the current goal the subterms to pass to the
+ tactic by using the mouse. In order to perform a multiple selection of
+ subterms, hold the Ctrl key while selecting every subterm after the
+ first one.
+ From the contextual menu select "Copy".
+ From the "Edit" or the contextual menu select
+ "Paste as pattern"
+
+
+
+
+ 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;
+ ::=
+ normalize
+ 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
+
+
+
+
+
+
+
+ auto-params
+
+ auto-params
+
+
+
+ &autoparams;
+ ::=
+ [&simpleautoparam;]â¦
+ [by
+ &term; [,&term;]â¦]
+
+
+
+
+
+
+ simple-auto-param
+
+
+
+ &simpleautoparam;
+ ::=
+ depth=&nat;
+ Give a bound to the depth of the search tree
+
+
+
+ |
+ width=&nat;
+ The maximal width of the search tree
+
+
+
+ |
+ library
+ Search everywhere (not only in included files)
+
+
+
+ |
+ type
+ Try to close also goals of sort Type, otherwise only goals
+ living in sort Prop are attacked.
+
+
+
+
+ |
+ paramodulation
+ Try to close the goal performing unit-equality paramodulation
+
+
+
+
+ |
+ size=&nat;
+ The maximal number of nodes in the proof
+
+
+
+ |
+ timeout=&nat;
+ Timeout in seconds
+
+
+
+
+
+
+
+
+ justification
+
+ justification
+
+
+
+ &justification;
+ ::=
+ using &term;
+ Proof term manually provided
+
+
+
+ |
+ &autoparams;
+ Call automation
+
+
+
+
+
+
+