]> matita.cs.unibo.it Git - helm.git/blob - components/tactics/setoids.mli
matita 0.5.1 tagged
[helm.git] / components / tactics / setoids.mli
1 (************************************************************************)
2 (*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
3 (* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4 (*   \VV/  **************************************************************)
5 (*    //   *      This file is distributed under the terms of the       *)
6 (*         *       GNU Lesser General Public License Version 2.1        *)
7 (************************************************************************)
8
9 (*i $Id: setoid_replace.mli 8779 2006-05-02 20:59:21Z letouzey $ i*)
10
11 type relation =
12    { rel_a: Cic.term ;
13      rel_aeq: Cic.term;
14      rel_refl: Cic.term option;
15      rel_sym: Cic.term option;
16      rel_trans : Cic.term option;
17      rel_quantifiers_no: int  (* it helps unification *);
18      rel_X_relation_class: Cic.term;
19      rel_Xreflexive_relation_class: Cic.term
20    }
21
22 type 'a relation_class =
23    Relation of 'a    (* the [rel_aeq] of the relation or the relation*)
24  | Leibniz of Cic.term option  (* the [carrier] (if [eq] is partially instantiated)*)
25
26 type 'a morphism =
27     { args : (bool option * 'a relation_class) list;
28       output : 'a relation_class;
29       lem : Cic.term;
30       morphism_theory : Cic.term
31     }
32
33 type morphism_signature = (bool option * Cic.term) list * Cic.term
34
35 val register_replace : (Cic.term -> Cic.term -> ProofEngineTypes.tactic) -> unit
36 val register_general_rewrite : (bool -> Cic.term -> ProofEngineTypes.tactic) -> unit
37
38 val print_setoids : unit -> unit
39
40 val equiv_list : unit -> Cic.term list
41 val default_relation_for_carrier :
42   ?filter:(relation -> bool) -> Cic.term -> relation relation_class 
43 (* [default_morphism] raises [Not_found] *)
44 val default_morphism :
45   ?filter:(Cic.term morphism -> bool) -> Cic.term -> relation morphism
46
47 val setoid_replace :
48  Cic.term option -> Cic.term -> Cic.term -> new_goals:Cic.term list -> ProofEngineTypes.tactic
49 val setoid_replace_in :
50  string -> Cic.term option -> Cic.term -> Cic.term -> new_goals:Cic.term list ->
51   ProofEngineTypes.tactic
52
53 val general_s_rewrite : bool -> Cic.term -> new_goals:Cic.term list -> ProofEngineTypes.tactic
54 val general_s_rewrite_in :
55  string -> bool -> Cic.term -> new_goals:Cic.term list -> ProofEngineTypes.tactic
56
57 val setoid_reflexivity_tac : ProofEngineTypes.tactic
58 val setoid_symmetry : ProofEngineTypes.tactic
59 val setoid_symmetry_in : string -> ProofEngineTypes.tactic
60 val setoid_transitivity : Cic.term -> ProofEngineTypes.tactic
61
62 val add_relation :
63  string -> Cic.term -> Cic.term -> Cic.term option ->
64   Cic.term option -> Cic.term option -> unit
65
66 val new_named_morphism :
67  string -> Cic.term -> morphism_signature option -> unit
68
69 val relation_table_find : Cic.term -> relation
70 val relation_table_mem : Cic.term -> bool