]> matita.cs.unibo.it Git - helm.git/blob - components/tactics/paramodulation/equality.mli
existential variables in goal supported
[helm.git] / components / tactics / paramodulation / equality.mli
1 (* Copyright (C) 2006, HELM Team.
2  * 
3  * This file is part of HELM, an Hypertextual, Electronic
4  * Library of Mathematics, developed at the Computer Science
5  * Department, University of Bologna, Italy.
6  * 
7  * HELM is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  * 
12  * HELM is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with HELM; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://helm.cs.unibo.it/
24  *)
25
26 type rule = SuperpositionRight | SuperpositionLeft | Demodulation
27
28 type equality 
29
30 and proof =
31     Exact of Cic.term
32   | Step of Subst.substitution * (rule * int * (Utils.pos * int) * Cic.term)
33
34 and goal_proof = (Utils.pos * int * Subst.substitution * Cic.term) list
35
36 val pp_proof: (Cic.name option) list -> goal_proof -> proof -> string
37
38 val reset : unit -> unit
39
40 val mk_equality :
41   int * proof * 
42   (Cic.term * Cic.term * Cic.term * Utils.comparison) *
43   Cic.metasenv -> 
44     equality
45
46 val mk_tmp_equality :
47   int * (Cic.term * Cic.term * Cic.term * Utils.comparison) * Cic.metasenv -> 
48     equality
49     
50 val open_equality :
51   equality ->
52     int * proof * 
53     (Cic.term * Cic.term * Cic.term * Utils.comparison) *
54     Cic.metasenv * int
55 val depend : equality -> int -> bool
56 val compare : equality -> equality -> int
57 val string_of_equality : ?env:Utils.environment -> equality -> string
58 val string_of_proof : 
59   ?names:(Cic.name option)list -> proof -> goal_proof -> string
60 val build_proof_term: 
61   proof -> Cic.term
62 (* given a proof and a list of meta indexes we are interested in the
63  * instantiation gives back the cic proof and the list of instantiations *)  
64 (* build_goal_proof [goal_proof] [initial_proof] [ty] 
65  *  [ty] is the type of the goal *)
66 val build_goal_proof: 
67   goal_proof -> Cic.term -> Cic.term-> int list -> Cic.term * Cic.term list
68 val refl_proof: Cic.term -> Cic.term -> Cic.term 
69 (** ensures that metavariables in equality are unique *)
70 val fix_metas: int -> equality -> int * equality
71 val metas_of_proof: proof -> int list
72
73 exception TermIsNotAnEquality;;
74
75 (**
76    raises TermIsNotAnEquality if term is not an equation.
77    The first Cic.term is a proof of the equation
78 *)
79 val equality_of_term: Cic.term -> Cic.term -> equality
80
81 (**
82    Re-builds the term corresponding to this equality
83 *)
84 val term_of_equality: equality -> Cic.term
85 val term_is_equality: Cic.term -> bool
86
87 (** tests a sort of alpha-convertibility between the two terms, but on the
88     metavariables *)
89 val meta_convertibility: Cic.term -> Cic.term -> bool
90
91 (** meta convertibility between two equations *)
92 val meta_convertibility_eq: equality -> equality -> bool
93
94 val is_weak_identity: equality -> bool
95 val is_identity: Utils.environment -> equality -> bool