~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to proofs/proof_type.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: proof_type.mli 12168 2009-06-06 21:34:37Z herbelin $ i*)
 
10
 
 
11
(*i*)
 
12
open Environ
 
13
open Evd
 
14
open Names
 
15
open Libnames
 
16
open Term
 
17
open Util
 
18
open Tacexpr
 
19
open Decl_expr
 
20
open Rawterm
 
21
open Genarg
 
22
open Nametab
 
23
open Pattern
 
24
(*i*)
 
25
 
 
26
(* This module defines the structure of proof tree and the tactic type. So, it
 
27
   is used by [Proof_tree] and [Refiner] *)
 
28
 
 
29
type prim_rule =
 
30
  | Intro of identifier
 
31
  | Cut of bool * bool * identifier * types
 
32
  | FixRule of identifier * int * (identifier * int * constr) list * int
 
33
  | Cofix of identifier * (identifier * constr) list * int
 
34
  | Refine of constr
 
35
  | Convert_concl of types * cast_kind 
 
36
  | Convert_hyp of named_declaration
 
37
  | Thin of identifier list
 
38
  | ThinBody of identifier list
 
39
  | Move of bool * identifier * identifier move_location
 
40
  | Order of identifier list
 
41
  | Rename of identifier * identifier
 
42
  | Change_evars
 
43
 
 
44
(* The type [goal sigma] is the type of subgoal. It has the following form
 
45
\begin{verbatim}
 
46
   it    = { evar_concl = [the conclusion of the subgoal]
 
47
             evar_hyps = [the hypotheses of the subgoal]
 
48
             evar_body = Evar_Empty;
 
49
             evar_info = { pgm    : [The Realizer pgm if any]
 
50
                           lc     : [Set of evar num occurring in subgoal] }}
 
51
   sigma = { stamp = [an int chardacterizing the ed field, for quick compare]
 
52
             ed : [A set of existential variables depending in the subgoal]
 
53
               number of first evar,
 
54
               it = { evar_concl = [the type of first evar]
 
55
                      evar_hyps = [the context of the evar]
 
56
                      evar_body = [the body of the Evar if any]
 
57
                      evar_info = { pgm    : [Useless ??]
 
58
                                    lc     : [Set of evars occurring
 
59
                                              in the type of evar] } };
 
60
               ...
 
61
               number of last evar, 
 
62
               it = { evar_concl = [the type of evar]
 
63
                      evar_hyps = [the context of the evar]
 
64
                      evar_body = [the body of the Evar if any]
 
65
                      evar_info = { pgm    : [Useless ??]
 
66
                                    lc     : [Set of evars occurring
 
67
                                              in the type of evar] } } }
 
68
   }
 
69
\end{verbatim}
 
70
*)
 
71
 
 
72
(*s Proof trees. 
 
73
  [ref] = [None] if the goal has still to be proved, 
 
74
  and [Some (r,l)] if the rule [r] was applied to the goal
 
75
  and gave [l] as subproofs to be completed. 
 
76
  if [ref = (Some(Nested(Tactic t,p),l))] then [p] is the proof 
 
77
  that the goal can be proven if the goals in [l] are solved. *)
 
78
type proof_tree = {
 
79
  open_subgoals : int;
 
80
  goal : goal;
 
81
  ref : (rule * proof_tree list) option }
 
82
 
 
83
and rule =
 
84
  | Prim of prim_rule
 
85
  | Nested of compound_rule * proof_tree 
 
86
  | Decl_proof of bool
 
87
  | Daimon
 
88
 
 
89
and compound_rule= 
 
90
  (* the boolean of Tactic tells if the default tactic is used *)
 
91
  | Tactic of tactic_expr * bool
 
92
  | Proof_instr of bool * proof_instr
 
93
 
 
94
and goal = evar_info
 
95
 
 
96
and tactic = goal sigma -> (goal list sigma * validation)
 
97
 
 
98
and validation = (proof_tree list -> proof_tree)
 
99
 
 
100
and tactic_expr =
 
101
  (open_constr,
 
102
   constr_pattern,
 
103
   evaluable_global_reference,
 
104
   inductive,
 
105
   ltac_constant,
 
106
   identifier,
 
107
   glob_tactic_expr)
 
108
     Tacexpr.gen_tactic_expr
 
109
 
 
110
and atomic_tactic_expr =
 
111
  (open_constr,
 
112
   constr_pattern,
 
113
   evaluable_global_reference,
 
114
   inductive,
 
115
   ltac_constant,
 
116
   identifier,
 
117
   glob_tactic_expr)
 
118
     Tacexpr.gen_atomic_tactic_expr
 
119
 
 
120
and tactic_arg =
 
121
  (open_constr,
 
122
   constr_pattern,
 
123
   evaluable_global_reference,
 
124
   inductive,
 
125
   ltac_constant,
 
126
   identifier,
 
127
   glob_tactic_expr)
 
128
     Tacexpr.gen_tactic_arg
 
129
 
 
130
type hyp_location = identifier Tacexpr.raw_hyp_location
 
131
 
 
132
type ltac_call_kind = 
 
133
  | LtacNotationCall of string
 
134
  | LtacNameCall of ltac_constant
 
135
  | LtacAtomCall of glob_atomic_tactic_expr * atomic_tactic_expr option ref
 
136
  | LtacVarCall of identifier * glob_tactic_expr
 
137
  | LtacConstrInterp of rawconstr *
 
138
      ((identifier * constr) list * (identifier * identifier option) list)
 
139
 
 
140
type ltac_trace = (loc * ltac_call_kind) list
 
141
 
 
142
exception LtacLocated of (ltac_call_kind * ltac_trace * loc) * exn
 
143
 
 
144
val abstract_tactic_box : atomic_tactic_expr option ref ref