summaryrefslogtreecommitdiff
path: root/plugins/cc/ccproof.mli
blob: eacbfeac703417f9fe9ed3032b7cd5a01e14ec15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2016     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

open Ccalgo
open Term

type rule=
    Ax of constr
  | SymAx of constr
  | Refl of term
  | Trans of proof*proof
  | Congr of proof*proof
  | Inject of proof*pconstructor*int*int
and proof =
    private {p_lhs:term;p_rhs:term;p_rule:rule}

(** Proof smart constructors *)

val prefl:term -> proof

val pcongr: proof -> proof -> proof

val ptrans: proof -> proof -> proof

val psym: proof -> proof

val pax : (Ccalgo.term * Ccalgo.term) Ccalgo.Constrhash.t ->
           Ccalgo.Constrhash.key -> proof

val psymax :  (Ccalgo.term * Ccalgo.term) Ccalgo.Constrhash.t ->
           Ccalgo.Constrhash.key -> proof

val pinject :  proof -> pconstructor -> int -> int -> proof

(** Proof building functions *)

val equal_proof : forest -> int -> int -> proof

val edge_proof : forest -> (int*int)*equality -> proof

val path_proof : forest -> int -> ((int*int)*equality) list -> proof

val congr_proof :  forest -> int -> int -> proof

val ind_proof : forest -> int -> pa_constructor -> int -> pa_constructor -> proof

(** Main proof building function *)

val build_proof :
  forest ->
  [ `Discr of int * pa_constructor * int * pa_constructor
  | `Prove of int * int ] -> proof