From: Claudio Sacerdoti Coen Date: Tue, 23 Dec 2014 10:30:50 +0000 (+0000) Subject: 0.5.9 released X-Git-Tag: make_still_working~780 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=5b05d943dc8ebfe10e8932795f7f7aa8ef0b4ebc 0.5.9 released --- diff --git a/helm/www/matita/FILES/matita-0.5.8.orig.tar.gz b/helm/www/matita/FILES/matita-0.5.8.orig.tar.gz new file mode 100644 index 000000000..46cd1e9df Binary files /dev/null and b/helm/www/matita/FILES/matita-0.5.8.orig.tar.gz differ diff --git a/helm/www/matita/FILES/matita-0.5.9.tar.gz b/helm/www/matita/FILES/matita-0.5.9.tar.gz new file mode 100644 index 000000000..4fa25a147 Binary files /dev/null and b/helm/www/matita/FILES/matita-0.5.9.tar.gz differ diff --git a/helm/www/matita/FILES/matita-0.99.1.iso b/helm/www/matita/FILES/matita-0.99.1.iso new file mode 100644 index 000000000..8c615dc66 Binary files /dev/null and b/helm/www/matita/FILES/matita-0.99.1.iso differ diff --git a/helm/www/matita/FILES/matita-0.99.1.tar.gz b/helm/www/matita/FILES/matita-0.99.1.tar.gz new file mode 100644 index 000000000..790b694b0 Binary files /dev/null and b/helm/www/matita/FILES/matita-0.99.1.tar.gz differ diff --git a/helm/www/matita/FILES/matita-doc_0.5.9_all.deb b/helm/www/matita/FILES/matita-doc_0.5.9_all.deb new file mode 100644 index 000000000..8bdf54fc9 Binary files /dev/null and b/helm/www/matita/FILES/matita-doc_0.5.9_all.deb differ diff --git a/helm/www/matita/FILES/matita_0.5.9_amd64.deb b/helm/www/matita/FILES/matita_0.5.9_amd64.deb new file mode 100644 index 000000000..33ddc8a4a Binary files /dev/null and b/helm/www/matita/FILES/matita_0.5.9_amd64.deb differ diff --git a/helm/www/matita/FILES/matita_0.99.1.orig.tar.gz b/helm/www/matita/FILES/matita_0.99.1.orig.tar.gz new file mode 100644 index 000000000..790b694b0 Binary files /dev/null and b/helm/www/matita/FILES/matita_0.99.1.orig.tar.gz differ diff --git a/helm/www/matita/PAPERS/lmcs_types_2010.pdf b/helm/www/matita/PAPERS/lmcs_types_2010.pdf new file mode 100644 index 000000000..66d63bb19 Binary files /dev/null and b/helm/www/matita/PAPERS/lmcs_types_2010.pdf differ diff --git a/helm/www/matita/PAPERS/nonunifcoerc.pdf b/helm/www/matita/PAPERS/nonunifcoerc.pdf new file mode 100644 index 000000000..b93f38e1a Binary files /dev/null and b/helm/www/matita/PAPERS/nonunifcoerc.pdf differ diff --git a/helm/www/matita/PAPERS/plmms09.pdf b/helm/www/matita/PAPERS/plmms09.pdf new file mode 100644 index 000000000..a7f57517a Binary files /dev/null and b/helm/www/matita/PAPERS/plmms09.pdf differ diff --git a/helm/www/matita/PAPERS/sadhana.pdf b/helm/www/matita/PAPERS/sadhana.pdf new file mode 100644 index 000000000..c09ff4ff4 Binary files /dev/null and b/helm/www/matita/PAPERS/sadhana.pdf differ diff --git a/helm/www/matita/PAPERS/smart.pdf b/helm/www/matita/PAPERS/smart.pdf new file mode 100644 index 000000000..d0e35eef8 Binary files /dev/null and b/helm/www/matita/PAPERS/smart.pdf differ diff --git a/helm/www/matita/PAPERS/system_description2011.pdf b/helm/www/matita/PAPERS/system_description2011.pdf new file mode 100644 index 000000000..c6bf87070 Binary files /dev/null and b/helm/www/matita/PAPERS/system_description2011.pdf differ diff --git a/helm/www/matita/PAPERS/tphol09.pdf b/helm/www/matita/PAPERS/tphol09.pdf new file mode 100644 index 000000000..dc82df495 Binary files /dev/null and b/helm/www/matita/PAPERS/tphol09.pdf differ diff --git a/helm/www/matita/docs/manual-0.5.9/Makefile b/helm/www/matita/docs/manual-0.5.9/Makefile new file mode 100644 index 000000000..817d6964a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/Makefile @@ -0,0 +1,51 @@ + +include ../../../Makefile.defs + +XSLTPROC=xsltproc +XHTML_XSL=xsl/matita-xhtml.xsl +MAIN=matita.xml +DEPS := $(wildcard *.xml) + +DESTDIR = /usr/local/share/doc/matita/ + +all: quickref-stamp html-stamp pdf-stamp + +quickref-stamp: tactics_quickref.xml declarative_tactics_quickref.xml + touch $@ + +tactics_quickref.xml: xsl/tactic_quickref.xsl sec_tactics.xml + $(XSLTPROC) --param declarative "''" $< matita.xml > $@ +declarative_tactics_quickref.xml: xsl/tactic_quickref.xsl sec_declarative_tactics.xml + $(XSLTPROC) --param declarative "'declarative_'" $< matita.xml > $@ + +html: quickref-stamp html-stamp +html-stamp: $(MAIN) $(DEPS) $(XHTML_XSL) + $(XSLTPROC) $(XHTML_XSL) $< + touch $@ + +pdf: quickref-stamp pdf-stamp +pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN)) + touch $@ + +%.pdf: %.xml + dblatex -rscripts/fix-symbols.sh -tpdf $< +%.dvi: %.xml + dblatex -rscripts/fix-symbols.sh -tdvi $< +%.ps: %.xml + dblatex -rscripts/fix-symbols.sh -tps $< + +install: install-html install-pdf +install-pdf: pdf-stamp + mkdir -p $(DESTDIR)/pdf + cp matita.pdf $(DESTDIR)/pdf + +install-html: html-stamp + mkdir -p $(DESTDIR)/html + cp *.html *.css $(DESTDIR)/html + test -d $(DESTDIR)/html/figures || mkdir $(DESTDIR)/html/figures + cp figures/* $(DESTDIR)/html/figures/ + +clean: + rm -f *.html *.pdf *.ps *.dvi *.tex + rm -f *-stamp + diff --git a/helm/www/matita/docs/manual-0.5.9/TODO b/helm/www/matita/docs/manual-0.5.9/TODO new file mode 100644 index 000000000..73c4146d9 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/TODO @@ -0,0 +1,12 @@ + +1) in order to generated chunked html directly + XHTML_XSL=http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl + +2) to obtain a better pdf, package db2latex-xsl + +3) write a separate XSLT that includes the standard one + +4) have a look at: + svn checkout svn://svn.debian.org/svn/ddp/refcard/trunk + http://people.debian.org/~debacle/ (thanks Debacle!) + diff --git a/helm/www/matita/docs/manual-0.5.9/WrtCoq.html b/helm/www/matita/docs/manual-0.5.9/WrtCoq.html new file mode 100644 index 000000000..1355dca21 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/WrtCoq.html @@ -0,0 +1,12 @@ + +Matita vs Coq

Matita vs Coq

+ The system shares a common look&feel with the Coq proof assistant + and its graphical user interface. The two systems have the same logic, + very close proof languages and similar sets of tactics. Moreover, + Matita is compatible with the library of Coq. + From the user point of view the main lacking features + with respect to Coq are: +

  • proof extraction;

  • an extensible language of tactics;

  • automatic implicit arguments;

  • several ad-hoc decision procedures;

  • several rarely used variants for most of the tactics;

  • sections and local variables. To maintain compatibility with the library of Coq, theorems defined inside sections are abstracted by name over the section variables; their instances are explicitly applied to actual arguments by means of explicit named substitutions.

+ Still from the user point of view, the main differences with respect + to Coq are: +

  • the language of tacticals that allows execution of partial tactical application;

  • the unification of the concept of metavariable and existential variable;

  • terms with subterms that cannot be inferred are always allowed as arguments of tactics or other commands;

  • ambiguous terms are disambiguated by direct interaction with the user;

  • theorems and definitions in the library are always accessible without needing to require/include them; right now, only notation needs to be included to become active, but we plan to remove this limitation.

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/authoring.html b/helm/www/matita/docs/manual-0.5.9/authoring.html new file mode 100644 index 000000000..88ec2cf6d --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/authoring.html @@ -0,0 +1,50 @@ + +Authoring

Authoring

How to compile a script

+ Scripts are compiled to base URIs. Base URIs are of the form + "cic:/matita/path" and are given once for all for a set + of scripts using the "root" file. +

+ A "root" file has to be placed in the root of a script set, + for example, consider the following files and directories, and + assume you keep files in "list" separated from files + in "sort" (for example the former directory may contain + functions and proofs about lists, while latter sorting algorithms + for lists): +

+  list/
+    list.ma (* depending just on the standard library *)
+    utils/
+      swap.ma (* including list.ma *)
+  sort/
+    qsort.ma (* including utils/swap.ma *)
+

+ To be able to compile properly the contents of "list" + a file called root has to be placed in it. The file should be like + the following snippet. +

+  baseuri=cic:/matita/mydatastructures
+

+ This file tells Matita that objects generated by + "list.ma" have to be placed in + "cic:/matita/mydatastructures/list" while + objects generated by + "swap.ma" have to be placed in + "cic:/matita/mydatastructures/utils/swap". +

+ Once you created the root file, you must generate a depend file. + Enter the "list" directory (the root of yuor file set) + and type "matitadep". Remember to regenerate the depend file + every time you alter the dependencies of your files (for example + including other scripts). + You can now compile you files typing "matitac". +

+ To compile the "sort" directory, create a root file + in "sort/" like the following one and then run + "matitadep". +

+  baseuri=cic:/matita/myalgorithms
+  include_paths=../list
+

+ The include_paths field can declare a list of paths separated by space. + Please omit any "/" from the end of base URIs or paths. +

The authoring interface

TODO

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/axiom_definition_declaration.html b/helm/www/matita/docs/manual-0.5.9/axiom_definition_declaration.html new file mode 100644 index 000000000..67b7e6ea4 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/axiom_definition_declaration.html @@ -0,0 +1,38 @@ + +Definitions and declarations

Definitions and declarations

axiom id: term

axiom H: P

H is declared as an axiom that states P

definition id[: term] [≝ term]

definition f: T ≝ t

f is defined as t; + T is its type. An error is raised if the type of + t is not convertible to T.

T is inferred from t if + omitted.

t can be omitted only if T is + given. In this case Matita enters in interactive mode and + f must be defined by means of tactics.

Notice that the command is equivalent to theorem f: T ≝ t.

letrec TODO

TODO

[inductive|coinductive] id [args2]… : term ≝ [|] [id:term] [| id:term]… +[with id : term ≝ [|] [id:term] [| id:term]…]… +

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 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.

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/ch05s02.html b/helm/www/matita/docs/manual-0.5.9/ch05s02.html new file mode 100644 index 000000000..a03cc3035 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/ch05s02.html @@ -0,0 +1,27 @@ + +interpretation

interpretation

interpretation "description" 'symbol p1 … pn = + rhs

+

Synopsis:

interpretation + qstring csymbol [interpretation_argument]… + = + interpretation_rhs +

Action:

It declares a bi-directional mapping {…} between the content-level AST 'symbol t1 … tn and the semantic term rhs[{t1}/p1;…;{tn}/pn] + (the simultaneous substitution in rhs of the + interpretation {…} of every content-level + actual argument ti for its + corresponding formal parameter + pi). The + description must be a textual description of the + meaning associated to 'symbol by this + interpretation, and is used by the user interface of Matita to + provide feedback on the interpretation of ambiguous terms. +

Interpretation arguments:

Table 5.11. interpretation_argument

interpretation_argument::=[η.]… idA formal parameter. If the name of the formal parameter is + prefixed by n symbols "η", then the mapping performs + (multiple) η-expansions to grant that the semantic actual + parameter begins with at least n λ-abstractions.

Table 5.12. interpretation_rhs

interpretation_rhs::=uriA constant, specified by its URI
 |idA constant, specified by its name, or a bound variable. If + the constant name is ambiguous, the one corresponding to the + last implicitly or explicitly specified alias is used.
 |?An implicit parameter
 |( + interpretation_rhs + [interpretation_rhs]… + )An application

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/cicbrowser.html b/helm/www/matita/docs/manual-0.5.9/cicbrowser.html new file mode 100644 index 000000000..418e2b88d --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/cicbrowser.html @@ -0,0 +1,21 @@ + +Browsing and searching

Browsing and searching

The CIC browser is used to browse and search the library. + You can open a new CIC browser selecting "New Cic Browser" + from the "View" menu of Matita, or by pressing "F3". + The CIC browser is similar to a traditional Web browser.

Browsing the library

To browse the library, type in the location bar the absolute URI of + the theorem, definition or library fragment you are interested in. + "cic:/" is the root of the library. Contributions developed + in Matita are under "cic:/matita"; all the others are + part of the library of Coq.

Following the hyperlinks it is possible to navigate in the Web + of mathematical notions. Proof are rendered in pseudo-natural language + and mathematical notation is used for formulae. For now, mathematical + notation must be included in the current script to be activated, but we + plan to remove this limitation.

Looking at a proof under development

A proof under development is not yet part of the library. + The special URI "about:proof" can be used to browse the + proof currently under development, if there is one. + The "home" button of the CIC browser sets the location bar to + "about:proof". +

Searching the library

The query bar of the CIC browser can be used to search the library + of Matita for theorems or definitions that match certain criteria. + The criteria is given by typing a term in the query bar and selecting + an action in the drop down menu right of it.

Searching by name

TODO

List of lemmas that can be applied

TODO

Searching by exact match

TODO

List of elimination principles for a given type

TODO

Searching by instantiation

TODO

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_check.html b/helm/www/matita/docs/manual-0.5.9/command_check.html new file mode 100644 index 000000000..f826f9b79 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_check.html @@ -0,0 +1,6 @@ + +check

check

check t

+

Synopsis:

check term

Action:

Opens a CIC browser window that shows t + together with its type. The command is immediately removed from + the script.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_coercion.html b/helm/www/matita/docs/manual-0.5.9/command_coercion.html new file mode 100644 index 000000000..580317a8c --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_coercion.html @@ -0,0 +1,28 @@ + +coercion

coercion

coercion u with ariety saturation nocomposites

+

Synopsis:

+ coercion + (uri | term with) + [ nat [nat]] + [ nocomposites ] +

Action:

Declares u as an implicit coercion. + If the type of u is + ∀x1:T1. … ∀x(n-1):T(n-1).Tn the coercion target is + T(n - ariety) while its source is + T(n - ariety - saturation - 1). + Every time a term x + of type source is used with expected type target, Matita + automatically replaces x with + (u ? … ? x ? … ?) to avoid a typing error.

+ Note that the number of ? added after + x is saturation. +

Implicit coercions are not displayed to the user: + (u ? … ? x) is rendered simply + as x.

When a coercion u is declared + from source s to target t + and there is already a coercion u' of + target s or source t, + a composite implicit coercion is automatically computed + by Matita unless nocomposites + is specified.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_default.html b/helm/www/matita/docs/manual-0.5.9/command_default.html new file mode 100644 index 000000000..2bf2811b4 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_default.html @@ -0,0 +1,17 @@ + +default

default

default "s" u1 … un

+

Synopsis:

default + qstring uri [uri]… +

Action:

It registers a cluster of related definitions and + theorems to be used by tactics and the rendering engine. + Some functionalities of Matita are not available when some + clusters have not been registered. Overloading a cluster + registration is possible: the last registration will be the + default one, but the previous ones are still in effect.

+ s is an identifier of the cluster and + u1 … un + are the URIs of the definitions and theorems of the cluster. + The number n of required URIs depends on the + cluster. The following clusters are supported. +

Table 9.1. clusters

nameexpected object for 1st URIexpected object for 2nd URIexpected object for 3rd URIexpected object for 4th URIexpected object for 5th URIexpected object for 6th URIexpected object for 7th URIexpected object for 8th URIexpected object for 9th URIexpected object for 10th URIexpected object for 11th URI
equalityan inductive type (say, of type eq) of type ∀A:Type.A → Prop with one family parameter and one constructor of type ∀x:A.eq A xa theorem of type ∀A.∀x,y:A.eq A x y → eq A y xa theorem of type ∀A.∀x,y,z:A.eq A x y → eq A y z → eq A x z∀A.∀a.∀ P:A → Prop.P x → ∀y.eq A x y → P y∀A.∀a.∀ P:A → Prop.P x → ∀y.eq A y x → P y∀A.∀a.∀ P:A → Set.P x → ∀y.eq A x y → P y∀A.∀a.∀ P:A → Set.P x → ∀y.eq A y x → P y∀A.∀a.∀ P:A → Type.P x → ∀y.eq A x y → P y∀A.∀a.∀ P:A → Type.P x → ∀y.eq A y x → P y∀A.∀B.∀ f:A → B.∀x,y:A.eq A x y → eq B (f x) (f y)∀A.∀B.∀ f:A → B.∀x,y:A.eq A x y → eq B (f y) (f x)
truean inductive type of type Prop with only one constructor that has no arguments    
falsean inductive type of type Prop without constructors    
absurda theorem of type ∀A:Prop.∀B:Prop.A → Not A → B    

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_eval.html b/helm/www/matita/docs/manual-0.5.9/command_eval.html new file mode 100644 index 000000000..94474ad44 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_eval.html @@ -0,0 +1,10 @@ + +eval

eval

eval red on t

+

Synopsis:

eval + reduction-kind + on + term

Action:

Opens a CIC browser window that shows + the reduct of + t + together with its type.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_hint.html b/helm/www/matita/docs/manual-0.5.9/command_hint.html new file mode 100644 index 000000000..270e18b68 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_hint.html @@ -0,0 +1,10 @@ + +hint

hint

hint

+

Synopsis:

hint +

Action:

Displays a list of theorems that can be successfully + applied to the current selected sequent. The command is + removed from the script, but the window that displays the + theorems allow to add to the script the application of the + selected theorem. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_include.html b/helm/www/matita/docs/manual-0.5.9/command_include.html new file mode 100644 index 000000000..2ae7d394f --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_include.html @@ -0,0 +1,15 @@ + +include

include

include "s"

+

Synopsis:

include qstring

Action:

Every coercion, + notation and + interpretation that was active + when the file s was compiled last time + is made active. The same happens for declarations of + default definitions and + theorems and disambiguation + hints (aliases). + On the contrary, theorem and definitions declared in a file can be + immediately used without including it.

The file s is automatically compiled + if it is not compiled yet. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_include_first.html b/helm/www/matita/docs/manual-0.5.9/command_include_first.html new file mode 100644 index 000000000..085c33bd5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_include_first.html @@ -0,0 +1,4 @@ + +include' "s"

include' "s"

+

Synopsis:

include' qstring

Action:

Not documented (TODO), do not use it.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_inline.html b/helm/www/matita/docs/manual-0.5.9/command_inline.html new file mode 100644 index 000000000..b657df37b --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_inline.html @@ -0,0 +1,47 @@ + +inline

inline

inline "s" params

+

Synopsis:

+ inline qstring inline_params +

Action:

Inlines a representation of the item s, +which can be the URI of a HELM object. If an entire HELM directory (i.e. a base +URI) or the path of a *.ma source file is provided, all the contained objects +are represented in a row. +If the inlined object has a proof, this proof is represented in several ways +depending on the provided parameters.

+

inline-params

Table 9.2. inline-params


Table 9.3. inline-param

inline_param::=axiomTry to give an axiom flavour + (bodies are omitted even if present) +
 |definitionTry give a definition flavour +
 |theoremTry give a theorem flavour +
 |lemmaTry give a lemma flavour +
 |remarkTry give a remark flavour +
 |factTry give a fact flavour +
 |variantTry give a variant flavour + (implies plain) +
 |declarativeRepresent proofs using + declarative tactics + (this is the dafault and can be omitted) +
 |proceduralRepresent proofs using + procedural tactics +
 |plainRepresent proofs using plain + proof terms +
 |nodefaults + Do not use the tactics depending on the + default command + (rewrite + in the procedural mode) +
 |level=nat + Set the level of the procedural proof representation + (the default is the highest level) +
+
 |depth=natTODO

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_prefer_coercion.html b/helm/www/matita/docs/manual-0.5.9/command_prefer_coercion.html new file mode 100644 index 000000000..0a099b3e4 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_prefer_coercion.html @@ -0,0 +1,9 @@ + +prefer coercion

prefer coercion

prefer coercion u

+

Synopsis:

+ prefer coercion + (uri | term) +

Action:

The already declared coercion u + is preferred to other coercions with the same source and target. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_qed.html b/helm/www/matita/docs/manual-0.5.9/command_qed.html new file mode 100644 index 000000000..6ca315293 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_qed.html @@ -0,0 +1,8 @@ + +qed

qed

qed

+

Synopsis:

qed +

Action:

Saves and indexes the current interactive theorem or + definition. + In order to do this, the set of sequents still to be proved + must be empty.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/command_whelp.html b/helm/www/matita/docs/manual-0.5.9/command_whelp.html new file mode 100644 index 000000000..0d7f2bcfc --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/command_whelp.html @@ -0,0 +1,14 @@ + +whelp

whelp

whelp locate "s"

whelp hint t

whelp elim t

whelp match t

whelp instance t

+

Synopsis:

whelp + [locate qstring + | hint term + | elim term + | match term + | instance term + ] +

Action:

Performs the corresponding query, + showing the result in the CIC browser. The command is removed + from the script. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/declarative_tactics_quickref.xml b/helm/www/matita/docs/manual-0.5.9/declarative_tactics_quickref.xml new file mode 100644 index 000000000..002a7a376 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/declarative_tactics_quickref.xml @@ -0,0 +1,75 @@ + + tactics + + + + &tactic; + ::= + assume id : sterm + + + + | + by induction hypothesis we know term ( id ) + + + + | + case id [( id : term )] … + + + + | + justification done + + + + | + justification let id + : term such that term + ( id ) + + + + | + [obtain id | conclude term] = term [auto_params | using term | using once term | proof] [done] + + + + | + suppose term ( id + ) [ that is equivalent to term ] + + + + | + the thesis becomes term + + + + | + we need to prove term + [(id + )] + [ or equivalently term] + + + + | + we proceed by cases on term to prove term + + + + | + we proceed by induction on term to prove term + + + + | + justification we proved term + ( id + ) + + + +
diff --git a/helm/www/matita/docs/manual-0.5.9/docbook.css b/helm/www/matita/docs/manual-0.5.9/docbook.css new file mode 100644 index 000000000..a6ea52fe6 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/docbook.css @@ -0,0 +1,56 @@ + +body { + background: url(../../images/sheetbg.png); +} + +ul.authorgroup { + list-style-type: none; + padding-left: 1em; +} + +div.titlepage { + background: #eaeaea; +} + +div.titlepage hr { + display: none; +} + +div.navheader hr { + display: none; +} + +div.navfooter hr { + display: none; +} + +div.navheader { + padding-left: 150px; + background: #eaeaea; +} + +div.navfooter { + background: #eaeaea; +} + +div.matita_logo { + position: absolute; + top: 3px; + left: 5px; +} + +div.matita_logo img { + border-style: none; +} + +div.matita_logo span { + position: absolute; + top: 13px; + left: 65px; + text-decoration: underline; +} + +div.figure { + text-align: center; +} + diff --git a/helm/www/matita/docs/manual-0.5.9/figures/database.dia b/helm/www/matita/docs/manual-0.5.9/figures/database.dia new file mode 100644 index 000000000..652ea01eb Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/database.dia differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/database.png b/helm/www/matita/docs/manual-0.5.9/figures/database.png new file mode 100644 index 000000000..7e9b1ca78 Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/database.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/matita.png b/helm/www/matita/docs/manual-0.5.9/figures/matita.png new file mode 100644 index 000000000..5a6807126 Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/matita.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox1.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox1.png new file mode 100644 index 000000000..f7c85fe07 Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox1.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox2.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox2.png new file mode 100644 index 000000000..8d2182f5c Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox2.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox3.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox3.png new file mode 100644 index 000000000..48f6309bb Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox3.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox35.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox35.png new file mode 100644 index 000000000..313bd1ca8 Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox35.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox4.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox4.png new file mode 100644 index 000000000..432f3ffba Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox4.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox5.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox5.png new file mode 100644 index 000000000..465e5454d Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox5.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox6.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox6.png new file mode 100644 index 000000000..bc353de3b Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox6.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/figures/vbox7.png b/helm/www/matita/docs/manual-0.5.9/figures/vbox7.png new file mode 100644 index 000000000..7d17a852c Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/figures/vbox7.png differ diff --git a/helm/www/matita/docs/manual-0.5.9/html-stamp b/helm/www/matita/docs/manual-0.5.9/html-stamp new file mode 100644 index 000000000..e69de29bb diff --git a/helm/www/matita/docs/manual-0.5.9/index.html b/helm/www/matita/docs/manual-0.5.9/index.html new file mode 100644 index 000000000..0578255a9 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/index.html @@ -0,0 +1,9 @@ + +Matita V0.5.9 User Manual (rev. 0.5.9 )

Matita V0.5.9 + User Manual (rev. 0.5.9 +)

Both Matita and this document are free software, you can + redistribute them and/or modify them under the terms of the GNU General + Public License as published by the Free Software Foundation. See Chapter 10, License for more information.

Revision: 0.5.9 +, 12/07/2006

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/inst_from_src.html b/helm/www/matita/docs/manual-0.5.9/inst_from_src.html new file mode 100644 index 000000000..7e0f5bd37 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/inst_from_src.html @@ -0,0 +1,148 @@ + +Installing from sources

Installing from sources

Install Matita from the sources is hard, you have been warned! +

Getting the source code

You can get the Matita source code in two ways: +

  1. go to the download + page and get the latest released source tarball;

  2. get the development sources from our + SVN repository. You will need the + components/ and + matita/ directories from the + trunk/helm/software/ directory, plus the + configure and Makefile* + stuff from the same directory.

    In this case you will need to run + autoconf before proceding with the building + instructions below.

+

Requirements

In order to build Matita from sources you will need some + tools and libraries. They are listed below. + +

Note for Debian (and derivatives) users

If you are running a + Debian GNU/Linux + distribution, + or any of its derivative like Ubuntu, + you can use APT to install all the required tools and + libraries since they are all part of the Debian archive. +

+ apt-get install ocaml ocaml-findlib libgdome2-ocaml-dev liblablgtk2-ocaml-dev liblablgtkmathview-ocaml-dev liblablgtksourceview-ocaml-dev libsqlite3-ocaml-dev libocamlnet-ocaml-dev libzip-ocaml-dev libhttp-ocaml-dev ocaml-ulex08 libexpat-ocaml-dev libmysql-ocaml-dev camlp5 +

+ An official debian package is going to be added to the + archive too. +

+ +

Required tools and libraries

+ OCaml +

the Objective Caml compiler, version 3.09 or above

+ Findlib + +

OCaml package manager, version 1.1.1 or above

+ OCaml + Expat +

OCaml bindings for the expat + library

+ GMetaDOM + +

OCaml bindings for the Gdome 2 + library

+ OCaml + HTTP +

OCaml library to write HTTP daemons (and clients)

+ LablGTK + +

OCaml bindings for the GTK+ library + , version 2.6.0 or above

+ GtkMathView + + , + LablGtkMathView + +

GTK+ widget to render MathML documents and its + OCaml bindings

+ GtkSourceView + + , + LablGtkSourceView + +

extension for the GTK+ text widget (adding the typical + features of source code editors) and its OCaml bindings

MySQL , + OCaml + MySQL +

SQL database and OCaml bindings for its client-side library +

The SQL database itself is not strictly needed to run + Matita, but the client libraries are.

Sqlite , + + + OCaml Sqlite3 + +

Sqlite database and OCaml bindings +

+ Ocamlnet + +

collection of OCaml libraries to deal with + application-level Internet protocols and conventions

+ ulex + +

Unicode lexer generator for OCaml

+ CamlZip + +

OCaml library to access .gz files +

(optional) MySQL setup

To fully exploit Matita indexing and search capabilities + on a huge metadata set you may + need a working MySQL database. Detalied instructions on how to do + it can be found in the MySQL documentation. Here you + can find a quick howto.

In order to create a database you need administrator permissions on + your MySQL installation, usually the root account has them. Once you + have the permissions, a new database can be created executing + mysqladmin create matita + (matita is the default database name, you can + change it using the db.user key of the + configuration file).

Then you need to grant the necessary access permissions to the + database user of Matita, typing echo "grant all privileges + on matita.* to helm;" | mysql matita should do the trick + (helm is the default user name used by Matita to + access the database, you can change it using the + db.user key of the configuration file). +

Note

This way you create a database named matita + on which anyone claiming to be the helm user can + do everything (like adding dummy data or destroying the contained + one). It is strongly suggested to apply more fine grained permissions, + how to do it is out of the scope of this manual.

Compiling and installing

Once you get the source code the installations steps should be + quite familiar.

First of all you need to configure the build process executing + ./configure. This will check that all needed + tools and library are installed and prepare the sources for compilation + and installation.

Quite a few (optional) arguments may be passed to the + configure command line to change build time + parameters. They are listed below, together with their + default values:

configure command line + arguments

+ --with-runtime-dir=dir +

+ (Default: + /usr/local/matita) Runtime base directory + where all Matita stuff (executables, configuration files, + standard library, ...) will be installed +

+ --with-dbhost=host +

+ (Default: localhost) Default SQL server + hostname. Will be used while building the standard library + during the installation and to create the default Matita + configuration. May be changed later in configuration file. +

+ --enable-debug +

+ (Default: disabled) Enable debugging code. + Not for the casual user. +

Then you will manage the build and install process using + make + as usual. Below are reported the targets you have to invoke in sequence + to build and install: +

make targets

world

builds components needed by Matita and Matita itself + (in bytecode or native code depending + on the availability of the OCaml native code compiler)

install

installs Matita related tools, standard library and the + needed runtime stuff in the proper places on the filesystem. +

As a part of the installation process the Matita + standard library will be compiled, thus testing that the just + built matitac compiler works + properly.

For this step you will need a working SQL database (for + indexing the standard library while you are compiling it). See + Database setup + for instructions on how to set it up. +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/legal.xml b/helm/www/matita/docs/manual-0.5.9/legal.xml new file mode 100644 index 000000000..115ae002d --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/legal.xml @@ -0,0 +1,20 @@ + Both &appname; and this document are part of HELM, an Hypertextual, + Electronic Library of Mathematics, developed at the Computer Science + Department, University of Bologna, Italy. + + HELM is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + + HELM is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + You should have received a copy of the GNU General Public License along + with HELM; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301 USA. A copy of the GNU General + Public License is available at this link. + diff --git a/helm/www/matita/docs/manual-0.5.9/matita.conf.xml.html b/helm/www/matita/docs/manual-0.5.9/matita.conf.xml.html new file mode 100644 index 000000000..73d7497a4 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/matita.conf.xml.html @@ -0,0 +1,94 @@ + +Configuring Matita

Configuring Matita

+ The configuration file is divided in four sections. The user and + matita ones are self explicative and does not need user + intervention. Here we report a sample snippet for these two + sections. The remaining db and getter sections will be explained in + details later. +

+
+  <section name="user">
+    <key name="home">$(HOME)</key>
+    <key name="name">$(USER)</key>
+  </section>
+  <section name="matita">
+    <key name="basedir">$(user.home)/.matita</key>
+    <key name="rt_base_dir">/usr/share/matita/</key>
+    <key name="owner">$(user.name)</key>
+  </section>
+

+

+ Matita needs to store/fetch data and metadata. Data is essentially + composed of XML files, metadata is a set of tuples for a relational + model. Data and metadata can produced by the user or be already + available. Both kind of data/metadata can be local and/or remote. +

+ The db section tells Matita where to store and retrieve metadata, + while the getter section describes where XML files have to be + found. The following picture describes the suggested configuration. + Dashed arrows are determined by the configuration file. +

Figure 2.9. Configuring the Databases

How to configure the databases.

The getter

+ Consider the following snippet and the URI + cic:/matita/foo/bar.con. If Matita + is asked to read that object it will resolve the object trough + the getter. Since the first two entries are equally specific + (longest match rule applies) first the path + file://$(matita.rt_base_dir)/xml/standard-library/foo/bar.con + and then file://$(user.home)/.matita/xml/matita/foo/bar.con + are inspected. +

+
+  <section name="getter">
+    <key name="cache_dir">$(user.home)/.matita/getter/cache</key>
+    <key name="prefix">
+      cic:/matita/
+      file://$(matita.rt_base_dir)/xml/standard-library/
+      ro
+    </key>
+    <key name="prefix">
+      cic:/matita/
+      file://$(user.home)/.matita/xml/matita/
+    </key>
+    <key name="prefix">
+      cic:/Coq/
+      http://mowgli.cs.unibo.it/xml/
+      legacy
+    </key>
+  </section>
+	
+	

+ if the same URI has to be written, the former prefix is skipped + since it is marked as readonly (ro). + Objects resolved using the third prefix are readonly too, and are + retrieved using the network. There is no limit to the number of + prefixes the user can define. The distinction between prefixes marked + as readonly and legacy is that, legacy ones are really read only, while + the ones marked with ro are considered for + writing when Matita is started in system mode (used to publish user + developments in the library space). +

The db

+ The database subsystem has three fron ends: library, user and + legacy. The latter is the only optional one. Every query is done on + every frontend, making the duplicate free union of the results. + The user front end kepps metadata produced by the user, and is thus + heavily accessed in read/write mode, while the library and legacy + fron ends are read only. Every front end can be connected to + backend, the storage actually. + Consider the following snippet. +

+
+  <section name="db">
+    <key name="metadata">mysql://mowgli.cs.unibo.it matita helm none legacy</key>
+    <key name="metadata">file://$(matita.rt_base_dir) metadata.db helm helm library</key>
+    <key name="metadata">file://$(matita.basedir) user.db helm helm user</key>
+  </section>
+	
+	

+ Here the usr database is a file (thus locally accessed trough the + Sqlite library) placed in the user's home directory. The library one is + placed in the Matita runtime directory. The legacy fron end is + connected to a remote MySQL based storage. Every metadata key + takes a path to the storage, the name of the database, the user name, + a password (or none) and the name of the front + end to which it is attached. +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/matita.pdf b/helm/www/matita/docs/manual-0.5.9/matita.pdf new file mode 100644 index 000000000..c3eb222ec Binary files /dev/null and b/helm/www/matita/docs/manual-0.5.9/matita.pdf differ diff --git a/helm/www/matita/docs/manual-0.5.9/matita.txt b/helm/www/matita/docs/manual-0.5.9/matita.txt new file mode 100644 index 000000000..5578e9dd1 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/matita.txt @@ -0,0 +1,2322 @@ + +Matita V0.1.0 User Manual (rev. 1α) + +Andrea Asperti + + + +Claudio Sacerdoti Coen + + + +Ferruccio Guidi + + + +Enrico Tassi + + + +Stefano Zacchiroli + + + + Copyright © 2006 The HELM team. + + Both Matita and this document are free software, you can + redistribute them and/or modify them under the terms of the + GNU General Public License as published by the Free Software + Foundation. See Chapter 9 for more information. + _________________________________________________________ + + Table of Contents + 1. Introduction + + 1.1. Features + 1.2. Matita vs Coq + + 2. Installation + + 2.1. Installing from sources + + 2.1.1. Getting the source code + 2.1.2. Requirements + 2.1.3. Database setup + 2.1.4. Compiling and installing + + 2.2. Configuring Matita + + 3. Getting started + + 3.1. How to type Unicode symbols + 3.2. Browsing and searching + + 3.2.1. Browsing the library + 3.2.2. Looking at a proof under development + 3.2.3. Searching the library + + 3.3. Authoring + + 3.3.1. How to use developments + 3.3.2. The authoring interface + + 4. Syntax + + 4.1. Terms & co. + + 4.1.1. Lexical conventions + 4.1.2. Terms + + 4.2. Definitions and declarations + + 4.2.1. axiom id: term + 4.2.2. definition id[: term] [â term] + 4.2.3. [inductive|coinductive] id [args2]⦠: term + â [|] [id:term] [| id:term]⦠[with id : + term â [|] [id:term] [| id:term]â¦]⦠+ + 4.2.4. record id [args2]⦠: term â{[id [:|:>] + term] [;id [:|:>] term]â¦} + + 4.3. Proofs + + 4.3.1. theorem id[: term] [â term] + 4.3.2. variant id: term â term + 4.3.3. lemma id[: term] [â term] + 4.3.4. fact id[: term] [â term] + 4.3.5. remark id[: term] [â term] + + 4.4. Tactic arguments + + 4.4.1. intros-spec + 4.4.2. pattern + 4.4.3. reduction-kind + 4.4.4. auto-params + + 5. Extending the syntax + + 5.1. Introduction + + 6. Tacticals + + 6.1. Interactive proofs and definitions + 6.2. The proof status + 6.3. Tacticals + + 7. Tactics + + 7.1. Quick reference card + 7.2. absurd + 7.3. apply + 7.4. applyS + 7.5. assumption + 7.6. auto + 7.7. clear + 7.8. clearbody + 7.9. change + 7.10. constructor + 7.11. contradiction + 7.12. cut + 7.13. decompose + 7.14. demodulate + 7.15. destruct + 7.16. elim + 7.17. elimType + 7.18. exact + 7.19. exists + 7.20. fail + 7.21. fold + 7.22. fourier + 7.23. fwd + 7.24. generalize + 7.25. id + 7.26. intro + 7.27. intros + 7.28. inversion + 7.29. lapply + 7.30. left + 7.31. letin + 7.32. normalize + 7.33. reduce + 7.34. reflexivity + 7.35. replace + 7.36. rewrite + 7.37. right + 7.38. ring + 7.39. simplify + 7.40. split + 7.41. subst + 7.42. symmetry + 7.43. transitivity + 7.44. unfold + 7.45. whd + + 8. Other commands + + 8.1. alias + 8.2. check + 8.3. coercion + 8.4. default + 8.5. hint + 8.6. include + 8.7. include' "s" + 8.8. set + 8.9. whelp + 8.10. qed + + 9. License + + List of Tables + 4-1. qstring + 4-2. id + 4-3. nat + 4-4. char + 4-5. uri-step + 4-6. uri + 4-7. Terms + 4-8. Simple terms + 4-9. Arguments + 4-10. Pattern matching + 4-11. intros-spec + 4-12. pattern + 4-13. path + 4-14. reduction-kind + 4-15. reduction-kind + 6-1. proof script + 6-2. proof steps + 6-3. tactics and LCF tacticals + 7-1. tactics + 8-1. clusters + + List of Figures + 3-1. The Developments window + _________________________________________________________ + +Chapter 1. Introduction + +1.1. Features + + Matita is an interactive theorem prover (or proof assistant) + with the following characteristics: + + * It is based on a variant of the Calculus of (Co)Inductive + Constructions (CIC). CIC is also the logic of the Coq + proof assistant. + * It adopts a procedural proof language, but it has a new + set of small step tacticals that improve proof structuring + and debugging. + * It has a stand-alone graphical user interface (GUI) + inspired by CtCoq/Proof General. The GUI is implemented + according to the state of the art. In particular: + + It is based and fully integrated with Gtk/Gnome. + + An on-line help can be browsed via the Gnome + documentation browser. + + Mathematical formulae are rendered in two dimensional + notation via MathML and Unicode. + * It integrates advanced browsing and searching procedures. + * It allows the use of the typical ambiguous mathematical + notation by means of a disambiguating parser. + * It is compatible with the library of Coq (definitions and + proof objects). + _________________________________________________________ + +1.2. Matita vs Coq + + The system shares a common look&feel with the Coq proof + assistant and its graphical user interface. The two systems + have the same logic, very close proof languages and similar + sets of tactics. Moreover, Matita is compatible with the + library of Coq. From the user point of view the main lacking + features with respect to Coq are: + + * proof extraction; + * an extensible language of tactics; + * automatic implicit arguments; + * several ad-hoc decision procedures; + * several rarely used variants for most of the tactics; + * sections and local variables. To maintain compatibility + with the library of Coq, theorems defined inside sections + are abstracted by name over the section variables; their + instances are explicitly applied to actual arguments by + means of explicit named substitutions. + + Still from the user point of view, the main differences with + respect to Coq are: + + * the language of tacticals that allows execution of partial + tactical application; + * the unification of the concept of metavariable and + existential variable; + * terms with subterms that cannot be inferred are always + allowed as arguments of tactics or other commands; + * ambiguous terms are disambiguated by direct interaction + with the user; + * theorems and definitions in the library are always + accessible without needing to require/include them; right + now, only notation needs to be included to become active, + but we plan to remove this limitation. + _________________________________________________________ + +Chapter 2. Installation + +2.1. Installing from sources + + Currently, the only intended way to install Matita is starting + from its source code. + _________________________________________________________ + +2.1.1. Getting the source code + + You can get the Matita source code in two ways: + + 1. go to the download page and get the latest released source + tarball; + 2. get the development sources from our SVN repository. You + will need the components/ and matita/ directories from the + trunk/helm/software/ directory, plus the configure and + Makefile* stuff from the same directory. + In this case you will need to run autoconf before + proceding with the building instructions below. + _________________________________________________________ + +2.1.2. Requirements + + In order to build Matita from sources you will need some tools + and libraries. They are listed below. + + Note Note for Debian users + + + If you are running a Debian GNU/Linux distribution you can + have APT install all the required tools and libraries by + adding the following repository to your /etc/apt/sources.list: + deb http://people.debian.org/~zack unstable helm + + + and installing the helm-matita-deps package. + + Required tools and libraries + + OCaml + the Objective Caml compiler, version 3.09 or above + + Findlib + OCaml package manager, version 1.1.1 or above + + OCaml Expat + OCaml bindings for the expat library + + GMetaDOM + OCaml bindings for the Gdome 2 library + + OCaml HTTP + OCaml library to write HTTP daemons (and clients) + + LablGTK + OCaml bindings for the GTK+ library , version 2.6.0 or + above + + GtkMathView , LablGtkMathView + GTK+ widget to render MathML documents and its OCaml + bindings + + GtkSourceView , LablGtkSourceView + extension for the GTK+ text widget (adding the typical + features of source code editors) and its OCaml bindings + + MySQL , OCaml MySQL + SQL database and OCaml bindings for its client-side + library + + The SQL database itself is not strictly needed to run + Matita, but we stronly encourage its use since a lot of + features are disabled without it. Still, the OCaml + bindings of the library are needed at compile time. + + Ocamlnet + collection of OCaml libraries to deal with + application-level Internet protocols and conventions + + ulex + Unicode lexer generator for OCaml + + CamlZip + OCaml library to access .gz files + _________________________________________________________ + +2.1.3. Database setup + + To fully exploit Matita indexing and search capabilities you + will need a working MySQL database. Detalied instructions on + how to do it can be found in the MySQL documentation. Here you + can find a quick howto. + + In order to create a database you need administrator + permissions on your MySQL installation, usually the root + account has them. Once you have the permissions, a new + database can be created executing mysqladmin create matita + (matita is the default database name, you can change it using + the db.user key of the configuration file). + + Then you need to grant the necessary access permissions to the + database user of Matita, typing echo "grant all privileges on + matita.* to helm;" | mysql matita should do the trick (helm is + the default user name used by Matita to access the database, + you can change it using the db.user key of the configuration + file). + + Note + + This way you create a database named matita on which anyone + claiming to be the helm user can do everything (like adding + dummy data or destroying the contained one). It is strongly + suggested to apply more fine grained permissions, how to do it + is out of the scope of this manual. + _________________________________________________________ + +2.1.4. Compiling and installing + + Once you get the source code the installations steps should be + quite familiar. + + First of all you need to configure the build process executing + ./configure. This will check that all needed tools and library + are installed and prepare the sources for compilation and + installation. + + Quite a few (optional) arguments may be passed to the + configure command line to change build time parameters. They + are listed below, together with their default values: + + configure command line arguments + + --with-runtime-dir=dir + (Default: /usr/local/matita) Runtime base directory + where all Matita stuff (executables, configuration + files, standard library, ...) will be installed + + --with-dbhost=host + (Default: localhost) Default SQL server hostname. Will + be used while building the standard library during the + installation and to create the default Matita + configuration. May be changed later in configuration + file. + + --enable-debug + (Default: disabled) Enable debugging code. Not for the + casual user. + + Then you will manage the build and install process using make + as usual. Below are reported the targets you have to invoke in + sequence to build and install: + + make targets + + world + builds components needed by Matita and Matita itself + (in bytecode or native code depending on the + availability of the OCaml native code compiler) + + install + installs Matita related tools, standard library and the + needed runtime stuff in the proper places on the + filesystem. + + As a part of the installation process the Matita + standard library will be compiled, thus testing that + the just built matitac compiler works properly. + + For this step you will need a working SQL database (for + indexing the standard library while you are compiling + it). See Database setup for instructions on how to set + it up. + _________________________________________________________ + +2.2. Configuring Matita + + The file matita.conf.xml... TODO + _________________________________________________________ + +Chapter 3. Getting started + + If you are already familiar with the Calculus of (Co)Inductive + Constructions (CIC) and with interactive theorem provers with + procedural proof languages (expecially Coq), getting started + with Matita is relatively easy. You just need to learn how to + type Unicode symbols, how to browse and search the library and + how to author a proof script. + _________________________________________________________ + +3.1. How to type Unicode symbols + + Unicode characters can be typed in several ways: + + * Using the "Ctrl+Shift+Unicode code" standard Gnome + shortcut. E.g. Ctrl+Shift+3a9 generates "Ω". + * Typing the ligature "\name" where "name" is a standard + Unicode or LaTeX name for the character. Pressing "Alt+L" + just after the last character of the name converts the + ligature to the Unicode symbol. This operation is not + required since Matita understands also the "\name" + sequences. E.g. "\Omega" followed by Alt+L generates "Ω". + * Typing one of the following ligatures (and optionally + converting the ligature to the Unicode character has + described before): ":=" (which stands for â); "->" (which + stands for "â"); "=>" (which stands for "â"). + _________________________________________________________ + +3.2. Browsing and searching + + The CIC browser is used to browse and search the library. You + can open a new CIC browser selecting "New Cic Browser" from + the "View" menu of Matita, or by pressing "F3". The CIC + browser is similar to a traditional Web browser. + _________________________________________________________ + +3.2.1. Browsing the library + + To browse the library, type in the location bar the absolute + URI of the theorem, definition or library fragment you are + interested in. "cic:/" is the root of the library. + Contributions developed in Matita are under "cic:/matita"; all + the others are part of the library of Coq. + + Following the hyperlinks it is possible to navigate in the Web + of mathematical notions. Proof are rendered in pseudo-natural + language and mathematical notation is used for formulae. For + now, mathematical notation must be included in the current + script to be activated, but we plan to remove this limitation. + _________________________________________________________ + +3.2.2. Looking at a proof under development + + A proof under development is not yet part of the library. The + special URI "about:proof" can be used to browse the proof + currently under development, if there is one. The "home" + button of the CIC browser sets the location bar to + "about:proof". + _________________________________________________________ + +3.2.3. Searching the library + + The query bar of the CIC browser can be used to search the + library of Matita for theorems or definitions that match + certain criteria. The criteria is given by typing a term in + the query bar and selecting an action in the drop down menu + right of it. + _________________________________________________________ + +3.2.3.1. Searching by name + + TODO + _________________________________________________________ + +3.2.3.2. List of lemmas that can be applied + + TODO + _________________________________________________________ + +3.2.3.3. Searching by exact match + + TODO + _________________________________________________________ + +3.2.3.4. List of elimination principles for a given type + + TODO + _________________________________________________________ + +3.2.3.5. Searching by instantiation + + TODO + _________________________________________________________ + +3.3. Authoring + +3.3.1. How to use developments + + A development is a set of scripts files that are strictly + related (i.e. they depend on each other). Matita is able to + automatically manage dependencies among the scripts in a + development, compiling them in the correct order. + + The include statement can be performed by Matita only if the + mentioned script is compiled. If both scripts (the one that + includes and the included) are part of the same development, + the included script (and recursively all its dependencies) can + be compiled automatically. Dependencies among scripts + belonging to different developments is not implemented yet. + + The "Developments..." item the File menu (or pressing Ctrl+D) + opens the Developments window. + + Figure 3-1. The Developments window + + [developments.png] + + Developments window buttons + + New + To create a new Development the user needs to specify a + name[1] and the root directory in which all scripts + will be placed, eventually organized in subdirectories. + The Development should be named as the directory in + which it lives. A "makefile" file is placed in the + specified root directory. That makefile supports the + following targets: + + all + Build the whole development. + + clean + Cleans the whole development. + + cleanall + Resets the user environment (i.e. deleting all + the results of compilation of every development, + including the contents of the database). This + target should be used only in case something goes + wrong and Matita behaves incorrectly. + + scriptname.mo + Compiles "scriptname.ma" + + Delete + Decompiles the whole development and removes it. + + Build + Compiles all the scripts in the development. + + Clean + Decompiles the whole development. + + Publish + All the user developments live in the "user" space. + That is, the result of the compilation of scripts is + placed in his home directory and the tuples are placed + in personal tables inside the database. Publishing a + development means putting it in the "library" space. + This means putting the result of compilation in the + same place where the standard library lives. This + feature will be improved in the future to support + publishing the development in the "distributed library" + space (making your development public). + + Close + Closes the Developments window + _________________________________________________________ + +3.3.2. The authoring interface + + TODO + _________________________________________________________ + +Chapter 4. Syntax + + To describe syntax in this manual we use the following + conventions: + + 1. Non terminal symbols are emphasized and have a link to + their definition. E.g.: term + 2. Terminal symbols are in bold. E.g.: theorem + 3. Optional sequences of elements are put in square brackets. + E.g.: [in term] + 4. Alternatives are put in square brakets and they are + separated by vertical bars. E.g.: [<|>] + 5. 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]⦠+ 6. 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_-] + _________________________________________________________ + +4.1. Terms & co. + +4.1.1. Lexical conventions + + Table 4-1. qstring + qstring ::= "â©â©any sequence of characters excluded "âªâª" + + Table 4-2. 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 ([?'`])âªâª + + Table 4-3. nat + nat ::= â©â©any sequence of valid XML digitsâªâª + + Table 4-4. char + char ::= [a-zA-Z0-9_-] + + Table 4-5. uri-step + uri-step ::= char[char]⦠+ + Table 4-6. uri + uri ::= + [cic:/|theory:/]uri-step[/uri-step]â¦.id[.id]â¦[#xpointer(nat/ + nat[/nat]â¦)] + _________________________________________________________ + +4.1.2. Terms + + Table 4-7. Terms + term ::= sterm simple or delimited term + | term term application + | λargs.term λ-abstraction + | Î args.term dependent product meant to define a datatype + | âargs.term dependent product meant to define a proposition + | term â term non-dependent product (logical implication or + function space) + | let [id|(id: term)] â term in term local definition + | let [co]rec rec_def (co)recursive definitions + [and rec_def]⦠+ in term + | ⦠user provided notation + rec_def ::= id [id|(id[,term]⦠:term)]⦠+ [on id] [: term] â term] + + Table 4-8. Simple terms + sterm ::= (term) + | id[\subst[ idâterm [;idâterm]⦠]] identifier with + optional explicit named substitution + | uri a qualified reference + | Prop the impredicative sort of propositions + | Set the impredicate sort of datatypes + | CProp one fixed predicative sort of constructive + propositions + | Type one predicative sort of datatypes + | ? implicit argument + | ?n [[ [_|term]⦠]] metavariable + | match term [ in term ] [ return term ] with case analysis + [ match_branch[|match_branch]⦠] + | (term:term) cast + | ⦠user provided notation at precedence 90 + + Table 4-9. Arguments + args ::= _[: term] ignored argument + | (_[: term]) ignored argument + | id[,id]â¦[: term] + | (id[,id]â¦[: term]) + args2 ::= id + | (id[,id]â¦: term) + + Table 4-10. Pattern matching + match_branch ::= match_pattern â term + match_pattern ::= id 0-ary constructor + | (id id [id]â¦) n-ary constructor (binds the n arguments) + _________________________________________________________ + +4.2. Definitions and declarations + +4.2.1. axiom id: term + + axiom H: P + + H is declared as an axiom that states P + _________________________________________________________ + +4.2.2. definition id[: term] [â term] + + definition f: T â t + + f is defined as t; T is its type. An error is raised if the + type of t is not convertible to T. + + T is inferred from t if omitted. + + t can be omitted only if T is given. In this case Matita + enters in interactive mode and f must be defined by means of + tactics. + + Notice that the command is equivalent to theorem f: T â t. + _________________________________________________________ + +4.2.3. [inductive|coinductive] id [args2]⦠: term â [|] [id:term] +[| id:term]⦠[with id : term â [|] [id:term] [| id:term]â¦]⦠+ + 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. + _________________________________________________________ + +4.2.4. record id [args2]⦠: term â{[id [:|:>] term] [;id [:|:>] +term]â¦} + + 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. + _________________________________________________________ + +4.3. Proofs + +4.3.1. theorem id[: term] [â term] + + theorem f: P â p + + Proves a new theorem f whose thesis is P. + + If p is provided, it must be a proof term for P. Otherwise an + interactive proof is started. + + P can be omitted only if the proof is not interactive. + + Proving a theorem already proved in the library is an error. + To provide an alternative name and proof for the same theorem, + use variant f: P â p. + + A warning is raised if the name of the theorem cannot be + obtained by mangling the name of the constants in its thesis. + + Notice that the command is equivalent to definition f: T â t. + _________________________________________________________ + +4.3.2. variant id: term â term + + variant f: T â t + + Same as theorem f: T â t, but it does not complain if the + theorem has already been proved. To be used to give an + alternative name or proof to a theorem. + _________________________________________________________ + +4.3.3. lemma id[: term] [â term] + + lemma f: T â t + + Same as theorem f: T â t + _________________________________________________________ + +4.3.4. fact id[: term] [â term] + + fact f: T â t + + Same as theorem f: T â t + _________________________________________________________ + +4.3.5. remark id[: term] [â term] + + remark f: T â t + + Same as theorem f: T â t + _________________________________________________________ + +4.4. Tactic arguments + + This section documents the syntax of some recurring arguments + for tactics. + _________________________________________________________ + +4.4.1. intros-spec + + Table 4-11. 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. + _________________________________________________________ + +4.4.2. pattern + + Table 4-12. pattern + pattern ::= in [id[: path]]⦠[⢠path]] simple pattern + | in match term [in [id[: path]]⦠[⢠path]] full pattern + + Table 4-13. path + path ::= â©â©any sterm whithout 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: + + 1. Occurrences of the subterms to locate that are represented + by %. + 2. Subterms without any occurrence of subterms to locate that + can be represented by ?. + + 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: + + 1. 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. + 2. From the contextual menu select "Copy". + 3. From the "Edit" or the contextual menu select "Paste as + pattern" + _________________________________________________________ + +4.4.3. 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. + + Table 4-14. reduction-kind + reduction-kind ::= 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 + _________________________________________________________ + +4.4.4. auto-params + + TODO + + Table 4-15. reduction-kind + auto_params ::= depth=â« TODO + | width=â« TODO + | TODO TODO + _________________________________________________________ + +Chapter 5. Extending the syntax + +5.1. Introduction + + TODO + + notation: TODO + + interpretation: TODO + _________________________________________________________ + +Chapter 6. Tacticals + +6.1. Interactive proofs and definitions + + An interactive definition is started by giving a definition + command omitting the definiens. An interactive proof is + started by using one of the proof commands omitting an + explicit proof term. + + An interactive proof or definition can and must be terminated + by a qed command when no more sequents are left to prove. + Between the command that starts the interactive session and + the qed command the user must provide a procedural proof + script made of tactics structured by means of tacticals. + + In the tradition of the LCF system, tacticals can be + considered higher order tactics. Their syntax is structured + and they are executed atomically. On the contrary, in Matita + the syntax of several tacticals is destructured into a + sequence of tokens and tactics in such a way that is is + possible to stop execution after every single token or tactic. + The original semantics is preserved: the execution of the + whole sequence yields the result expected by the original + LCF-like tactical. + _________________________________________________________ + +6.2. The proof status + + During an interactive proof, the proof status is made of the + set of sequents to prove and the partial proof built so far. + + The partial proof can be inspected on demand in the CIC + browser. It will be shown in pseudo-natural language produced + on the fly from the proof term. + + The set of sequents to prove is shown in the notebook of the + authoring interface, in the top-right corner of the main + window of Matita. Each tab shows a different sequent, named + with a question mark followed by a number. The current role of + the sequent, according to the following description, is also + shown in the tab tag. + + 1. Selected sequents (name in boldface, e.g. ?3). The next + tactic will be applied to every selected sequent, + producing new selected sequents. Tacticals such as + branching ("[") or "focus" can be used to change the set + of selected sequents. + 2. Sibling sequents (name prefixed by a vertical bar and + their position, e.g. |[3]?2). When the set of selected + sequents has more than one element, the user can decide to + focus in turn on each of them. The branching tactical + ("[") selects the first sequent only, marking every + previously selected sequent as a sibling sequent. Each + sibling sequent is given a different position. The + tactical "2,3:" can be used to select one or more sibling + sequents, different from the one proposed, according to + their position. Once the user starts to work on the + selected sibling sequents it becomes impossible to select + a new set of siblings until the ("|") tactical is used to + end work on the current one. + 3. Automatically solved sibling sequents (name strokethrough, + e.g. |[3]?2). Sometimes a tactic can close by side effects + a sibling sequent the user has not selected yet. The + sequent is left in the automatically solved status in + order for the user to explicitly accept (using the "skip" + tactical) the automatic instantiation in the proof script. + This way the correspondence between the number of branches + in the proof script and the number of sequents generated + in the proof is preserved. + _________________________________________________________ + +6.3. Tacticals + + Table 6-1. proof script + proof-script ::= proof-step [proof-step]⦠+ + Every proof step can be immediately executed. + + Table 6-2. proof steps + proof-step ::= LCF-tactical The tactical is applied to each + selected sequent. Each new sequent becomes a selected sequent. + | . The first selected sequent becomes the only one + selected. All the remaining previously selected sequents are + proposed to the user one at a time when the next "." is used. + | ; Nothing changes. Use this proof step as a separator in + concrete syntax. + | [ Every selected sequent becomes a sibling sequent that + constitute a branch in the proof. Moreover, the first sequent + is also selected. + | | Stop working on the current branch of the innermost + branching proof. The sibling branches become the sibling + sequents and the first one is also selected. + | nat[,nat]â¦: The sibling sequents specified by the user + become the next selected sequents. + | *: Every sibling branch not considered yet in the + innermost branching proof becomes a selected sequent. + | skip Accept the automatically provided instantiation (not + shown to the user) for the currently selected automatically + closed sibling sequent. + | ] Stop analyzing branches for the innermost branching + proof. Every sequent opened during the branching proof and not + closed yet becomes a selected sequent. + | focus nat [nat]⦠Selects the sequents specified by the + user. The selected sequents must be completely closed (no new + sequents left open) before doing an "unfocus that restores the + current set of sibling branches. + | unfocus Used to match the innermost "focus" tactical when + all the sequents selected by it have been closed. Until + "unfocus" is performed, it is not possible to progress in the + rest of the proof. + + Table 6-3. tactics and LCF tacticals + LCF-tactical ::= tactic Applies the specified tactic. + | LCF-tactical ; LCF-tactical Applies the first tactical + first and the second tactical to each sequent opened by the + first one. + | LCF-tactical [ [LCF-tactical] [| LCF-tactical]⦠] Applies + the first tactical first and each tactical in the list of + tacticals to the corresponding sequent opened by the first + one. The number of tacticals provided in the list must be + equal to the number of sequents opened by the first tactical. + | do nat LCF-tactical end TODO + | repeat LCF-tactical end TODO + | first [ [LCF-tactical] [| LCF-tactical]⦠] TODO + | try LCF-tactical TODO + | solve [ [LCF-tactical] [| LCF-tactical]⦠] TODO + | (LCF-tactical) Used for grouping during parsing. + _________________________________________________________ + +Chapter 7. Tactics + +7.1. Quick reference card + + Table 7-1. tactics + tactic ::= absurd sterm + | apply sterm + | applyS sterm + | assumption + | auto [depth=nat] [width=nat] [paramodulation] [full] + | change pattern with sterm + | clear id [idâ¦] + | clearbody id + | constructor nat + | contradiction + | cut sterm [as id] + | decompose [( id⦠)] [id] [as idâ¦] + | demodulate + | destruct sterm + | elim sterm [using sterm] intros-spec + | elimType sterm [using sterm] intros-spec + | exact sterm + | exists + | fail + | fold reduction-kind sterm pattern + | fourier + | fwd id [as id [id]â¦] + | generalize pattern [as id] + | id + | intro [id] + | intros intros-spec + | inversion sterm + | lapply [linear] [depth=nat] sterm [to sterm [,stermâ¦] ] + [as id] + | left + | letin id â sterm + | normalize pattern + | reduce pattern + | reflexivity + | replace pattern with sterm + | rewrite [<|>] sterm pattern + | right + | ring + | simplify pattern + | split + | subst + | symmetry + | transitivity sterm + | unfold [sterm] pattern + | whd pattern + _________________________________________________________ + +7.2. absurd + + absurd P + + Synopsis: + absurd sterm + + Pre-conditions: + P must have type Prop. + + Action: + It closes the current sequent by eliminating an absurd + term. + + New sequents to prove: + It opens two new sequents of conclusion P and ¬P. + _________________________________________________________ + +7.3. apply + + apply t + + Synopsis: + apply sterm + + Pre-conditions: + t must have type T[1] â ... â T[n] â G where G can be + unified with the conclusion of the current sequent. + + Action: + It closes the current sequent by applying t to n + implicit arguments (that become new sequents). + + New sequents to prove: + It opens a new sequent for each premise T[i] that is + not instantiated by unification. T[i] is the conclusion + of the i-th new sequent to prove. + _________________________________________________________ + +7.4. applyS + + applyS t auto_params + + Synopsis: + applyS sterm auto_params + + Pre-conditions: + t must have type T[1] â ... â T[n] â G. + + Action: + applyS is useful when apply fails because the current + goal and the conclusion of the applied theorems are + extensionally equivalent up to instantiation of + metavariables, but cannot be unified. E.g. the goal is + P(n*O+m) and the theorem to be applied proves + âm.P(m+O). + + It tries to automatically rewrite the current goal + using auto paramodulation to make it unifiable with G. + Then it closes the current sequent by applying t to n + implicit arguments (that become new sequents). The + auto_params parameters are passed directly to auto + paramodulation. + + New sequents to prove: + It opens a new sequent for each premise T[i] that is + not instantiated by unification. T[i] is the conclusion + of the i-th new sequent to prove. + _________________________________________________________ + +7.5. assumption + + assumption + + Synopsis: + assumption + + Pre-conditions: + There must exist an hypothesis whose type can be + unified with the conclusion of the current sequent. + + Action: + It closes the current sequent exploiting an hypothesis. + + New sequents to prove: + None + _________________________________________________________ + +7.6. auto + + auto depth=d width=w paramodulation full + + Synopsis: + auto [depth=nat] [width=nat] [paramodulation] [full] + + Pre-conditions: + None, but the tactic may fail finding a proof if every + proof is in the search space that is pruned away. + Pruning is controlled by d and w. Moreover, only lemmas + whose type signature is a subset of the signature of + the current sequent are considered. The signature of a + sequent is ...TODO + + Action: + It closes the current sequent by repeated application + of rewriting steps (unless paramodulation is omitted), + hypothesis and lemmas in the library. + + New sequents to prove: + None + _________________________________________________________ + +7.7. clear + + clear H[1] ... H[m] + + Synopsis: + clear id [idâ¦] + + Pre-conditions: + H[1] ... H[m] must be hypotheses of the current sequent + to prove. + + Action: + It hides the hypotheses H[1] ... H[m] from the current + sequent. + + New sequents to prove: + None + _________________________________________________________ + +7.8. clearbody + + clearbody H + + Synopsis: + clearbody id + + Pre-conditions: + H must be an hypothesis of the current sequent to + prove. + + Action: + It hides the definiens of a definition in the current + sequent context. Thus the definition becomes an + hypothesis. + + New sequents to prove: + None. + _________________________________________________________ + +7.9. change + + change patt with t + + Synopsis: + change pattern with sterm + + Pre-conditions: + Each subterm matched by the pattern must be convertible + with the term t disambiguated in the context of the + matched subterm. + + Action: + It replaces the subterms of the current sequent matched + by patt with the new term t. For each subterm matched + by the pattern, t is disambiguated in the context of + the subterm. + + New sequents to prove: + None. + _________________________________________________________ + +7.10. constructor + + constructor n + + Synopsis: + constructor nat + + Pre-conditions: + The conclusion of the current sequent must be an + inductive type or the application of an inductive type + with at least n constructors. + + Action: + It applies the n-th constructor of the inductive type + of the conclusion of the current sequent. + + New sequents to prove: + It opens a new sequent for each premise of the + constructor that can not be inferred by unification. + For more details, see the apply tactic. + _________________________________________________________ + +7.11. contradiction + + contradiction + + Synopsis: + contradiction + + Pre-conditions: + There must be in the current context an hypothesis of + type False. + + Action: + It closes the current sequent by applying an hypothesis + of type False. + + New sequents to prove: + None + _________________________________________________________ + +7.12. cut + + cut P as H + + Synopsis: + cut sterm [as id] + + Pre-conditions: + P must have type Prop. + + Action: + It closes the current sequent. + + New sequents to prove: + It opens two new sequents. The first one has an extra + hypothesis H:P. If H is omitted, the name of the + hypothesis is automatically generated. The second + sequent has conclusion P and hypotheses the hypotheses + of the current sequent to prove. + _________________________________________________________ + +7.13. decompose + + decompose (T[1] ... T[n]) H as H[1] ... H[m] + + Synopsis: + decompose [( id⦠)] [id] [as idâ¦] + + Pre-conditions: + H must inhabit one inductive type among T[1] ... T[n] + and the types of a predefined list. + + Action: + Runs elim H H[1] ... H[m] , clears H and tries to run + itself recursively on each new identifier introduced by + elim in the opened sequents. If H is not provided tries + this operation on each premise in the current context. + + New sequents to prove: + The ones generated by all the elim tactics run. + _________________________________________________________ + +7.14. demodulate + + demodulate + + Synopsis: + demodulate + + Pre-conditions: + None. + + Action: + TODO + + New sequents to prove: + None. + _________________________________________________________ + +7.15. destruct + + destruct p + + Synopsis: + destruct sterm + + Pre-conditions: + p must have type E[1] = E[2] where the two sides of the + equality are possibly applied constructors of an + inductive type. + + Action: + The tactic recursively compare the two sides of the + equality looking for different constructors in + corresponding position. If two of them are found, the + tactic closes the current sequent by proving the + absurdity of p. Otherwise it adds a new hypothesis for + each leaf of the formula that states the equality of + the subformulae in the corresponding positions on the + two sides of the equality. + + New sequents to prove: + None. + _________________________________________________________ + +7.16. elim + + elim t using th hyps + + Synopsis: + elim sterm [using sterm] intros-spec + + Pre-conditions: + t must inhabit an inductive type and th must be an + elimination principle for that inductive type. If th is + omitted the appropriate standard elimination principle + is chosen. + + Action: + It proceeds by cases on the values of t, according to + the elimination principle th. + + New sequents to prove: + It opens one new sequent for each case. The names of + the new hypotheses are picked by hyps, if provided. If + hyps specifies also a number of hypotheses that is less + than the number of new hypotheses for a new sequent, + then the exceeding hypothesis will be kept as + implications in the conclusion of the sequent. + _________________________________________________________ + +7.17. elimType + + elimType T using th hyps + + Synopsis: + elimType sterm [using sterm] intros-spec + + Pre-conditions: + T must be an inductive type. + + Action: + TODO (severely bugged now). + + New sequents to prove: + TODO + _________________________________________________________ + +7.18. exact + + exact p + + Synopsis: + exact sterm + + Pre-conditions: + The type of p must be convertible with the conclusion + of the current sequent. + + Action: + It closes the current sequent using p. + + New sequents to prove: + None. + _________________________________________________________ + +7.19. exists + + exists + + Synopsis: + exists + + Pre-conditions: + The conclusion of the current sequent must be an + inductive type or the application of an inductive type + with at least one constructor. + + Action: + Equivalent to constructor 1. + + New sequents to prove: + It opens a new sequent for each premise of the first + constructor of the inductive type that is the + conclusion of the current sequent. For more details, + see the constructor tactic. + _________________________________________________________ + +7.20. fail + + fail + + Synopsis: + fail + + Pre-conditions: + None. + + Action: + This tactic always fail. + + New sequents to prove: + N.A. + _________________________________________________________ + +7.21. fold + + fold red t patt + + Synopsis: + fold reduction-kind sterm pattern + + Pre-conditions: + The pattern must not specify the wanted term. + + Action: + First of all it locates all the subterms matched by + patt. In the context of each matched subterm it + disambiguates the term t and reduces it to its red + normal form; then it replaces with t every occurrence + of the normal form in the matched subterm. + + New sequents to prove: + None. + _________________________________________________________ + +7.22. fourier + + fourier + + Synopsis: + fourier + + Pre-conditions: + The conclusion of the current sequent must be a linear + inequation over real numbers taken from standard + library of Coq. Moreover the inequations in the + hypotheses must imply the inequation in the conclusion + of the current sequent. + + Action: + It closes the current sequent by applying the Fourier + method. + + New sequents to prove: + None. + _________________________________________________________ + +7.23. fwd + + fwd H as H[0] ... H[n] + + Synopsis: + fwd id [as id [id]â¦] + + Pre-conditions: + The type of H must be the premise of a forward + simplification theorem. + + Action: + This tactic is under development. It simplifies the + current context by removing H using the following + methods: forward application (by lapply) of a suitable + simplification theorem, chosen automatically, of which + the type of H is a premise, decomposition (by + decompose), rewriting (by rewrite). H[0] ... H[n] are + passed to the tactics fwd invokes, as names for the + premise they introduce. + + New sequents to prove: + The ones opened by the tactics fwd invokes. + _________________________________________________________ + +7.24. generalize + + generalize patt as H + + Synopsis: + generalize pattern [as id] + + Pre-conditions: + All the terms matched by patt must be convertible and + close in the context of the current sequent. + + Action: + It closes the current sequent by applying a stronger + lemma that is proved using the new generated sequent. + + New sequents to prove: + It opens a new sequent where the current sequent + conclusion G is generalized to âx.G{x/t} where {x/t} is + a notation for the replacement with x of all the + occurrences of the term t matched by patt. If patt + matches no subterm then t is defined as the wanted part + of the pattern. + _________________________________________________________ + +7.25. id + + id + + Synopsis: + id + + Pre-conditions: + None. + + Action: + This identity tactic does nothing without failing. + + New sequents to prove: + None. + _________________________________________________________ + +7.26. intro + + intro H + + Synopsis: + intro [id] + + Pre-conditions: + The conclusion of the sequent to prove must be an + implication or a universal quantification. + + Action: + It applies the right introduction rule for implication, + closing the current sequent. + + New sequents to prove: + It opens a new sequent to prove adding to the + hypothesis the antecedent of the implication and + setting the conclusion to the consequent of the + implicaiton. The name of the new hypothesis is H if + provided; otherwise it is automatically generated. + _________________________________________________________ + +7.27. intros + + intros hyps + + Synopsis: + intros intros-spec + + Pre-conditions: + If hyps specifies a number of hypotheses to introduce, + then the conclusion of the current sequent must be + formed by at least that number of imbricated + implications or universal quantifications. + + Action: + It applies several times the right introduction rule + for implication, closing the current sequent. + + New sequents to prove: + It opens a new sequent to prove adding a number of new + hypotheses equal to the number of new hypotheses + requested. If the user does not request a precise + number of new hypotheses, it adds as many hypotheses as + possible. The name of each new hypothesis is either + popped from the user provided list of names, or it is + automatically generated when the list is (or becomes) + empty. + _________________________________________________________ + +7.28. inversion + + inversion t + + Synopsis: + inversion sterm + + Pre-conditions: + The type of the term t must be an inductive type or the + application of an inductive type. + + Action: + It proceeds by cases on t paying attention to the + constraints imposed by the actual "right arguments" of + the inductive type. + + New sequents to prove: + It opens one new sequent to prove for each case in the + definition of the type of t. With respect to a simple + elimination, each new sequent has additional hypotheses + that states the equalities of the "right parameters" of + the inductive type with terms originally present in the + sequent to prove. + _________________________________________________________ + +7.29. lapply + + lapply linear depth=d t to t[1], ..., t[n] as H + + Synopsis: + lapply [linear] [depth=nat] sterm [to sterm [,stermâ¦] + ] [as id] + + Pre-conditions: + t must have at least d independent premises and n must + not be greater than d. + + Action: + Invokes letin H â (t ? ... ?) with enough ?'s to reach + the d-th independent premise of t (d is maximum if + unspecified). Then istantiates (by apply) with t[1], + ..., t[n] the ?'s corresponding to the first n + independent premises of t. Usually the other ?'s + preceding the n-th independent premise of t are + istantiated as a consequence. If the linear flag is + specified and if t, t[1], ..., t[n] are (applications + of) premises in the current context, they are cleared. + + New sequents to prove: + The ones opened by the tactics lapply invokes. + _________________________________________________________ + +7.30. left + + left + + Synopsis: + left + + Pre-conditions: + The conclusion of the current sequent must be an + inductive type or the application of an inductive type + with at least one constructor. + + Action: + Equivalent to constructor 1. + + New sequents to prove: + It opens a new sequent for each premise of the first + constructor of the inductive type that is the + conclusion of the current sequent. For more details, + see the constructor tactic. + _________________________________________________________ + +7.31. letin + + letin x â t + + Synopsis: + letin id â sterm + + Pre-conditions: + None. + + Action: + It adds to the context of the current sequent to prove + a new definition x â t. + + New sequents to prove: + None. + _________________________________________________________ + +7.32. normalize + + normalize patt + + Synopsis: + normalize pattern + + Pre-conditions: + None. + + Action: + It replaces all the terms matched by patt with their + βδιζ-normal form. + + New sequents to prove: + None. + _________________________________________________________ + +7.33. reduce + + reduce patt + + Synopsis: + reduce pattern + + Pre-conditions: + None. + + Action: + It replaces all the terms matched by patt with their + βδιζ-normal form. + + New sequents to prove: + None. + _________________________________________________________ + +7.34. reflexivity + + reflexivity + + Synopsis: + reflexivity + + Pre-conditions: + The conclusion of the current sequent must be t=t for + some term t + + Action: + It closes the current sequent by reflexivity of + equality. + + New sequents to prove: + None. + _________________________________________________________ + +7.35. replace + + change patt with t + + Synopsis: + replace pattern with sterm + + Pre-conditions: + None. + + Action: + It replaces the subterms of the current sequent matched + by patt with the new term t. For each subterm matched + by the pattern, t is disambiguated in the context of + the subterm. + + New sequents to prove: + For each matched term t' it opens a new sequent to + prove whose conclusion is t'=t. + _________________________________________________________ + +7.36. rewrite + + rewrite dir p patt + + Synopsis: + rewrite [<|>] sterm pattern + + Pre-conditions: + p must be the proof of an equality, possibly under some + hypotheses. + + Action: + It looks in every term matched by patt for all the + occurrences of the left hand side of the equality that + p proves (resp. the right hand side if dir is <). Every + occurence found is replaced with the opposite side of + the equality. + + New sequents to prove: + It opens one new sequent for each hypothesis of the + equality proved by p that is not closed by unification. + _________________________________________________________ + +7.37. right + + right + + Synopsis: + right + + Pre-conditions: + The conclusion of the current sequent must be an + inductive type or the application of an inductive type + with at least two constructors. + + Action: + Equivalent to constructor 2. + + New sequents to prove: + It opens a new sequent for each premise of the second + constructor of the inductive type that is the + conclusion of the current sequent. For more details, + see the constructor tactic. + _________________________________________________________ + +7.38. ring + + ring + + Synopsis: + ring + + Pre-conditions: + The conclusion of the current sequent must be an + equality over Coq's real numbers that can be proved + using the ring properties of the real numbers only. + + Action: + It closes the current sequent veryfying the equality by + means of computation (i.e. this is a reflexive tactic, + implemented exploiting the "two level reasoning" + technique). + + New sequents to prove: + None. + _________________________________________________________ + +7.39. simplify + + simplify patt + + Synopsis: + simplify pattern + + Pre-conditions: + None. + + Action: + It replaces all the terms matched by patt with other + convertible terms that are supposed to be simpler. + + New sequents to prove: + None. + _________________________________________________________ + +7.40. split + + split + + Synopsis: + split + + Pre-conditions: + The conclusion of the current sequent must be an + inductive type or the application of an inductive type + with at least one constructor. + + Action: + Equivalent to constructor 1. + + New sequents to prove: + It opens a new sequent for each premise of the first + constructor of the inductive type that is the + conclusion of the current sequent. For more details, + see the constructor tactic. + _________________________________________________________ + +7.41. subst + + subst + + Synopsis: + subst + + Pre-conditions: + None. + + Action: + For each premise of the form H: x = t or H: t = x where + x is a local variable and t does not depend on x, the + tactic rewrites H wherever x appears clearing H and x + afterwards. + + New sequents to prove: + The one opened by the applied tactics. + _________________________________________________________ + +7.42. symmetry + + The tactic symmetry + + symmetry + + Synopsis: + symmetry + + Pre-conditions: + The conclusion of the current proof must be an + equality. + + Action: + It swaps the two sides of the equalityusing the + symmetric property. + + New sequents to prove: + None. + _________________________________________________________ + +7.43. transitivity + + transitivity t + + Synopsis: + transitivity sterm + + Pre-conditions: + The conclusion of the current proof must be an + equality. + + Action: + It closes the current sequent by transitivity of the + equality. + + New sequents to prove: + It opens two new sequents l=t and t=r where l and r are + the left and right hand side of the equality in the + conclusion of the current sequent to prove. + _________________________________________________________ + +7.44. unfold + + unfold t patt + + Synopsis: + unfold [sterm] pattern + + Pre-conditions: + None. + + Action: + It finds all the occurrences of t (possibly applied to + arguments) in the subterms matched by patt. Then it + δ-expands each occurrence, also performing + β-reduction of the obtained term. If t is omitted it + defaults to each subterm matched by patt. + + New sequents to prove: + None. + _________________________________________________________ + +7.45. whd + + whd patt + + Synopsis: + whd pattern + + Pre-conditions: + None. + + Action: + It replaces all the terms matched by patt with their + βδιζ-weak-head normal form. + + New sequents to prove: + None. + _________________________________________________________ + +Chapter 8. Other commands + +8.1. alias + + alias id "s" = "def" + + alias symbol "s" (instance n) = "def" + + alias num (instance n) = "def" + + Synopsis: + alias [id qstring = qstring | symbol qstring [(instance + nat)] = qstring | num [(instance nat)] = qstring ] + + Action: + Used to give an hint to the disambiguating parser. When + the parser is faced to the identifier (or symbol) s or + to any number, it will prefer interpretations that "map + s (or the number) to def". For identifiers, "def" is + the URI of the interpretation. E.g.: + cic:/matita/nat/nat.ind#xpointer(1/1/1) for the first + constructor of the first inductive type defined in the + block of inductive type(s) cic:/matita/nat/nat.ind. For + symbols and numbers, "def" is the label used to mark + the wanted interpretation. + + When a symbol or a number occurs several times in the + term to be parsed, it is possible to give an hint only + for the instance n. When the instance is omitted, the + hint is valid for every occurrence. + + Hints are automatically inserted in the script by + Matita every time the user is interactively asked a + question to disambiguate a term. This way the user + won't be posed the same question twice when the script + will be executed again. + _________________________________________________________ + +8.2. check + + check t + + Synopsis: + check term + + Action: + Opens a CIC browser window that shows t together with + its type. The command is immediately removed from the + script. + _________________________________________________________ + +8.3. coercion + + coercion u + + Synopsis: + coercion uri + + Action: + Declares u as an implicit coercion from the type of its + last argument (source) to its codomain (target). Every + time a term x of type source is used with expected type + target, Matita automatically replaces x with (u ? ⦠? + x) to avoid a typing error. + + Implicit coercions are not displayed to the user: (u ? + ⦠? x) is rendered simply as x. + + When a coercion u is declared from source s to target t + and there is already a coercion u' of target s or + source t, a composite implicit coercion is + automatically computed by Matita. + _________________________________________________________ + +8.4. default + + default "s" u[1] ⦠u[n] + + Synopsis: + default qstring uri [uri]⦠+ + Action: + It registers a cluster of related definitions and + theorems to be used by tactics and the rendering + engine. Some functionalities of Matita are not + available when some clusters have not been registered. + Overloading a cluster registration is possible: the + last registration will be the default one, but the + previous ones are still in effect. + + s is an identifier of the cluster and u[1] ⦠u[n] are + the URIs of the definitions and theorems of the + cluster. The number n of required URIs depends on the + cluster. The following clusters are supported. + + Table 8-1. clusters + + name expected object for 1st URI expected object for 2nd URI + expected object for 3rd URI expected object for 4th URI + expected object for 5th URI + equality an inductive type (say, of type eq) of type âA:Type.A + â Prop with one family parameter and one constructor of type + âx:A.eq A x a theorem of type âA.âx,y:A.eq A x y â eq A y x a + theorem of type âA.âx,y,z:A.eq A x y â eq A y z â eq A x z + âA.âa.â P:A â Prop.P x â ây.eq A x y â P y âA.âa.â P:A â + Prop.P x â ây.eq A y x â P y + true an inductive type of type Prop with only one constructor + that has no arguments + false an inductive type of type Prop without constructors + + absurd a theorem of type âA:Prop.âB:Prop.A â Not A â B + _________________________________________________________ + +8.5. hint + + hint + + Synopsis: + hint + + Action: + Displays a list of theorems that can be successfully + applied to the current selected sequent. The command is + removed from the script, but the window that displays + the theorems allow to add to the script the application + of the selected theorem. + _________________________________________________________ + +8.6. include + + include "s" + + Synopsis: + include qstring + + Action: + Every coercion, notation and interpretation that was + active when the file s was compiled last time is made + active. The same happens for declarations of default + definitions and theorems and disambiguation hints + (aliases). On the contrary, theorem and definitions + declared in a file can be immediately used without + including it. + + The file s is automatically compiled if it is not + compiled yet and if it is handled by a development. + _________________________________________________________ + +8.7. include' "s" + + Synopsis: + include' qstring + + Action: + Not documented (TODO), do not use it. + _________________________________________________________ + +8.8. set + + set "baseuri" "s" + + Synopsis: + set qstring qstring + + Action: + Sets to s the baseuri of all the theorems and + definitions stated in the current file. The baseuri + should be a/b/c/foo if the file is named foo and it is + in the subtree a/b/c of the current development. This + requirement is not enforced, but it could be in the + future. + + Currently, baseuri is the only property that can be set + even if the parser accepts arbitrary property names. + _________________________________________________________ + +8.9. whelp + + whelp locate "s" + + whelp hint t + + whelp elim t + + whelp match t + + whelp instance t + + Synopsis: + whelp [locate qstring | hint term | elim term | match + term | instance term ] + + Action: + Performs the corresponding query, showing the result in + the CIC browser. The command is removed from the + script. + _________________________________________________________ + +8.10. qed + + Synopsis: + qed + + Action: + Saves and indexes the current interactive theorem or + definition. In order to do this, the set of sequents + still to be proved must be empty. + _________________________________________________________ + +Chapter 9. License + + Both Matita and this document are part of HELM, an + Hypertextual, Electronic Library of Mathematics, developed at + the Computer Science Department, University of Bologna, Italy. + + HELM is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + HELM is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with HELM; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA. A copy of the GNU General Public License is + available at this link. + + Notes + + [1] + + The name of the Development should be the name of the + directory in which it lives. This is not a requirement, but + the makefile automatically generated by matita in the root + directory of the development will eventually generate a new + Development with a name that follows this convention. Having + more than one development for the same set of files is not an + issue. diff --git a/helm/www/matita/docs/manual-0.5.9/matita.xml b/helm/www/matita/docs/manual-0.5.9/matita.xml new file mode 100644 index 000000000..aa45a806a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/matita.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + Matita"> + + + + TODO"> + MySQL "> + Sqlite "> + + + id"> + uri"> + char"> + uri-step"> + nat"> + term"> + rec_def"> + match_pattern"> + match_branch"> + args"> + args2"> + sterm"> + intros-spec"> + pattern"> + reduction-kind"> + path"> + proof-script"> + proof-step"> + tactic"> + LCF-tactical"> + qstring"> + interpretation"> + auto_params"> + justification"> + simple_auto_param"> + inline_params"> + inline_param"> + interpretation_argument"> + interpretation_rhs"> + csymbol"> + usage"> + notation_lhs"> + layout"> + literal"> + notation_rhs"> + associativity"> + symbol"> + level2_meta"> + unparsed_ast"> + unparsed_meta"> + enriched_term"> +]> + + + + + + &app; V&appversion; User Manual (rev. &manrevision;) + + + + + 2006 + The HELM team. + + + + + Andrea + Asperti + +
asperti@cs.unibo.it
+
+
+ + Claudio + Sacerdoti Coen + +
sacerdot@cs.unibo.it
+
+
+ + Ferruccio + Guidi + +
fguidi@cs.unibo.it
+
+
+ + Enrico + Tassi + +
tassi@cs.unibo.it
+
+
+ + Stefano + Zacchiroli + +
zacchiro@cs.unibo.it
+
+
+
+ + + Both &appname; and this document are free software, you can + redistribute them and/or modify them under the terms of the GNU General + Public License as published by the Free Software Foundation. See for more information. + + + + + &manrevision; + &date; + + + +
+ + + +&intro; +&install; +&gettingstarted; +&terms; +&usernotation; +&tacticals; +&tactics; +&declarative_tactics; +&othercommands; +&license; + +
+ + diff --git a/helm/www/matita/docs/manual-0.5.9/pdf-stamp b/helm/www/matita/docs/manual-0.5.9/pdf-stamp new file mode 100644 index 000000000..e69de29bb diff --git a/helm/www/matita/docs/manual-0.5.9/proofs.html b/helm/www/matita/docs/manual-0.5.9/proofs.html new file mode 100644 index 000000000..ebcdda5cc --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/proofs.html @@ -0,0 +1,10 @@ + +Proofs

Proofs

theorem id[: term] [≝ term]

theorem f: P ≝ p

Proves a new theorem f whose thesis is + P.

If p is provided, it must be a proof term for + P. Otherwise an interactive proof is started.

P can be omitted only if the proof is not + interactive.

Proving a theorem already proved in the library is an error. + To provide an alternative name and proof for the same theorem, use + variant f: P ≝ p.

A warning is raised if the name of the theorem cannot be obtained + by mangling the name of the constants in its thesis.

Notice that the command is equivalent to definition f: T ≝ t.

variant id: term ≝ term

variant f: T ≝ t

Same as theorem f: T ≝ t, but it does not + complain if the theorem has already been proved. To be used to give + an alternative name or proof to a theorem.

lemma id[: term] [≝ term]

lemma f: T ≝ t

Same as theorem f: T ≝ t

fact id[: term] [≝ term]

fact f: T ≝ t

Same as theorem f: T ≝ t

remark id[: term] [≝ term]

remark f: T ≝ t

Same as theorem f: T ≝ t

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/proofstatus.html b/helm/www/matita/docs/manual-0.5.9/proofstatus.html new file mode 100644 index 000000000..ca08ef67b --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/proofstatus.html @@ -0,0 +1,47 @@ + +The proof status

The proof status

+ During an interactive proof, the proof status is made of + the set of sequents to prove and the partial proof built so far. +

The partial proof can be inspected + on demand in the CIC browser. It will be shown in pseudo-natural language + produced on the fly from the proof term.

The set of sequents to prove is shown in the notebook of the + authoring interface, in the + top-right corner of the main window of Matita. Each tab shows a different + sequent, named with a question mark followed by a number. The current + role of the sequent, according to the following description, is also + shown in the tab tag. +

  1. + Selected sequents + (name in boldface, e.g. ?3). + The next tactic will be applied to every selected sequent, producing + new selected sequents. Tacticals + such as branching ("[") + or "focus" can be used + to change the set of selected sequents. +

  2. + Sibling sequents + (name prefixed by a vertical bar and their position, e.g. + |3?2). When the set of selected sequents + has more than one element, the user can decide to focus in turn on each + of them. The branching tactical + ("[") selects the first + sequent only, marking every previously selected sequent as a sibling + sequent. Each sibling sequent is given a different position. The + tactical "2,3:" can be used to + select one or more sibling sequents, different from the one proposed, + according to their position. Once the user starts to work on the + selected sibling sequents it becomes impossible to select a new + set of siblings until the ("|") + tactical is used to end work on the current one. +

  3. + Automatically solved sibling sequents + (name strokethrough, e.g. |3?2). + Sometimes a tactic can close by side effects a sibling sequent the + user has not selected yet. The sequent is left in the automatically + solved status in order for the user to explicitly accept + (using the "skip" + tactical) the automatic + instantiation in the proof script. This way the correspondence between + the number of branches in the proof script and the number of sequents + generated in the proof is preserved. +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/quickref-stamp b/helm/www/matita/docs/manual-0.5.9/quickref-stamp new file mode 100644 index 000000000..e69de29bb diff --git a/helm/www/matita/docs/manual-0.5.9/scripts/fix-symbols.sh b/helm/www/matita/docs/manual-0.5.9/scripts/fix-symbols.sh new file mode 100755 index 000000000..eb491489a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/scripts/fix-symbols.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sed -i 's/\\&\\#x225d;/\\ensuremath{\\stackrel{def}{=}}/g' $1 +sed -i 's/\\&\\#x3a9;/\\ensuremath{\\Omega}/g' $1 diff --git a/helm/www/matita/docs/manual-0.5.9/sec_commands.html b/helm/www/matita/docs/manual-0.5.9/sec_commands.html new file mode 100644 index 000000000..17d7aa811 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_commands.html @@ -0,0 +1,30 @@ + +Chapter 9. Other commands

Chapter 9. Other commands

alias

alias id "s" = "def"

alias symbol "s" (instance n) = "def"

alias num (instance n) = "def"

+

Synopsis:

alias + [id qstring = qstring + | symbol qstring [(instance nat)] = qstring + | num [(instance nat)] = qstring + ] +

Action:

Used to give an hint to the disambiguating parser. + When the parser is faced to the identifier (or symbol) + s or to any number, it will prefer + interpretations that "map s (or the + number) to def". For identifiers, + "def" is the URI of the interpretation. + E.g.: cic:/matita/nat/nat.ind#xpointer(1/1/1) + for the first constructor of the first inductive type defined + in the block of inductive type(s) + cic:/matita/nat/nat.ind. + For symbols and numbers, "def" is the label used to + mark the wanted + interpretation. +

When a symbol or a number occurs several times in the + term to be parsed, it is possible to give an hint only for the + instance n. When the instance is omitted, + the hint is valid for every occurrence. +

+ Hints are automatically inserted in the script by Matita every + time the user is interactively asked a question to disambiguate + a term. This way the user won't be posed the same question twice + when the script will be executed again.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_commands.xml b/helm/www/matita/docs/manual-0.5.9/sec_commands.xml new file mode 100644 index 000000000..7e22f3304 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_commands.xml @@ -0,0 +1,588 @@ + + + + Other commands + + alias + alias id "s" = "def" + alias symbol "s" (instance n) = "def" + alias num (instance n) = "def" + + + + Synopsis: + + alias + [id &qstring; = &qstring; + | symbol &qstring; [(instance &nat;)] = &qstring; + | num [(instance &nat;)] = &qstring; + ] + + + + + Action: + + Used to give an hint to the disambiguating parser. + When the parser is faced to the identifier (or symbol) + s or to any number, it will prefer + interpretations that "map s (or the + number) to def". For identifiers, + "def" is the URI of the interpretation. + E.g.: cic:/matita/nat/nat.ind#xpointer(1/1/1) + for the first constructor of the first inductive type defined + in the block of inductive type(s) + cic:/matita/nat/nat.ind. + For symbols and numbers, "def" is the label used to + mark the wanted + interpretation. + + When a symbol or a number occurs several times in the + term to be parsed, it is possible to give an hint only for the + instance n. When the instance is omitted, + the hint is valid for every occurrence. + + + Hints are automatically inserted in the script by Matita every + time the user is interactively asked a question to disambiguate + a term. This way the user won't be posed the same question twice + when the script will be executed again. + + + + + + + check + check t + + + + Synopsis: + + check &term; + + + + Action: + + Opens a CIC browser window that shows t + together with its type. The command is immediately removed from + the script. + + + + + + + eval + eval red on t + + + + Synopsis: + + eval + &reduction-kind; + on + &term; + + + + Action: + + Opens a CIC browser window that shows + the reduct of + t + together with its type. + + + + + + + prefer coercion + prefer coercion u + + + + Synopsis: + + + prefer coercion + (&uri; | &term;) + + + + + Action: + + The already declared coercion u + is preferred to other coercions with the same source and target. + + + + + + + + coercion + coercion u with ariety saturation nocomposites + + + + Synopsis: + + + coercion + (&uri; | &term; with) + [ &nat; [&nat;]] + [ nocomposites ] + + + + + Action: + + Declares u as an implicit coercion. + If the type of u is + ∀x1:T1. … ∀x(n-1):T(n-1).Tn the coercion target is + T(n - ariety) while its source is + T(n - ariety - saturation - 1). + Every time a term x + of type source is used with expected type target, Matita + automatically replaces x with + (u ? … ? x ? … ?) to avoid a typing error. + Note that the number of ? added after + x is saturation. + Implicit coercions are not displayed to the user: + (u ? … ? x) is rendered simply + as x. + When a coercion u is declared + from source s to target t + and there is already a coercion u' of + target s or source t, + a composite implicit coercion is automatically computed + by Matita unless nocomposites + is specified. + + + + + + + default + default "s" u1 … un + + + + Synopsis: + + default + &qstring; &uri; [&uri;]… + + + + + Action: + + It registers a cluster of related definitions and + theorems to be used by tactics and the rendering engine. + Some functionalities of Matita are not available when some + clusters have not been registered. Overloading a cluster + registration is possible: the last registration will be the + default one, but the previous ones are still in effect. + + s is an identifier of the cluster and + u1 … un + are the URIs of the definitions and theorems of the cluster. + The number n of required URIs depends on the + cluster. The following clusters are supported. + + + clusters + + + + name + expected object for 1st URI + expected object for 2nd URI + expected object for 3rd URI + expected object for 4th URI + expected object for 5th URI + expected object for 6th URI + expected object for 7th URI + expected object for 8th URI + expected object for 9th URI + expected object for 10th URI + expected object for 11th URI + + + + + equality + an inductive type (say, of type eq) of type ∀A:Type.A → Prop with one family parameter and one constructor of type ∀x:A.eq A x + a theorem of type ∀A.∀x,y:A.eq A x y → eq A y x + a theorem of type ∀A.∀x,y,z:A.eq A x y → eq A y z → eq A x z + ∀A.∀a.∀ P:A → Prop.P x → ∀y.eq A x y → P y + ∀A.∀a.∀ P:A → Prop.P x → ∀y.eq A y x → P y + ∀A.∀a.∀ P:A → Set.P x → ∀y.eq A x y → P y + ∀A.∀a.∀ P:A → Set.P x → ∀y.eq A y x → P y + ∀A.∀a.∀ P:A → Type.P x → ∀y.eq A x y → P y + ∀A.∀a.∀ P:A → Type.P x → ∀y.eq A y x → P y + ∀A.∀B.∀ f:A → B.∀x,y:A.eq A x y → eq B (f x) (f y) + ∀A.∀B.∀ f:A → B.∀x,y:A.eq A x y → eq B (f y) (f x) + + + true + an inductive type of type Prop with only one constructor that has no arguments + + + + + + + false + an inductive type of type Prop without constructors + + + + + + + absurd + a theorem of type ∀A:Prop.∀B:Prop.A → Not A → B + + + + + + + +
+
+
+
+
+
+ + hint + hint + + + + Synopsis: + + hint + + + + + Action: + + Displays a list of theorems that can be successfully + applied to the current selected sequent. The command is + removed from the script, but the window that displays the + theorems allow to add to the script the application of the + selected theorem. + + + + + + + + include + include "s" + + + + Synopsis: + + include &qstring; + + + + Action: + + Every coercion, + notation and + interpretation that was active + when the file s was compiled last time + is made active. The same happens for declarations of + default definitions and + theorems and disambiguation + hints (aliases). + On the contrary, theorem and definitions declared in a file can be + immediately used without including it. + The file s is automatically compiled + if it is not compiled yet. + + + + + + + + include' "s" + + + + + Synopsis: + + include' &qstring; + + + + Action: + + Not documented (&TODO;), do not use it. + + + + + + + whelp + whelp locate "s" + whelp hint t + whelp elim t + whelp match t + whelp instance t + + + + Synopsis: + + whelp + [locate &qstring; + | hint &term; + | elim &term; + | match &term; + | instance &term; + ] + + + + + Action: + + Performs the corresponding query, + showing the result in the CIC browser. The command is removed + from the script. + + + + + + + + qed + qed + + + + Synopsis: + + qed + + + + + Action: + + Saves and indexes the current interactive theorem or + definition. + In order to do this, the set of sequents still to be proved + must be empty. + + + + + + + + inline + inline "s" params + + + + Synopsis: + + + inline &qstring; &inlineparams; + + + + + Action: + + Inlines a representation of the item s, +which can be the URI of a HELM object. If an entire HELM directory (i.e. a base +URI) or the path of a *.ma source file is provided, all the contained objects +are represented in a row. +If the inlined object has a proof, this proof is represented in several ways +depending on the provided parameters. + + + + + + + inline-params + + inline-params + + + + &inlineparams; + ::= + [&inlineparam; [&inlineparam;] … ] + + + +
+ + inline-param + + + + + &inlineparam; + ::= + axiom + Try to give an axiom flavour + (bodies are omitted even if present) + + + + + + | + definition + Try give a definition flavour + + + + + + | + theorem + Try give a theorem flavour + + + + + + | + lemma + Try give a lemma flavour + + + + + + | + remark + Try give a remark flavour + + + + + + | + fact + Try give a fact flavour + + + + + + | + variant + Try give a variant flavour + (implies plain) + + + + + + | + declarative + Represent proofs using + declarative tactics + (this is the dafault and can be omitted) + + + + + + | + procedural + Represent proofs using + procedural tactics + + + + + + | + plain + Represent proofs using plain + proof terms + + + + + + | + nodefaults + + Do not use the tactics depending on the + default command + (rewrite + in the procedural mode) + + + + + + | + level=&nat; + + Set the level of the procedural proof representation + (the default is the highest level) + + + Tactics used at level 1: + exact + + + Additional tactics used at level 2: + letin, + cut, + change, + intros, + apply, + elim, + cases, + rewrite + + + + + + + + | + depth=&nat; + &TODO; + + + + +
+
+
+
diff --git a/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.html b/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.html new file mode 100644 index 000000000..2a3a53779 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.html @@ -0,0 +1,13 @@ + +Chapter 8. Declarative Tactics

Chapter 8. Declarative Tactics

Quick reference card

+

Table 8.1. tactics

tactic::=assume id : sterm
 |by induction hypothesis we know term ( id )
 |case id [( id : term )] …
 |justification done
 |justification let id + : term such that term + ( id )
 |[obtain id | conclude term] = term [auto_params | using term | using once term | proof] [done]
 |suppose term ( id + ) [ that is equivalent to term ]
 |the thesis becomes term
 |we need to prove term + [(id + )] + [ or equivalently term]
 |we proceed by cases on term to prove term
 |we proceed by induction on term to prove term
 |justification we proved term + ( id + )


+ +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.xml b/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.xml new file mode 100644 index 000000000..bc0b424e0 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_declarative_tactics.xml @@ -0,0 +1,518 @@ + + + Declarative Tactics + + + Quick reference card + + &declarativetacticref; + + + + + + assume + assume + assume x : t + + + + Synopsis: + + assume &id; : &sterm; + + + + Pre-conditions: + + The conclusion of the current proof must be + ∀x:T.P or + T→P where T is + a data type (i.e. T has type + Set or Type). + + + + Action: + + It adds to the context of the current sequent to prove a new + declaration x : T . The new conclusion becomes + P. + + + + New sequents to prove: + + None. + + + + + + + + by induction hypothesis we know + by induction hypothesis we know + by induction hypothesis we know t (id) + + + + Synopsis: + by induction hypothesis we know &term; ( &id; ) + + + + Pre-condition: + + To be used in a proof by induction to state the inductive + hypothesis. + + + + Action: + + Introduces the inductive hypothesis. + + + + New sequents to prove: + + None. + + + + + + + + case + case + case id (id1:t1) … (idn:tn) + + + + Synopsis: + + case &id; [( &id; : &term; )] … + + + + Pre-condition: + + To be used in a proof by induction or by cases to start + a new case + + + + Action: + + Starts the new case id declaring + the local parameters (id1:t1) … (idn:tn) + + + + New sequents to prove: + + None + + + + + + + + done + done + justification done + + + + Synopsis: + + &justification; done + + + + Pre-condition: + + + + + + Action: + + It closes the current sequent given the justification. + + + + New sequents to prove: + + None. + + + + + + + + + let such that + let such that + justification let x:t such that p (id) + + + + + Synopsis: + + &justification; let &id; + : &term; such that &term; + ( &id; ) + + + + Pre-condition: + + + + + + + Action: + + It derives ∃x:t.p using the + justification and then it introduces in the context + x and the hypothesis + p labelled with + id. + + + + + New sequent to prove: + + None. + + + + + + + + obtain + obtain + obtain H t1 = t2 justification + + + + Synopsis: + + [obtain &id; | conclude &term;] = &term; [&autoparams; | using &term; | using once &term; | proof] [done] + + + + Pre-condition: + + conclude can be used only if the current + sequent is stating an equality. The left hand side must be omitted + in an equality chain. + + + + Action: + + Starts or continues an equality chain. If the chain starts + with obtain H a new subproof named + H is started. + + + + New sequent to prove: + + If the chain starts + with obtain H a nre sequent for + t2 = ? is opened. + + + + + + + + + suppose + suppose + suppose t1 (x) that is equivalent to t2 + + + + Synopsis: + + suppose &term; ( &id; + ) [ that is equivalent to &term; ] + + + + Pre-condition: + + The conclusion of the current proof must be + ∀x:T.P or + T→P where T is + a proposition (i.e. T has type + Prop or CProp). + + + + Action: + + It adds to the context of the current sequent to prove a new + declaration x : T . The new conclusion becomes + P. + + + + New sequents to prove: + + None. + + + + + + + + the thesis becomes + the thesis becomes + the thesis becomes t + + + + Synopsis: + + the thesis becomes &term; + + + + Pre-condition: + + The provided term t must be convertible with + current sequent. + + + + Action: + + It changes the current goal to the one provided. + + + + New sequent to prove: + + None. + + + + + + + + we need to prove + we need to prove + we need to prove t1 (id) or equivalently t2 + + + + Synopsis: + + we need to prove &term; + [(&id; + )] + [ or equivalently &term;] + + + + Pre-condition: + + + + + + Action: + + If id is provided, starts a subproof that once concluded + will be named id. Otherwise states what needs to be proved. + If t2 is provided, the new goal is + immediately changed to t2 wich must + be equivalent to t1. + + + + + New sequents to prove: + + The stated one if id is provided + + + + + + + + + we have + we have + justification we have t1 (id1) and t2 (id2) + + + + + Synopsis: + + &justification; we have &term; + ( &id; ) and &term; + ( &id; ) + + + + Pre-condition: + + + + + + Action: + + It derives t1∧t2 using the + justification then it introduces in the context + t1 labelled with id1 and + t2 labelled with id2. + + + + + New sequent to prove: + + None. + + + + + + + + we proceed by cases on + we proceed by cases on + we proceed by cases on t to prove th + + + + Synopsis: + + we proceed by cases on &term; to prove &term; + + + + Pre-condition: + + t must inhabitant of an inductive type and + th must be the conclusion to be proved by + cases. + + + + Action: + + It proceeds by cases on t + + + + New sequents to prove: + + It opens one new sequent for each constructor of the + type of t. + + + + + + + + we proceed by induction on + we proceed by induction on + we proceed by induction on t to prove th + + + + Synopsis: + + we proceed by induction on &term; to prove &term; + + + + Pre-condition: + + t must inhabitant of an inductive type and + th must be the conclusion to be proved by induction. + + + + + Action: + + It proceed by induction on t. + + + + New sequents to prove: + + It opens one new sequent for each constructor of the + type of t. + + + + + + + + + we proved + we proved + justification we proved t (id) + + + + Synopsis: + + &justification; we proved &term; + ( &id; + ) + + + + Pre-condition: + + tmust have type Prop. + + + + + Action: + + It derives t + using the justification and labels the conclusion with + id. + + + + + New sequent to prove: + + None. + + + + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.html b/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.html new file mode 100644 index 000000000..7092e34cc --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.html @@ -0,0 +1,30 @@ + +Chapter 3. Getting started

Chapter 3. Getting started

If you are already familiar with the Calculus of (Co)Inductive + Constructions (CIC) and with interactive theorem provers with procedural + proof languages (expecially Coq), getting started with Matita is relatively + easy. You just need to learn how to type Unicode symbols, how to browse + and search the library and how to author a proof script.

How to type Unicode symbols

Unicode characters can be typed in several ways:

  • Using the "Ctrl+Shift+Unicode code" standard Gnome shortcut. E.g. Ctrl+Shift+3a9 generates "Ω".

  • Typing the ligature "\name" where "name" + is a standard Unicode or LaTeX name for the character or an + ASCII art resembling the shape of the character. Pressing + "Alt+L" or Space or Enter just after the last character + of the name converts + the ligature to the Unicode symbol. + E.g. "\Delta" followed by Alt+L generates + "Δ", while pressing Alt-L after "=>" generates + "⇒"

  • Typing a symbol and rotating trough its equivalence class + with Alt-L. E.g. pressing Alt-L after an "l" + generates a "λ", while pressing Alt-L after an + "→" once generates "⇉" and pressing + Alt-L again generates "⇒". +

+ The comprehensive list of symbols names or shortcuts and their equivalence + classes is available clicking on the "TeX/UTF-8 table" item + of the "View" menu. +

+ There is a memory mechanism related to equivalence classes that + remembers your last choice, making it the default one. For example, + if you use "_" to generate "⎻" + (that is the third choice, after "⎽" and "⎼"), + the next time you type Alt-L + after "_" you immediately get "⎻". +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.xml b/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.xml new file mode 100644 index 000000000..e18f3a067 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_gettingstarted.xml @@ -0,0 +1,171 @@ + + + + + Getting started + If you are already familiar with the Calculus of (Co)Inductive + Constructions (CIC) and with interactive theorem provers with procedural + proof languages (expecially Coq), getting started with Matita is relatively + easy. You just need to learn how to type Unicode symbols, how to browse + and search the library and how to author a proof script. + + + How to type Unicode symbols + Unicode characters can be typed in several ways: + + Using the "Ctrl+Shift+Unicode code" standard Gnome shortcut. E.g. Ctrl+Shift+3a9 generates "Ω". + + Typing the ligature "\name" where "name" + is a standard Unicode or LaTeX name for the character or an + ASCII art resembling the shape of the character. Pressing + "Alt+L" or Space or Enter just after the last character + of the name converts + the ligature to the Unicode symbol. + E.g. "\Delta" followed by Alt+L generates + "Δ", while pressing Alt-L after "=>" generates + "⇒" + + + Typing a symbol and rotating trough its equivalence class + with Alt-L. E.g. pressing Alt-L after an "l" + generates a "λ", while pressing Alt-L after an + "→" once generates "⇉" and pressing + Alt-L again generates "⇒". + + + + + The comprehensive list of symbols names or shortcuts and their equivalence + classes is available clicking on the "TeX/UTF-8 table" item + of the "View" menu. + + + There is a memory mechanism related to equivalence classes that + remembers your last choice, making it the default one. For example, + if you use "_" to generate "⎻" + (that is the third choice, after "⎽" and "⎼"), + the next time you type Alt-L + after "_" you immediately get "⎻". + + + + Browsing and searching + The CIC browser is used to browse and search the library. + You can open a new CIC browser selecting "New Cic Browser" + from the "View" menu of Matita, or by pressing "F3". + The CIC browser is similar to a traditional Web browser. + + Browsing the library + To browse the library, type in the location bar the absolute URI of + the theorem, definition or library fragment you are interested in. + "cic:/" is the root of the library. Contributions developed + in Matita are under "cic:/matita"; all the others are + part of the library of Coq. + Following the hyperlinks it is possible to navigate in the Web + of mathematical notions. Proof are rendered in pseudo-natural language + and mathematical notation is used for formulae. For now, mathematical + notation must be included in the current script to be activated, but we + plan to remove this limitation. + + + Looking at a proof under development + A proof under development is not yet part of the library. + The special URI "about:proof" can be used to browse the + proof currently under development, if there is one. + The "home" button of the CIC browser sets the location bar to + "about:proof". + + + + Searching the library + The query bar of the CIC browser can be used to search the library + of Matita for theorems or definitions that match certain criteria. + The criteria is given by typing a term in the query bar and selecting + an action in the drop down menu right of it. + + Searching by name + &TODO; + + + List of lemmas that can be applied + &TODO; + + + Searching by exact match + &TODO; + + + List of elimination principles for a given type + &TODO; + + + Searching by instantiation + &TODO; + + + + + Authoring + + How to compile a script + + Scripts are compiled to base URIs. Base URIs are of the form + "cic:/matita/path" and are given once for all for a set + of scripts using the "root" file. + + + A "root" file has to be placed in the root of a script set, + for example, consider the following files and directories, and + assume you keep files in "list" separated from files + in "sort" (for example the former directory may contain + functions and proofs about lists, while latter sorting algorithms + for lists): + + To be able to compile properly the contents of "list" + a file called root has to be placed in it. The file should be like + the following snippet. + + This file tells &appname; that objects generated by + "list.ma" have to be placed in + "cic:/matita/mydatastructures/list" while + objects generated by + "swap.ma" have to be placed in + "cic:/matita/mydatastructures/utils/swap". + + + Once you created the root file, you must generate a depend file. + Enter the "list" directory (the root of yuor file set) + and type "matitadep". Remember to regenerate the depend file + every time you alter the dependencies of your files (for example + including other scripts). + You can now compile you files typing "matitac". + + + To compile the "sort" directory, create a root file + in "sort/" like the following one and then run + "matitadep". + + The include_paths field can declare a list of paths separated by space. + Please omit any "/" from the end of base URIs or paths. + + + + The authoring interface + &TODO; + + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/sec_install.html b/helm/www/matita/docs/manual-0.5.9/sec_install.html new file mode 100644 index 000000000..a43b92c4e --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_install.html @@ -0,0 +1,84 @@ + +Chapter 2. Installation

Chapter 2. Installation

+ Matita is a quite complex piece of software, we thus recommend + you to either install al precompiled version or use the LiveCD. + If you are running Debian GNU/Linux (or one of its derivatives + like Ubuntu), you can install matita typing +

 aptitude install matita matita-standard-library 

+ If you are running MacOSX or Windows, give the LiveCD a try before + trying to compile Matita from its sources. +

Using the LiveCD

+ In the following, we will assume you have installed + virtualbox + for your platform and downloaded the .iso image of the LiveCD +

Creating the virtual machine

+ Click on the New button, a wizard will popup, you should ask to + its questions as follows +

  1. + The name should be something like Matita, but can + be any meaningful string. +

  2. + The OS type should be Debian +

  3. + The base memory size can be 256 mega bytes, but you may + want to increase it if you are going to work with huge + formalizations. +

  4. + The boot hard disk should be no hard disk. It may complain + that this choice is not common, but it is right, since you + will run a LiveCD you do not need to emulate an hard drive. +

+ Now that you are done with the creation of the virtual machine, + you need to insert the LiveCD in the virtual cd reader unit. +

Figure 2.1. The brand new virtual machine

The breand new virtual machine

+ Click on CD/DVD-ROM (that should display something like: Not mouted). + Then click on mount CD/DVD drive and select the ISO image + option. The combo-box should display no available image, you need to + add the ISO image you downloaded from the Matita website clicking on + the button near the combo-box. + to start the virtual machine. +

Figure 2.2. Mounting an ISO image

Mounting an ISO image

+ In the newely opened window click + the Add button +

Figure 2.3. Choosing the ISO image

Choosing the ISO image

+ A new windows will pop-up: choose the file you downloaded + (usually matita-version.iso) and click open. +

Figure 2.4. Choosing the ISO image

Choosing the ISO image

+ Now select the new entry you just added as the CD image + you want to insert in the virtual CD drive. + You are now ready to start the virtual machine. +

Sharing files with the real PC

+ The virtual machine Matita will run on, has its own file + system, that is completely separated from the one of your + real PC (thus your files are not available in the + emulated environment) and moreover it is a non-presistent + file system (thus you data is lost every time you + turn off the virtual machine). +

+ Virtualbox allows you to share a real folder (beloging + to your real PC) with the emulated computer. Since this + folder is persistent, you are encouraged to put + your work there, so that it is not lost when the virtual + machine is powered off. +

+ The first step to set up a shared folder is to click + on the shared folder configuration entry + of the virtual machine. +

Figure 2.5. Set up a shared folder

Shared folder

+ Then you shuld add a shared folder clicking on the + plus icon on the right +

Figure 2.6. Choosing the folder to share

Shared folder

+ Then you have to specify the real PC folder you want to share + and name it. A reasonable folder to share is /home on + a standard Unix system, while /Users on MaxOSX. + The name you give to the share is important, you should + remember it. +

Figure 2.7. Naming the shared folder

Shared folder

+ Once your virtual machine is up and running, you can + mount (that meand have access to) the shared folder + by clicking on the Mount VirtualBox share icon, and typing + the name of the share. +

Figure 2.8. Using it from the virtual machine

Shared folder at work

+ A window will then pop-up, and its content will be the + the content of the real PC folder. +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_install.xml b/helm/www/matita/docs/manual-0.5.9/sec_install.xml new file mode 100644 index 000000000..92e9d62cc --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_install.xml @@ -0,0 +1,684 @@ + + + + + Installation + + + &appname; is a quite complex piece of software, we thus recommend + you to either install al precompiled version or use the LiveCD. + If you are running Debian GNU/Linux (or one of its derivatives + like Ubuntu), you can install matita typing + + If you are running MacOSX or Windows, give the LiveCD a try before + trying to compile &appname; from its sources. + + + + Using the LiveCD + + + In the following, we will assume you have installed + virtualbox + for your platform and downloaded the .iso image of the LiveCD + + + + Creating the virtual machine + + Click on the New button, a wizard will popup, you should ask to + its questions as follows + + + The name should be something like &appname;, but can + be any meaningful string. + + + The OS type should be Debian + + + The base memory size can be 256 mega bytes, but you may + want to increase it if you are going to work with huge + formalizations. + + + The boot hard disk should be no hard disk. It may complain + that this choice is not common, but it is right, since you + will run a LiveCD you do not need to emulate an hard drive. + + + Now that you are done with the creation of the virtual machine, + you need to insert the LiveCD in the virtual cd reader unit. + +
The brand new virtual machine + + + + + The breand new virtual machine + +
+ + Click on CD/DVD-ROM (that should display something like: Not mouted). + Then click on mount CD/DVD drive and select the ISO image + option. The combo-box should display no available image, you need to + add the ISO image you downloaded from the &appname; website clicking on + the button near the combo-box. + to start the virtual machine. + +
Mounting an ISO image + + + + + Mounting an ISO image + +
+ + In the newely opened window click + the Add button + +
Choosing the ISO image + + + + + Choosing the ISO image + +
+ + A new windows will pop-up: choose the file you downloaded + (usually matita-version.iso) and click open. + +
Choosing the ISO image + + + + + Choosing the ISO image + +
+ + Now select the new entry you just added as the CD image + you want to insert in the virtual CD drive. + You are now ready to start the virtual machine. + +
+ + Sharing files with the real PC + + The virtual machine &appname; will run on, has its own file + system, that is completely separated from the one of your + real PC (thus your files are not available in the + emulated environment) and moreover it is a non-presistent + file system (thus you data is lost every time you + turn off the virtual machine). + + + Virtualbox allows you to share a real folder (beloging + to your real PC) with the emulated computer. Since this + folder is persistent, you are encouraged to put + your work there, so that it is not lost when the virtual + machine is powered off. + + + The first step to set up a shared folder is to click + on the shared folder configuration entry + of the virtual machine. + +
Set up a shared folder + + + + + Shared folder + +
+ + Then you shuld add a shared folder clicking on the + plus icon on the right + +
Choosing the folder to share + + + + + Shared folder + +
+ + Then you have to specify the real PC folder you want to share + and name it. A reasonable folder to share is /home on + a standard Unix system, while /Users on MaxOSX. + The name you give to the share is important, you should + remember it. + +
Naming the shared folder + + + + + Shared folder + +
+ + Once your virtual machine is up and running, you can + mount (that meand have access to) the shared folder + by clicking on the Mount VirtualBox share icon, and typing + the name of the share. + +
Using it from the virtual machine + + + + + Shared folder at work + +
+ + A window will then pop-up, and its content will be the + the content of the real PC folder. + +
+ +
+ + + Installing from sources + + Install &appname; from the sources is hard, you have been warned! + + + + Getting the source code + + You can get the &appname; source code in two ways: + + + go to the download + page and get the latest released source tarball; + + get the development sources from our + SVN repository. You will need the + components/ and + matita/ directories from the + trunk/helm/software/ directory, plus the + configure and Makefile* + stuff from the same directory. + + In this case you will need to run + autoconf before proceding with the building + instructions below. + + + + + + + + Requirements + + In order to build &appname; from sources you will need some + tools and libraries. They are listed below. + + + Note for Debian (and derivatives) users + + If you are running a + Debian GNU/Linux + distribution, + or any of its derivative like Ubuntu, + you can use APT to install all the required tools and + libraries since they are all part of the Debian archive. + + + apt-get install ocaml ocaml-findlib libgdome2-ocaml-dev liblablgtk2-ocaml-dev liblablgtkmathview-ocaml-dev liblablgtksourceview-ocaml-dev libsqlite3-ocaml-dev libocamlnet-ocaml-dev libzip-ocaml-dev libhttp-ocaml-dev ocaml-ulex08 libexpat-ocaml-dev libmysql-ocaml-dev camlp5 + + + An official debian package is going to be added to the + archive too. + + + + + + Required tools and libraries + + + + OCaml + + + the Objective Caml compiler, version 3.09 or above + + + + + + Findlib + + + + OCaml package manager, version 1.1.1 or above + + + + + + OCaml + Expat + + + OCaml bindings for the expat + library + + + + + + GMetaDOM + + + + OCaml bindings for the Gdome 2 + library + + + + + + OCaml + HTTP + + + OCaml library to write HTTP daemons (and clients) + + + + + + LablGTK + + + + OCaml bindings for the GTK+ library + , version 2.6.0 or above + + + + + + GtkMathView + + + + LablGtkMathView + + + + GTK+ widget to render MathML documents and its + OCaml bindings + + + + + + GtkSourceView + + + + LablGtkSourceView + + + + extension for the GTK+ text widget (adding the typical + features of source code editors) and its OCaml bindings + + + + + &MYSQL; + + OCaml + MySQL + + + SQL database and OCaml bindings for its client-side library + + The SQL database itself is not strictly needed to run + &appname;, but the client libraries are. + + + + + &Sqlite; + + + + OCaml Sqlite3 + + + + Sqlite database and OCaml bindings + + + + + + + Ocamlnet + + + + collection of OCaml libraries to deal with + application-level Internet protocols and conventions + + + + + + ulex + + + + Unicode lexer generator for OCaml + + + + + + CamlZip + + + + OCaml library to access .gz files + + + + + + + + + + (optional) &MYSQL; setup + + To fully exploit &appname; indexing and search capabilities + on a huge metadata set you may + need a working &MYSQL; database. Detalied instructions on how to do + it can be found in the MySQL documentation. Here you + can find a quick howto. + + In order to create a database you need administrator permissions on + your MySQL installation, usually the root account has them. Once you + have the permissions, a new database can be created executing + mysqladmin create matita + (matita is the default database name, you can + change it using the db.user key of the + configuration file). + + Then you need to grant the necessary access permissions to the + database user of &appname;, typing echo "grant all privileges + on matita.* to helm;" | mysql matita should do the trick + (helm is the default user name used by &appname; to + access the database, you can change it using the + db.user key of the configuration file). + + + + This way you create a database named matita + on which anyone claiming to be the helm user can + do everything (like adding dummy data or destroying the contained + one). It is strongly suggested to apply more fine grained permissions, + how to do it is out of the scope of this manual. + + + + + + Compiling and installing + + Once you get the source code the installations steps should be + quite familiar. + + First of all you need to configure the build process executing + ./configure. This will check that all needed + tools and library are installed and prepare the sources for compilation + and installation. + + Quite a few (optional) arguments may be passed to the + configure command line to change build time + parameters. They are listed below, together with their + default values: + + + <application>configure</application> command line + arguments + + + + --with-runtime-dir=dir + + + + (Default: + /usr/local/matita) Runtime base directory + where all &appname; stuff (executables, configuration files, + standard library, ...) will be installed + + + + + + + --with-dbhost=host + + + + (Default: localhost) Default SQL server + hostname. Will be used while building the standard library + during the installation and to create the default &appname; + configuration. May be changed later in configuration file. + + + + + + + --enable-debug + + + + (Default: disabled) Enable debugging code. + Not for the casual user. + + + + + + Then you will manage the build and install process using + make + as usual. Below are reported the targets you have to invoke in sequence + to build and install: + + + + <application>make</application> targets + + + world + + builds components needed by &appname; and &appname; itself + (in bytecode or native code depending + on the availability of the OCaml native code compiler) + + + + + install + + installs &appname; related tools, standard library and the + needed runtime stuff in the proper places on the filesystem. + + As a part of the installation process the &appname; + standard library will be compiled, thus testing that the just + built matitac compiler works + properly. + For this step you will need a working SQL database (for + indexing the standard library while you are compiling it). See + Database setup + for instructions on how to set it up. + + + + + + + + + + + + Configuring &appname; + + The configuration file is divided in four sections. The user and + matita ones are self explicative and does not need user + intervention. Here we report a sample snippet for these two + sections. The remaining db and getter sections will be explained in + details later. + + + $(HOME) + $(USER) + +
+ $(user.home)/.matita + /usr/share/matita/ + $(user.name) +
+]]>
+
+ + &appname; needs to store/fetch data and metadata. Data is essentially + composed of XML files, metadata is a set of tuples for a relational + model. Data and metadata can produced by the user or be already + available. Both kind of data/metadata can be local and/or remote. + + + The db section tells &appname; where to store and retrieve metadata, + while the getter section describes where XML files have to be + found. The following picture describes the suggested configuration. + Dashed arrows are determined by the configuration file. + +
Configuring the Databases + + + + + How to configure the databases. + +
+ The getter + + Consider the following snippet and the URI + cic:/matita/foo/bar.con. If &appname; + is asked to read that object it will resolve the object trough + the getter. Since the first two entries are equally specific + (longest match rule applies) first the path + file://$(matita.rt_base_dir)/xml/standard-library/foo/bar.con + and then file://$(user.home)/.matita/xml/matita/foo/bar.con + are inspected. + + + $(user.home)/.matita/getter/cache + + cic:/matita/ + file://$(matita.rt_base_dir)/xml/standard-library/ + ro + + + cic:/matita/ + file://$(user.home)/.matita/xml/matita/ + + + cic:/Coq/ + http://mowgli.cs.unibo.it/xml/ + legacy + + +]]> + + if the same URI has to be written, the former prefix is skipped + since it is marked as readonly (ro). + Objects resolved using the third prefix are readonly too, and are + retrieved using the network. There is no limit to the number of + prefixes the user can define. The distinction between prefixes marked + as readonly and legacy is that, legacy ones are really read only, while + the ones marked with ro are considered for + writing when &appname; is started in system mode (used to publish user + developments in the library space). + + The db + + The database subsystem has three fron ends: library, user and + legacy. The latter is the only optional one. Every query is done on + every frontend, making the duplicate free union of the results. + The user front end kepps metadata produced by the user, and is thus + heavily accessed in read/write mode, while the library and legacy + fron ends are read only. Every front end can be connected to + backend, the storage actually. + Consider the following snippet. + + + mysql://mowgli.cs.unibo.it matita helm none legacy + file://$(matita.rt_base_dir) metadata.db helm helm library + file://$(matita.basedir) user.db helm helm user + +]]> + + Here the usr database is a file (thus locally accessed trough the + Sqlite library) placed in the user's home directory. The library one is + placed in the &appname; runtime directory. The legacy fron end is + connected to a remote &MYSQL; based storage. Every metadata key + takes a path to the storage, the name of the database, the user name, + a password (or none) and the name of the front + end to which it is attached. + +
+ +
+ diff --git a/helm/www/matita/docs/manual-0.5.9/sec_intro.html b/helm/www/matita/docs/manual-0.5.9/sec_intro.html new file mode 100644 index 000000000..7eb40a9eb --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_intro.html @@ -0,0 +1,7 @@ + +Chapter 1. Introduction

Chapter 1. Introduction

Table of Contents

Features
Matita vs Coq

Features

Matita is an interactive theorem prover + (or proof assistant) with the following characteristics:

  • It is based on a variant of the Calculus of (Co)Inductive Constructions (CIC). CIC is also the logic of the Coq proof assistant.

  • It adopts a procedural proof language, but it has a new set of small step tacticals that improve proof structuring and debugging.

  • It has a stand-alone graphical user interface (GUI) inspired by +CtCoq/Proof General. The GUI is implemented according to the state +of the art. In particular:

    • It is based and fully integrated with Gtk/Gnome.

    • An on-line help can be browsed via the Gnome documentation browser.

    • Mathematical formulae are rendered in two dimensional notation via MathML and Unicode.

  • It integrates advanced browsing and searching procedures.

  • It allows the use of the typical ambiguous mathematical notation by means of a disambiguating parser.

  • It is compatible with the library of Coq (definitions and proof objects).

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_intro.xml b/helm/www/matita/docs/manual-0.5.9/sec_intro.xml new file mode 100644 index 000000000..6c22f4664 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_intro.xml @@ -0,0 +1,96 @@ + + + + + Introduction + + Features + Matita is an interactive theorem prover + (or proof assistant) with the following characteristics: + + + It is based on a variant of the Calculus of (Co)Inductive Constructions (CIC). CIC is also the logic of the Coq proof assistant. + + + It adopts a procedural proof language, but it has a new set of small step tacticals that improve proof structuring and debugging. + + + It has a stand-alone graphical user interface (GUI) inspired by +CtCoq/Proof General. The GUI is implemented according to the state +of the art. In particular: + + + It is based and fully integrated with Gtk/Gnome. + + + An on-line help can be browsed via the Gnome documentation browser. + + + Mathematical formulae are rendered in two dimensional notation via MathML and Unicode. + + + + + It integrates advanced browsing and searching procedures. + + + It allows the use of the typical ambiguous mathematical notation by means of a disambiguating parser. + + + It is compatible with the library of Coq (definitions and proof objects). + + + + + Matita vs Coq + + The system shares a common look&feel with the Coq proof assistant + and its graphical user interface. The two systems have the same logic, + very close proof languages and similar sets of tactics. Moreover, + Matita is compatible with the library of Coq. + From the user point of view the main lacking features + with respect to Coq are: + + + + proof extraction; + + + an extensible language of tactics; + + + automatic implicit arguments; + + + several ad-hoc decision procedures; + + + several rarely used variants for most of the tactics; + + + sections and local variables. To maintain compatibility with the library of Coq, theorems defined inside sections are abstracted by name over the section variables; their instances are explicitly applied to actual arguments by means of explicit named substitutions. + + + + Still from the user point of view, the main differences with respect + to Coq are: + + + + the language of tacticals that allows execution of partial tactical application; + + + the unification of the concept of metavariable and existential variable; + + + terms with subterms that cannot be inferred are always allowed as arguments of tactics or other commands; + + + ambiguous terms are disambiguated by direct interaction with the user; + + + theorems and definitions in the library are always accessible without needing to require/include them; right now, only notation needs to be included to become active, but we plan to remove this limitation. + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/sec_license.html b/helm/www/matita/docs/manual-0.5.9/sec_license.html new file mode 100644 index 000000000..ad0755d14 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_license.html @@ -0,0 +1,13 @@ + +Chapter 10. License

Chapter 10. License

Both Matita and this document are part of HELM, an Hypertextual, + Electronic Library of Mathematics, developed at the Computer Science + Department, University of Bologna, Italy.

HELM is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version.

HELM is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. +

You should have received a copy of the GNU General Public License along + with HELM; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301 USA. A copy of the GNU General + Public License is available at this link.

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_license.xml b/helm/www/matita/docs/manual-0.5.9/sec_license.xml new file mode 100644 index 000000000..47e146126 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_license.xml @@ -0,0 +1,8 @@ + + + + + License + &legal; + + diff --git a/helm/www/matita/docs/manual-0.5.9/sec_tacticals.html b/helm/www/matita/docs/manual-0.5.9/sec_tacticals.html new file mode 100644 index 000000000..3f48d2884 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_tacticals.html @@ -0,0 +1,20 @@ + +Chapter 6. Tacticals

Chapter 6. Tacticals

Interactive proofs and definitions

+ An interactive definition is started by giving a + definition command omitting + the definiens. + An interactive proof is started by using one of the + proof commands omitting + an explicit proof term. +

An interactive proof or definition can and must be terminated by + a qed command when no more sequents are + left to prove. Between the command that starts the interactive session and + the qed command the user must provide a procedural proof script made + of tactics structured by means of + tacticals.

In the tradition of the LCF system, tacticals can be considered + higher order tactics. Their syntax is structured and they are executed + atomically. On the contrary, in Matita the syntax of several tacticals is + destructured into a sequence of tokens and tactics in such a way that is + is possible to stop execution after every single token or tactic. + The original semantics is preserved: the execution of the whole sequence + yields the result expected by the original LCF-like tactical.

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_tacticals.xml b/helm/www/matita/docs/manual-0.5.9/sec_tacticals.xml new file mode 100644 index 000000000..2f84ae736 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_tacticals.xml @@ -0,0 +1,305 @@ + + + + Tacticals + + Interactive proofs and definitions + + An interactive definition is started by giving a + definition command omitting + the definiens. + An interactive proof is started by using one of the + proof commands omitting + an explicit proof term. + + An interactive proof or definition can and must be terminated by + a qed command when no more sequents are + left to prove. Between the command that starts the interactive session and + the qed command the user must provide a procedural proof script made + of tactics structured by means of + tacticals. + In the tradition of the LCF system, tacticals can be considered + higher order tactics. Their syntax is structured and they are executed + atomically. On the contrary, in Matita the syntax of several tacticals is + destructured into a sequence of tokens and tactics in such a way that is + is possible to stop execution after every single token or tactic. + The original semantics is preserved: the execution of the whole sequence + yields the result expected by the original LCF-like tactical. + + + The proof status + + During an interactive proof, the proof status is made of + the set of sequents to prove and the partial proof built so far. + + The partial proof can be inspected + on demand in the CIC browser. It will be shown in pseudo-natural language + produced on the fly from the proof term. + The set of sequents to prove is shown in the notebook of the + authoring interface, in the + top-right corner of the main window of Matita. Each tab shows a different + sequent, named with a question mark followed by a number. The current + role of the sequent, according to the following description, is also + shown in the tab tag. + + + + + Selected sequents + (name in boldface, e.g. ?3). + The next tactic will be applied to every selected sequent, producing + new selected sequents. Tacticals + such as branching ("[") + or "focus" can be used + to change the set of selected sequents. + + + + + Sibling sequents + (name prefixed by a vertical bar and their position, e.g. + |3?2). When the set of selected sequents + has more than one element, the user can decide to focus in turn on each + of them. The branching tactical + ("[") selects the first + sequent only, marking every previously selected sequent as a sibling + sequent. Each sibling sequent is given a different position. The + tactical "2,3:" can be used to + select one or more sibling sequents, different from the one proposed, + according to their position. Once the user starts to work on the + selected sibling sequents it becomes impossible to select a new + set of siblings until the ("|") + tactical is used to end work on the current one. + + + + + Automatically solved sibling sequents + (name strokethrough, e.g. |3?2). + Sometimes a tactic can close by side effects a sibling sequent the + user has not selected yet. The sequent is left in the automatically + solved status in order for the user to explicitly accept + (using the "skip" + tactical) the automatic + instantiation in the proof script. This way the correspondence between + the number of branches in the proof script and the number of sequents + generated in the proof is preserved. + + + + + + Tacticals + + proof script + + + + &proofscript; + ::= + &proofstep; [&proofstep;]… + + + +
+ Every proof step can be immediately executed. + + proof steps + + + + &proofstep; + ::= + &LCFtactical; + The tactical is applied to each + selected sequent. + Each new sequent becomes a selected sequent. + + + + | + . + The first + selected sequent becomes + the only one selected. All the remaining previously selected sequents + are proposed to the user one at a time when the next + "." is used. + + + + + | + ; + Nothing changes. Use this proof step as a separator in + concrete syntax. + + + + | + [ + Every selected sequent + becomes a sibling sequent + that constitute a branch in the proof. + Moreover, the first sequent is also selected. + + + + + | + | + Stop working on the current branch of the innermost branching + proof. + The sibling branches become the sibling + sequents and the first one is also selected. + + + + + | + &nat;[,&nat;]…: + The sibling sequents + specified by the user become the next + selected sequents. + + + + + | + *: + Every sibling branch not considered yet in the innermost + branching proof becomes a + selected sequent. + + + + + | + skip + Accept the automatically provided instantiation (not shown + to the user) for the currently selected + automatically closed sibling sequent. + + + + + | + ] + Stop analyzing branches for the innermost branching proof. + Every sequent opened during the branching proof and not closed yet + becomes a selected sequent. + + + + + | + focus &nat; [&nat;]… + + Selects the sequents specified by the user. The selected sequents + must be completely closed (no new sequents left open) before doing an + "unfocus that restores + the current set of sibling branches. + + + + + | + unfocus + + Used to match the innermost + "focus" tactical + when all the sequents selected by it have been closed. + Until "unfocus" is + performed, it is not possible to progress in the rest of the + proof. + + + + +
+ + tactics and LCF tacticals + + + + &LCFtactical; + ::= + &tactic; + Applies the specified tactic. + + + + | + &LCFtactical; ; &LCFtactical; + Applies the first tactical first and the second tactical + to each sequent opened by the first one. + + + + | + &LCFtactical; + [ + [&LCFtactical;] + [| &LCFtactical;]… + ] + + Applies the first tactical first and each tactical in the + list of tacticals to the corresponding sequent opened by the + first one. The number of tacticals provided in the list must be + equal to the number of sequents opened by the first tactical. + + + + | + do &nat; + &LCFtactical; + + &TODO; + + + + | + repeat + &LCFtactical; + + &TODO; + + + + | + + first [ + [&LCFtactical;] + [| &LCFtactical;]… + ] + + &TODO; + + + + | + try &LCFtactical; + &TODO; + + + + | + + solve [ + [&LCFtactical;] + [| &LCFtactical;]… + ] + + &TODO; + + + + | + (&LCFtactical;) + Used for grouping during parsing. + + + +
+
+
+ diff --git a/helm/www/matita/docs/manual-0.5.9/sec_tactics.html b/helm/www/matita/docs/manual-0.5.9/sec_tactics.html new file mode 100644 index 000000000..b905d92b2 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_tactics.html @@ -0,0 +1,76 @@ + +Chapter 7. Tactics

Chapter 7. Tactics

Quick reference card

+

Table 7.1. tactics

tactic::=absurd sterm
 |apply sterm
 |applyS sterm auto_params
 | + + assumption + +
 |auto auto_params. autobatch auto_params
 | + cases + term pattern [([id]…)] +
 |change pattern with sterm
 | + clear + id [id…] +
 |clearbody id
 |compose [nat] sterm [with sterm] [intros-spec]
 |constructor nat
 | + + contradiction + +
 |cut sterm [as id]
 | + decompose + [as id…] +
 |demodulate auto_params
 |destruct sterm
 |elim sterm pattern [using sterm] intros-spec
 |elimType sterm [using sterm] intros-spec
 |exact sterm
 | + + exists + +
 | + + fail + +
 |fold reduction-kind sterm pattern
 | + + fourier + +
 |fwd id [as id [id]…]
 |generalize pattern [as id]
 | + + id + +
 |intro [id]
 |intros intros-spec
 |inversion sterm
 | + lapply + [linear] + [depth=nat] + sterm + [to + sterm + [,sterm…] + ] + [as id] +
 | + + left + +
 |letin id ≝ sterm
 |normalize pattern
 | + + reflexivity + +
 |replace pattern with sterm
 |rewrite [<|>] sterm pattern
 | + + right + +
 | + + ring + +
 |simplify pattern
 | + + split + +
 | + + subst + +
 | + + symmetry + +
 |transitivity sterm
 |unfold [sterm] pattern
 |whd pattern


+ +

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_tactics.xml b/helm/www/matita/docs/manual-0.5.9/sec_tactics.xml new file mode 100644 index 000000000..ebd100a26 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_tactics.xml @@ -0,0 +1,1802 @@ + + + + Tactics + + + Quick reference card + + &tacticref; + + + + + absurd + absurd + absurd P + + + + Synopsis: + + absurd &sterm; + + + + Pre-conditions: + + P must have type Prop. + + + + Action: + + It closes the current sequent by eliminating an + absurd term. + + + + New sequents to prove: + + It opens two new sequents of conclusion P + and ¬P. + + + + + + + apply + apply + apply t + + + + Synopsis: + + apply &sterm; + + + + Pre-conditions: + + t must have type + T1 → … → + Tn → G + where G can be unified with the conclusion + of the current sequent. + + + + Action: + + It closes the current sequent by applying t to n implicit arguments (that become new sequents). + + + + New sequents to prove: + + It opens a new sequent for each premise + Ti that is not + instantiated by unification. Ti is + the conclusion of the i-th new sequent to + prove. + + + + + + + applyS + applyS + applyS t auto_params + + + + Synopsis: + + applyS &sterm; &autoparams; + + + + Pre-conditions: + + t must have type + T1 → ... → + Tn → G. + + + + Action: + + applyS is useful when + apply fails because the current goal + and the conclusion of the applied theorems are extensionally + equivalent up to instantiation of metavariables, but cannot + be unified. E.g. the goal is P(n*O+m) and + the theorem to be applied proves ∀m.P(m+O). + + + It tries to automatically rewrite the current goal using + auto paramodulation + to make it unifiable with G. + Then it closes the current sequent by applying + t to n + implicit arguments (that become new sequents). + The auto_params parameters are passed + directly to auto paramodulation. + + + + + New sequents to prove: + + It opens a new sequent for each premise + Ti that is not + instantiated by unification. Ti is + the conclusion of the i-th new sequent to + prove. + + + + + + + assumption + assumption + assumption + + + + Synopsis: + + assumption + + + + Pre-conditions: + + There must exist an hypothesis whose type can be unified with + the conclusion of the current sequent. + + + + Action: + + It closes the current sequent exploiting an hypothesis. + + + + New sequents to prove: + + None + + + + + + + auto + auto + auto params + + + + Synopsis: + + auto &autoparams;. + autobatch &autoparams; + + + + Pre-conditions: + + None, but the tactic may fail finding a proof if every + proof is in the search space that is pruned away. Pruning is + controlled by the optional params. + Moreover, only lemmas whose type signature is a subset of the + signature of the current sequent are considered. The signature of + a sequent is essentially the set of constats appearing in it. + + + + + Action: + + It closes the current sequent by repeated application of + rewriting steps (unless paramodulation is + omitted), hypothesis and lemmas in the library. + + + + New sequents to prove: + + None + + + + + + + cases + cases + + cases t pattern hyps + + + + + Synopsis: + + + cases + &term; &pattern; [([&id;]…)] + + + + + Pre-conditions: + + + t must inhabit an inductive type + + + + + Action: + + + It proceed by cases on t. The new generated + hypothesis in each branch are named according to + hyps. + The elimintation predicate is restricted by + pattern. In particular, if some hypothesis + is listed in pattern, the hypothesis is + generalized and cleared before proceeding by cases on + t. Currently, we only support patterns of the + form H1 … Hn ⊢ %. This limitation will be lifted in the future. + + + + + New sequents to prove: + + One new sequent for each constructor of the type of + t. Each sequent has a new hypothesis for + each argument of the constructor. + + + + + + + clear + clear + + clear H1 ... Hm + + + + + Synopsis: + + + clear + &id; [&id;…] + + + + + Pre-conditions: + + + + H1 ... Hm + must be hypotheses of the + current sequent to prove. + + + + + Action: + + + It hides the hypotheses + + H1 ... Hm + from the current sequent. + + + + + New sequents to prove: + + None + + + + + + + clearbody + clearbody + clearbody H + + + + Synopsis: + + clearbody &id; + + + + Pre-conditions: + + H must be an hypothesis of the + current sequent to prove. + + + + Action: + + It hides the definiens of a definition in the current + sequent context. Thus the definition becomes an hypothesis. + + + + New sequents to prove: + + None. + + + + + + + compose + compose + compose n t1 with t2 hyps + + + + Synopsis: + + compose [&nat;] &sterm; [with &sterm;] [&intros-spec;] + + + + Pre-conditions: + + + + + + Action: + + Composes t1 with t2 in every possible way + n times introducing generated terms + as if intros hyps was issued. + If t1:∀x:A.B[x] and + t2:∀x,y:A.B[x]→B[y]→C[x,y] it generates: + + + λx,y:A.t2 x y (t1 x) : ∀x,y:A.B[y]→C[x,y] + + + λx,y:A.λH:B[x].t2 x y H (t1 y) : ∀x,y:A.B[x]→C[x,y] + + + + + If t2 is omitted it composes + t1 + with every hypothesis that can be introduced. + n iterates the process. + + + + New sequents to prove: + + The same, but with more hypothesis eventually introduced + by the &intros-spec;. + + + + + + + change + change + change patt with t + + + + Synopsis: + + change &pattern; with &sterm; + + + + Pre-conditions: + + Each subterm matched by the pattern must be convertible + with the term t disambiguated in the context + of the matched subterm. + + + + Action: + + It replaces the subterms of the current sequent matched by + patt with the new term t. + For each subterm matched by the pattern, t is + disambiguated in the context of the subterm. + + + + New sequents to prove: + + None. + + + + + + + constructor + constructor + constructor n + + + + Synopsis: + + constructor &nat; + + + + Pre-conditions: + + The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least n constructors. + + + + Action: + + It applies the n-th constructor of the + inductive type of the conclusion of the current sequent. + + + + New sequents to prove: + + It opens a new sequent for each premise of the constructor + that can not be inferred by unification. For more details, + see the apply tactic. + + + + + + + contradiction + contradiction + contradiction + + + + Synopsis: + + contradiction + + + + Pre-conditions: + + There must be in the current context an hypothesis of type + False. + + + + Action: + + It closes the current sequent by applying an hypothesis of + type False. + + + + New sequents to prove: + + None + + + + + + + cut + cut + cut P as H + + + + Synopsis: + + cut &sterm; [as &id;] + + + + Pre-conditions: + + P must have type Prop. + + + + Action: + + It closes the current sequent. + + + + New sequents to prove: + + It opens two new sequents. The first one has an extra + hypothesis H:P. If H is + omitted, the name of the hypothesis is automatically generated. + The second sequent has conclusion P and + hypotheses the hypotheses of the current sequent to prove. + + + + + + + decompose + decompose + + decompose as H1 ... Hm + + + + + Synopsis: + + + decompose + [as &id;…] + + + + + Pre-conditions: + + None. + + + + Action: + + + For each each premise H of type + T in the current context where + T is a non-recursive inductive type without + right parameters and of sort Prop or CProp, the tactic runs + + elim H as H1 ... Hm + , clears H and runs itself + recursively on each new premise introduced by + elim in the opened sequents. + + + + + New sequents to prove: + + + The ones generated by all the elim tactics run. + + + + + + + + demodulate + demodulate + demodulate auto_params + + + + Synopsis: + + demodulate &autoparams; + + + + Pre-conditions: + + None. + + + + Action: + + &TODO; + + + + New sequents to prove: + + None. + + + + + + + destruct + destruct + destruct p + + + + Synopsis: + + destruct &sterm; + + + + Pre-conditions: + + p must have type E1 = E2 where the two sides of the equality are possibly applied constructors of an inductive type. + + + + Action: + + The tactic recursively compare the two sides of the equality + looking for different constructors in corresponding position. + If two of them are found, the tactic closes the current sequent + by proving the absurdity of p. Otherwise + it adds a new hypothesis for each leaf of the formula that + states the equality of the subformulae in the corresponding + positions on the two sides of the equality. + + + + + New sequents to prove: + + None. + + + + + + + elim + elim + elim t pattern using th hyps + + + + Synopsis: + + elim &sterm; &pattern; [using &sterm;] &intros-spec; + + + + Pre-conditions: + + t must inhabit an inductive type and + th must be an elimination principle for that + inductive type. If th is omitted the appropriate + standard elimination principle is chosen. + + + + Action: + + It proceeds by cases on the values of t, + according to the elimination principle th. + The induction predicate is restricted by + pattern. In particular, if some hypothesis + is listed in pattern, the hypothesis is + generalized and cleared before eliminating t + + + + + New sequents to prove: + + It opens one new sequent for each case. The names of + the new hypotheses are picked by hyps, if + provided. If hyps specifies also a number of hypotheses that + is less than the number of new hypotheses for a new sequent, + then the exceeding hypothesis will be kept as implications in + the conclusion of the sequent. + + + + + + + elimType + elimType + elimType T using th hyps + + + + Synopsis: + + elimType &sterm; [using &sterm;] &intros-spec; + + + + Pre-conditions: + + T must be an inductive type. + + + + Action: + + TODO (severely bugged now). + + + + New sequents to prove: + + TODO + + + + + + + exact + exact + exact p + + + + Synopsis: + + exact &sterm; + + + + Pre-conditions: + + The type of p must be convertible + with the conclusion of the current sequent. + + + + Action: + + It closes the current sequent using p. + + + + New sequents to prove: + + None. + + + + + + + exists + exists + exists + + + + Synopsis: + + exists + + + + Pre-conditions: + + The conclusion of the current sequent must be + an inductive type or the application of an inductive type + with at least one constructor. + + + + Action: + + Equivalent to constructor 1. + + + + New sequents to prove: + + It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic. + + + + + + + fail + fail + fail + + + + Synopsis: + + fail + + + + Pre-conditions: + + None. + + + + Action: + + This tactic always fail. + + + + New sequents to prove: + + N.A. + + + + + + + fold + fold + fold red t patt + + + + Synopsis: + + fold &reduction-kind; &sterm; &pattern; + + + + Pre-conditions: + + The pattern must not specify the wanted term. + + + + Action: + + First of all it locates all the subterms matched by + patt. In the context of each matched subterm + it disambiguates the term t and reduces it + to its red normal form; then it replaces with + t every occurrence of the normal form in the + matched subterm. + + + + New sequents to prove: + + None. + + + + + + + fourier + fourier + fourier + + + + Synopsis: + + fourier + + + + Pre-conditions: + + The conclusion of the current sequent must be a linear + inequation over real numbers taken from standard library of + Coq. Moreover the inequations in the hypotheses must imply the + inequation in the conclusion of the current sequent. + + + + Action: + + It closes the current sequent by applying the Fourier method. + + + + New sequents to prove: + + None. + + + + + + + fwd + fwd + fwd H as H0 ... Hn + + + + Synopsis: + + fwd &id; [as &id; [&id;]…] + + + + Pre-conditions: + + + The type of H must be the premise of a + forward simplification theorem. + + + + + Action: + + + This tactic is under development. + It simplifies the current context by removing + H using the following methods: + forward application (by lapply) of a suitable + simplification theorem, chosen automatically, of which the type + of H is a premise, + decomposition (by decompose), + rewriting (by rewrite). + H0 ... Hn + are passed to the tactics fwd invokes, as + names for the premise they introduce. + + + + + New sequents to prove: + + + The ones opened by the tactics fwd invokes. + + + + + + + + generalize + generalize + generalize patt as H + + + + Synopsis: + + generalize &pattern; [as &id;] + + + + Pre-conditions: + + All the terms matched by patt must be + convertible and close in the context of the current sequent. + + + + Action: + + It closes the current sequent by applying a stronger + lemma that is proved using the new generated sequent. + + + + New sequents to prove: + + It opens a new sequent where the current sequent conclusion + G is generalized to + ∀x.G{x/t} where {x/t} + is a notation for the replacement with x of all + the occurrences of the term t matched by + patt. If patt matches no + subterm then t is defined as the + wanted part of the pattern. + + + + + + + id + id + id + + + + Synopsis: + + id + + + + Pre-conditions: + + None. + + + + Action: + + This identity tactic does nothing without failing. + + + + New sequents to prove: + + None. + + + + + + + intro + intro + intro H + + + + Synopsis: + + intro [&id;] + + + + Pre-conditions: + + The conclusion of the sequent to prove must be an implication + or a universal quantification. + + + + Action: + + It applies the right introduction rule for implication, + closing the current sequent. + + + + New sequents to prove: + + It opens a new sequent to prove adding to the hypothesis + the antecedent of the implication and setting the conclusion + to the consequent of the implicaiton. The name of the new + hypothesis is H if provided; otherwise it + is automatically generated. + + + + + + + intros + intros + intros hyps + + + + Synopsis: + + intros &intros-spec; + + + + Pre-conditions: + + If hyps specifies a number of hypotheses + to introduce, then the conclusion of the current sequent must + be formed by at least that number of imbricated implications + or universal quantifications. + + + + Action: + + It applies several times the right introduction rule for + implication, closing the current sequent. + + + + New sequents to prove: + + It opens a new sequent to prove adding a number of new + hypotheses equal to the number of new hypotheses requested. + If the user does not request a precise number of new hypotheses, + it adds as many hypotheses as possible. + The name of each new hypothesis is either popped from the + user provided list of names, or it is automatically generated when + the list is (or becomes) empty. + + + + + + + inversion + inversion + inversion t + + + + Synopsis: + + inversion &sterm; + + + + Pre-conditions: + + The type of the term t must be an inductive + type or the application of an inductive type. + + + + Action: + + It proceeds by cases on t paying attention + to the constraints imposed by the actual "right arguments" + of the inductive type. + + + + New sequents to prove: + + It opens one new sequent to prove for each case in the + definition of the type of t. With respect to + a simple elimination, each new sequent has additional hypotheses + that states the equalities of the "right parameters" + of the inductive type with terms originally present in the + sequent to prove. + + + + + + + lapply + lapply + + lapply linear depth=d t + to t1, ..., tn as H + + + + + Synopsis: + + + lapply + [linear] + [depth=&nat;] + &sterm; + [to + &sterm; + [,&sterm;…] + ] + [as &id;] + + + + + Pre-conditions: + + + t must have at least d + independent premises and n must not be + greater than d. + + + + + Action: + + + Invokes letin H ≝ (t ? ... ?) + with enough ?'s to reach the + d-th independent premise of + t + (d is maximum if unspecified). + Then istantiates (by apply) with + t1, ..., tn + the ?'s corresponding to the first + n independent premises of + t. + Usually the other ?'s preceding the + n-th independent premise of + t are istantiated as a consequence. + If the linear flag is specified and if + t, t1, ..., tn + are (applications of) premises in the current context, they are + cleared. + + + + + New sequents to prove: + + + The ones opened by the tactics lapply invokes. + + + + + + + + left + left + left + + + + Synopsis: + + left + + + + Pre-conditions: + + The conclusion of the current sequent must be + an inductive type or the application of an inductive type + with at least one constructor. + + + + Action: + + Equivalent to constructor 1. + + + + New sequents to prove: + + It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic. + + + + + + + letin + letin + letin x ≝ t + + + + Synopsis: + + letin &id; ≝ &sterm; + + + + Pre-conditions: + + None. + + + + Action: + + It adds to the context of the current sequent to prove a new + definition x ≝ t. + + + + New sequents to prove: + + None. + + + + + + + normalize + normalize + normalize patt + + + + Synopsis: + + normalize &pattern; + + + + Pre-conditions: + + None. + + + + Action: + + It replaces all the terms matched by patt + with their βδιζ-normal form. + + + + New sequents to prove: + + None. + + + + + + + reflexivity + reflexivity + reflexivity + + + + Synopsis: + + reflexivity + + + + Pre-conditions: + + The conclusion of the current sequent must be + t=t for some term t + + + + Action: + + It closes the current sequent by reflexivity + of equality. + + + + New sequents to prove: + + None. + + + + + + + replace + change + change patt with t + + + + Synopsis: + + replace &pattern; with &sterm; + + + + Pre-conditions: + + None. + + + + Action: + + It replaces the subterms of the current sequent matched by + patt with the new term t. + For each subterm matched by the pattern, t is + disambiguated in the context of the subterm. + + + + New sequents to prove: + + For each matched term t' it opens + a new sequent to prove whose conclusion is + t'=t. + + + + + + + rewrite + rewrite + rewrite dir p patt + + + + Synopsis: + + rewrite [<|>] &sterm; &pattern; + + + + Pre-conditions: + + p must be the proof of an equality, + possibly under some hypotheses. + + + + Action: + + It looks in every term matched by patt + for all the occurrences of the + left hand side of the equality that p proves + (resp. the right hand side if dir is + <). Every occurence found is replaced with + the opposite side of the equality. + + + + New sequents to prove: + + It opens one new sequent for each hypothesis of the + equality proved by p that is not closed + by unification. + + + + + + + right + right + right + + + + Synopsis: + + right + + + + Pre-conditions: + + The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least two constructors. + + + + Action: + + Equivalent to constructor 2. + + + + New sequents to prove: + + It opens a new sequent for each premise of the second + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic. + + + + + + + ring + ring + ring + + + + Synopsis: + + ring + + + + Pre-conditions: + + The conclusion of the current sequent must be an + equality over Coq's real numbers that can be proved using + the ring properties of the real numbers only. + + + + Action: + + It closes the current sequent veryfying the equality by + means of computation (i.e. this is a reflexive tactic, implemented + exploiting the "two level reasoning" technique). + + + + New sequents to prove: + + None. + + + + + + + simplify + simplify + simplify patt + + + + Synopsis: + + simplify &pattern; + + + + Pre-conditions: + + None. + + + + Action: + + It replaces all the terms matched by patt + with other convertible terms that are supposed to be simpler. + + + + New sequents to prove: + + None. + + + + + + + split + split + split + + + + Synopsis: + + split + + + + Pre-conditions: + + The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least one constructor. + + + + Action: + + Equivalent to constructor 1. + + + + New sequents to prove: + + It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic. + + + + + + + + subst + subst + subst + + + + Synopsis: + + subst + + + + Pre-conditions: + + None. + + + + Action: + + For each premise of the form + H: x = t or H: t = x + where x is a local variable and + t does not depend on x, + the tactic rewrites H wherever + x appears clearing H and + x afterwards. + + + + New sequents to prove: + + The one opened by the applied tactics. + + + + + + + symmetry + symmetry + The tactic symmetry + symmetry + + + + Synopsis: + + symmetry + + + + Pre-conditions: + + The conclusion of the current proof must be an equality. + + + + Action: + + It swaps the two sides of the equalityusing the symmetric + property. + + + + New sequents to prove: + + None. + + + + + + + transitivity + transitivity + transitivity t + + + + Synopsis: + + transitivity &sterm; + + + + Pre-conditions: + + The conclusion of the current proof must be an equality. + + + + Action: + + It closes the current sequent by transitivity of the equality. + + + + New sequents to prove: + + It opens two new sequents l=t and + t=r where l and r are the left and right hand side of the equality in the conclusion of +the current sequent to prove. + + + + + + + unfold + unfold + unfold t patt + + + + Synopsis: + + unfold [&sterm;] &pattern; + + + + Pre-conditions: + + None. + + + + Action: + + It finds all the occurrences of t + (possibly applied to arguments) in the subterms matched by + patt. Then it δ-expands each occurrence, + also performing β-reduction of the obtained term. If + t is omitted it defaults to each + subterm matched by patt. + + + + New sequents to prove: + + None. + + + + + + + whd + whd + whd patt + + + + Synopsis: + + whd &pattern; + + + + Pre-conditions: + + None. + + + + Action: + + It replaces all the terms matched by patt + with their βδιζ-weak-head normal form. + + + + New sequents to prove: + + None. + + + + + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/sec_terms.html b/helm/www/matita/docs/manual-0.5.9/sec_terms.html new file mode 100644 index 000000000..8d0b079aa --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_terms.html @@ -0,0 +1,53 @@ + +Chapter 4. Syntax

Chapter 4. Syntax

To describe syntax in this manual we use the following conventions:

  1. Non terminal symbols are emphasized and have a link to their + definition. E.g.: term

  2. Terminal symbols are in bold. E.g.: + theorem

  3. Optional sequences of elements are put in square brackets. + E.g.: [in term]

  4. Alternatives are put in square brakets and they are + separated by vertical bars. E.g.: [<|>]

  5. 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]…

  6. 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

Table 4.1. qstring

qstring::="〈〈any sequence of characters excluded "〉〉" 

Table 4.2. 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 ([?'`])〉〉 

Table 4.3. nat

nat::=〈〈any sequence of valid XML digits〉〉 

Table 4.4. char

char::=[a-zA-Z0-9_-] 

Table 4.5. uri-step

uri-step::=char[char]… 

Table 4.6. uri

uri::=[cic:/|theory:/]uri-step[/uri-step]….id[.id]…[#xpointer(nat/nat[/nat]…)] 

Table 4.7. csymbol

csymbol::='id 

Table 4.8. symbol

symbol::=〈〈None of the above〉〉 

Terms

+

Table 4.9. Terms

term::=stermsimple or delimited term
 |term termapplication
 |λargs.termλ-abstraction
 |Πargs.termdependent product meant to define a datatype
 |∀args.termdependent product meant to define a proposition
 |term → termnon-dependent product (logical implication or function space)
 |let [id|(id: term)] ≝ term in termlocal definition
 | + let + [co]rec + rec_def + (co)recursive definitions
   + [and rec_def]… +  
   + in term +  
 |…user provided notation
rec_def::= + id [id|_|(id[,id]… :term)]… +  
   + [on id] + [: term] + ≝ term] +  


+ +

Table 4.10. Simple terms

sterm::=(term) 
 |id[\subst[ + id≔term + [;id≔term]… + ]] + identifier with optional explicit named substitution
 |uria qualified reference
 |Propthe impredicative sort of propositions
 |Setthe impredicate sort of datatypes
 |CPropone fixed predicative sort of constructive propositions
 |Typeone predicative sort of datatypes
 |?implicit argument
 |?n + [[ + [_|term]… + ]]metavariable
 |match term + [ in id ] + [ return term ] + with + case analysis
   + [ + match_branch[|match_branch]… + ] +  
 |(term:term)cast
 |…user provided notation at precedence 90


+ +

Table 4.11. Arguments

args::= + _[: term] + ignored argument
 | + (_[: term]) + ignored argument
 |id[,id]…[: term] 
 |(id[,id]…[: term]) 
args2::=id 
 |(id[,id]…: term) 


+ +

Table 4.12. Pattern matching

match_branch::=match_pattern ⇒ term 
match_pattern::=id0-ary constructor
 |(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)


+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_terms.xml b/helm/www/matita/docs/manual-0.5.9/sec_terms.xml new file mode 100644 index 000000000..a1353b2f0 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_terms.xml @@ -0,0 +1,843 @@ + + + + + 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.: [<|>] + 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 + + qstring + + + + &qstring; + ::= + "〈〈any sequence of characters excluded "〉〉" + + + +
+ + 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;]…)] + + + +
+ + csymbol + + + + &csymbol; + ::= + '&id; + + + +
+ + symbol + + + + &symbol; + ::= + 〈〈None of the above〉〉 + + + +
+
+ + Terms + + + + + + + Terms + + + + &term; + ::= + &sterm; + simple or delimited term + + + + | + &term; &term; + application + + + + | + λ&args;.&term; + λ-abstraction + + + + | + Π&args;.&term; + dependent product meant to define a datatype + + + + | + ∀&args;.&term; + dependent product meant to define a proposition + + + + | + &term; → &term; + non-dependent product (logical implication or function space) + + + + | + let [&id;|(&id;: &term;)] ≝ &term; in &term; + local definition + + + + | + + let + [co]rec + &rec_def; + + (co)recursive definitions + + + + + + [and &rec_def;]… + + + + + + + + in &term; + + + + + + | + … + user provided notation + + + &rec_def; + ::= + + &id; [&id;|_|(&id;[,&id;]… :&term;)]… + + + + + + + + [on &id;] + [: &term;] + ≝ &term;] + + + + + +
+ + + Simple terms + + + + &sterm; + ::= + (&term;) + + + + + | + &id;[\subst[ + &id;≔&term; + [;&id;≔&term;]… + ]] + + identifier with optional explicit named substitution + + + + | + &uri; + a qualified reference + + + + | + Prop + the impredicative sort of propositions + + + + | + Set + the impredicate sort of datatypes + + + + | + CProp + one fixed predicative sort of constructive propositions + + + + | + Type + one predicative sort of datatypes + + + + | + ? + implicit argument + + + + | + ?n + [[ + [_|&term;]… + ]] + metavariable + + + + | + match &term; + [ in &id; ] + [ return &term; ] + with + + case analysis + + + + + + [ + &match_branch;[|&match_branch;]… + ] + + + + + + | + (&term;:&term;) + cast + + + + | + … + user provided notation at precedence 90 + + + +
+ + + Arguments + + + + &args; + ::= + + _[: &term;] + + ignored argument + + + + | + + (_[: &term;]) + + ignored argument + + + + | + &id;[,&id;]…[: &term;] + + + + + | + (&id;[,&id;]…[: &term;]) + + + + &args2; + ::= + &id; + + + + + | + (&id;[,&id;]…: &term;) + + + + +
+ + + Pattern matching + + + + &match_branch; + ::= + &match_pattern; ⇒ &term; + + + + &match_pattern; + ::= + &id; + 0-ary constructor + + + + | + (&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) + + + +
+
+ +
+
+ + + Definitions and declarations + + <emphasis role="bold">axiom</emphasis> &id;<emphasis role="bold">:</emphasis> &term; + axiom + axiom H: P + H is declared as an axiom that states P + + + <emphasis role="bold">definition</emphasis> &id;[<emphasis role="bold">:</emphasis> &term;] [<emphasis role="bold">≝</emphasis> &term;] + definition + definition f: T ≝ t + f is defined as t; + T is its type. An error is raised if the type of + t is not convertible to T. + T is inferred from t if + omitted. + t can be omitted only if T is + given. In this case Matita enters in interactive mode and + f must be defined by means of tactics. + Notice that the command is equivalent to theorem f: T ≝ t. + + + <emphasis role="bold">letrec</emphasis> &TODO; + &TODO; + &TODO; + + + [<emphasis role="bold">inductive</emphasis>|<emphasis role="bold">coinductive</emphasis>] &id; [&args2;]… <emphasis role="bold">:</emphasis> &term; <emphasis role="bold">≝</emphasis> [<emphasis role="bold">|</emphasis>] [&id;<emphasis role="bold">:</emphasis>&term;] [<emphasis role="bold">|</emphasis> &id;<emphasis role="bold">:</emphasis>&term;]… +[<emphasis role="bold">with</emphasis> &id; <emphasis role="bold">:</emphasis> &term; <emphasis role="bold">≝</emphasis> [<emphasis role="bold">|</emphasis>] [&id;<emphasis role="bold">:</emphasis>&term;] [<emphasis role="bold">|</emphasis> &id;<emphasis role="bold">:</emphasis>&term;]…]… + + (co)inductive types declaration + 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. + + + <emphasis role="bold">record</emphasis> &id; [&args2;]… <emphasis role="bold">:</emphasis> &term; <emphasis role="bold">≝</emphasis><emphasis role="bold">{</emphasis>[&id; [<emphasis role="bold">:</emphasis>|<emphasis role="bold">:></emphasis>] &term;] [<emphasis role="bold">;</emphasis>&id; [<emphasis role="bold">:</emphasis>|<emphasis role="bold">:></emphasis>] &term;]…<emphasis role="bold">}</emphasis> + 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 + + <emphasis role="bold">theorem</emphasis> &id;[<emphasis role="bold">:</emphasis> &term;] [<emphasis role="bold">≝</emphasis> &term;] + theorem + theorem f: P ≝ p + Proves a new theorem f whose thesis is + P. + If p is provided, it must be a proof term for + P. Otherwise an interactive proof is started. + P can be omitted only if the proof is not + interactive. + Proving a theorem already proved in the library is an error. + To provide an alternative name and proof for the same theorem, use + variant f: P ≝ p. + A warning is raised if the name of the theorem cannot be obtained + by mangling the name of the constants in its thesis. + Notice that the command is equivalent to definition f: T ≝ t. + + + <emphasis role="bold">variant</emphasis> &id;<emphasis role="bold">:</emphasis> &term; <emphasis role="bold">≝</emphasis> &term; + variant + variant f: T ≝ t + Same as theorem f: T ≝ t, but it does not + complain if the theorem has already been proved. To be used to give + an alternative name or proof to a theorem. + + + <emphasis role="bold">lemma</emphasis> &id;[<emphasis role="bold">:</emphasis> &term;] [<emphasis role="bold">≝</emphasis> &term;] + lemma + lemma f: T ≝ t + Same as theorem f: T ≝ t + + + <emphasis role="bold">fact</emphasis> &id;[<emphasis role="bold">:</emphasis> &term;] [<emphasis role="bold">≝</emphasis> &term;] + fact + fact f: T ≝ t + Same as theorem f: T ≝ t + + + <emphasis role="bold">remark</emphasis> &id;[<emphasis role="bold">:</emphasis> &term;] [<emphasis role="bold">≝</emphasis> &term;] + remark + remark 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; + ::= + 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 + + + +
+
+
+ +
+ diff --git a/helm/www/matita/docs/manual-0.5.9/sec_usernotation.html b/helm/www/matita/docs/manual-0.5.9/sec_usernotation.html new file mode 100644 index 000000000..322544b00 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_usernotation.html @@ -0,0 +1,37 @@ + +Chapter 5. Extending the syntax

Chapter 5. Extending the syntax

Table of Contents

notation
interpretation
+ Introduction: TODO

notation

notation usage "presentation" associativity with precedence p for content

+

Synopsis:

notation + [usage] "notation_lhs" [associativity] with precedence nat + for + notation_rhs +

Action:

Declares a mapping between the presentation + AST presentation and the content AST + content. The declared presentation AST fragment + presentation is at precedence level + p. The precedence level is used to determine where + parentheses must be inserted. In particular, the content AST fragment + content is actually a pattern, since it contains + placeholders (variables) for sub-ASTs. Every placeholder for a term + is given an expected precedence level. Parentheses must be inserted + around sub-ASTs having a precedence level strictly smaller than the + expected one.

If presentation describes a binary + infix operator and if no precedence level is explicitly given for the + operator arguments, an associativity declaration + can be given to automatically choose the right level for the operands. + Otherwise, no associativity can be given.

If direction is + omitted, the mapping is bi-directional and is used both during + parsing and pretty-printing of terms. If direction + is >, the mapping is used only during parsing; + if it is <, it is used only during + pretty-printing. Thus it is possible to use simple notations to type + for writing the term, and nicer ones for rendering it.

Notation arguments:

Table 5.1. usage

usage::=<Only for pretty-printing
 |>Only for parsing

Table 5.2. associativity

associativity::=left associativeLeft associative
 |right associativeRight associative
 |non associativeNon associative (default)

Table 5.3. notation_rhs


Table 5.4. unparsed_ast

unparsed_ast::=@{enriched_term}A content level AST (a term which is parsed, but not disambiguated).
 |@id@id is just an abbreviation for @{id}
 |@csymbol@'symbol is just an abbreviation for @{'symbol}

Table 5.5. enriched_term

enriched_term::=〈〈A term that may contain occurrences of unparsed_meta, even as variable names in binders, and occurrences of csymbol〉〉TODO

Table 5.6. unparsed_meta

unparsed_meta::=${level2_meta}TODO
 |$id$id is just an abbreviation for ${id}
 |$_$_ is just an abbreviation for ${_}

Table 5.7. level2_meta

level2_meta::=unparsed_astTODO
 |term nat idTODO
 |number idTODO
 |ident idTODO
 |fresh idTODO
 |anonymousTODO
 |idTODO
 |fold [left|right] level2_meta rec id level2_metaTODO
 |default level2_meta level2_metaTODO
 |if level2_meta then level2_meta else level2_metaTODO
 |failTODO

Table 5.8. notation_lhs

notation_lhs::=layout [layout]… 

Table 5.9. layout

layout::=layout \sub layoutSubscript
 |layout \sup layoutSuperscript
 |layout \below layout 
 |layout \above layout 
 |layout \over layout 
 |layout \atop layout 
 |layout \frac layoutFraction
 |\infrule layout layout layoutInference rule (premises, conclusion, rule name)
 |\sqrt layoutSquare root
 |\root layout \of layoutGeneralized root
 |hbox ( layout [layout]… )Horizontal box
 |vbox ( layout [layout]… )Vertical box
 |hvbox ( layout [layout]… )Horizontal and vertical box
 |hovbox ( layout [layout]… )Horizontal or vertical box
 |breakBreakable space
 |( layout [layout]… )Group
 |idPlaceholder for a term with no explicit precedence
 |term nat idPlaceholder for a term with explicit expected precedence
 |number idPlaceholder for a natural number
 |ident idPlaceholder for an identifier
 |literalLiteral
 |opt layoutOptional layout (it can be omitted for parsing)
 |list0 layout + [sep literal]List of layouts separated by sep (default: + any blank)
 |list1 layout + [sep literal]Non empty list of layouts separated by sep + (default: any blank)
 |mstyle id value (layout) + Style attributes like color #ff0000
 |mpadded id value (layout) + padding attributes like width -150%
 |maction (layout) + [ (layout) … ] + Alternative notations (output only)

Table 5.10. literal

literal::=symbolUnicode symbol
 |natNatural number (a constant)
 |'id'New keyword for the lexer

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/sec_usernotation.xml b/helm/www/matita/docs/manual-0.5.9/sec_usernotation.xml new file mode 100644 index 000000000..e141bd859 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/sec_usernotation.xml @@ -0,0 +1,583 @@ + + + + Extending the syntax + Introduction: &TODO; + + notation + notation + notation usage "presentation" associativity with precedence p for content + + + + Synopsis: + + notation + [&usage;] "¬ation_lhs;" [&associativity;] with precedence &nat; + for + ¬ation_rhs; + + + + + Action: + + Declares a mapping between the presentation + AST presentation and the content AST + content. The declared presentation AST fragment + presentation is at precedence level + p. The precedence level is used to determine where + parentheses must be inserted. In particular, the content AST fragment + content is actually a pattern, since it contains + placeholders (variables) for sub-ASTs. Every placeholder for a term + is given an expected precedence level. Parentheses must be inserted + around sub-ASTs having a precedence level strictly smaller than the + expected one. + If presentation describes a binary + infix operator and if no precedence level is explicitly given for the + operator arguments, an associativity declaration + can be given to automatically choose the right level for the operands. + Otherwise, no associativity can be given. + If direction is + omitted, the mapping is bi-directional and is used both during + parsing and pretty-printing of terms. If direction + is >, the mapping is used only during parsing; + if it is <, it is used only during + pretty-printing. Thus it is possible to use simple notations to type + for writing the term, and nicer ones for rendering it. + + + + Notation arguments: + + + + usage + + + + &usage; + ::= + < + Only for pretty-printing + + + + | + > + Only for parsing + + + +
+ + + associativity + + + + &associativity; + ::= + left associative + Left associative + + + + | + right associative + Right associative + + + + | + non associative + Non associative (default) + + + +
+ + + notation_rhs + + + + ¬ation_rhs; + ::= + &unparsed_ast; + &TODO; + + + + | + &unparsed_meta; + &TODO; + + + +
+ + + unparsed_ast + + + + &unparsed_ast; + ::= + @{&enriched_term;} + A content level AST (a term which is parsed, but not disambiguated). + + + + | + @&id; + @id is just an abbreviation for @{id} + + + + | + @&csymbol; + @'symbol is just an abbreviation for @{'symbol} + + + +
+ + + enriched_term + + + + &enriched_term; + ::= + 〈〈A term that may contain occurrences of &unparsed_meta;, even as variable names in binders, and occurrences of &csymbol;〉〉 + &TODO; + + + +
+ + + unparsed_meta + + + + &unparsed_meta; + ::= + ${&level2_meta;} + &TODO; + + + + | + $&id; + $id is just an abbreviation for ${id} + + + + | + $_ + $_ is just an abbreviation for ${_} + + + +
+ + + level2_meta + + + + &level2_meta; + ::= + &unparsed_ast; + &TODO; + + + + | + term &nat; &id; + &TODO; + + + + | + number &id; + &TODO; + + + + | + ident &id; + &TODO; + + + + | + fresh &id; + &TODO; + + + + | + anonymous + &TODO; + + + + | + &id; + &TODO; + + + + | + fold [left|right] &level2_meta; rec &id; &level2_meta; + &TODO; + + + + | + default &level2_meta; &level2_meta; + &TODO; + + + + | + if &level2_meta; then &level2_meta; else &level2_meta; + &TODO; + + + + | + fail + &TODO; + + + +
+ + + notation_lhs + + + + ¬ation_lhs; + ::= + &layout; [&layout;]… + + + +
+ + + layout + + + + &layout; + ::= + &layout; \sub &layout; + Subscript + + + + | + &layout; \sup &layout; + Superscript + + + + | + &layout; \below &layout; + + + + + | + &layout; \above &layout; + + + + + | + &layout; \over &layout; + + + + + | + &layout; \atop &layout; + + + + + | + &layout; \frac &layout; + Fraction + + + + | + \infrule &layout; &layout; &layout; + Inference rule (premises, conclusion, rule name) + + + + | + \sqrt &layout; + Square root + + + + | + \root &layout; \of &layout; + Generalized root + + + + | + hbox ( &layout; [&layout;]… ) + Horizontal box + + + + | + vbox ( &layout; [&layout;]… ) + Vertical box + + + + | + hvbox ( &layout; [&layout;]… ) + Horizontal and vertical box + + + + | + hovbox ( &layout; [&layout;]… ) + Horizontal or vertical box + + + + | + break + Breakable space + + + + | + ( &layout; [&layout;]… ) + Group + + + + | + &id; + Placeholder for a term with no explicit precedence + + + + | + term &nat; &id; + Placeholder for a term with explicit expected precedence + + + + | + number &id; + Placeholder for a natural number + + + + | + ident &id; + Placeholder for an identifier + + + + | + &literal; + Literal + + + + | + opt &layout; + Optional layout (it can be omitted for parsing) + + + + | + list0 &layout; + [sep &literal;] + List of layouts separated by sep (default: + any blank) + + + + + | + list1 &layout; + [sep &literal;] + Non empty list of layouts separated by sep + (default: any blank) + + + + + | + mstyle &id; value (&layout;) + + Style attributes like color #ff0000 + + + + + | + mpadded &id; value (&layout;) + + padding attributes like width -150% + + + + + | + maction (&layout;) + [ (&layout;) … ] + + Alternative notations (output only) + + + + + +
+ + + literal + + + + &literal; + ::= + &symbol; + Unicode symbol + + + + | + &nat; + Natural number (a constant) + + + + | + '&id;' + New keyword for the lexer + + + +
+ +
+
+
+
+
+ + interpretation + interpretation + interpretation "description" 'symbol p1 … pn = + rhs + + + + Synopsis: + + interpretation + &qstring; &csymbol; [&interpretation_argument;]… + = + &interpretation_rhs; + + + + + Action: + + It declares a bi-directional mapping {…} between the content-level AST 'symbol t1 … tn and the semantic term rhs[{t1}/p1;…;{tn}/pn] + (the simultaneous substitution in rhs of the + interpretation {…} of every content-level + actual argument ti for its + corresponding formal parameter + pi). The + description must be a textual description of the + meaning associated to 'symbol by this + interpretation, and is used by the user interface of Matita to + provide feedback on the interpretation of ambiguous terms. + + + + + Interpretation arguments: + + + + interpretation_argument + + + + &interpretation_argument; + ::= + [η.]… &id; + A formal parameter. If the name of the formal parameter is + prefixed by n symbols "η", then the mapping performs + (multiple) η-expansions to grant that the semantic actual + parameter begins with at least n λ-abstractions. + + + +
+ + interpretation_rhs + + + + &interpretation_rhs; + ::= + &uri; + A constant, specified by its URI + + + + | + &id; + A constant, specified by its name, or a bound variable. If + the constant name is ambiguous, the one corresponding to the + last implicitly or explicitly specified alias is used. + + + + | + ? + An implicit parameter + + + + | + ( + &interpretation_rhs; + [&interpretation_rhs;]… + ) + An application + + + +
+ +
+
+
+
+
+
diff --git a/helm/www/matita/docs/manual-0.5.9/tac_absurd.html b/helm/www/matita/docs/manual-0.5.9/tac_absurd.html new file mode 100644 index 000000000..c124364a2 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_absurd.html @@ -0,0 +1,6 @@ + +absurd

absurd

absurd P

+

Synopsis:

absurd sterm

Pre-conditions:

P must have type Prop.

Action:

It closes the current sequent by eliminating an + absurd term.

New sequents to prove:

It opens two new sequents of conclusion P + and ¬P.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_andelim.html b/helm/www/matita/docs/manual-0.5.9/tac_andelim.html new file mode 100644 index 000000000..3e62abe92 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_andelim.html @@ -0,0 +1,11 @@ + +we have

we have

justification we have t1 (id1) and t2 (id2) +

+

Synopsis:

justification we have term + ( id ) and term + ( id )

Pre-condition:

Action:

It derives t1∧t2 using the + justification then it introduces in the context + t1 labelled with id1 and + t2 labelled with id2. +

New sequent to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_apply.html b/helm/www/matita/docs/manual-0.5.9/tac_apply.html new file mode 100644 index 000000000..917b508bd --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_apply.html @@ -0,0 +1,12 @@ + +apply

apply

apply t

+

Synopsis:

apply sterm

Pre-conditions:

t must have type + T1 → … → + Tn → G + where G can be unified with the conclusion + of the current sequent.

Action:

It closes the current sequent by applying t to n implicit arguments (that become new sequents).

New sequents to prove:

It opens a new sequent for each premise + Ti that is not + instantiated by unification. Ti is + the conclusion of the i-th new sequent to + prove.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_applyS.html b/helm/www/matita/docs/manual-0.5.9/tac_applyS.html new file mode 100644 index 000000000..afc709242 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_applyS.html @@ -0,0 +1,25 @@ + +applyS

applyS

applyS t auto_params

+

Synopsis:

applyS sterm auto_params

Pre-conditions:

t must have type + T1 → ... → + Tn → G.

Action:

applyS is useful when + apply fails because the current goal + and the conclusion of the applied theorems are extensionally + equivalent up to instantiation of metavariables, but cannot + be unified. E.g. the goal is P(n*O+m) and + the theorem to be applied proves ∀m.P(m+O). +

+ It tries to automatically rewrite the current goal using + auto paramodulation + to make it unifiable with G. + Then it closes the current sequent by applying + t to n + implicit arguments (that become new sequents). + The auto_params parameters are passed + directly to auto paramodulation. +

New sequents to prove:

It opens a new sequent for each premise + Ti that is not + instantiated by unification. Ti is + the conclusion of the i-th new sequent to + prove.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_assume.html b/helm/www/matita/docs/manual-0.5.9/tac_assume.html new file mode 100644 index 000000000..e527c9005 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_assume.html @@ -0,0 +1,10 @@ + +assume

assume

assume x : t

+

Synopsis:

assume id : sterm

Pre-conditions:

The conclusion of the current proof must be + ∀x:T.P or + T→P where T is + a data type (i.e. T has type + Set or Type).

Action:

It adds to the context of the current sequent to prove a new + declaration x : T . The new conclusion becomes + P.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_assumption.html b/helm/www/matita/docs/manual-0.5.9/tac_assumption.html new file mode 100644 index 000000000..ca3a80299 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_assumption.html @@ -0,0 +1,5 @@ + +assumption

assumption

assumption

+

Synopsis:

assumption

Pre-conditions:

There must exist an hypothesis whose type can be unified with + the conclusion of the current sequent.

Action:

It closes the current sequent exploiting an hypothesis.

New sequents to prove:

None

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_auto.html b/helm/www/matita/docs/manual-0.5.9/tac_auto.html new file mode 100644 index 000000000..086e5668f --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_auto.html @@ -0,0 +1,12 @@ + +auto

auto

auto params

+

Synopsis:

auto auto_params.

autobatch auto_params

Pre-conditions:

None, but the tactic may fail finding a proof if every + proof is in the search space that is pruned away. Pruning is + controlled by the optional params. + Moreover, only lemmas whose type signature is a subset of the + signature of the current sequent are considered. The signature of + a sequent is essentially the set of constats appearing in it. +

Action:

It closes the current sequent by repeated application of + rewriting steps (unless paramodulation is + omitted), hypothesis and lemmas in the library.

New sequents to prove:

None

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_bydone.html b/helm/www/matita/docs/manual-0.5.9/tac_bydone.html new file mode 100644 index 000000000..a96035777 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_bydone.html @@ -0,0 +1,4 @@ + +done

done

justification done

+

Synopsis:

justification done

Pre-condition:

Action:

It closes the current sequent given the justification.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_byinduction.html b/helm/www/matita/docs/manual-0.5.9/tac_byinduction.html new file mode 100644 index 000000000..ce5c1a01e --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_byinduction.html @@ -0,0 +1,5 @@ + +by induction hypothesis we know

by induction hypothesis we know

by induction hypothesis we know t (id)

+

Synopsis:

by induction hypothesis we know term ( id )

Pre-condition:

To be used in a proof by induction to state the inductive + hypothesis.

Action:

Introduces the inductive hypothesis.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_bytermweproved.html b/helm/www/matita/docs/manual-0.5.9/tac_bytermweproved.html new file mode 100644 index 000000000..34de2e230 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_bytermweproved.html @@ -0,0 +1,10 @@ + +we proved

we proved

justification we proved t (id)

+

Synopsis:

justification we proved term + ( id + )

Pre-condition:

tmust have type Prop. +

Action:

It derives t + using the justification and labels the conclusion with + id. +

New sequent to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_case.html b/helm/www/matita/docs/manual-0.5.9/tac_case.html new file mode 100644 index 000000000..1571578c5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_case.html @@ -0,0 +1,6 @@ + +case

case

case id (id1:t1) … (idn:tn)

+

Synopsis:

case id [( id : term )] …

Pre-condition:

To be used in a proof by induction or by cases to start + a new case

Action:

Starts the new case id declaring + the local parameters (id1:t1) … (idn:tn)

New sequents to prove:

None

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_cases.html b/helm/www/matita/docs/manual-0.5.9/tac_cases.html new file mode 100644 index 000000000..ff40497a5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_cases.html @@ -0,0 +1,23 @@ + +cases

cases

+ cases t pattern hyps +

+

Synopsis:

+ cases + term pattern [([id]…)] +

Pre-conditions:

+ t must inhabit an inductive type +

Action:

+ It proceed by cases on t. The new generated + hypothesis in each branch are named according to + hyps. + The elimintation predicate is restricted by + pattern. In particular, if some hypothesis + is listed in pattern, the hypothesis is + generalized and cleared before proceeding by cases on + t. Currently, we only support patterns of the + form H1 … Hn ⊢ %. This limitation will be lifted in the future. +

New sequents to prove:

One new sequent for each constructor of the type of + t. Each sequent has a new hypothesis for + each argument of the constructor.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_change.html b/helm/www/matita/docs/manual-0.5.9/tac_change.html new file mode 100644 index 000000000..9a6ff07f9 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_change.html @@ -0,0 +1,9 @@ + +change

change

change patt with t

+

Synopsis:

change pattern with sterm

Pre-conditions:

Each subterm matched by the pattern must be convertible + with the term t disambiguated in the context + of the matched subterm.

Action:

It replaces the subterms of the current sequent matched by + patt with the new term t. + For each subterm matched by the pattern, t is + disambiguated in the context of the subterm.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_clear.html b/helm/www/matita/docs/manual-0.5.9/tac_clear.html new file mode 100644 index 000000000..8be431a30 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_clear.html @@ -0,0 +1,19 @@ + +clear

clear

+ clear H1 ... Hm +

+

Synopsis:

+ clear + id [id…] +

Pre-conditions:

+ + H1 ... Hm + must be hypotheses of the + current sequent to prove. +

Action:

+ It hides the hypotheses + + H1 ... Hm + from the current sequent. +

New sequents to prove:

None

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_clearbody.html b/helm/www/matita/docs/manual-0.5.9/tac_clearbody.html new file mode 100644 index 000000000..d87c34320 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_clearbody.html @@ -0,0 +1,6 @@ + +clearbody

clearbody

clearbody H

+

Synopsis:

clearbody id

Pre-conditions:

H must be an hypothesis of the + current sequent to prove.

Action:

It hides the definiens of a definition in the current + sequent context. Thus the definition becomes an hypothesis.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_compose.html b/helm/www/matita/docs/manual-0.5.9/tac_compose.html new file mode 100644 index 000000000..8e4badcdd --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_compose.html @@ -0,0 +1,14 @@ + +compose

compose

compose n t1 with t2 hyps

+

Synopsis:

compose [nat] sterm [with sterm] [intros-spec]

Pre-conditions:

Action:

Composes t1 with t2 in every possible way + n times introducing generated terms + as if intros hyps was issued.

If t1:∀x:A.B[x] and + t2:∀x,y:A.B[x]→B[y]→C[x,y] it generates: +

  • λx,y:A.t2 x y (t1 x) : ∀x,y:A.B[y]→C[x,y]

  • λx,y:A.λH:B[x].t2 x y H (t1 y) : ∀x,y:A.B[x]→C[x,y] +

+

If t2 is omitted it composes + t1 + with every hypothesis that can be introduced. + n iterates the process.

New sequents to prove:

The same, but with more hypothesis eventually introduced + by the intros-spec.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_constructor.html b/helm/www/matita/docs/manual-0.5.9/tac_constructor.html new file mode 100644 index 000000000..67eabff6e --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_constructor.html @@ -0,0 +1,9 @@ + +constructor

constructor

constructor n

+

Synopsis:

constructor nat

Pre-conditions:

The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least n constructors.

Action:

It applies the n-th constructor of the + inductive type of the conclusion of the current sequent.

New sequents to prove:

It opens a new sequent for each premise of the constructor + that can not be inferred by unification. For more details, + see the apply tactic.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_contradiction.html b/helm/www/matita/docs/manual-0.5.9/tac_contradiction.html new file mode 100644 index 000000000..aace7783c --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_contradiction.html @@ -0,0 +1,6 @@ + +contradiction

contradiction

contradiction

+

Synopsis:

contradiction

Pre-conditions:

There must be in the current context an hypothesis of type + False.

Action:

It closes the current sequent by applying an hypothesis of + type False.

New sequents to prove:

None

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_cut.html b/helm/www/matita/docs/manual-0.5.9/tac_cut.html new file mode 100644 index 000000000..507334e81 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_cut.html @@ -0,0 +1,8 @@ + +cut

cut

cut P as H

+

Synopsis:

cut sterm [as id]

Pre-conditions:

P must have type Prop.

Action:

It closes the current sequent.

New sequents to prove:

It opens two new sequents. The first one has an extra + hypothesis H:P. If H is + omitted, the name of the hypothesis is automatically generated. + The second sequent has conclusion P and + hypotheses the hypotheses of the current sequent to prove.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_decompose.html b/helm/www/matita/docs/manual-0.5.9/tac_decompose.html new file mode 100644 index 000000000..ab76c8bce --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_decompose.html @@ -0,0 +1,21 @@ + +decompose

decompose

+ decompose as H1 ... Hm +

+

Synopsis:

+ decompose + [as id…] +

Pre-conditions:

None.

Action:

+ For each each premise H of type + T in the current context where + T is a non-recursive inductive type without + right parameters and of sort Prop or CProp, the tactic runs + + elim H as H1 ... Hm + , clears H and runs itself + recursively on each new premise introduced by + elim in the opened sequents. +

New sequents to prove:

+ The ones generated by all the elim tactics run. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_demodulate.html b/helm/www/matita/docs/manual-0.5.9/tac_demodulate.html new file mode 100644 index 000000000..c6f9f4588 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_demodulate.html @@ -0,0 +1,4 @@ + +demodulate

demodulate

demodulate auto_params

+

Synopsis:

demodulate auto_params

Pre-conditions:

None.

Action:

TODO

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_destruct.html b/helm/www/matita/docs/manual-0.5.9/tac_destruct.html new file mode 100644 index 000000000..6eb470661 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_destruct.html @@ -0,0 +1,11 @@ + +destruct

destruct

destruct p

+

Synopsis:

destruct sterm

Pre-conditions:

p must have type E1 = E2 where the two sides of the equality are possibly applied constructors of an inductive type.

Action:

The tactic recursively compare the two sides of the equality + looking for different constructors in corresponding position. + If two of them are found, the tactic closes the current sequent + by proving the absurdity of p. Otherwise + it adds a new hypothesis for each leaf of the formula that + states the equality of the subformulae in the corresponding + positions on the two sides of the equality. +

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_elim.html b/helm/www/matita/docs/manual-0.5.9/tac_elim.html new file mode 100644 index 000000000..46f642f2c --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_elim.html @@ -0,0 +1,18 @@ + +elim

elim

elim t pattern using th hyps

+

Synopsis:

elim sterm pattern [using sterm] intros-spec

Pre-conditions:

t must inhabit an inductive type and + th must be an elimination principle for that + inductive type. If th is omitted the appropriate + standard elimination principle is chosen.

Action:

It proceeds by cases on the values of t, + according to the elimination principle th. + The induction predicate is restricted by + pattern. In particular, if some hypothesis + is listed in pattern, the hypothesis is + generalized and cleared before eliminating t +

New sequents to prove:

It opens one new sequent for each case. The names of + the new hypotheses are picked by hyps, if + provided. If hyps specifies also a number of hypotheses that + is less than the number of new hypotheses for a new sequent, + then the exceeding hypothesis will be kept as implications in + the conclusion of the sequent.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_elimType.html b/helm/www/matita/docs/manual-0.5.9/tac_elimType.html new file mode 100644 index 000000000..f0f737f13 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_elimType.html @@ -0,0 +1,4 @@ + +elimType

elimType

elimType T using th hyps

+

Synopsis:

elimType sterm [using sterm] intros-spec

Pre-conditions:

T must be an inductive type.

Action:

TODO (severely bugged now).

New sequents to prove:

TODO

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_exact.html b/helm/www/matita/docs/manual-0.5.9/tac_exact.html new file mode 100644 index 000000000..6f38cee1f --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_exact.html @@ -0,0 +1,5 @@ + +exact

exact

exact p

+

Synopsis:

exact sterm

Pre-conditions:

The type of p must be convertible + with the conclusion of the current sequent.

Action:

It closes the current sequent using p.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_exists.html b/helm/www/matita/docs/manual-0.5.9/tac_exists.html new file mode 100644 index 000000000..77952c6d3 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_exists.html @@ -0,0 +1,8 @@ + +exists

exists

exists

+

Synopsis:

exists

Pre-conditions:

The conclusion of the current sequent must be + an inductive type or the application of an inductive type + with at least one constructor.

Action:

Equivalent to constructor 1.

New sequents to prove:

It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_exitselim.html b/helm/www/matita/docs/manual-0.5.9/tac_exitselim.html new file mode 100644 index 000000000..0ea438f83 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_exitselim.html @@ -0,0 +1,13 @@ + +let such that

let such that

justification let x:t such that p (id) +

+

Synopsis:

justification let id + : term such that term + ( id )

Pre-condition:

+

Action:

It derives ∃x:t.p using the + justification and then it introduces in the context + x and the hypothesis + p labelled with + id. +

New sequent to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_fail.html b/helm/www/matita/docs/manual-0.5.9/tac_fail.html new file mode 100644 index 000000000..b38ea3e65 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_fail.html @@ -0,0 +1,4 @@ + +fail

fail

fail

+

Synopsis:

fail

Pre-conditions:

None.

Action:

This tactic always fail.

New sequents to prove:

N.A.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_fold.html b/helm/www/matita/docs/manual-0.5.9/tac_fold.html new file mode 100644 index 000000000..76939c7a2 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_fold.html @@ -0,0 +1,9 @@ + +fold

fold

fold red t patt

+

Synopsis:

fold reduction-kind sterm pattern

Pre-conditions:

The pattern must not specify the wanted term.

Action:

First of all it locates all the subterms matched by + patt. In the context of each matched subterm + it disambiguates the term t and reduces it + to its red normal form; then it replaces with + t every occurrence of the normal form in the + matched subterm.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_fourier.html b/helm/www/matita/docs/manual-0.5.9/tac_fourier.html new file mode 100644 index 000000000..fdc1c0023 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_fourier.html @@ -0,0 +1,7 @@ + +fourier

fourier

fourier

+

Synopsis:

fourier

Pre-conditions:

The conclusion of the current sequent must be a linear + inequation over real numbers taken from standard library of + Coq. Moreover the inequations in the hypotheses must imply the + inequation in the conclusion of the current sequent.

Action:

It closes the current sequent by applying the Fourier method.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_fwd.html b/helm/www/matita/docs/manual-0.5.9/tac_fwd.html new file mode 100644 index 000000000..38bfcc0b6 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_fwd.html @@ -0,0 +1,21 @@ + +fwd

fwd

fwd H as H0 ... Hn

+

Synopsis:

fwd id [as id [id]…]

Pre-conditions:

+ The type of H must be the premise of a + forward simplification theorem. +

Action:

+ This tactic is under development. + It simplifies the current context by removing + H using the following methods: + forward application (by lapply) of a suitable + simplification theorem, chosen automatically, of which the type + of H is a premise, + decomposition (by decompose), + rewriting (by rewrite). + H0 ... Hn + are passed to the tactics fwd invokes, as + names for the premise they introduce. +

New sequents to prove:

+ The ones opened by the tactics fwd invokes. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_generalize.html b/helm/www/matita/docs/manual-0.5.9/tac_generalize.html new file mode 100644 index 000000000..f51f1d969 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_generalize.html @@ -0,0 +1,13 @@ + +generalize

generalize

generalize patt as H

+

Synopsis:

generalize pattern [as id]

Pre-conditions:

All the terms matched by patt must be + convertible and close in the context of the current sequent.

Action:

It closes the current sequent by applying a stronger + lemma that is proved using the new generated sequent.

New sequents to prove:

It opens a new sequent where the current sequent conclusion + G is generalized to + ∀x.G{x/t} where {x/t} + is a notation for the replacement with x of all + the occurrences of the term t matched by + patt. If patt matches no + subterm then t is defined as the + wanted part of the pattern.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_id.html b/helm/www/matita/docs/manual-0.5.9/tac_id.html new file mode 100644 index 000000000..97f0ef7de --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_id.html @@ -0,0 +1,4 @@ + +id

id

id

+

Synopsis:

id

Pre-conditions:

None.

Action:

This identity tactic does nothing without failing.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_intro.html b/helm/www/matita/docs/manual-0.5.9/tac_intro.html new file mode 100644 index 000000000..39e4dbc69 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_intro.html @@ -0,0 +1,10 @@ + +intro

intro

intro H

+

Synopsis:

intro [id]

Pre-conditions:

The conclusion of the sequent to prove must be an implication + or a universal quantification.

Action:

It applies the right introduction rule for implication, + closing the current sequent.

New sequents to prove:

It opens a new sequent to prove adding to the hypothesis + the antecedent of the implication and setting the conclusion + to the consequent of the implicaiton. The name of the new + hypothesis is H if provided; otherwise it + is automatically generated.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_intros.html b/helm/www/matita/docs/manual-0.5.9/tac_intros.html new file mode 100644 index 000000000..29eea277c --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_intros.html @@ -0,0 +1,14 @@ + +intros

intros

intros hyps

+

Synopsis:

intros intros-spec

Pre-conditions:

If hyps specifies a number of hypotheses + to introduce, then the conclusion of the current sequent must + be formed by at least that number of imbricated implications + or universal quantifications.

Action:

It applies several times the right introduction rule for + implication, closing the current sequent.

New sequents to prove:

It opens a new sequent to prove adding a number of new + hypotheses equal to the number of new hypotheses requested. + If the user does not request a precise number of new hypotheses, + it adds as many hypotheses as possible. + The name of each new hypothesis is either popped from the + user provided list of names, or it is automatically generated when + the list is (or becomes) empty.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_inversion.html b/helm/www/matita/docs/manual-0.5.9/tac_inversion.html new file mode 100644 index 000000000..56ff69c3e --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_inversion.html @@ -0,0 +1,12 @@ + +inversion

inversion

inversion t

+

Synopsis:

inversion sterm

Pre-conditions:

The type of the term t must be an inductive + type or the application of an inductive type.

Action:

It proceeds by cases on t paying attention + to the constraints imposed by the actual "right arguments" + of the inductive type.

New sequents to prove:

It opens one new sequent to prove for each case in the + definition of the type of t. With respect to + a simple elimination, each new sequent has additional hypotheses + that states the equalities of the "right parameters" + of the inductive type with terms originally present in the + sequent to prove.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_lapply.html b/helm/www/matita/docs/manual-0.5.9/tac_lapply.html new file mode 100644 index 000000000..17ba95c48 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_lapply.html @@ -0,0 +1,41 @@ + +lapply

lapply

+ lapply linear depth=d t + to t1, ..., tn as H +

+

Synopsis:

+ lapply + [linear] + [depth=nat] + sterm + [to + sterm + [,sterm…] + ] + [as id] +

Pre-conditions:

+ t must have at least d + independent premises and n must not be + greater than d. +

Action:

+ Invokes letin H ≝ (t ? ... ?) + with enough ?'s to reach the + d-th independent premise of + t + (d is maximum if unspecified). + Then istantiates (by apply) with + t1, ..., tn + the ?'s corresponding to the first + n independent premises of + t. + Usually the other ?'s preceding the + n-th independent premise of + t are istantiated as a consequence. + If the linear flag is specified and if + t, t1, ..., tn + are (applications of) premises in the current context, they are + cleared. +

New sequents to prove:

+ The ones opened by the tactics lapply invokes. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_left.html b/helm/www/matita/docs/manual-0.5.9/tac_left.html new file mode 100644 index 000000000..95baed039 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_left.html @@ -0,0 +1,8 @@ + +left

left

left

+

Synopsis:

left

Pre-conditions:

The conclusion of the current sequent must be + an inductive type or the application of an inductive type + with at least one constructor.

Action:

Equivalent to constructor 1.

New sequents to prove:

It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_letin.html b/helm/www/matita/docs/manual-0.5.9/tac_letin.html new file mode 100644 index 000000000..ea3c4a540 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_letin.html @@ -0,0 +1,5 @@ + +letin

letin

letin x ≝ t

+

Synopsis:

letin id ≝ sterm

Pre-conditions:

None.

Action:

It adds to the context of the current sequent to prove a new + definition x ≝ t.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_normalize.html b/helm/www/matita/docs/manual-0.5.9/tac_normalize.html new file mode 100644 index 000000000..b2ae4cb18 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_normalize.html @@ -0,0 +1,5 @@ + +normalize

normalize

normalize patt

+

Synopsis:

normalize pattern

Pre-conditions:

None.

Action:

It replaces all the terms matched by patt + with their βδιζ-normal form.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_obtain.html b/helm/www/matita/docs/manual-0.5.9/tac_obtain.html new file mode 100644 index 000000000..1e97ef0c5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_obtain.html @@ -0,0 +1,11 @@ + +obtain

obtain

obtain H t1 = t2 justification

+

Synopsis:

[obtain id | conclude term] = term [auto_params | using term | using once term | proof] [done]

Pre-condition:

conclude can be used only if the current + sequent is stating an equality. The left hand side must be omitted + in an equality chain.

Action:

Starts or continues an equality chain. If the chain starts + with obtain H a new subproof named + H is started.

New sequent to prove:

If the chain starts + with obtain H a nre sequent for + t2 = ? is opened. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_reflexivity.html b/helm/www/matita/docs/manual-0.5.9/tac_reflexivity.html new file mode 100644 index 000000000..291f0880a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_reflexivity.html @@ -0,0 +1,6 @@ + +reflexivity

reflexivity

reflexivity

+

Synopsis:

reflexivity

Pre-conditions:

The conclusion of the current sequent must be + t=t for some term t

Action:

It closes the current sequent by reflexivity + of equality.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_replace.html b/helm/www/matita/docs/manual-0.5.9/tac_replace.html new file mode 100644 index 000000000..1a8166694 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_replace.html @@ -0,0 +1,9 @@ + +replace

replace

change patt with t

+

Synopsis:

replace pattern with sterm

Pre-conditions:

None.

Action:

It replaces the subterms of the current sequent matched by + patt with the new term t. + For each subterm matched by the pattern, t is + disambiguated in the context of the subterm.

New sequents to prove:

For each matched term t' it opens + a new sequent to prove whose conclusion is + t'=t.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_rewrite.html b/helm/www/matita/docs/manual-0.5.9/tac_rewrite.html new file mode 100644 index 000000000..76d0107ac --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_rewrite.html @@ -0,0 +1,12 @@ + +rewrite

rewrite

rewrite dir p patt

+

Synopsis:

rewrite [<|>] sterm pattern

Pre-conditions:

p must be the proof of an equality, + possibly under some hypotheses.

Action:

It looks in every term matched by patt + for all the occurrences of the + left hand side of the equality that p proves + (resp. the right hand side if dir is + <). Every occurence found is replaced with + the opposite side of the equality.

New sequents to prove:

It opens one new sequent for each hypothesis of the + equality proved by p that is not closed + by unification.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_right.html b/helm/www/matita/docs/manual-0.5.9/tac_right.html new file mode 100644 index 000000000..01dd02c79 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_right.html @@ -0,0 +1,8 @@ + +right

right

right

+

Synopsis:

right

Pre-conditions:

The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least two constructors.

Action:

Equivalent to constructor 2.

New sequents to prove:

It opens a new sequent for each premise of the second + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_ring.html b/helm/www/matita/docs/manual-0.5.9/tac_ring.html new file mode 100644 index 000000000..fdebac643 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_ring.html @@ -0,0 +1,8 @@ + +ring

ring

ring

+

Synopsis:

ring

Pre-conditions:

The conclusion of the current sequent must be an + equality over Coq's real numbers that can be proved using + the ring properties of the real numbers only.

Action:

It closes the current sequent veryfying the equality by + means of computation (i.e. this is a reflexive tactic, implemented + exploiting the "two level reasoning" technique).

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_simplify.html b/helm/www/matita/docs/manual-0.5.9/tac_simplify.html new file mode 100644 index 000000000..031d0e6e5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_simplify.html @@ -0,0 +1,5 @@ + +simplify

simplify

simplify patt

+

Synopsis:

simplify pattern

Pre-conditions:

None.

Action:

It replaces all the terms matched by patt + with other convertible terms that are supposed to be simpler.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_split.html b/helm/www/matita/docs/manual-0.5.9/tac_split.html new file mode 100644 index 000000000..8a3f60cf0 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_split.html @@ -0,0 +1,8 @@ + +split

split

split

+

Synopsis:

split

Pre-conditions:

The conclusion of the current sequent must be + an inductive type or the application of an inductive type with + at least one constructor.

Action:

Equivalent to constructor 1.

New sequents to prove:

It opens a new sequent for each premise of the first + constructor of the inductive type that is the conclusion of the + current sequent. For more details, see the constructor tactic.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_subst.html b/helm/www/matita/docs/manual-0.5.9/tac_subst.html new file mode 100644 index 000000000..1272d9d45 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_subst.html @@ -0,0 +1,16 @@ + +subst

subst

subst

+

Synopsis:

subst

Pre-conditions:

+ None. +

Action:

+ For each premise of the form + H: x = t or H: t = x + where x is a local variable and + t does not depend on x, + the tactic rewrites H wherever + x appears clearing H and + x afterwards. +

New sequents to prove:

+ The one opened by the applied tactics. +

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_suppose.html b/helm/www/matita/docs/manual-0.5.9/tac_suppose.html new file mode 100644 index 000000000..e320be056 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_suppose.html @@ -0,0 +1,11 @@ + +suppose

suppose

suppose t1 (x) that is equivalent to t2

+

Synopsis:

suppose term ( id + ) [ that is equivalent to term ]

Pre-condition:

The conclusion of the current proof must be + ∀x:T.P or + T→P where T is + a proposition (i.e. T has type + Prop or CProp).

Action:

It adds to the context of the current sequent to prove a new + declaration x : T . The new conclusion becomes + P.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_symmetry.html b/helm/www/matita/docs/manual-0.5.9/tac_symmetry.html new file mode 100644 index 000000000..1bc3c7ce0 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_symmetry.html @@ -0,0 +1,5 @@ + +symmetry

symmetry

The tactic symmetry

symmetry

+

Synopsis:

symmetry

Pre-conditions:

The conclusion of the current proof must be an equality.

Action:

It swaps the two sides of the equalityusing the symmetric + property.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_thesisbecomes.html b/helm/www/matita/docs/manual-0.5.9/tac_thesisbecomes.html new file mode 100644 index 000000000..3cd70c4d8 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_thesisbecomes.html @@ -0,0 +1,5 @@ + +the thesis becomes

the thesis becomes

the thesis becomes t

+

Synopsis:

the thesis becomes term

Pre-condition:

The provided term t must be convertible with + current sequent.

Action:

It changes the current goal to the one provided.

New sequent to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_transitivity.html b/helm/www/matita/docs/manual-0.5.9/tac_transitivity.html new file mode 100644 index 000000000..6ec961196 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_transitivity.html @@ -0,0 +1,6 @@ + +transitivity

transitivity

transitivity t

+

Synopsis:

transitivity sterm

Pre-conditions:

The conclusion of the current proof must be an equality.

Action:

It closes the current sequent by transitivity of the equality.

New sequents to prove:

It opens two new sequents l=t and + t=r where l and r are the left and right hand side of the equality in the conclusion of +the current sequent to prove.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_unfold.html b/helm/www/matita/docs/manual-0.5.9/tac_unfold.html new file mode 100644 index 000000000..b245d6a4d --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_unfold.html @@ -0,0 +1,9 @@ + +unfold

unfold

unfold t patt

+

Synopsis:

unfold [sterm] pattern

Pre-conditions:

None.

Action:

It finds all the occurrences of t + (possibly applied to arguments) in the subterms matched by + patt. Then it δ-expands each occurrence, + also performing β-reduction of the obtained term. If + t is omitted it defaults to each + subterm matched by patt.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_weneedtoprove.html b/helm/www/matita/docs/manual-0.5.9/tac_weneedtoprove.html new file mode 100644 index 000000000..7a6113bbc --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_weneedtoprove.html @@ -0,0 +1,12 @@ + +we need to prove

we need to prove

we need to prove t1 (id) or equivalently t2

+

Synopsis:

we need to prove term + [(id + )] + [ or equivalently term]

Pre-condition:

Action:

If id is provided, starts a subproof that once concluded + will be named id. Otherwise states what needs to be proved. + If t2 is provided, the new goal is + immediately changed to t2 wich must + be equivalent to t1. +

New sequents to prove:

The stated one if id is provided

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_weproceedbycases.html b/helm/www/matita/docs/manual-0.5.9/tac_weproceedbycases.html new file mode 100644 index 000000000..3047db54a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_weproceedbycases.html @@ -0,0 +1,7 @@ + +we proceed by cases on

we proceed by cases on

we proceed by cases on t to prove th

+

Synopsis:

we proceed by cases on term to prove term

Pre-condition:

t must inhabitant of an inductive type and + th must be the conclusion to be proved by + cases.

Action:

It proceeds by cases on t

New sequents to prove:

It opens one new sequent for each constructor of the + type of t.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_weproceedbyinduction.html b/helm/www/matita/docs/manual-0.5.9/tac_weproceedbyinduction.html new file mode 100644 index 000000000..29d748bd9 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_weproceedbyinduction.html @@ -0,0 +1,7 @@ + +we proceed by induction on

we proceed by induction on

we proceed by induction on t to prove th

+

Synopsis:

we proceed by induction on term to prove term

Pre-condition:

t must inhabitant of an inductive type and + th must be the conclusion to be proved by induction. +

Action:

It proceed by induction on t.

New sequents to prove:

It opens one new sequent for each constructor of the + type of t.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tac_whd.html b/helm/www/matita/docs/manual-0.5.9/tac_whd.html new file mode 100644 index 000000000..191eb6c31 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tac_whd.html @@ -0,0 +1,5 @@ + +whd

whd

whd patt

+

Synopsis:

whd pattern

Pre-conditions:

None.

Action:

It replaces all the terms matched by patt + with their βδιζ-weak-head normal form.

New sequents to prove:

None.

+

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tactic_quickref.xml b/helm/www/matita/docs/manual-0.5.9/tactic_quickref.xml new file mode 100644 index 000000000..e1ff24b38 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tactic_quickref.xml @@ -0,0 +1,6 @@ + + tacticssec__tactics + + + +
diff --git a/helm/www/matita/docs/manual-0.5.9/tacticals.html b/helm/www/matita/docs/manual-0.5.9/tacticals.html new file mode 100644 index 000000000..aa2efa620 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tacticals.html @@ -0,0 +1,65 @@ + +Tacticals

Tacticals

Table 6.1. proof script


Every proof step can be immediately executed.

Table 6.2. proof steps

proof-step::=LCF-tacticalThe tactical is applied to each + selected sequent. + Each new sequent becomes a selected sequent.
 |.The first + selected sequent becomes + the only one selected. All the remaining previously selected sequents + are proposed to the user one at a time when the next + "." is used. +
 |;Nothing changes. Use this proof step as a separator in + concrete syntax.
 |[Every selected sequent + becomes a sibling sequent + that constitute a branch in the proof. + Moreover, the first sequent is also selected. +
 ||Stop working on the current branch of the innermost branching + proof. + The sibling branches become the sibling + sequents and the first one is also selected. +
 |nat[,nat]…:The sibling sequents + specified by the user become the next + selected sequents. +
 |*:Every sibling branch not considered yet in the innermost + branching proof becomes a + selected sequent. +
 |skipAccept the automatically provided instantiation (not shown + to the user) for the currently selected + automatically closed sibling sequent. +
 |]Stop analyzing branches for the innermost branching proof. + Every sequent opened during the branching proof and not closed yet + becomes a selected sequent. +
 |focus nat [nat]… + Selects the sequents specified by the user. The selected sequents + must be completely closed (no new sequents left open) before doing an + "unfocus that restores + the current set of sibling branches. +
 |unfocus + Used to match the innermost + "focus" tactical + when all the sequents selected by it have been closed. + Until "unfocus" is + performed, it is not possible to progress in the rest of the + proof. +

Table 6.3. tactics and LCF tacticals

LCF-tactical::=tacticApplies the specified tactic.
 |LCF-tactical ; LCF-tacticalApplies the first tactical first and the second tactical + to each sequent opened by the first one.
 |LCF-tactical + [ + [LCF-tactical] + [| LCF-tactical]… + ] + Applies the first tactical first and each tactical in the + list of tacticals to the corresponding sequent opened by the + first one. The number of tacticals provided in the list must be + equal to the number of sequents opened by the first tactical.
 |do nat + LCF-tactical + TODO
 |repeat + LCF-tactical + TODO
 | + first [ + [LCF-tactical] + [| LCF-tactical]… + ] + TODO
 |try LCF-tacticalTODO
 | + solve [ + [LCF-tactical] + [| LCF-tactical]… + ] + TODO
 |(LCF-tactical)Used for grouping during parsing.

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tacticargs.html b/helm/www/matita/docs/manual-0.5.9/tacticargs.html new file mode 100644 index 000000000..b60db9de5 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tacticargs.html @@ -0,0 +1,83 @@ + +Tactic arguments

Tactic arguments

This section documents the syntax of some recurring arguments for + tactics.

intros-spec

Table 4.13. 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

Table 4.14. pattern

pattern::=in + [id[: path]]… + [⊢ path]]simple pattern
 |in match path + [in + [id[: path]]… + [⊢ path]]full pattern

Table 4.15. 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:

  1. Occurrences of the subterms to locate that are + represented by %.

  2. 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:

  1. 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.

  2. From the contextual menu select "Copy".

  3. 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.

Table 4.16. reduction-kind

reduction-kind::=normalizeComputes the βδιζ-normal form
 |simplifyComputes a form supposed to be simpler
 |unfold [sterm]δ-reduces the constant or variable if specified, or that + in head position
 |whdComputes the βδιζ-weak-head normal form

auto-params

Table 4.17. auto-params

auto_params::=[simple_auto_param]… + [by + term [,term]…] +  

Table 4.18. simple-auto-param

simple_auto_param::=depth=natGive a bound to the depth of the search tree
 |width=natThe maximal width of the search tree
 |librarySearch everywhere (not only in included files)
 |typeTry to close also goals of sort Type, otherwise only goals + living in sort Prop are attacked. +
 |paramodulationTry to close the goal performing unit-equality paramodulation +
 |size=natThe maximal number of nodes in the proof
 |timeout=natTimeout in seconds +

justification

Table 4.19. justification

justification::=using termProof term manually provided
 |auto_paramsCall automation

\ No newline at end of file diff --git a/helm/www/matita/docs/manual-0.5.9/tactics_quickref.xml b/helm/www/matita/docs/manual-0.5.9/tactics_quickref.xml new file mode 100644 index 000000000..c7a789c1a --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/tactics_quickref.xml @@ -0,0 +1,303 @@ + + tactics + + + + &tactic; + ::= + absurd sterm + + + + | + apply sterm + + + + | + applyS sterm auto_params + + + + | + + + assumption + + + + + + | + auto auto_params. autobatch auto_params + + + + | + + cases + term pattern [([id]…)] + + + + + | + change pattern with sterm + + + + | + + clear + id [id…] + + + + + | + clearbody id + + + + | + compose [nat] sterm [with sterm] [intros-spec] + + + + | + constructor nat + + + + | + + + contradiction + + + + + + | + cut sterm [as id] + + + + | + + decompose + [as id…] + + + + + | + demodulate auto_params + + + + | + destruct sterm + + + + | + elim sterm pattern [using sterm] intros-spec + + + + | + elimType sterm [using sterm] intros-spec + + + + | + exact sterm + + + + | + + + exists + + + + + + | + + + fail + + + + + + | + fold reduction-kind sterm pattern + + + + | + + + fourier + + + + + + | + fwd id [as id [id]…] + + + + | + generalize pattern [as id] + + + + | + + + id + + + + + + | + intro [id] + + + + | + intros intros-spec + + + + | + inversion sterm + + + + | + + lapply + [linear] + [depth=nat] + sterm + [to + sterm + [,sterm…] + ] + [as id] + + + + + | + + + left + + + + + + | + letin id ≝ sterm + + + + | + normalize pattern + + + + | + + + reflexivity + + + + + + | + replace pattern with sterm + + + + | + rewrite [<|>] sterm pattern + + + + | + + + right + + + + + + | + + + ring + + + + + + | + simplify pattern + + + + | + + + split + + + + + + | + + + subst + + + + + + | + + + symmetry + + + + + + | + transitivity sterm + + + + | + unfold [sterm] pattern + + + + | + whd pattern + + + +
diff --git a/helm/www/matita/docs/manual-0.5.9/version.txt b/helm/www/matita/docs/manual-0.5.9/version.txt new file mode 100644 index 000000000..416bfb0a2 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/version.txt @@ -0,0 +1 @@ +0.5.9 diff --git a/helm/www/matita/docs/manual-0.5.9/version.txt.in b/helm/www/matita/docs/manual-0.5.9/version.txt.in new file mode 100644 index 000000000..c275a8ce8 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/version.txt.in @@ -0,0 +1 @@ +@MATITA_VERSION@ diff --git a/helm/www/matita/docs/manual-0.5.9/xhtml1-transitional.dtd b/helm/www/matita/docs/manual-0.5.9/xhtml1-transitional.dtd new file mode 100644 index 000000000..388a59434 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/xhtml1-transitional.dtd @@ -0,0 +1,1717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/xsl/matita-fo.xsl b/helm/www/matita/docs/manual-0.5.9/xsl/matita-fo.xsl new file mode 100644 index 000000000..3e564b4b7 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/xsl/matita-fo.xsl @@ -0,0 +1,5 @@ + + + + + diff --git a/helm/www/matita/docs/manual-0.5.9/xsl/matita-xhtml.xsl b/helm/www/matita/docs/manual-0.5.9/xsl/matita-xhtml.xsl new file mode 100644 index 000000000..008f66913 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/xsl/matita-xhtml.xsl @@ -0,0 +1,73 @@ + + + + + + + + + docbook.css + + + + + + +
    + +
+
+ +
  • + + + + < + + + mailto: + + + + + > +
  • +
    + + + + + +
    + +
    +
    + + + Revision: + + + + , + + + + + + + + + + + + + + +
    + diff --git a/helm/www/matita/docs/manual-0.5.9/xsl/tactic_quickref.xsl b/helm/www/matita/docs/manual-0.5.9/xsl/tactic_quickref.xsl new file mode 100644 index 000000000..3a46261e0 --- /dev/null +++ b/helm/www/matita/docs/manual-0.5.9/xsl/tactic_quickref.xsl @@ -0,0 +1,75 @@ + + + + + + + + + tactics + + + + + + + +
    +
    + + + + + + + + + + + + grammar.tactic + &tactic; + + + + + + + ::= + + + | + + + + + + + + + + + tac_ + + + + + + + + + + + + + + + + + +
    diff --git a/helm/www/matita/docs/tutorial/cover.png b/helm/www/matita/docs/tutorial/cover.png new file mode 100644 index 000000000..efcf5f365 Binary files /dev/null and b/helm/www/matita/docs/tutorial/cover.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-1.png b/helm/www/matita/docs/tutorial/def-fish-rec-1.png new file mode 100644 index 000000000..5574e28de Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-1.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-2-1.png b/helm/www/matita/docs/tutorial/def-fish-rec-2-1.png new file mode 100644 index 000000000..5838426c9 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-2-1.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-2.png b/helm/www/matita/docs/tutorial/def-fish-rec-2.png new file mode 100644 index 000000000..be87320ca Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-2.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-3.png b/helm/www/matita/docs/tutorial/def-fish-rec-3.png new file mode 100644 index 000000000..426fc3a3f Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-3.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-5-1.png b/helm/www/matita/docs/tutorial/def-fish-rec-5-1.png new file mode 100644 index 000000000..489dc3540 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-5-1.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-5.png b/helm/www/matita/docs/tutorial/def-fish-rec-5.png new file mode 100644 index 000000000..56a6048c1 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-5.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-6.png b/helm/www/matita/docs/tutorial/def-fish-rec-6.png new file mode 100644 index 000000000..e341a2ff0 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-6.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-7.png b/helm/www/matita/docs/tutorial/def-fish-rec-7.png new file mode 100644 index 000000000..cacfa8b11 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-7.png differ diff --git a/helm/www/matita/docs/tutorial/def-fish-rec-9.png b/helm/www/matita/docs/tutorial/def-fish-rec-9.png new file mode 100644 index 000000000..35eec8327 Binary files /dev/null and b/helm/www/matita/docs/tutorial/def-fish-rec-9.png differ diff --git a/helm/www/matita/docs/tutorial/igft-CIC-universes.svg b/helm/www/matita/docs/tutorial/igft-CIC-universes.svg new file mode 100644 index 000000000..524a15df8 --- /dev/null +++ b/helm/www/matita/docs/tutorial/igft-CIC-universes.svg @@ -0,0 +1,359 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + Type[0] + + Type[1] + + Type[2] + + CProp[0] + + CProp[1] + + CProp[2] + + + + + + + + + + + + + + + + + + + + Has type + Is included + + Mirror + + + Legenda + + + + + Impredicativity + Axiom of Choice + + diff --git a/helm/www/matita/docs/tutorial/igft-minimality-CIC.svg b/helm/www/matita/docs/tutorial/igft-minimality-CIC.svg new file mode 100644 index 000000000..d70c35e03 --- /dev/null +++ b/helm/www/matita/docs/tutorial/igft-minimality-CIC.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + CProp impredicative + CProp = Type + + + Matita's CICCProp,Type predicativeNo elim CProp toward Type + + + + + Coq's CIC (work in Prop)Prop impredicativeNo elim Prop toward Type + + + + + + + Coq's CIC (work in Type)CProp=Type predicativeMartin Löf Axiom of Choice + + + + CIC + EMProp impredicative with EMNo elim Prop toward Type + + + + + + + Excluded Middle + Where's the content? + + + + + + + CProp Impredicative + Girard's paradox + + + + + + + Axiom of Choice + + Bishop + + + + + + Topos + + + + + + ZFC + + + + + + + + + + + + + becomes + + + Legenda + + good to formalise X + X + + + + + + + + + diff --git a/helm/www/matita/docs/tutorial/igft.html b/helm/www/matita/docs/tutorial/igft.html new file mode 100644 index 000000000..9c3ea4b6c --- /dev/null +++ b/helm/www/matita/docs/tutorial/igft.html @@ -0,0 +1,1554 @@ + + + + + + + + + + + +

    Inductively generated formal topologies in Matita

    + +

    This is a not so short introduction to Matita, based on +the formalization of the paper

    + +
    +

    Between formal topology and game theory: an +explicit solution for the conditions for an +inductive generation of formal topologies

    +
    + +

    by Stefano Berardi and Silvio Valentini.

    + +

    The tutorial and the formalization are by Enrico Tassi.

    + +

    The reader should be familiar with inductively generated +formal topologies and have some basic knowledge of type theory and λ-calculus.

    + +

    A considerable part of this tutorial is devoted to explain how to define +notations that resemble the ones used in the original paper. We believe +this is an important part of every formalization, not only from the aesthetic +point of view, but also from the practical point of view. Being +consistent allows to follow the paper in a pedantic way, and hopefully +to make the formalization (at least the definitions and proved +statements) readable to the author of the paper.

    + +

    The formalization uses the "new generation" version of Matita +(that will be named 1.x when finally released). +Last stable release of the "old" system is named 0.5.7; the ng system +is coexisting with the old one in all development release +(named "nightly builds" in the download page of Matita) +with a version strictly greater than 0.5.7.

    + +

    To read this tutorial in HTML format, you need a decent browser +equipped with a unicode capable font. Use the PDF format if some +symbols are not displayed correctly.

    + +

    Orienteering

    + +

    The graphical interface of Matita is composed of three windows: +the script window, on the left, is where you type; the sequent +window on the top right is where the system shows you the ongoing proof; +the error window, on the bottom right, is where the system complains. +On the top of the script window five buttons drive the processing of +the proof script. From left to right they request the system to:

    + +
      +
    • go back to the beginning of the script
    • +
    • go back one step
    • +
    • go to the current cursor position
    • +
    • advance one step
    • +
    • advance to the end of the script
    • +
    + +

    When the system processes a command, it locks the part of the script +corresponding to the command, such that you cannot edit it anymore +(without going back). Locked parts are coloured in blue.

    + +

    The sequent window is hyper textual, i.e. you can click on symbols +to jump to their definition, or switch between different notations +for the same expression (for example, equality has two notations, +one of them makes the type of the arguments explicit).

    + +

    Everywhere in the script you can use the ncheck (term). command to +ask for the type a given term. If you do that in the middle of a proof, +the term is assumed to live in the current proof context (i.e. can use +variables introduced so far).

    + +

    To ease the typing of mathematical symbols, the script window +implements two unusual input facilities:

    + +
      +
    • some TeX symbols can be typed using their TeX names, and are +automatically converted to UTF-8 characters. For a list of +the supported TeX names, see the menu: View ▹ TeX/UTF-8 Table. +Moreover some ASCII-art is understood as well, like => and -> +to mean double or single arrows. +Here we recall some of these "shortcuts":

      + +
        +
      • ∀ can be typed with \forall
      • +
      • λ can be typed with \lambda
      • +
      • ≝ can be typed with \def or :=
      • +
      • → can be typed with \to or ->
      • +
    • +
    • some symbols have variants, like the ≤ relation and ≼, ≰, ⋠. +The user can cycle between variants typing one of them and then +pressing ALT-L. Note that also letters do have variants, for +example W has Ω, 𝕎 and 𝐖, L has Λ, 𝕃, and 𝐋, F has Φ, … +Variants are listed in the aforementioned TeX/UTF-8 table.

    • +
    + +

    The syntax of terms (and types) is the one of the λ-calculus CIC +on which Matita is based. The main syntactical difference w.r.t. +the usual mathematical notation is the function application, written +(f x y) in place of f(x,y).

    + +

    Pressing F1 opens the Matita manual.

    + +

    CIC (as implemented in Matita) in a nutshell

    + +

    CIC is a full and functional Pure Type System (all products do exist, +and their sort is is determined by the target) with an impredicative sort +Prop and a predicative sort Type. It features both dependent types and +polymorphism like the Calculus of Constructions. Proofs and terms share +the same syntax, and they can occur in types.

    + +

    The environment used for in the typing judgement can be populated with +well typed definitions or theorems, (co)inductive types validating positivity +conditions and recursive functions provably total by simple syntactical +analysis (recursive calls are allowed only on structurally smaller subterms). +Co-recursive +functions can be defined as well, and must satisfy the dual condition, i.e. +performing the recursive call only after having generated a constructor (a piece +of output).

    + +

    The CIC λ-calculus is equipped with a pattern matching construct (match) on inductive +types defined in the environment. This construct, together with the possibility to +definable total recursive functions, allows to define eliminators (or constructors) +for (co)inductive types.

    + +

    Types are compare up to conversion. Since types may depend on terms, conversion +involves β-reduction, δ-reduction (definition unfolding), ζ-reduction (local +definition unfolding), ι-reduction (pattern matching simplification), +μ-reduction (recursive function computation) and ν-reduction (co-fixpoint +computation).

    + +

    Since we are going to formalize constructive and predicative mathematics +in an intensional type theory like CIC, we try to establish some terminology. +Type is the sort of sets equipped with the Id equality (i.e. an intensional, +not quotiented set).

    + +

    We write Type[i] to mention a Type in the predicative hierarchy +of types. To ease the comprehension we will use Type[0] for sets, +and Type[1] for classes. The index i is just a label: constraints among +universes are declared by the user. The standard library defines

    + +
    +

    Type[0] < Type[1] < Type[2]

    +
    + +

    Matita implements a variant of CIC in which constructive and predicative proposition +are distinguished from predicative data types.

    + +

    + +

    For every Type[i] there is a corresponding level of predicative +propositions CProp[i] (the C initial is due to historical reasons, and +stands for constructive). +A predicative proposition cannot be eliminated toward +Type[j] unless it holds no computational content (i.e. it is an inductive proposition +with 0 or 1 constructors with propositional arguments, like Id and And +but not like Or).

    + +

    The distinction between predicative propositions and predicative data types +is a peculiarity of Matita (for example in CIC as implemented by Coq they are the +same). The additional restriction of not allowing the elimination of a CProp +toward a Type makes the theory of Matita minimal in the following sense:

    + +

    + +

    Theorems proved in CIC as implemented in Matita can be reused in a classical +and impredicative framework (i.e. forcing Matita to collapse the hierarchy of +constructive propositions and assuming the excluded middle on them). +Alternatively, one can decide to collapse predicative propositions and +predicative data types recovering the Axiom of Choice in the sense of Martin Löf +(i.e. ∃ really holds a witness and can be eliminated to inhabit a type).

    + +

    This implementation of CIC is the result of the collaboration with Maietti M., +Sambin G. and Valentini S. of the University of Padua.

    + +

    Formalization choices

    + +

    There are many different ways of formalizing the same piece of mathematics +in CIC, depending on what our interests are. There is usually a trade-off +between the possibility of reuse the formalization we did and its complexity.

    + +

    In this work, our decisions mainly regarded the following two areas

    + +
      +
    • Axiom of Choice: controlled use or not
    • +
    • Equality: Id or not
    • +
    + +

    Axiom of Choice

    + +

    In this paper it is clear that the author is interested in using the Axiom +of Choice, thus choosing to identify ∃ and Σ (i.e. working in the +leftmost box of the graph "Coq's CIC (work in CProp)") would be a safe decision +(that is, the author of the paper would not complain we formalized something +different from what he had in mind).

    + +

    Anyway, we may benefit from the minimality of CIC as implemented in Matita, +"asking" the type system to ensure we do no use the Axiom of Choice elsewhere +in the proof (by mistake or as a shortcut). If we identify ∃ and Σ from the +very beginning, the system will not complain if we use the Axiom of Choice at all. +Moreover, the elimination of an inductive type (like ∃) is a so common operation +that the syntax chosen for the elimination command is very compact and non +informative, hard to spot for a human being +(in fact it is just two characters long!).

    + +

    We decided to formalize the whole paper without identifying +CProp and Type and assuming the Axiom of Choice as a real axiom +(i.e. a black hole with no computational content, a function with no body).

    + +

    It is clear that this approach give us full control on when/where we really use +the Axiom of Choice. But, what are we loosing? What happens to the computational +content of the proofs if the Axiom of Choice gives no content back?

    + +

    It really +depends on when we actually look at the computational content of the proof and +we "run" that program. We can extract the content and run it before or after +informing the system that our propositions are actually code (i.e. identifying +∃ and Σ). If we run the program before, as soon as the computation reaches the +Axiom of Choice it stops, giving no output. If we tell the system that CProp and +Type are the same, we can exhibit a body for the Axiom of Choice (i.e. a projection) +and the extracted code would compute an output.

    + +

    Note that the computational +content is there even if the Axiom of Choice is an axiom, the difference is +just that we cannot use it (the typing rules inhibit the elimination of the +existential). This is possible only thanks to the minimality of CIC as implemented +in Matita.

    + +

    Equality

    + +

    What we have to decide here is which models we admit. The paper does not +mention quotiented sets, thus using an intensional equality is enough +to capture the intended content of the paper. Nevertheless, the formalization +cannot be reused in a concrete example where the (families of) sets +that will build the axiom set are quotiented.

    + +

    Matita gives support for setoid rewriting under a context built with +non dependent morphisms. As we will detail later, if we assume a generic +equality over the carrier of our axiom set, a non trivial inductive +construction over the ordinals has to be proved to respect extensionality +(i.e. if the input is an extensional set, also the output is). +The proof requires to rewrite under the context formed by the family of sets +I and D, that have a dependent type. Declaring them as dependently typed +morphisms is possible, but Matita does not provide an adequate support for them, +and would thus need more effort than formalizing the whole paper.

    + +

    Anyway, in a preliminary attempt of formalization, we tried the setoid approach, +reaching the end of the formalization, but we had to assume the proof +of the extensionality of the U_x construction (while there is no +need to assume the same property for F_x!).

    + +

    The current version of the formalization uses Id.

    + +

    The standard library and the include command

    + +

    Some basic notions, like subset, membership, intersection and union +are part of the standard library of Matita.

    + +

    These notions come with some standard notation attached to them:

    + +
      +
    • A ∪ B can be typed with A \cup B
    • +
    • A ∩ B can be typed with A \cap B
    • +
    • A ≬ B can be typed with A \between B
    • +
    • x ∈ A can be typed with x \in A
    • +
    • Ω^A, that is the type of the subsets of A, can be typed with \Omega ^ A
    • +
    + +

    The include command tells Matita to load a part of the library, +in particular the part that we will use can be loaded as follows:

    + +
    include "sets/sets.ma".
    +
    + +

    Some basic results that we will use are also part of the sets library:

    + +
      +
    • subseteq_union_l: ∀A.∀U,V,W:Ω^A.U ⊆ W → V ⊆ W → U ∪ V ⊆ W
    • +
    • subseteq_intersection_r: ∀A.∀U,V,W:Ω^A.W ⊆ U → W ⊆ V → W ⊆ U ∩ V
    • +
    + +

    Defining Axiom set

    + +

    A set of axioms is made of a set S, a family of sets I and a +family C of subsets of S indexed by elements a of S +and elements of I(a).

    + +

    It is desirable to state theorems like "for every set of axioms, …" +without explicitly mentioning S, I and C. To do that, the three +components have to be grouped into a record (essentially a dependently +typed tuple). The system is able to generate the projections +of the record automatically, and they are named as the fields of +the record. So, given an axiom set A we can obtain the set +with S A, the family of sets with I A and the family of subsets +with C A.

    + +
    nrecord Ax : Type[1] ≝ { 
    +  S :> Type[0];
    +  I :  S → Type[0];
    +  C :  ∀a:S. I a → Ω^S
    +}.
    +
    + +

    Forget for a moment the :> that will be detailed later, and focus on +the record definition. It is made of a list of pairs: a name, followed +by : and the its type. It is a dependently typed tuple, thus +already defined names (fields) can be used in the types that follow.

    + +

    Note that the field S was declared with :> instead of a simple :. +This declares the S projection to be a coercion. A coercion is +a "cast" function the system automatically inserts when it is needed. +In that case, the projection S has type Ax → setoid, and whenever +the expected type of a term is setoid while its type is Ax, the +system inserts the coercion around it, to make the whole term well typed.

    + +

    When formalizing an algebraic structure, declaring the carrier as a +coercion is a common practice, since it allows to write statements like

    + +
    ∀G:Group.∀x:G.x * x^-1 = 1
    +
    + +

    The quantification over x of type G is ill-typed, since G is a term +(of type Group) and thus not a type. Since the carrier projection +carr is a coercion, that maps a Group into the type of +its elements, the system automatically inserts carr around G, +obtaining …∀x: carr G.….

    + +

    Coercions are hidden by the system when it displays a term. +In this particular case, the coercion S allows to write (and read):

    + +
    ∀A:Ax.∀a:A.…
    +
    + +

    Since A is not a type, but it can be turned into a setoid by S +and a setoid can be turned into a type by its carr projection, the +composed coercion carr ∘ S is silently inserted.

    + +

    Implicit arguments

    + +

    Something that is not still satisfactory, is that the dependent type +of I and C are abstracted over the Axiom set. To obtain the +precise type of a term, you can use the ncheck command as follows.

    + +
    (** ncheck I. *) (* shows: ∀A:Ax.A → Type[0] *)
    +(** ncheck C. *) (* shows: ∀A:Ax.∀a:A.A → I A a → Ω^A *)
    +
    + +

    One would like to write I a and not I A a under a context where +A is an axiom set and a has type S A (or thanks to the coercion +mechanism simply A). In Matita, a question mark represents an implicit +argument, i.e. a missing piece of information the system is asked to +infer. Matita performs Hindley-Milner-style type inference, thus writing +I ? a is enough: since the second argument of I is typed by the +first one, the first (omitted) argument can be inferred just +computing the type of a (that is A).

    + +
    (** ncheck (∀A:Ax.∀a:A.I ? a). *) (* shows: ∀A:Ax.∀a:A.I A a *)
    +
    + +

    This is still not completely satisfactory, since you have always to type +?; to fix this minor issue we have to introduce the notational +support built in Matita.

    + +

    Notation for I and C

    + +

    Matita is quipped with a quite complex notational support, +allowing the user to define and use mathematical notations +(From Notation to Semantics: There and Back Again).

    + +

    Since notations are usually ambiguous (e.g. the frequent overloading of +symbols) Matita distinguishes between the term level, the +content level, and the presentation level, allowing multiple +mappings between the content and the term level.

    + +

    The mapping between the presentation level (i.e. what is typed on the +keyboard and what is displayed in the sequent window) and the content +level is defined with the notation command. When followed by +>, it defines an input (only) notation.

    + +
    notation > "𝐈 term 90 a" non associative with precedence 70 for @{ 'I $a }.
    +notation > "𝐂 term 90 a term 90 i" non associative with precedence 70 for @{ 'C $a $i }.
    +
    + +

    The first notation defines the writing 𝐈 a where a is a generic +term of precedence 90, the maximum one. This high precedence forces +parentheses around any term of a lower precedence. For example 𝐈 x +would be accepted, since identifiers have precedence 90, but +𝐈 f x would be interpreted as (𝐈 f) x. In the latter case, parentheses +have to be put around f x, thus the accepted writing would be 𝐈 (f x).

    + +

    To obtain the 𝐈 is enough to type I and then cycle between its +similar symbols with ALT-L. The same for 𝐂. Notations cannot use +regular letters or the round parentheses, thus their variants (like the +bold ones) have to be used.

    + +

    The first notation associates 𝐈 a with 'I $a where 'I is a +new content element to which a term $a is passed.

    + +

    Content elements have to be interpreted, and possibly multiple, +incompatible, interpretations can be defined.

    + +
    interpretation "I" 'I a = (I ? a).
    +interpretation "C" 'C a i = (C ? a i).
    +
    + +

    The interpretation command allows to define the mapping between +the content level and the terms level. Here we associate the I and +C projections of the Axiom set record, where the Axiom set is an implicit +argument ? to be inferred by the system.

    + +

    Interpretation are bi-directional, thus when displaying a term like +C _ a i, the system looks for a presentation for the content element +'C a i.

    + +
    notation < "𝐈  \sub( ❨a❩ )" non associative with precedence 70 for @{ 'I $a }.
    +notation < "𝐂 \sub( ❨a,\emsp i❩ )" non associative with precedence 70 for @{ 'C $a $i }.
    +
    + +

    For output purposes we can define more complex notations, for example +we can put bold parentheses around the arguments of 𝐈 and 𝐂, decreasing +the size of the arguments and lowering their baseline (i.e. putting them +as subscript), separating them with a comma followed by a little space.

    + +

    The first (technical) definition

    + +

    Before defining the cover relation as an inductive predicate, one +has to notice that the infinity rule uses, in its hypotheses, the +cover relation between two subsets, while the inductive predicate +we are going to define relates an element and a subset.

    + +
                    a ∈ U                i ∈ I(a)    C(a,i) ◃ U
    +(reflexivity) ⎼⎼⎼⎼⎼⎼⎼⎼⎼  (infinity) ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                a ◃ U                       a ◃ U
    +
    + +

    An option would be to unfold the definition of cover between subsets, +but we prefer to define the abstract notion of cover between subsets +(so that we can attach a (ambiguous) notation to it).

    + +

    Anyway, to ease the understanding of the definition of the cover relation +between subsets, we first define the inductive predicate unfolding the +definition, and we later refine it with.

    + +
    ninductive xcover (A : Ax) (U : Ω^A) : A → CProp[0] ≝ 
    +| xcreflexivity : ∀a:A. a ∈ U → xcover A U a
    +| xcinfinity    : ∀a:A.∀i:𝐈 a. (∀y.y ∈ 𝐂 a i → xcover A U y) → xcover A U a.
    +
    + +

    We defined the xcover (x will be removed in the final version of the +definition) as an inductive predicate. The arity of the inductive +predicate has to be carefully analyzed:

    + +
    +

    (A : Ax) (U : Ω^A) : A → CProp[0]

    +
    + +

    The syntax separates with : abstractions that are fixed for every +constructor (introduction rule) and abstractions that can change. In that +case the parameter U is abstracted once and for all in front of every +constructor, and every occurrence of the inductive predicate is applied to +U in a consistent way. Arguments abstracted on the right of : are not +constant, for example the xcinfinity constructor introduces a ◃ U, +but under the assumption that (for every y) y ◃ U. In that rule, the left +had side of the predicate changes, thus it has to be abstracted (in the arity +of the inductive predicate) on the right of :.

    + +

    The intuition Valentini suggests is that we are defining the unary predicate +"being covered by U" (i.e. _ ◃ U) and not "being covered" (i.e. _ ◃ _). +Unluckily, the syntax of Matita forces us to abstract U first, and +we will make it the second argument of the predicate using +the notational support Matita offers.

    + +
    (** ncheck xcreflexivity. *) (* shows: ∀A:Ax.∀U:Ω^A.∀a:A.a∈U → xcover A U a *)
    +
    + +

    We want now to abstract out (∀y.y ∈ 𝐂 a i → xcover A U y) and define +a notion cover_set to which a notation 𝐂 a i ◃ U can be attached.

    + +

    This notion has to be abstracted over the cover relation (whose +type is the arity of the inductive xcover predicate just defined).

    + +

    Then it has to be abstracted over the arguments of that cover relation, +i.e. the axiom set and the set U, and the subset (in that case 𝐂 a i) +sitting on the left hand side of ◃.

    + +
    ndefinition cover_set : 
    +  ∀cover: ∀A:Ax.Ω^A → A → CProp[0]. ∀A:Ax.∀C,U:Ω^A. CProp[0] 
    +≝ 
    +  λcover.                           λA,    C,U.     ∀y.y ∈ C → cover A U y.
    +
    + +

    The ndefinition command takes a name, a type and body (of that type). +The type can be omitted, and in that case it is inferred by the system. +If the type is given, the system uses it to infer implicit arguments +of the body. In that case all types are left implicit in the body.

    + +

    We now define the notation a ◃ b. Here the keywork hvbox +and break tell the system how to wrap text when it does not +fit the screen (they can be safely ignored for the scope of +this tutorial). We also add an interpretation for that notation, +where the (abstracted) cover relation is implicit. The system +will not be able to infer it from the other arguments C and U +and will thus prompt the user for it. This is also why we named this +interpretation covers set temp: we will later define another +interpretation in which the cover relation is the one we are going to +define.

    + +
    notation "hvbox(a break ◃ b)" non associative with precedence 45
    +for @{ 'covers $a $b }.
    +
    +interpretation "covers set temp" 'covers C U = (cover_set ?? C U).
    +
    + +

    The cover relation

    + +

    We can now define the cover relation using the ◃ notation for +the premise of infinity.

    + +
    ninductive cover (A : Ax) (U : Ω^A) : A → CProp[0] ≝ 
    +| creflexivity : ∀a. a ∈ U → cover A U a
    +| cinfinity    : ∀a. ∀i. 𝐂 a i ◃ U → cover A U a.
    +
    + +

    cover

    + +
    napply cover;
    +nqed.
    +
    + +

    Note that the system accepts the definition +but prompts the user for the relation the cover_set notion is +abstracted on.

    + +

    The horizontal line separates the hypotheses from the conclusion. +The napply cover command tells the system that the relation +it is looking for is exactly our first context entry (i.e. the inductive +predicate we are defining, up to α-conversion); while the nqed command +ends a definition or proof.

    + +

    We can now define the interpretation for the cover relation between an +element and a subset first, then between two subsets (but this time +we fix the relation cover_set is abstracted on).

    + +
    interpretation "covers" 'covers a U = (cover ? U a).
    +interpretation "covers set" 'covers a U = (cover_set cover ? a U).
    +
    + +

    We will proceed similarly for the fish relation, but before going +on it is better to give a short introduction to the proof mode of Matita. +We define again the cover_set term, but this time we build +its body interactively. In the λ-calculus Matita is based on, CIC, proofs +and terms share the same syntax, and it is thus possible to use the +commands devoted to build proof term also to build regular definitions. +A tentative semantics for the proof mode commands (called tactics) +in terms of sequent calculus rules are given in the +appendix.

    + +
    ndefinition xcover_set : 
    +  ∀c: ∀A:Ax.Ω^A → A → CProp[0]. ∀A:Ax.∀C,U:Ω^A. CProp[0].
    +
    + +

    xcover-set-1

    + +

    The system asks for a proof of the full statement, in an empty context.

    + +

    The # command is the ∀-introduction rule, it gives a name to an +assumption putting it in the context, and generates a λ-abstraction +in the proof term.

    + +
    #cover; #A; #C; #U;
    +
    + +

    xcover-set-2

    + +

    We have now to provide a proposition, and we exhibit it. We left +a part of it implicit; since the system cannot infer it it will +ask for it later. +Note that the type of ∀y:A.y ∈ C → ? is a proposition +whenever ? is a proposition.

    + +
    napply (∀y:A.y ∈ C → ?);
    +
    + +

    xcover-set-3

    + +

    The proposition we want to provide is an application of the +cover relation we have abstracted in the context. The command +napply, if the given term has not the expected type (in that +case it is a product versus a proposition) it applies it to as many +implicit arguments as necessary (in that case ? ? ?).

    + +
    napply cover;
    +
    + +

    xcover-set-4

    + +

    The system will now ask in turn the three implicit arguments +passed to cover. The syntax ##[ allows to start a branching +to tackle every sub proof individually, otherwise every command +is applied to every subproof. The command ##| switches to the next +subproof and ##] ends the branching.

    + +
    ##[ napply A;
    +##| napply U;
    +##| napply y;
    +##]
    +nqed.
    +
    + +

    The fish relation

    + +

    The definition of fish works exactly the same way as for cover, except +that it is defined as a coinductive proposition.

    + +
    ndefinition fish_set ≝ λf:∀A:Ax.Ω^A → A → CProp[0].
    + λA,U,V.
    +  ∃a.a ∈ V ∧ f A U a.
    +
    +(* a \ltimes b *)
    +notation "hvbox(a break ⋉ b)" non associative with precedence 45
    +for @{ 'fish $a $b }. 
    +
    +interpretation "fish set temp" 'fish A U = (fish_set ?? U A).
    +
    +ncoinductive fish (A : Ax) (F : Ω^A) : A → CProp[0] ≝ 
    +| cfish : ∀a. a ∈ F → (∀i:𝐈 a .𝐂  a i ⋉ F) → fish A F a.
    +napply fish;
    +nqed.
    +
    +interpretation "fish set" 'fish A U = (fish_set fish ? U A).
    +interpretation "fish" 'fish a U = (fish ? U a).
    +
    + +

    Introduction rule for fish

    + +

    Matita is able to generate elimination rules for inductive types

    + +
    (** ncheck cover_rect_CProp0. *)
    +
    + +

    but not introduction rules for the coinductive case.

    + +
                   P ⊆ U   (∀x,j.x ∈ P → C(x,j) ≬ P)   a ∈ P
    +(fish intro) ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                               a ⋉ U
    +
    + +

    We thus have to define the introduction rule for fish by co-recursion. +Here we again use the proof mode of Matita to exhibit the body of the +corecursive function.

    + +
    nlet corec fish_rec (A:Ax) (U: Ω^A)
    + (P: Ω^A) (H1: P ⊆ U)
    +  (H2: ∀a:A. a ∈ P → ∀j: 𝐈 a. 𝐂 a j ≬ P): ∀a:A. ∀p: a ∈ P. a ⋉ U ≝ ?.
    +
    + +

    def-fish-rec-1

    + +

    Note the first item of the context, it is the corecursive function we are +defining. This item allows to perform the recursive call, but we will be +allowed to do such call only after having generated a constructor of +the fish coinductive type.

    + +

    We introduce a and p, and then return the fish constructor cfish. +Since the constructor accepts two arguments, the system asks for them.

    + +
    #a; #a_in_P; napply cfish;
    +
    + +

    def-fish-rec-2

    + +

    The first one is a proof that a ∈ U. This can be proved using H1 and p. +With the nchange tactic we change H1 into an equivalent form (this step +can be skipped, since the system would be able to unfold the definition +of inclusion by itself)

    + +
    ##[ nchange in H1 with (∀b.b∈P → b∈U);
    +
    + +

    def-fish-rec-2-1

    + +

    It is now clear that H1 can be applied. Again napply adds two +implicit arguments to H1 ? ?, obtaining a proof of ? ∈ U given a proof +that ? ∈ P. Thanks to unification, the system understands that ? is actually +a, and it asks a proof that a ∈ P.

    + +
        napply H1;
    +
    + +

    def-fish-rec-3

    + +

    The nassumption tactic looks for the required proof in the context, and in +that cases finds it in the last context position.

    + +

    We move now to the second branch of the proof, corresponding to the second +argument of the cfish constructor.

    + +

    We introduce i and then we destruct H2 a p i, that being a proof +of an overlap predicate, give as an element and a proof that it is +both in 𝐂 a i and P.

    + +
        nassumption;
    +##| #i; ncases (H2 a a_in_P i);
    +
    + +

    def-fish-rec-5

    + +

    We then introduce x, break the conjunction (the *; command is the +equivalent of ncases but operates on the first hypothesis that can +be introduced). We then introduce the two sides of the conjunction.

    + +
        #x; *; #xC; #xP;
    +
    + +

    def-fish-rec-5-1

    + +

    The goal is now the existence of a point in 𝐂 a i fished by U. +We thus need to use the introduction rule for the existential quantifier. +In CIC it is a defined notion, that is an inductive type with just +one constructor (one introduction rule) holding the witness and the proof +that the witness satisfies a proposition.

    + +
    +

    ncheck Ex.

    +
    + +

    Instead of trying to remember the name of the constructor, that should +be used as the argument of napply, we can ask the system to find by +itself the constructor name and apply it with the @ tactic. +Note that some inductive predicates, like the disjunction, have multiple +introduction rules, and thus @ can be followed by a number identifying +the constructor.

    + +
        @;
    +
    + +

    def-fish-rec-6

    + +

    After choosing x as the witness, we have to prove a conjunction, +and we again apply the introduction rule for the inductively defined +predicate ∧.

    + +
        ##[ napply x
    +    ##| @;
    +
    + +

    def-fish-rec-7

    + +

    The left hand side of the conjunction is trivial to prove, since it +is already in the context. The right hand side needs to perform +the co-recursive call.

    + +
            ##[ napply xC; 
    +        ##| napply (fish_rec ? U P);
    +
    + +

    def-fish-rec-9

    + +

    The co-recursive call needs some arguments, but all of them are +in the context. Instead of explicitly mention them, we use the +nassumption tactic, that simply tries to apply every context item.

    + +
                nassumption;
    +        ##]
    +    ##]
    +##]
    +nqed.
    +
    + +

    Subset of covered/fished points

    + +

    We now have to define the subset of S of points covered by U. +We also define a prefix notation for it. Remember that the precedence +of the prefix form of a symbol has to be higher than the precedence +of its infix form.

    + +
    ndefinition coverage : ∀A:Ax.∀U:Ω^A.Ω^A ≝ λA,U.{ a | a ◃ U }.
    +
    +notation "◃U" non associative with precedence 55 for @{ 'coverage $U }.
    +
    +interpretation "coverage cover" 'coverage U = (coverage ? U).
    +
    + +

    Here we define the equation characterizing the cover relation. +Even if it is not part of the paper, we proved that ◃(U) is +the minimum solution for +such equation, the interested reader should be able to reply the proof +with Matita.

    + +
    ndefinition cover_equation : ∀A:Ax.∀U,X:Ω^A.CProp[0] ≝  λA,U,X. 
    +  ∀a.a ∈ X ↔ (a ∈ U ∨ ∃i:𝐈 a.∀y.y ∈ 𝐂 a i → y ∈ X).  
    +
    +ntheorem coverage_cover_equation : ∀A,U. cover_equation A U (◃U).
    +#A; #U; #a; @; #H;
    +##[ nelim H; #b; 
    +    ##[ #bU; @1; nassumption;
    +    ##| #i; #CaiU; #IH; @2; @ i; #c; #cCbi; ncases (IH ? cCbi);
    +        ##[ #E; @; napply E;
    +        ##| #_; napply CaiU; nassumption; ##] ##]
    +##| ncases H; ##[ #E; @; nassumption]
    +    *; #j; #Hj; @2 j; #w; #wC; napply Hj; nassumption;
    +##]
    +nqed. 
    +
    +ntheorem coverage_min_cover_equation : 
    +  ∀A,U,W. cover_equation A U W → ◃U ⊆ W.
    +#A; #U; #W; #H; #a; #aU; nelim aU; #b;
    +##[ #bU; ncases (H b); #_; #H1; napply H1; @1; nassumption;
    +##| #i; #CbiU; #IH; ncases (H b); #_; #H1; napply H1; @2; @i; napply IH;
    +##]
    +nqed.
    +
    + +

    We similarly define the subset of points "fished" by F, the +equation characterizing ⋉(F) and prove that fish is +the biggest solution for such equation.

    + +
    notation "⋉F" non associative with precedence 55
    +for @{ 'fished $F }.
    +
    +ndefinition fished : ∀A:Ax.∀F:Ω^A.Ω^A ≝ λA,F.{ a | a ⋉ F }.
    +
    +interpretation "fished fish" 'fished F = (fished ? F).
    +
    +ndefinition fish_equation : ∀A:Ax.∀F,X:Ω^A.CProp[0] ≝ λA,F,X.
    +  ∀a. a ∈ X ↔ a ∈ F ∧ ∀i:𝐈 a.∃y.y ∈ 𝐂 a i ∧ y ∈ X. 
    +
    +ntheorem fished_fish_equation : ∀A,F. fish_equation A F (⋉F).
    +#A; #F; #a; @; (* *; non genera outtype che lega a *) #H; ncases H;
    +##[ #b; #bF; #H2; @ bF; #i; ncases (H2 i); #c; *; #cC; #cF; @c; @ cC;
    +    napply cF;  
    +##| #aF; #H1; @ aF; napply H1;
    +##]
    +nqed.
    +
    +ntheorem fished_max_fish_equation : ∀A,F,G. fish_equation A F G → G ⊆ ⋉F.
    +#A; #F; #G; #H; #a; #aG; napply (fish_rec … aG);
    +#b; ncases (H b); #H1; #_; #bG; ncases (H1 bG); #E1; #E2; nassumption; 
    +nqed.
    +
    + +

    Part 2, the new set of axioms

    + +

    Since the name of defined objects (record included) has to be unique +within the same file, we prefix every field name +in the new definition of the axiom set with n.

    + +
    nrecord nAx : Type[1] ≝ { 
    +  nS:> Type[0]; 
    +  nI: nS → Type[0];
    +  nD: ∀a:nS. nI a → Type[0];
    +  nd: ∀a:nS. ∀i:nI a. nD a i → nS
    +}.
    +
    + +

    We again define a notation for the projections, making the +projected record an implicit argument. Note that, since we already have +a notation for 𝐈, we just add another interpretation for it. The +system, looking at the argument of 𝐈, will be able to choose +the correct interpretation.

    + +
    notation "𝐃 \sub ( ❨a,\emsp i❩ )" non associative with precedence 70 for @{ 'D $a $i }.
    +notation "𝐝 \sub ( ❨a,\emsp i,\emsp j❩ )" non associative with precedence 70 for @{ 'd $a $i $j}.
    +
    +notation > "𝐃 term 90 a term 90 i" non associative with precedence 70 for @{ 'D $a $i }.
    +notation > "𝐝 term 90 a term 90 i term 90 j" non associative with precedence 70 for @{ 'd $a $i $j}.
    +
    +interpretation "D" 'D a i = (nD ? a i).
    +interpretation "d" 'd a i j = (nd ? a i j).
    +interpretation "new I" 'I a = (nI ? a).
    +
    + +

    The first result the paper presents to motivate the new formulation +of the axiom set is the possibility to define and old axiom set +starting from a new one and vice versa. The key definition for +such construction is the image of d(a,i). +The paper defines the image as

    + +
    +

    Im[d(a,i)] = { d(a,i,j) | j : D(a,i) }

    +
    + +

    but this not so formal notation poses some problems. The image is +often used as the left hand side of the ⊆ predicate

    + +
    +

    Im[d(a,i)] ⊆ V

    +
    + +

    Of course this writing is interpreted by the authors as follows

    + +
    +

    ∀j:D(a,i). d(a,i,j) ∈ V

    +
    + +

    If we need to use the image to define 𝐂 (a subset of S) we are obliged to +form a subset, i.e. to place a single variable { here | … } of type S.

    + +
    +

    Im[d(a,i)] = { y | ∃j:D(a,i). y = d(a,i,j) }

    +
    + +

    This poses no theoretical problems, since S is a Type and thus +equipped with the Id equality. If S was a setoid, here the equality +would have been the one of the setoid.

    + +

    Unless we define two different images, one for stating that the image is ⊆ of +something and another one to define 𝐂, we end up using always the latter. +Thus the statement Im[d(a,i)] ⊆ V unfolds to

    + +
    +

    ∀x:S. ( ∃j.x = d(a,i,j) ) → x ∈ V

    +
    + +

    That, up to rewriting with the equation defining x, is what we mean. +Since we decided to use Id the rewriting always work (the elimination +principle for Id is Leibnitz's equality, that is quantified over +the context.

    + +

    The problem that arises if we decide to make S a setoid is that +V has to be extensional w.r.t. the equality of S (i.e. the characteristic +functional proposition has to quotient its input with a relation bigger +than the one of S.

    + +
    +

    ∀x,y:S. x = y → x ∈ V → y ∈ V

    +
    + +

    If V is a complex construction, the proof may not be trivial.

    + +
    include "logic/equality.ma".
    +
    +ndefinition image ≝ λA:nAx.λa:A.λi. { x | ∃j:𝐃 a i. x = 𝐝 a i j }.
    +
    +notation > "𝐈𝐦  [𝐝 term 90 a term 90 i]" non associative with precedence 70 for @{ 'Im $a $i }.
    +notation < "𝐈𝐦  [𝐝 \sub ( ❨a,\emsp i❩ )]" non associative with precedence 70 for @{ 'Im $a $i }.
    +
    +interpretation "image" 'Im a i = (image ? a i).
    +
    + +

    Thanks to our definition of image, we can define a function mapping a +new axiom set to an old one and vice versa. Note that in the second +definition, when we give the 𝐝 component, the projection of the +Σ-type is inlined (constructed on the fly by *;) +while in the paper it was named fst.

    + +
    ndefinition Ax_of_nAx : nAx → Ax.
    +#A; @ A (nI ?); #a; #i; napply (𝐈𝐦 [𝐝 a i]);
    +nqed.
    +
    +ndefinition nAx_of_Ax : Ax → nAx.
    +#A; @ A (I ?);
    +##[ #a; #i; napply (Σx:A.x ∈ 𝐂 a i);
    +##| #a; #i; *; #x; #_; napply x;
    +##]
    +nqed.
    +
    + +

    We now prove that the two function above form a retraction pair for +the C component of the axiom set. To prove that we face a little +problem since CIC is not equipped with η-conversion. This means that +the followin does not hold (where A is an axiom set).

    + +
    +

    A = (S A, I A, C A)

    +
    + +

    This can be proved only under a pattern mach over A, that means +that the resulting computation content of the proof is a program +that computes something only if A is a concrete axiom set.

    + +

    To state the lemma we have to drop notation, and explicitly +give the axiom set in input to the C projection.

    + +
    nlemma Ax_nAx_equiv : 
    +  ∀A:Ax. ∀a,i. C (Ax_of_nAx (nAx_of_Ax A)) a i ⊆ C A a i ∧
    +               C A a i ⊆ C (Ax_of_nAx (nAx_of_Ax A)) a i.               
    +#A; #a; #i; @; #b; #H;
    +
    + +

    retr-1

    + +

    Look for example the type of a. The command nchange in a with A +would fail because of the missing η-conversion rule. We have thus +to pattern match over A and introduce its pieces.

    + +
    ##[  ncases A in a i b H; #S; #I; #C; #a; #i; #b; #H;
    +
    + +

    retr-2

    + +

    Now the system accepts that the type of a is the fist component +of the axiom set, now called S. Unfolding definitions in H we discover +there is still some work to do.

    + +
         nchange in a with S; nwhd in H;
    +
    + +

    retr-3

    + +

    To use the equation defining b we have to eliminate H. Unfolding +definitions in x tell us there is still something to do. The nrewrite +tactic is a shortcut for the elimination principle of the equality. +It accepts an additional argument < or > to rewrite left-to-right +or right-to-left.

    + +
         ncases H; #x; #E; nrewrite > E; nwhd in x;
    +
    + +

    retr-4

    + +

    We defined 𝐝 to be the first projection of x, thus we have to +eliminate x to actually compute 𝐝.

    + +

    The remaining part of the proof it not interesting and poses no +new problems.

    + +
         ncases x; #b; #Hb; nnormalize; nassumption;
    +##|  ncases A in a i b H; #S; #I; #C; #a; #i; #b; #H; @;
    +     ##[ @ b; nassumption;
    +     ##| nnormalize; @; ##]
    +##]
    +nqed.
    +
    + +

    We then define the inductive type of ordinals, parametrized over an axiom +set. We also attach some notations to the constructors.

    + +
    ninductive Ord (A : nAx) : Type[0] ≝ 
    + | oO : Ord A
    + | oS : Ord A → Ord A
    + | oL : ∀a:A.∀i.∀f:𝐃 a i → Ord A. Ord A.
    +
    +notation "0" non associative with precedence 90 for @{ 'oO }.
    +notation "x+1" non associative with precedence 50 for @{'oS $x }.
    +notation "Λ term 90 f" non associative with precedence 50 for @{ 'oL $f }.
    +
    +interpretation "ordinals Zero" 'oO = (oO ?).
    +interpretation "ordinals Succ" 'oS x = (oS ? x).
    +interpretation "ordinals Lambda" 'oL f = (oL ? ? ? f).
    +
    + +

    The definition of U⎽x is by recursion over the ordinal x. +We thus define a recursive function using the nlet rec command. +The on x directive tells +the system on which argument the function is (structurally) recursive.

    + +

    In the oS case we use a local definition to name the recursive call +since it is used twice.

    + +

    Note that Matita does not support notation in the left hand side +of a pattern match, and thus the names of the constructors have to +be spelled out verbatim.

    + +
    nlet rec famU (A : nAx) (U : Ω^A) (x : Ord A) on x : Ω^A ≝ 
    +  match x with
    +  [ oO ⇒ U
    +  | oS y ⇒ let U_n ≝ famU A U y in U_n ∪ { x | ∃i.𝐈𝐦[𝐝 x i] ⊆ U_n} 
    +  | oL a i f ⇒ { x | ∃j.x ∈ famU A U (f j) } ].
    +
    +notation < "term 90 U \sub (term 90 x)" non associative with precedence 50 for @{ 'famU $U $x }.
    +notation > "U ⎽ term 90 x" non associative with precedence 50 for @{ 'famU $U $x }.
    +
    +interpretation "famU" 'famU U x = (famU ? U x).
    +
    + +

    We attach as the input notation for U_x the similar U⎽x where underscore, +that is a character valid for identifier names, has been replaced by ⎽ that is +not. The symbol ⎽ can act as a separator, and can be typed as an alternative +for _ (i.e. pressing ALT-L after _).

    + +

    The notion ◃(U) has to be defined as the subset of elements y
    +belonging to U⎽x for some x. Moreover, we have to define the notion +of cover between sets again, since the one defined at the beginning +of the tutorial works only for the old axiom set.

    + +
    ndefinition ord_coverage : ∀A:nAx.∀U:Ω^A.Ω^A ≝ 
    +  λA,U.{ y | ∃x:Ord A. y ∈ famU ? U x }.
    +
    +ndefinition ord_cover_set ≝ λc:∀A:nAx.Ω^A → Ω^A.λA,C,U.
    +  ∀y.y ∈ C → y ∈ c A U.
    +
    +interpretation "coverage new cover" 'coverage U = (ord_coverage ? U).
    +interpretation "new covers set" 'covers a U = (ord_cover_set ord_coverage ? a U).
    +interpretation "new covers" 'covers a U = (mem ? (ord_coverage ? U) a).
    +
    + +

    Before proving that this cover relation validates the reflexivity and infinity +rules, we prove this little technical lemma that is used in the proof for the +infinity rule.

    + +
    nlemma ord_subset: ∀A:nAx.∀a:A.∀i,f,U.∀j:𝐃 a i. U⎽(f j) ⊆ U⎽(Λ f).
    +#A; #a; #i; #f; #U; #j; #b; #bUf; @ j; nassumption;
    +nqed.
    +
    + +

    The proof of infinity uses the following form of the Axiom of Choice, +that cannot be proved inside Matita, since the existential quantifier +lives in the sort of predicative propositions while the sigma in the conclusion +lives in the sort of data types, and thus the former cannot be eliminated +to provide the witness for the second.

    + +
    naxiom AC : ∀A,a,i,U.
    +  (∀j:𝐃 a i.∃x:Ord A.𝐝 a i j ∈ U⎽x) → (Σf.∀j:𝐃 a i.𝐝 a i j ∈ U⎽(f j)).
    +
    + +

    Note that, if we will decide later to identify ∃ and Σ, AC is +trivially provable

    + +
    nlemma AC_exists_is_sigma : ∀A,a,i,U.
    +  (∀j:𝐃 a i.Σx:Ord A.𝐝 a i j ∈ U⎽x) → (Σf.∀j:𝐃 a i.𝐝 a i j ∈ U⎽(f j)).
    +#A; #a; #i; #U; #H; @;
    +##[ #j; ncases (H j); #x; #_; napply x;
    +##| #j; ncases (H j); #x; #Hx; napply Hx; ##]
    +nqed.
    +
    + +

    In case we made S a setoid, the following property has to be proved

    + +
    +

    nlemma Uxis_ext: ∀A:nAx.∀a,b:A.∀x.∀U. a = b → b ∈ U⎽x → a ∈ U⎽x.

    +
    + +

    Anyway this proof is a non trivial induction over x, that requires 𝐈 and 𝐃 to be +declared as morphisms.

    + +

    The reflexivity proof is trivial, it is enough to provide the ordinal 0 +as a witness, then ◃(U) reduces to U by definition, +hence the conclusion. Note that 0 is between ( and ) to +make it clear that it is a term (an ordinal) and not the number +of the constructor we want to apply (that is the first and only one +of the existential inductive type).

    + +
    ntheorem new_coverage_reflexive: ∀A:nAx.∀U:Ω^A.∀a. a ∈ U → a ◃ U.
    +#A; #U; #a; #H; @ (0); napply H;
    +nqed.
    +
    + +

    We now proceed with the proof of the infinity rule.

    + +
    alias symbol "covers" (instance 3) = "new covers set".
    +ntheorem new_coverage_infinity:
    +  ∀A:nAx.∀U:Ω^A.∀a:A. (∃i:𝐈 a. 𝐈𝐦[𝐝 a i] ◃ U) → a ◃ U.
    +#A; #U; #a;
    +
    + +

    n-cov-inf-1

    + +

    We eliminate the existential, obtaining an i and a proof that the +image of 𝐝 a i is covered by U. The nnormalize tactic computes the normal +form of H, thus expands the definition of cover between sets.

    + +
    *; #i; #H; nnormalize in H;
    +
    + +

    n-cov-inf-2

    + +

    When the paper proof considers H, it implicitly substitutes assumed +equation defining y in its conclusion. +In Matita this step is not completely trivial. +We thus assert (ncut) the nicer form of H and prove it.

    + +
    ncut (∀y:𝐃 a i.∃x:Ord A.𝐝 a i y ∈ U⎽x); ##[
    +
    + +

    n-cov-inf-3

    + +

    After introducing z, H can be applied (choosing 𝐝 a i z as y). +What is the left to prove is that ∃j: 𝐃 a j. 𝐝 a i z = 𝐝 a i j, that +becomes trivial if j is chosen to be z.

    + +
      #z; napply H; @ z; @; ##] #H';
    +
    + +

    n-cov-inf-4

    + +

    Under H' the axiom of choice AC can be eliminated, obtaining the f and +its property. Note that the axiom AC was abstracted over A,a,i,U before +assuming (∀j:𝐃 a i.∃x:Ord A.𝐝 a i j ∈ U⎽x). Thus the term that can be eliminated +is AC ???? H' where the system is able to infer every ?. Matita provides +a facility to specify a number of ? in a compact way, i.e. …. The system +expand … first to zero, then one, then two, three and finally four question +marks, "guessing" how may of them are needed.

    + +
    ncases (AC … H'); #f; #Hf;
    +
    + +

    n-cov-inf-5

    + +

    The paper proof does now a forward reasoning step, deriving (by the ord_subset +lemma we proved above) Hf' i.e. 𝐝 a i j ∈ U⎽(Λf).

    + +
    ncut (∀j.𝐝 a i j ∈ U⎽(Λ f));
    +  ##[ #j; napply (ord_subset … f … (Hf j));##] #Hf';
    +
    + +

    n-cov-inf-6

    + +

    To prove that a◃U we have to exhibit the ordinal x such that a ∈ U⎽x.

    + +
    @ (Λ f+1);
    +
    + +

    n-cov-inf-7

    + +

    The definition of U⎽(…+1) expands to the union of two sets, and proving +that a ∈ X ∪ Y is, by definition, equivalent to prove that a is in X or Y. +Applying the second constructor @2; of the disjunction, +we are left to prove that a belongs to the right hand side of the union.

    + +
    @2;
    +
    + +

    n-cov-inf-8

    + +

    We thus provide i as the witness of the existential, introduce the +element being in the image and we are +left to prove that it belongs to U⎽(Λf). In the meanwhile, since belonging +to the image means that there exists an object in the domain …, we eliminate the +existential, obtaining d (of type 𝐃 a i) and the equation defining x.

    + +
    @i; #x; *; #d; #Hd;
    +
    + +

    n-cov-inf-9

    + +

    We just need to use the equational definition of x to obtain a conclusion +that can be proved with Hf'. We assumed that U⎽x is extensional for +every x, thus we are allowed to use Hd and close the proof.

    + +
    nrewrite > Hd; napply Hf';
    +nqed.
    +
    + +

    The next proof is that ◃(U) is minimal. The hardest part of the proof +is to prepare the goal for the induction. The desiderata is to prove +U⎽o ⊆ V by induction on o, but the conclusion of the lemma is, +unfolding all definitions:

    + +
    +

    ∀x. x ∈ { y | ∃o:Ord A.y ∈ U⎽o } → x ∈ V

    +
    + +
    nlemma new_coverage_min :  
    +  ∀A:nAx.∀U:Ω^A.∀V.U ⊆ V → (∀a:A.∀i.𝐈𝐦[𝐝 a i] ⊆ V → a ∈ V) → ◃U ⊆ V.
    +#A; #U; #V; #HUV; #Im;#b;
    +
    + +

    n-cov-min-2

    + +

    After all the introductions, event the element hidden in the ⊆ definition, +we have to eliminate the existential quantifier, obtaining the ordinal o

    + +
    *; #o;
    +
    + +

    n-cov-min-3

    + +

    What is left is almost right, but the element b is already in the +context. We thus generalize every occurrence of b in +the current goal, obtaining ∀c.c ∈ U⎽o → c ∈ V that is U⎽o ⊆ V.

    + +
    ngeneralize in match b; nchange with (U⎽o ⊆ V);
    +
    + +

    n-cov-min-4

    + +

    We then proceed by induction on o obtaining the following goals

    + +
    nelim o;
    +
    + +

    n-cov-min-5

    + +

    All of them can be proved using simple set theoretic arguments, +the induction hypothesis and the assumption Im.

    + +
    ##[ napply HUV; 
    +##| #p; #IH; napply subseteq_union_l; ##[ nassumption; ##]
    +    #x; *; #i; #H; napply (Im ? i); napply (subseteq_trans … IH); napply H;
    +##| #a; #i; #f; #IH; #x; *; #d; napply IH; ##]
    +nqed.
    +
    + +

    The notion F⎽x is again defined by recursion over the ordinal x.

    + +
    nlet rec famF (A: nAx) (F : Ω^A) (x : Ord A) on x : Ω^A ≝ 
    +  match x with
    +  [ oO ⇒ F
    +  | oS o ⇒ let F_o ≝ famF A F o in F_o ∩ { x | ∀i:𝐈 x.∃j:𝐃 x i.𝐝 x i j ∈ F_o } 
    +  | oL a i f ⇒ { x | ∀j:𝐃 a i.x ∈ famF A F (f j) }
    +  ].
    +
    +interpretation "famF" 'famU U x = (famF ? U x).
    +
    +ndefinition ord_fished : ∀A:nAx.∀F:Ω^A.Ω^A ≝ λA,F.{ y | ∀x:Ord A. y ∈ F⎽x }.
    +
    +interpretation "fished new fish" 'fished U = (ord_fished ? U).
    +interpretation "new fish" 'fish a U = (mem ? (ord_fished ? U) a).
    +
    + +

    The proof of compatibility uses this little result, that we +proved outside the main proof.

    + +
    nlemma co_ord_subset: ∀A:nAx.∀F:Ω^A.∀a,i.∀f:𝐃 a i → Ord A.∀j. F⎽(Λ f) ⊆ F⎽(f j).
    +#A; #F; #a; #i; #f; #j; #x; #H; napply H;
    +nqed.
    +
    + +

    We assume the dual of the axiom of choice, as in the paper proof.

    + +
    naxiom AC_dual: ∀A:nAx.∀a:A.∀i,F. 
    + (∀f:𝐃 a i → Ord A.∃x:𝐃 a i.𝐝 a i x ∈ F⎽(f x))
    +    → ∃j:𝐃 a i.∀x:Ord A.𝐝 a i j ∈ F⎽x.
    +
    + +

    Proving the anti-reflexivity property is simple, since the +assumption a ⋉ F states that for every ordinal x (and thus also 0) +a ∈ F⎽x. If x is choose to be 0, we obtain the thesis.

    + +
    ntheorem new_fish_antirefl: ∀A:nAx.∀F:Ω^A.∀a. a ⋉ F → a ∈ F.
    +#A; #F; #a; #H; nlapply (H 0); #aFo; napply aFo;
    +nqed.
    +
    + +

    We now prove the compatibility property for the new fish relation.

    + +
    ntheorem new_fish_compatible: 
    + ∀A:nAx.∀F:Ω^A.∀a. a ⋉ F → ∀i:𝐈 a.∃j:𝐃 a i.𝐝 a i j ⋉ F.
    +#A; #F; #a; #aF; #i; nnormalize;
    +
    + +

    n-f-compat-1

    + +

    After reducing to normal form the goal, we observe it is exactly the conclusion of +the dual axiom of choice we just assumed. We thus apply it ad introduce the +fcuntion f.

    + +
    napply AC_dual; #f;
    +
    + +

    n-f-compat-2

    + +

    The hypothesis aF states that a⋉F⎽x for every x, and we choose Λf+1.

    + +
    nlapply (aF (Λf+1)); #aLf;
    +
    + +

    n-f-compat-3

    + +

    Since F_(Λf+1) is defined by recursion and we actually have a concrete input +Λf+1 for that recursive function, it can be computed. +Anyway, using the nnormalize +tactic would reduce too much (both the +1 and the Λf steps would be performed); +we thus explicitly give a convertible type for that hypothesis, corresponding +the computation of the +1 step, plus the unfolding the definition of +the intersection.

    + +
    nchange in aLf with 
    +  (a ∈ F⎽(Λ f) ∧ ∀i:𝐈 a.∃j:𝐃 a i.𝐝 a i j ∈ F⎽(Λ f));
    +
    + +

    n-f-compat-4

    + +

    We are interested in the right hand side of aLf, an in particular to +its intance where the generic index in 𝐈 a is i.

    + +
    ncases aLf; #_; #H; nlapply (H i);
    +
    + +

    n-f-compat-5

    + +

    We then eliminate the existential, obtaining j and its property Hj. We provide +the same witness

    + +
    *; #j; #Hj; @j;
    +
    + +

    n-f-compat-6

    + +

    What is left to prove is exactly the co_ord_subset lemma we factored out +of the main proof.

    + +
    napply (co_ord_subset … Hj);
    +nqed.
    +
    + +

    The proof that ⋉(F) is maximal is exactly the dual one of the +minimality of ◃(U). Thus the main problem is to obtain G ⊆ F⎽o +before doing the induction over o.

    + +
    ntheorem max_new_fished: 
    +  ∀A:nAx.∀G:Ω^A.∀F:Ω^A.G ⊆ F → (∀a.a ∈ G → ∀i.𝐈𝐦[𝐝 a i] ≬ G) → G ⊆ ⋉F.
    +#A; #G; #F; #GF; #H; #b; #HbG; #o; 
    +ngeneralize in match HbG; ngeneralize in match b;
    +nchange with (G ⊆ F⎽o);
    +nelim o;
    +##[ napply GF;
    +##| #p; #IH; napply (subseteq_intersection_r … IH);
    +    #x; #Hx; #i; ncases (H … Hx i); #c; *; *; #d; #Ed; #cG;
    +    @d; napply IH;
    +
    + +

    n-f-max-1

    + +

    Note that here the right hand side of ∈ is G and not F⎽p as +in the dual proof. If S was declare to be a setoid, to finish this proof +would be enough to assume G extensional, and no proof of the +extensionality of F⎽p is required.

    + +
    + +

    Appendix: tactics explanation

    + +

    In this appendix we try to give a description of tactics +in terms of sequent calculus rules annotated with proofs. +The : separator has to be read as is a proof of, in the spirit +of the Curry-Howard isomorphism.

    + +
                  Γ ⊢  f  :  A_1 → … → A_n → B     Γ ⊢ ?_i  :  A_i 
    +napply f;    ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                       Γ ⊢ (f ?_1 … ?_n )  :  B
    +
    +               Γ ⊢  ?  :  F → B       Γ ⊢ f  :  F 
    +nlapply f;    ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                         Γ ⊢ (? f)  :  B
    +
    +
    +             Γ; x : T  ⊢ ?  :  P(x) 
    +#x;      ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +            Γ ⊢ λx:T.?  :  ∀x:T.P(x)
    +
    +
    +                   Γ ⊢ ?_i  :  args_i → P(k_i args_i)          
    +ncases x;   ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +            Γ ⊢ match x with [ k1 args1 ⇒ ?_1 | … | kn argsn ⇒ ?_n ]  :  P(x)                    
    +
    +
    +                  Γ ⊢ ?i  :  ∀t. P(t) → P(k_i … t …)          
    +nelim x;   ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +               Γ ⊢ (T_rect_CProp0 ?_1 … ?_n)  :  P(x)
    +
    + +

    Where T_rect_CProp0 is the induction principle for the +inductive type T.

    + +
                          Γ ⊢ ?  :  Q     Q ≡ P          
    +nchange with Q;   ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                      Γ ⊢ ?  :  P
    +
    + +

    Where the equivalence relation between types ≡ keeps into account +β-reduction, δ-reduction (definition unfolding), ζ-reduction (local +definition unfolding), ι-reduction (pattern matching simplification), +μ-reduction (recursive function computation) and ν-reduction (co-fixpoint +computation).

    + +
                               Γ; H : Q; Δ ⊢ ?  :  G     Q ≡ P          
    +nchange in H with Q; ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                           Γ; H : P; Δ ⊢ ?  :  G                    
    +
    +
    +                           Γ; H : Q; Δ ⊢ ?  :  G     P →* Q           
    +nnormalize in H; ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                           Γ; H : P; Δ ⊢ ?  :  G
    +
    + +

    Where Q is the normal form of P considering βδζιμν-reduction steps.

    + +
                       Γ ⊢ ?  :  Q     P →* Q          
    +nnormalize; ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                   Γ ⊢ ?  :  P                    
    +
    +
    +                Γ ⊢ ?_2  :  T → G    Γ ⊢ ?_1  :  T
    +ncut T;   ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                           Γ ⊢ (?_2 ?_1)  :  G                    
    +
    +
    +                            Γ ⊢ ?  :  ∀x.P(x)
    +ngeneralize in match t; ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
    +                            Γ ⊢ (? t)  :  P(t)
    +
    +
    +    nrewrite < Ed; napply cG;    
    +##| #a; #i; #f; #Hf; nchange with (G ⊆ { y | ∀x. y ∈ F⎽(f x) }); 
    +    #b; #Hb; #d; napply (Hf d); napply Hb;
    +##]
    +nqed.
    +
    + +

    +Last updated: $Date: 2009-10-28 15:46:19 +0100 (Wed, 28 Oct 2009) $ +

    + + diff --git a/helm/www/matita/docs/tutorial/igft.pdf b/helm/www/matita/docs/tutorial/igft.pdf new file mode 100644 index 000000000..b8c11c01a Binary files /dev/null and b/helm/www/matita/docs/tutorial/igft.pdf differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-1.png b/helm/www/matita/docs/tutorial/n-cov-inf-1.png new file mode 100644 index 000000000..301e7e095 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-1.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-2.png b/helm/www/matita/docs/tutorial/n-cov-inf-2.png new file mode 100644 index 000000000..1535bb60c Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-2.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-3.png b/helm/www/matita/docs/tutorial/n-cov-inf-3.png new file mode 100644 index 000000000..37e995e24 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-3.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-4.png b/helm/www/matita/docs/tutorial/n-cov-inf-4.png new file mode 100644 index 000000000..be3a381e4 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-4.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-5.png b/helm/www/matita/docs/tutorial/n-cov-inf-5.png new file mode 100644 index 000000000..8893d86fa Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-5.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-6.png b/helm/www/matita/docs/tutorial/n-cov-inf-6.png new file mode 100644 index 000000000..ec123469f Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-6.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-7.png b/helm/www/matita/docs/tutorial/n-cov-inf-7.png new file mode 100644 index 000000000..d3086dafb Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-7.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-8.png b/helm/www/matita/docs/tutorial/n-cov-inf-8.png new file mode 100644 index 000000000..806d12a92 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-8.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-inf-9.png b/helm/www/matita/docs/tutorial/n-cov-inf-9.png new file mode 100644 index 000000000..f3071a0d0 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-inf-9.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-min-2.png b/helm/www/matita/docs/tutorial/n-cov-min-2.png new file mode 100644 index 000000000..f4c78c49c Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-min-2.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-min-3.png b/helm/www/matita/docs/tutorial/n-cov-min-3.png new file mode 100644 index 000000000..e967998bc Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-min-3.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-min-4.png b/helm/www/matita/docs/tutorial/n-cov-min-4.png new file mode 100644 index 000000000..144094066 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-min-4.png differ diff --git a/helm/www/matita/docs/tutorial/n-cov-min-5.png b/helm/www/matita/docs/tutorial/n-cov-min-5.png new file mode 100644 index 000000000..df40986c3 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-cov-min-5.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-1.png b/helm/www/matita/docs/tutorial/n-f-compat-1.png new file mode 100644 index 000000000..e1b449efa Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-1.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-2.png b/helm/www/matita/docs/tutorial/n-f-compat-2.png new file mode 100644 index 000000000..3da01d47b Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-2.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-3.png b/helm/www/matita/docs/tutorial/n-f-compat-3.png new file mode 100644 index 000000000..6cd542f06 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-3.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-4.png b/helm/www/matita/docs/tutorial/n-f-compat-4.png new file mode 100644 index 000000000..987963347 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-4.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-5.png b/helm/www/matita/docs/tutorial/n-f-compat-5.png new file mode 100644 index 000000000..7eeb2a205 Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-5.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-compat-6.png b/helm/www/matita/docs/tutorial/n-f-compat-6.png new file mode 100644 index 000000000..4b40cd0bf Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-compat-6.png differ diff --git a/helm/www/matita/docs/tutorial/n-f-max-1.png b/helm/www/matita/docs/tutorial/n-f-max-1.png new file mode 100644 index 000000000..40405087d Binary files /dev/null and b/helm/www/matita/docs/tutorial/n-f-max-1.png differ diff --git a/helm/www/matita/docs/tutorial/retr-1.png b/helm/www/matita/docs/tutorial/retr-1.png new file mode 100644 index 000000000..e746749b7 Binary files /dev/null and b/helm/www/matita/docs/tutorial/retr-1.png differ diff --git a/helm/www/matita/docs/tutorial/retr-2.png b/helm/www/matita/docs/tutorial/retr-2.png new file mode 100644 index 000000000..69f3827b8 Binary files /dev/null and b/helm/www/matita/docs/tutorial/retr-2.png differ diff --git a/helm/www/matita/docs/tutorial/retr-3.png b/helm/www/matita/docs/tutorial/retr-3.png new file mode 100644 index 000000000..05e558259 Binary files /dev/null and b/helm/www/matita/docs/tutorial/retr-3.png differ diff --git a/helm/www/matita/docs/tutorial/retr-4.png b/helm/www/matita/docs/tutorial/retr-4.png new file mode 100644 index 000000000..b8d1f00f8 Binary files /dev/null and b/helm/www/matita/docs/tutorial/retr-4.png differ diff --git a/helm/www/matita/docs/tutorial/retr2.png b/helm/www/matita/docs/tutorial/retr2.png new file mode 100644 index 000000000..6924a4e58 Binary files /dev/null and b/helm/www/matita/docs/tutorial/retr2.png differ diff --git a/helm/www/matita/docs/tutorial/sh_gedit.css b/helm/www/matita/docs/tutorial/sh_gedit.css new file mode 100644 index 000000000..a156d8236 --- /dev/null +++ b/helm/www/matita/docs/tutorial/sh_gedit.css @@ -0,0 +1,66 @@ +pre.sh_sourceCode { + background-color: white; + color: black; + font-style: normal; + font-weight: normal; +} + +pre.sh_sourceCode .sh_keyword { color: brown; font-weight: bold; } /* language keywords */ +pre.sh_sourceCode .sh_type { color: darkgreen; font-weight: bold; } /* basic types */ +pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */ +pre.sh_sourceCode .sh_string { color: magenta; font-family: monospace; } /* strings and chars */ +pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */ +pre.sh_sourceCode .sh_specialchar { color: pink; font-family: monospace; } /* e.g., \n, \t, \\ */ +pre.sh_sourceCode .sh_comment { color: blue; } /* comments */ +pre.sh_sourceCode .sh_number { color: black; } /* literal numbers */ +pre.sh_sourceCode .sh_preproc { color: MediumSeaGreen; } /* e.g., #include, import */ +pre.sh_sourceCode .sh_symbol { color:brown; font-weight: bold; } /* e.g., <, >, + */ +pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */ +pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */ +pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: cyan; } /* TODO and FIXME */ + +/* Predefined variables and functions (for instance glsl) */ +pre.sh_sourceCode .sh_predef_var { color: darkblue; } +pre.sh_sourceCode .sh_predef_func { color: darkblue; font-weight: bold; } + +/* for OOP */ +pre.sh_sourceCode .sh_classname { color: teal; } + +/* line numbers (not yet implemented) */ +pre.sh_sourceCode .sh_linenum { color: black; font-family: monospace; } + +/* Internet related */ +pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; } + +/* for ChangeLog and Log files */ +pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; } +pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: darkblue; font-weight: bold; } +pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: darkgreen; } + +/* for Prolog, Perl... */ +pre.sh_sourceCode .sh_variable { color: darkgreen; } + +/* for LaTeX */ +pre.sh_sourceCode .sh_italics { color: darkgreen; font-style: italic; } +pre.sh_sourceCode .sh_bold { color: darkgreen; font-weight: bold; } +pre.sh_sourceCode .sh_underline { color: darkgreen; text-decoration: underline; } +pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; } +pre.sh_sourceCode .sh_argument { color: darkgreen; } +pre.sh_sourceCode .sh_optionalargument { color: purple; } +pre.sh_sourceCode .sh_math { color: orange; } +pre.sh_sourceCode .sh_bibtex { color: blue; } + +/* for diffs */ +pre.sh_sourceCode .sh_oldfile { color: orange; } +pre.sh_sourceCode .sh_newfile { color: darkgreen; } +pre.sh_sourceCode .sh_difflines { color: blue; } + +/* for css */ +pre.sh_sourceCode .sh_selector { color: purple; } +pre.sh_sourceCode .sh_property { color: blue; } +pre.sh_sourceCode .sh_value { color: darkgreen; font-style: italic; } + +/* other */ +pre.sh_sourceCode .sh_section { color: black; font-weight: bold; } +pre.sh_sourceCode .sh_paren { color: red; } +pre.sh_sourceCode .sh_attribute { color: darkgreen; } diff --git a/helm/www/matita/docs/tutorial/sh_grafite.js b/helm/www/matita/docs/tutorial/sh_grafite.js new file mode 100644 index 000000000..2e6bcdff4 --- /dev/null +++ b/helm/www/matita/docs/tutorial/sh_grafite.js @@ -0,0 +1,71 @@ +if (! this.sh_languages) { + this.sh_languages = {}; +} +sh_languages['grafite'] = [ + [ + [ + /\b(?:napply|ncases|nelim|nletin|ncut|nauto|nwhd|nnormalize|nassumption|ngeneralize|nchange|nrewrite|nlapply)\b/g, + 'sh_preproc', + -1 + ], + [ + /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g, + 'sh_number', + -1 + ], + [ + /"/g, + 'sh_string', + 1 + ], + [ + /\b(?:match|with|in|naxiom|nlemma|ntheorem|nrecord|for|ninductive|ncoinductive|ndefinition|nlet|rec|corec|notation|interpretation|nqed|include)\b/g, + 'sh_keyword', + -1 + ], + [ + /\(\*/g, + 'sh_comment', + 2 + ], + [ + /\b(?:CProp|Type|Prop)\b/g, + 'sh_type', + -1 + ], + [ + /\[|\]|\||\$|@|\{|\}/g, + 'sh_symbol', + -1 + ] + ], + [ + [ + /$/g, + null, + -2 + ], + [ + /\\(?:\\|")/g, + null, + -1 + ], + [ + /"/g, + 'sh_string', + -2 + ] + ], + [ + [ + /\*\)/g, + 'sh_comment', + -2 + ], + [ + /\(\*/g, + 'sh_comment', + 2 + ] + ] +]; diff --git a/helm/www/matita/docs/tutorial/sh_main.js b/helm/www/matita/docs/tutorial/sh_main.js new file mode 100644 index 000000000..1fe3ea078 --- /dev/null +++ b/helm/www/matita/docs/tutorial/sh_main.js @@ -0,0 +1,538 @@ +/* +SHJS - Syntax Highlighting in JavaScript +Copyright (C) 2007, 2008 gnombat@users.sourceforge.net +License: http://shjs.sourceforge.net/doc/gplv3.html +*/ + +if (! this.sh_languages) { + this.sh_languages = {}; +} +var sh_requests = {}; + +function sh_isEmailAddress(url) { + if (/^mailto:/.test(url)) { + return false; + } + return url.indexOf('@') !== -1; +} + +function sh_setHref(tags, numTags, inputString) { + var url = inputString.substring(tags[numTags - 2].pos, tags[numTags - 1].pos); + if (url.length >= 2 && url.charAt(0) === '<' && url.charAt(url.length - 1) === '>') { + url = url.substr(1, url.length - 2); + } + if (sh_isEmailAddress(url)) { + url = 'mailto:' + url; + } + tags[numTags - 2].node.href = url; +} + +/* +Konqueror has a bug where the regular expression /$/g will not match at the end +of a line more than once: + + var regex = /$/g; + var match; + + var line = '1234567890'; + regex.lastIndex = 10; + match = regex.exec(line); + + var line2 = 'abcde'; + regex.lastIndex = 5; + match = regex.exec(line2); // fails +*/ +function sh_konquerorExec(s) { + var result = ['']; + result.index = s.length; + result.input = s; + return result; +} + +/** +Highlights all elements containing source code in a text string. The return +value is an array of objects, each representing an HTML start or end tag. Each +object has a property named pos, which is an integer representing the text +offset of the tag. Every start tag also has a property named node, which is the +DOM element started by the tag. End tags do not have this property. +@param inputString a text string +@param language a language definition object +@return an array of tag objects +*/ +function sh_highlightString(inputString, language) { + if (/Konqueror/.test(navigator.userAgent)) { + if (! language.konquered) { + for (var s = 0; s < language.length; s++) { + for (var p = 0; p < language[s].length; p++) { + var r = language[s][p][0]; + if (r.source === '$') { + r.exec = sh_konquerorExec; + } + } + } + language.konquered = true; + } + } + + var a = document.createElement('a'); + var span = document.createElement('span'); + + // the result + var tags = []; + var numTags = 0; + + // each element is a pattern object from language + var patternStack = []; + + // the current position within inputString + var pos = 0; + + // the name of the current style, or null if there is no current style + var currentStyle = null; + + var output = function(s, style) { + var length = s.length; + // this is more than just an optimization - we don't want to output empty elements + if (length === 0) { + return; + } + if (! style) { + var stackLength = patternStack.length; + if (stackLength !== 0) { + var pattern = patternStack[stackLength - 1]; + // check whether this is a state or an environment + if (! pattern[3]) { + // it's not a state - it's an environment; use the style for this environment + style = pattern[1]; + } + } + } + if (currentStyle !== style) { + if (currentStyle) { + tags[numTags++] = {pos: pos}; + if (currentStyle === 'sh_url') { + sh_setHref(tags, numTags, inputString); + } + } + if (style) { + var clone; + if (style === 'sh_url') { + clone = a.cloneNode(false); + } + else { + clone = span.cloneNode(false); + } + clone.className = style; + tags[numTags++] = {node: clone, pos: pos}; + } + } + pos += length; + currentStyle = style; + }; + + var endOfLinePattern = /\r\n|\r|\n/g; + endOfLinePattern.lastIndex = 0; + var inputStringLength = inputString.length; + while (pos < inputStringLength) { + var start = pos; + var end; + var startOfNextLine; + var endOfLineMatch = endOfLinePattern.exec(inputString); + if (endOfLineMatch === null) { + end = inputStringLength; + startOfNextLine = inputStringLength; + } + else { + end = endOfLineMatch.index; + startOfNextLine = endOfLinePattern.lastIndex; + } + + var line = inputString.substring(start, end); + + var matchCache = []; + for (;;) { + var posWithinLine = pos - start; + + var stateIndex; + var stackLength = patternStack.length; + if (stackLength === 0) { + stateIndex = 0; + } + else { + // get the next state + stateIndex = patternStack[stackLength - 1][2]; + } + + var state = language[stateIndex]; + var numPatterns = state.length; + var mc = matchCache[stateIndex]; + if (! mc) { + mc = matchCache[stateIndex] = []; + } + var bestMatch = null; + var bestPatternIndex = -1; + for (var i = 0; i < numPatterns; i++) { + var match; + if (i < mc.length && (mc[i] === null || posWithinLine <= mc[i].index)) { + match = mc[i]; + } + else { + var regex = state[i][0]; + regex.lastIndex = posWithinLine; + match = regex.exec(line); + mc[i] = match; + } + if (match !== null && (bestMatch === null || match.index < bestMatch.index)) { + bestMatch = match; + bestPatternIndex = i; + if (match.index === posWithinLine) { + break; + } + } + } + + if (bestMatch === null) { + output(line.substring(posWithinLine), null); + break; + } + else { + // got a match + if (bestMatch.index > posWithinLine) { + output(line.substring(posWithinLine, bestMatch.index), null); + } + + var pattern = state[bestPatternIndex]; + + var newStyle = pattern[1]; + var matchedString; + if (newStyle instanceof Array) { + for (var subexpression = 0; subexpression < newStyle.length; subexpression++) { + matchedString = bestMatch[subexpression + 1]; + output(matchedString, newStyle[subexpression]); + } + } + else { + matchedString = bestMatch[0]; + output(matchedString, newStyle); + } + + switch (pattern[2]) { + case -1: + // do nothing + break; + case -2: + // exit + patternStack.pop(); + break; + case -3: + // exitall + patternStack.length = 0; + break; + default: + // this was the start of a delimited pattern or a state/environment + patternStack.push(pattern); + break; + } + } + } + + // end of the line + if (currentStyle) { + tags[numTags++] = {pos: pos}; + if (currentStyle === 'sh_url') { + sh_setHref(tags, numTags, inputString); + } + currentStyle = null; + } + pos = startOfNextLine; + } + + return tags; +} + +//////////////////////////////////////////////////////////////////////////////// +// DOM-dependent functions + +function sh_getClasses(element) { + var result = []; + var htmlClass = element.className; + if (htmlClass && htmlClass.length > 0) { + var htmlClasses = htmlClass.split(' '); + for (var i = 0; i < htmlClasses.length; i++) { + if (htmlClasses[i].length > 0) { + result.push(htmlClasses[i]); + } + } + } + return result; +} + +function sh_addClass(element, name) { + var htmlClasses = sh_getClasses(element); + for (var i = 0; i < htmlClasses.length; i++) { + if (name.toLowerCase() === htmlClasses[i].toLowerCase()) { + return; + } + } + htmlClasses.push(name); + element.className = htmlClasses.join(' '); +} + +/** +Extracts the tags from an HTML DOM NodeList. +@param nodeList a DOM NodeList +@param result an object with text, tags and pos properties +*/ +function sh_extractTagsFromNodeList(nodeList, result) { + var length = nodeList.length; + for (var i = 0; i < length; i++) { + var node = nodeList.item(i); + switch (node.nodeType) { + case 1: + if (node.nodeName.toLowerCase() === 'br') { + var terminator; + if (/MSIE/.test(navigator.userAgent)) { + terminator = '\r'; + } + else { + terminator = '\n'; + } + result.text.push(terminator); + result.pos++; + } + else { + result.tags.push({node: node.cloneNode(false), pos: result.pos}); + sh_extractTagsFromNodeList(node.childNodes, result); + result.tags.push({pos: result.pos}); + } + break; + case 3: + case 4: + result.text.push(node.data); + result.pos += node.length; + break; + } + } +} + +/** +Extracts the tags from the text of an HTML element. The extracted tags will be +returned as an array of tag objects. See sh_highlightString for the format of +the tag objects. +@param element a DOM element +@param tags an empty array; the extracted tag objects will be returned in it +@return the text of the element +@see sh_highlightString +*/ +function sh_extractTags(element, tags) { + var result = {}; + result.text = []; + result.tags = tags; + result.pos = 0; + sh_extractTagsFromNodeList(element.childNodes, result); + return result.text.join(''); +} + +/** +Merges the original tags from an element with the tags produced by highlighting. +@param originalTags an array containing the original tags +@param highlightTags an array containing the highlighting tags - these must not overlap +@result an array containing the merged tags +*/ +function sh_mergeTags(originalTags, highlightTags) { + var numOriginalTags = originalTags.length; + if (numOriginalTags === 0) { + return highlightTags; + } + + var numHighlightTags = highlightTags.length; + if (numHighlightTags === 0) { + return originalTags; + } + + var result = []; + var originalIndex = 0; + var highlightIndex = 0; + + while (originalIndex < numOriginalTags && highlightIndex < numHighlightTags) { + var originalTag = originalTags[originalIndex]; + var highlightTag = highlightTags[highlightIndex]; + + if (originalTag.pos <= highlightTag.pos) { + result.push(originalTag); + originalIndex++; + } + else { + result.push(highlightTag); + if (highlightTags[highlightIndex + 1].pos <= originalTag.pos) { + highlightIndex++; + result.push(highlightTags[highlightIndex]); + highlightIndex++; + } + else { + // new end tag + result.push({pos: originalTag.pos}); + + // new start tag + highlightTags[highlightIndex] = {node: highlightTag.node.cloneNode(false), pos: originalTag.pos}; + } + } + } + + while (originalIndex < numOriginalTags) { + result.push(originalTags[originalIndex]); + originalIndex++; + } + + while (highlightIndex < numHighlightTags) { + result.push(highlightTags[highlightIndex]); + highlightIndex++; + } + + return result; +} + +/** +Inserts tags into text. +@param tags an array of tag objects +@param text a string representing the text +@return a DOM DocumentFragment representing the resulting HTML +*/ +function sh_insertTags(tags, text) { + var doc = document; + + var result = document.createDocumentFragment(); + var tagIndex = 0; + var numTags = tags.length; + var textPos = 0; + var textLength = text.length; + var currentNode = result; + + // output one tag or text node every iteration + while (textPos < textLength || tagIndex < numTags) { + var tag; + var tagPos; + if (tagIndex < numTags) { + tag = tags[tagIndex]; + tagPos = tag.pos; + } + else { + tagPos = textLength; + } + + if (tagPos <= textPos) { + // output the tag + if (tag.node) { + // start tag + var newNode = tag.node; + currentNode.appendChild(newNode); + currentNode = newNode; + } + else { + // end tag + currentNode = currentNode.parentNode; + } + tagIndex++; + } + else { + // output text + currentNode.appendChild(doc.createTextNode(text.substring(textPos, tagPos))); + textPos = tagPos; + } + } + + return result; +} + +/** +Highlights an element containing source code. Upon completion of this function, +the element will have been placed in the "sh_sourceCode" class. +@param element a DOM
     element containing the source code to be highlighted
    +@param  language  a language definition object
    +*/
    +function sh_highlightElement(element, language) {
    +  sh_addClass(element, 'sh_sourceCode');
    +  var originalTags = [];
    +  var inputString = sh_extractTags(element, originalTags);
    +  var highlightTags = sh_highlightString(inputString, language);
    +  var tags = sh_mergeTags(originalTags, highlightTags);
    +  var documentFragment = sh_insertTags(tags, inputString);
    +  while (element.hasChildNodes()) {
    +    element.removeChild(element.firstChild);
    +  }
    +  element.appendChild(documentFragment);
    +}
    +
    +function sh_getXMLHttpRequest() {
    +  if (window.ActiveXObject) {
    +    return new ActiveXObject('Msxml2.XMLHTTP');
    +  }
    +  else if (window.XMLHttpRequest) {
    +    return new XMLHttpRequest();
    +  }
    +  throw 'No XMLHttpRequest implementation available';
    +}
    +
    +function sh_load(language, element, prefix, suffix) {
    +  if (language in sh_requests) {
    +    sh_requests[language].push(element);
    +    return;
    +  }
    +  sh_requests[language] = [element];
    +  var request = sh_getXMLHttpRequest();
    +  var url = prefix + 'sh_' + language + suffix;
    +  request.open('GET', url, true);
    +  request.onreadystatechange = function () {
    +    if (request.readyState === 4) {
    +      try {
    +        if (! request.status || request.status === 200) {
    +          eval(request.responseText);
    +          var elements = sh_requests[language];
    +          for (var i = 0; i < elements.length; i++) {
    +            sh_highlightElement(elements[i], sh_languages[language]);
    +          }
    +        }
    +        else {
    +          throw 'HTTP error: status ' + request.status;
    +        }
    +      }
    +      finally {
    +        request = null;
    +      }
    +    }
    +  };
    +  request.send(null);
    +}
    +
    +/**
    +Highlights all elements containing source code on the current page. Elements
    +containing source code must be "pre" elements with a "class" attribute of
    +"sh_LANGUAGE", where LANGUAGE is a valid language identifier; e.g., "sh_java"
    +identifies the element as containing "java" language source code.
    +*/
    +function sh_highlightDocument(prefix, suffix) {
    +  var nodeList = document.getElementsByTagName('pre');
    +  for (var i = 0; i < nodeList.length; i++) {
    +    var element = nodeList.item(i);
    +    var htmlClasses = sh_getClasses(element);
    +    for (var j = 0; j < htmlClasses.length; j++) {
    +      var htmlClass = htmlClasses[j].toLowerCase();
    +      if (htmlClass === 'sh_sourcecode') {
    +        continue;
    +      }
    +      if (htmlClass.substr(0, 3) === 'sh_') {
    +        var language = htmlClass.substring(3);
    +        if (language in sh_languages) {
    +          sh_highlightElement(element, sh_languages[language]);
    +        }
    +        else if (typeof(prefix) === 'string' && typeof(suffix) === 'string') {
    +          sh_load(language, element, prefix, suffix);
    +        }
    +        else {
    +          throw 'Found 
     element with class="' + htmlClass + '", but no such language exists';
    +        }
    +        break;
    +      }
    +    }
    +  }
    +}
    diff --git a/helm/www/matita/docs/tutorial/xcover-set-1.png b/helm/www/matita/docs/tutorial/xcover-set-1.png
    new file mode 100644
    index 000000000..bf4b91bc9
    Binary files /dev/null and b/helm/www/matita/docs/tutorial/xcover-set-1.png differ
    diff --git a/helm/www/matita/docs/tutorial/xcover-set-2.png b/helm/www/matita/docs/tutorial/xcover-set-2.png
    new file mode 100644
    index 000000000..b3db5698e
    Binary files /dev/null and b/helm/www/matita/docs/tutorial/xcover-set-2.png differ
    diff --git a/helm/www/matita/docs/tutorial/xcover-set-3.png b/helm/www/matita/docs/tutorial/xcover-set-3.png
    new file mode 100644
    index 000000000..0ddce7772
    Binary files /dev/null and b/helm/www/matita/docs/tutorial/xcover-set-3.png differ
    diff --git a/helm/www/matita/docs/tutorial/xcover-set-4.png b/helm/www/matita/docs/tutorial/xcover-set-4.png
    new file mode 100644
    index 000000000..fe67ec241
    Binary files /dev/null and b/helm/www/matita/docs/tutorial/xcover-set-4.png differ
    diff --git a/helm/www/matita/download.shtml b/helm/www/matita/download.shtml
    index f6b7984b6..34565a11b 100644
    --- a/helm/www/matita/download.shtml
    +++ b/helm/www/matita/download.shtml
    @@ -44,10 +44,13 @@
     	trivial, we thus suggest that you try the live DVD instead. 
           
     
    -      

    Old releases (unsupported)

    +

    Old releases (unsupported, but still used for teaching at the University of Bologna)

    - Version is 0.5.8, released on January 8, 2010. Here the - ChangeLog. + Version is 0.5.9, released on December 23, 2014. + It is an update of version 0.5.8 to compile with the latter OCaml version + and libraries. +

    Live CD
    @@ -58,31 +61,33 @@
    The live CD (around 530 MB, md5sum: 9a6912765eacaaa7f96d7d6d6b34add5 - ) + ) for Matita version 0.5.8 is the easiest way to try Matita. You can burn the CD image and boot you computer from the CD, or install a free emulator like virtualbox and boot a virtual machine from the CD image. Virtualbox is available for Mac OS X, Windows and Linux. A short guide to VirtualBox is part of the - Matita manual
    + Matita manual
    .deb package
    + +
    We provide the Debian packages for matita (md5sum 1f7ff2c99fcf73380e6137ba4e6b537e) and its doc (md5sum 14b255f5dfd984acda2ffd7ab154ac8f) for Wheezy amd64.
    -
    Matita is part of the Matita is part of the Debian archive, you can install it with the following command:
    aptitude install matita
    -
    + -->
    Sources
    You can download the sources of Matita (around 6 MB, md5sum: -125223d3dc522c4ac063a66f5d46df69 + href="FILES/matita-0.5.9.tar.gz">sources of Matita (around 6 MB, md5sum: +0f2f66a4a8acc5f48b2cd77cfd8d824e ) and build it by yourself, following the installation instructions. + href="docs/manual-0.5.9/sec_install.html">installation instructions. The build process, due to the high number of external dependency is not trivial, we thus suggest you to try the live CD or the .deb package first.
    diff --git a/helm/www/matita/library.shtml b/helm/www/matita/library.shtml index e5aa7316e..d065b7a9f 100644 --- a/helm/www/matita/library.shtml +++ b/helm/www/matita/library.shtml @@ -42,7 +42,7 @@

    The CerCo project is a FET Open IST project funded by the EU community in the 7th Framework Programme. More informations on the project and the code of the Matita formalization can be found - on the CerCo Web site + on the CerCo Web site

    The Basic Picture

    diff --git a/helm/www/matita/news.shtml b/helm/www/matita/news.shtml index daa6cc5b8..d8a363c91 100644 --- a/helm/www/matita/news.shtml +++ b/helm/www/matita/news.shtml @@ -3,6 +3,9 @@
    News
      +
    • 23 December 2014
      + Legacy matita release 0.5.9 available for download. +
    • 13 March 2012
      The Matita web app is now publicly accessible online (go).