X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_content%2Facic2content.ml;h=ddd1b5ebcd02687a6d9a8834497fc9ebc984bf70;hb=e6c985d94df70748f132df23489ff3b60fd108a5;hp=2c51fe7f80331d23c800fdab42fa9dc78e073bd2;hpb=79d584e8f049226ec9cf68e9e06880ed0d95af51;p=helm.git diff --git a/helm/software/components/acic_content/acic2content.ml b/helm/software/components/acic_content/acic2content.ml index 2c51fe7f8..ddd1b5ebc 100644 --- a/helm/software/components/acic_content/acic2content.ml +++ b/helm/software/components/acic_content/acic2content.ml @@ -369,16 +369,19 @@ let infer_dependent ~headless context metasenv = function let rec build_subproofs_and_args ?(headless=false) seed context metasenv l ~ids_to_inner_types ~ids_to_inner_sorts = let module C = Cic in let module K = Content in - let rec aux = + let rec aux n = function [] -> [],[] | (dep, t)::l1 -> - let subproofs,args = aux l1 in - if (test_for_lifting t ~ids_to_inner_types ~ids_to_inner_sorts) then + let need_lifting = + test_for_lifting t ~ids_to_inner_types ~ids_to_inner_sorts in + let subproofs,args = aux (n + if need_lifting then 1 else 0) l1 in + if need_lifting then let new_subproof = acic2content seed context metasenv - ~name:"H" ~ids_to_inner_types ~ids_to_inner_sorts t in + ~name:("H" ^ string_of_int n) ~ids_to_inner_types + ~ids_to_inner_sorts t in let new_arg = K.Premise { K.premise_id = gen_id premise_prefix seed; @@ -444,7 +447,7 @@ let rec build_subproofs_and_args ?(headless=false) seed context metasenv l ~ids_ | _ -> (K.Term (dep,t))) in subproofs,hd::args in - match (aux (infer_dependent ~headless context metasenv l)) with + match (aux 1 (infer_dependent ~headless context metasenv l)) with [p],args -> [{p with K.proof_name = None}], List.map @@ -939,7 +942,8 @@ and rewrite seed context metasenv name id li ~ids_to_inner_types ~ids_to_inner_s { K.conclude_id = gen_id conclude_prefix seed; K.conclude_aref = id; K.conclude_method = - if UriManager.eq uri HelmLibraryObjects.Logic.eq_ind_URI then + if UriManager.eq uri HelmLibraryObjects.Logic.eq_ind_URI + || LibraryObjects.is_eq_ind_URI uri then "RewriteLR" else "RewriteRL";