aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Theo Zimmermann <theo.zimmermann@ens.fr>2015-06-16 15:47:25 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-06-23 15:03:08 +0200
commitae7568b19bd9b19db153a9711ccf6a7e0e7caf6e (patch)
treed61297b7a3bf20e82f45ce9ac9aaf67bd6faff82
parent5b9e2af49194adba609a748bb8ac03016fec4b07 (diff)
Add comments.
-rw-r--r--tactics/rewrite.ml17
1 files changed, 14 insertions, 3 deletions
diff --git a/tactics/rewrite.ml b/tactics/rewrite.ml
index 6d26e91c6..b442ca98b 100644
--- a/tactics/rewrite.ml
+++ b/tactics/rewrite.ml
@@ -631,13 +631,19 @@ let poly_inverse sort =
type rewrite_proof =
| RewPrf of constr * constr
+ (** A Relation (R : rew_car -> rew_car -> Prop) and a proof of R rew_from rew_to *)
| RewCast of cast_kind
+ (** A proof of convertibility (with casts) *)
type rewrite_result_info = {
rew_car : constr;
+ (** A type *)
rew_from : constr;
+ (** A term of type rew_car *)
rew_to : constr;
+ (** A term of type rew_car *)
rew_prf : rewrite_proof;
+ (** A proof of rew_from == rew_to *)
rew_evars : evars;
}
@@ -646,9 +652,14 @@ type rewrite_result =
| Identity
| Success of rewrite_result_info
-type 'a pure_strategy = 'a -> Environ.env -> Id.t list -> constr -> types ->
- (bool (* prop *) * constr option) -> evars ->
- 'a * rewrite_result
+type 'a pure_strategy =
+ 'a -> (* a parameter: for instance, a state *)
+ Environ.env ->
+ Id.t list -> (* Unfresh names *)
+ constr -> types -> (* first term and its type (convertible to rew_from) *)
+ (bool (* prop *) * constr option) ->
+ evars ->
+ 'a * rewrite_result (* the updated state for instance and the "result" *)
type strategy = unit pure_strategy