aboutsummaryrefslogtreecommitdiff
path: root/contrib/recdef
diff options
context:
space:
mode:
authorherbelin2007-05-20 17:44:23 +0000
committerherbelin2007-05-20 17:44:23 +0000
commit9accb5a66da5d68fa01c4c3b8e7b74985e84f6fa (patch)
tree59ccd22002952d3557ee0cb8f0299c232813f2a7 /contrib/recdef
parent08f7d8d83fd0a5f18ae764a21a21b5336a0ce7f5 (diff)
- Propagation des evars non résolues vers les with_bindings; permet par exemple
de résoudre des buts comme celui-ci : Record nat_retract : Type := {f1 : nat -> nat; f2 : nat -> nat; f1_o_f2 : forall x, f1 (f2 x) = x}. Goal nat_retract. exists (fun x => x) (fun x => x). - Nouvelle tentative d'utilisation des types des metas/evars pour inférer de nouvelles instances de metas/evars; permet par exemple d'utiliser f_equal sans option with, mais aussi, avec la modif précédente, de résoudre des buts tels que Goal exists f:bool->Prop, f true = True. exists (fun x => True). [Les expériences passées avaient montré qu'en prenant en compte les types dans l'unification, on peut unifier trop tôt une evars à une mauvaise sorte; à défaut de mécanisme de prise en compte des problème d'unification avec sous-typage, on s'est interdit ici d'unifier des types qui sont des arités.] - Tout les constr de tactic_expr deviennent des open_constr (même si seul with_bindings les accepte au final... c'est pas l'idéal). - Renommage env -> evd et templenv -> env dans clausenv. - Renommage closed_generic_argument -> typed_generic_argument. - Renommage closed_abstract_argument_type -> typed_abstract_argument_type. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9842 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/recdef')
-rw-r--r--contrib/recdef/recdef.ml426
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/recdef/recdef.ml4 b/contrib/recdef/recdef.ml4
index 7a2133a020..49791c3675 100644
--- a/contrib/recdef/recdef.ml4
+++ b/contrib/recdef/recdef.ml4
@@ -416,8 +416,8 @@ let base_leaf_terminate (func:global_reference) eqs expr =
[k';h] -> k',h
| _ -> assert false
in
- tclTHENLIST [observe_tac "first split" (split (ImplicitBindings [expr]));
- observe_tac "second split" (split (ImplicitBindings [delayed_force coq_O]));
+ tclTHENLIST [observe_tac "first split" (split (ImplicitBindings [inj_open expr]));
+ observe_tac "second split" (split (ImplicitBindings [inj_open (delayed_force coq_O)]));
observe_tac "intro k" (h_intro k');
observe_tac "case on k"
(tclTHENS
@@ -459,7 +459,7 @@ let rec compute_le_proofs = function
in
apply_with_bindings
(le_trans,
- ExplicitBindings[dummy_loc,NamedHyp m_id,a])
+ ExplicitBindings[dummy_loc,NamedHyp m_id,inj_open a])
g
)
[compute_le_proofs tl;
@@ -477,7 +477,7 @@ let make_lt_proof pmax le_proof =
in
apply_with_bindings
(le_lt_trans,
- ExplicitBindings[dummy_loc,NamedHyp m_id, pmax]) g)
+ ExplicitBindings[dummy_loc,NamedHyp m_id, inj_open pmax]) g)
[observe_tac "compute_le_proofs" (compute_le_proofs le_proof);
tclTHENLIST[observe_tac "lt_S_n" (apply (delayed_force lt_S_n)); default_full_auto]];;
@@ -496,8 +496,8 @@ let rec list_cond_rewrite k def pmax cond_eqs le_proofs =
tclTHENS
(general_rewrite_bindings false
(mkVar eq,
- ExplicitBindings[dummy_loc, NamedHyp k_id, mkVar k;
- dummy_loc, NamedHyp def_id, mkVar def]) false)
+ ExplicitBindings[dummy_loc, NamedHyp k_id, inj_open (mkVar k);
+ dummy_loc, NamedHyp def_id, inj_open (mkVar def)]) false)
[list_cond_rewrite k def pmax eqs le_proofs;
observe_tac "make_lt_proof" (make_lt_proof pmax le_proofs)] g
)
@@ -515,7 +515,7 @@ let rec introduce_all_equalities func eqs values specs bound le_proofs
let ids = h'::ids in
let def = next_global_ident_away true def_id ids in
tclTHENLIST
- [observe_tac "introduce_all_equalities_final split" (split (ImplicitBindings [s_max]));
+ [observe_tac "introduce_all_equalities_final split" (split (ImplicitBindings [inj_open s_max]));
observe_tac "introduce_all_equalities_final intro k" (h_intro k);
tclTHENS
(observe_tac "introduce_all_equalities_final case k" (simplest_case (mkVar k)))
@@ -575,8 +575,8 @@ let rec introduce_all_values is_mes acc_inv func context_fn
(match args with
[] ->
tclTHENLIST
- [observe_tac "split" (split(ImplicitBindings
- [context_fn (List.map mkVar (List.rev values))]));
+ [observe_tac "split" (split(ImplicitBindings
+ [inj_open (context_fn (List.map mkVar (List.rev values)))]));
observe_tac "introduce_all_equalities" (introduce_all_equalities func eqs
(List.rev values) (List.rev specs) (delayed_force coq_O) [] [])]
| arg::args ->
@@ -1194,9 +1194,9 @@ let rec introduce_all_values_eq cont_tac functional termine
general_rewrite_bindings false
(mkVar heq1,
ExplicitBindings[dummy_loc,NamedHyp k_id,
- f_S(f_S(mkVar pmax));
+ inj_open (f_S(f_S(mkVar pmax)));
dummy_loc,NamedHyp def_id,
- f]) false gls )
+ inj_open f]) false gls )
[tclTHENLIST
[simpl_iter();
unfold_constr (reference_of_constr functional);
@@ -1247,8 +1247,8 @@ let rec introduce_all_values_eq cont_tac functional termine
(mkVar heq,
ExplicitBindings
[dummy_loc, NamedHyp k_id,
- f_S(mkVar pmax');
- dummy_loc, NamedHyp def_id, f]) false))
+ inj_open (f_S(mkVar pmax'));
+ dummy_loc, NamedHyp def_id, inj_open f]) false))
g
)
[tclIDTAC;