let is_propositional context sort =
match CicReduction.whd context sort with
| Cic.Sort Cic.Prop
| Cic.Sort (Cic.CProp _) -> true
| _-> false
;;
let is_propositional context sort =
match CicReduction.whd context sort with
| Cic.Sort Cic.Prop
| Cic.Sort (Cic.CProp _) -> true
| _-> false
;;
let is_in_prop context subst metasenv ty =
let sort,u = typeof ~subst metasenv context ty CicUniv.oblivion_ugraph in
is_propositional context sort
let is_in_prop context subst metasenv ty =
let sort,u = typeof ~subst metasenv context ty CicUniv.oblivion_ugraph in
is_propositional context sort
let proof, goalno = status in
let _, metasenv,subst,_,_, _ = proof in
let proof, goalno = status in
let _, metasenv,subst,_,_, _ = proof in
with
| None, active, passive, bag ->
raise (ProofEngineTypes.Fail (lazy ("paramod fails")))
with
| None, active, passive, bag ->
raise (ProofEngineTypes.Fail (lazy ("paramod fails")))
+ (* if the goal is an equality we skip the congruence theorems
+ let candidates =
+ if is_equational_case goalty flags
+ then List.filter not_default_eq_term candidates
+ else candidates
+ in *)
+ let candidates = List.filter (only signature context metasenv) candidates
+ in
=
let goalno, depth, sort = g in
let fake_proof = mk_fake_proof m s g gty context in
=
let goalno, depth, sort = g in
let fake_proof = mk_fake_proof m s g gty context in
in
elems@more_elems, tables, cache, flags
else
in
elems@more_elems, tables, cache, flags
else
in
elems, tables, cache, flags
;;
in
elems, tables, cache, flags
;;
cache_reset_underinspection c,
List.filter (condition_for_prune_hint prune) l
;;
cache_reset_underinspection c,
List.filter (condition_for_prune_hint prune) l
;;
(* elems are possible computations for proving gty *)
let elems, tables, cache, flags =
equational_and_applicative_case dbd
(* elems are possible computations for proving gty *)
let elems, tables, cache, flags =
equational_and_applicative_case dbd
in
let elems = [metasenv,[],1,[],goals,[]] in
let rec aux tables solutions cache elems flags =
in
let elems = [metasenv,[],1,[],goals,[]] in
let rec aux tables solutions cache elems flags =
| Gaveup (tables,cache) ->
solutions,cache, tables
| Proved (metasenv,subst,others,tables,cache) ->
| Gaveup (tables,cache) ->
solutions,cache, tables
| Proved (metasenv,subst,others,tables,cache) ->
- let initial_time = Unix.gettimeofday() in
+ let initial_time = Unix.gettimeofday() in
+ let signature =
+ List.fold_left
+ (fun set g ->
+ MetadataConstraints.UriManagerSet.union set
+ (MetadataQuery.signature_of metasenv g)
+ )
+ MetadataConstraints.UriManagerSet.empty gl
+ in
let goals = order_new_goals metasenv [] gl CicPp.ppterm in
let goals = List.map (fun (x,s) -> D(x,flags.maxdepth,s)) goals in
let elems = [metasenv,[],1,[],goals,[]] in
let goals = order_new_goals metasenv [] gl CicPp.ppterm in
let goals = List.map (fun (x,s) -> D(x,flags.maxdepth,s)) goals in
let elems = [metasenv,[],1,[],goals,[]] in
| Proved (metasenv,subst,_, tables,cache) ->
debug_print(lazy
("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time)));
| Proved (metasenv,subst,_, tables,cache) ->
debug_print(lazy
("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time)));
in
let _,metasenv,subst,_,_, _ = proof in
let _,context,goalty = CicUtil.lookup_meta goal metasenv in
in
let _,metasenv,subst,_,_, _ = proof in
let _,context,goalty = CicUtil.lookup_meta goal metasenv in
+ let signature = MetadataQuery.signature_of metasenv goal in
+ let signature =
+ List.fold_left
+ (fun set t ->
+ let ty, _ =
+ CicTypeChecker.type_of_aux' metasenv context t
+ CicUniv.oblivion_ugraph
+ in
+ MetadataConstraints.UriManagerSet.union set
+ (MetadataConstraints.constants_of ty)
+ )
+ signature univ
+ in
else tables,cache in
let initial_time = Unix.gettimeofday() in
let (_,oldmetasenv,_,_,_, _) = proof in
else tables,cache in
let initial_time = Unix.gettimeofday() in
let (_,oldmetasenv,_,_,_, _) = proof in
let elem =
metasenv,subst,1,[],[D (goal,flags.maxdepth,P)],[]
in
let elem =
metasenv,subst,1,[],[D (goal,flags.maxdepth,P)],[]
in
| Proved (metasenv,subst,_, tables,cache) ->
debug_print (lazy
("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time)));
| Proved (metasenv,subst,_, tables,cache) ->
debug_print (lazy
("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time)));