diff options
| author | letouzey | 2013-10-24 21:25:12 +0000 |
|---|---|---|
| committer | letouzey | 2013-10-24 21:25:12 +0000 |
| commit | 43050b0d802f74fe59347f61830467a9804fd0d3 (patch) | |
| tree | 563601b09463b12a4c478a4430f1e05dcccc6db1 /plugins | |
| parent | 9e37e3b9695a214040c52082b1e7288df9362b33 (diff) | |
Rtree : cleanup of the comparing code
* Using generic fold functions was unecessarily obscure
* No more List.mem and hence indirect use of ocaml generic comparison
* Rtree.equiv (former Rtree.compare_rtree) has now a less cryptic
semantic...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16934 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/funind/invfun.ml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/funind/invfun.ml b/plugins/funind/invfun.ml index b6a8fdc1a3..4f7a61fbf2 100644 --- a/plugins/funind/invfun.ml +++ b/plugins/funind/invfun.ml @@ -918,7 +918,8 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = | _ -> assert false in let ids = res::hres::graph_principle_id::ids in - (* we also compute fresh names for each hyptohesis of each branche of the principle *) + (* we also compute fresh names for each hyptohesis of each branch + of the principle *) let branches = List.rev princ_infos.branches in let intro_pats = List.map @@ -935,8 +936,12 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = *) let rewrite_tac j ids : tactic = let graph_def = graphs.(j) in - let infos = try find_Function_infos (destConst funcs.(j)) with Not_found -> error "No graph found" in - if infos.is_general || Rtree.is_infinite graph_def.mind_recargs + let infos = + try find_Function_infos (destConst funcs.(j)) + with Not_found -> error "No graph found" + in + if infos.is_general + || Rtree.is_infinite Declareops.eq_recarg graph_def.mind_recargs then let eq_lemma = try Option.get (infos).equation_lemma @@ -945,7 +950,8 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = tclTHENSEQ[ tclMAP h_intro ids; Equality.rewriteLR (mkConst eq_lemma); - (* Don't forget to $\zeta$ normlize the term since the principles have been $\zeta$-normalized *) + (* Don't forget to $\zeta$ normlize the term since the principles + have been $\zeta$-normalized *) h_reduce (Genredexpr.Cbv {Redops.all_flags @@ -956,7 +962,8 @@ let prove_fun_complete funcs graphs schemes lemmas_types_infos i : tactic = h_generalize (List.map mkVar ids); thin ids ] - else unfold_in_concl [(Locus.AllOccurrences, Names.EvalConstRef (destConst f))] + else + unfold_in_concl [(Locus.AllOccurrences, Names.EvalConstRef (destConst f))] in (* The proof of each branche itself *) let ind_number = ref 0 in |
