let module S = CicSubstitution in
let module T = CicTypeChecker in
let newmeta = ProofEngineHelpers.new_meta_of_proof ~proof in
+ let ok_types ty menv =
+ List.for_all (fun (_, _, mt) -> mt = ty) menv
+ in
let rec aux index newmeta = function
| [] -> [], newmeta
| (Some (_, C.Decl (term)))::tl ->
in (
match head with
| C.Appl [C.MutInd (uri, _, _); ty; t1; t2]
- when UriManager.eq uri eq_uri ->
- Printf.printf "OK: %s\n" (CicPp.ppterm term);
+ when (UriManager.eq uri eq_uri) && (ok_types ty newmetas) ->
+ debug_print (
+ Printf.sprintf "OK: %s" (CicPp.ppterm term));
+(* debug_print ( *)
+(* Printf.sprintf "args: %s\n" *)
+(* (String.concat ", " (List.map CicPp.ppterm args))); *)
+(* debug_print ( *)
+(* Printf.sprintf "newmetas:\n%s\n" *)
+(* (print_metasenv newmetas)); *)
let o = !Utils.compare_terms t1 t2 in
let w = compute_equality_weight ty t1 t2 in
let proof = BasicProof p in
let iseq uri =
(UriManager.eq uri eq_uri1) || (UriManager.eq uri eq_uri2)
in
+ let ok_types ty menv =
+ List.for_all (fun (_, _, mt) -> mt = ty) menv
+ in
let rec aux newmeta = function
| [] -> [], newmeta
| (term, termty)::tl ->
C.Appl (term::args)
in (
match head with
- | C.Appl [C.MutInd (uri, _, _); ty; t1; t2] when iseq uri ->
- Printf.printf "OK: %s\n" (CicPp.ppterm term);
+ | C.Appl [C.MutInd (uri, _, _); ty; t1; t2]
+ when (iseq uri) && (ok_types ty newmetas) ->
+ debug_print (
+ Printf.sprintf "OK: %s" (CicPp.ppterm term));
let o = !Utils.compare_terms t1 t2 in
let w = compute_equality_weight ty t1 t2 in
let proof = BasicProof p in