Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dktactics
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raphael CAUDERLIER
dktactics
Commits
3efe270e
Commit
3efe270e
authored
Dec 14, 2017
by
Raphael Cauderlier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[doc] Documentation of the unification module
parent
481f3b33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
1 deletion
+67
-1
manual.org
manual.org
+67
-1
No files found.
manual.org
View file @
3efe270e
...
...
@@ -693,6 +693,72 @@ combinator) and then uses the classical lemma
* TODO Checking output of automatic theorem provers
** Reasoning modulo AC, ACU, symmetry
** Substitution and unification
** Shallow substitutions and unification
This section describes the features provided by the file
[[./meta/unif.dk][meta/unif.dk]] related to the handling of substitution and
unification. Usually, substitutions are not defined in shallow
embeddings relying on Higher-Order Abstract Syntax (HOAS) because
we have no access to the variables. However, unification is an
important tool for checking proof certificates that are not precise
enough to tell us which substitution to apply.
*** Substitutions
A substitution is usually defined as a finite mapping from
variables to terms. Since we have no precise type for variables in
our shallow embedding, we use lists of pairs of terms (both terms
having the same type).
- =unif.substition : Type=
- =unif.empty_subst : unif.substitution=
- =unif.cons_subst : A : fol.type -> fol.term A -> fol.term A -> unif.substitution -> unif.substitution=
Substitutions can be applied on propositions, terms, and list of terms.
- =unif.subst_prop : unif.substitution -> fol.prop -> fol.prop=
- =unif.subst_term : unif.substitution -> B : fol.type -> fol.term B -> fol.term B=
- =unif.subst_terms : unif.substitution -> Bs : fol.types -> fol.terms Bs -> fol.terms Bs=
These functions are defined by a non-confluent rewrite system
which means that the behaviour of substitution depends on the
order in which the rewrite rules are given. The rules with the
highest priorities are those traversing the structure of the term
or formula such as
=[s,a,b] unif.subst_prop s (fol.and a b) --> fol.and (unif.subst_prop s a) (unif.subst_prop s b)=
If none of these rules is applicable, the term is assumed to be a
variable so we look into the substitution (seen as a list) for
corresponding pair. The comparison is performed by a non-linear
rewrite rule (the second rule):
- =[a] unif.subst_term unif.empty_subst _ a --> a=
- =[A,x,a] unif.subst_term (unif.cons_subst A x a _) A x --> a=
- =[As,s,A,x] unif.subst_term (unif.cons_subst _ _ As s) A x -->
unif.subst_term s A x=
Finally, for technical reasons (see the next section about
unification), the following two rewrite rules are added:
- =[A,a,s,p] unif.subst_prop (unif.cons_subst A a a s) p --> unif.subst_prop s p=
- =[A,a,s,p] unif.subst_prop unif.empty_subst p --> p=
*** Rewrite rules for unification
A (first-order) unification problem is a list of pairs of terms
(both terms having the same type). Unification can either fail or
return a substitution, the most general unifier of the unification
problem.
- =unif.unify_problem : Type=
- =unif.unify_nil : unif.unify_problem=
- =unif.unify_cons : A : fol.type -> fol.term A -> fol.term A -> unif.unify_problem -> unif.unify_problem=
- =unif.unify_result : Type=
- =unif.unify_success : unif.substitution -> unif.unify_result=
- =unif.unify_failure : unif.unify_result=
We will not enter the details of the unification algorithm here,
the entry-point of the unification procedure is =unif.unify :
unif.unify_problem -> unif.unify_result=.
** Resolution
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment