X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fcic_disambiguation%2Fdisambiguate.ml;h=cb4d85cfd245fafb088410a89b092dd4b8375972;hb=4f12c6bc7fb5f1ba3bd42f78abddb77b3b0a8f93;hp=d3af052564b5e206303d8adb7338203f6f280592;hpb=8f9d476c32c48d14348a61889dc191c7696bd404;p=helm.git diff --git a/helm/software/components/cic_disambiguation/disambiguate.ml b/helm/software/components/cic_disambiguation/disambiguate.ml index d3af05256..cb4d85cfd 100644 --- a/helm/software/components/cic_disambiguation/disambiguate.ml +++ b/helm/software/components/cic_disambiguation/disambiguate.ml @@ -506,10 +506,13 @@ let interpretate_obj ~context ~env ~uri ~is_path obj ~localization_tbl = | CicNotationPt.Theorem (flavour, name, ty, bo) -> let attrs = [`Flavour flavour] in let ty' = interpretate_term [] env None false ty in - (match bo with - None -> + (match bo,flavour with + None,`Axiom -> + Cic.Constant (name,None,ty',[],attrs) + | Some bo,`Axiom -> assert false + | None,_ -> Cic.CurrentProof (name,[],Cic.Implicit None,ty',[],attrs) - | Some bo -> + | Some bo,_ -> let bo' = Some (interpretate_term [] env None false bo) in Cic.Constant (name,bo',ty',[],attrs)) @@ -707,9 +710,15 @@ let domain_of_obj ~context ast = (* dom1 \ dom2 *) let domain_diff dom1 dom2 = (* let domain_diff = Domain.diff *) - let is_in_dom2 = - List.fold_left (fun pred elt -> (fun elt' -> elt' = elt || pred elt')) - (fun _ -> false) dom2 + let is_in_dom2 elt = + List.exists + (function + | Symbol (symb, 0) -> + (match elt with + Symbol (symb',_) when symb = symb' -> true + | _ -> false) + | item -> elt = item + ) dom2 in List.filter (fun (_,elt) -> not (is_in_dom2 elt)) dom1 @@ -830,7 +839,7 @@ let refine_profiler = HExtlib.profile "disambiguate_thing.refine_thing" | item -> item in Environment.find item e - with Not_found -> []) + with Not_found -> lookup_in_library ()) in choices in