X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2Finversion.ml;h=3b4000ea4fb6fa1da810db0d300da3455a401ff3;hb=76ec6b95c6f462f7fdedf0bc87354fb874ef4a46;hp=5f90c45ebbee4854c64ebe0e44c5883d7d1773ea;hpb=cd3f9f850d16320dcc8fb1590e1cc9f8ba29e37b;p=helm.git diff --git a/helm/software/components/tactics/inversion.ml b/helm/software/components/tactics/inversion.ml index 5f90c45eb..3b4000ea4 100644 --- a/helm/software/components/tactics/inversion.ml +++ b/helm/software/components/tactics/inversion.ml @@ -183,16 +183,16 @@ let private_inversion_tac ~term = let private_inversion_tac ~term (proof, goal) = (*DEBUG*) debug_print (lazy ("private inversion begins")); - let _,metasenv,_,_, _ = proof in + let _,metasenv,_subst,_,_, _ = proof in let uri_of_eq = match LibraryObjects.eq_URI () with None -> raise EqualityNotDefinedYet | Some uri -> uri in let (_,context,goalty) = CicUtil.lookup_meta goal metasenv in - let termty,_ = T.type_of_aux' metasenv context term CicUniv.empty_ugraph in + let termty,_ = T.type_of_aux' metasenv context term CicUniv.oblivion_ugraph in let uri = baseuri_of_term termty in - let o,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in + let o,_ = CicEnvironment.get_obj CicUniv.oblivion_ugraph uri in let (_,_,typeno,_) = match termty with C.MutInd (uri,typeno,exp_named_subst) -> (uri,exp_named_subst,typeno,[]) @@ -215,7 +215,7 @@ let private_inversion_tac ~term = let parameters_tys = (List.map (fun t -> ( - match (T.type_of_aux' metasenv context t CicUniv.empty_ugraph) with + match (T.type_of_aux' metasenv context t CicUniv.oblivion_ugraph) with (term,graph) -> term)) parameters) in @@ -240,7 +240,7 @@ let private_inversion_tac ~term = (*DEBUG*) debug_print (lazy ("after apply HCUT;reflexivity in private inversion")); (* apply (ledx_ind( lambda x. lambda y, ...)) *) - let t1,metasenv,t3,t4, attrs = proof2 in + let t1,metasenv,_subst,t3,t4, attrs = proof2 in let goal2 = List.hd (List.tl gl1) in let (_,context,_) = CicUtil.lookup_meta goal2 metasenv in (* rightparameters type list *) @@ -261,17 +261,17 @@ let private_inversion_tac ~term = (*DEBUG*) debug_print (lazy ("private inversion: term before refinement: " ^ CicPp.ppterm t)); let (ref_t,_,metasenv'',_) = CicRefine.type_of_aux' metasenv context t - CicUniv.empty_ugraph + CicUniv.oblivion_ugraph in (*DEBUG*) debug_print (lazy ("private inversion: termine after refinement: " ^ CicPp.ppterm ref_t)); - let proof2 = (t1,metasenv'',t3,t4, attrs) in + let proof2 = (t1,metasenv'',_subst,t3,t4, attrs) in let my_apply_tac = let my_apply_tac status = let proof,goals = ProofEngineTypes.apply_tactic (P.apply_tac ref_t) status in let patched_new_goals = - let (_,metasenv''',_,_, _) = proof in + let (_,metasenv''',_subst,_,_, _) = proof in let new_goals = ProofEngineHelpers.compare_metasenvs ~oldmetasenv:metasenv ~newmetasenv:metasenv'' in @@ -305,9 +305,9 @@ let inversion_tac ~term = let module PET = ProofEngineTypes in let inversion_tac ~term (proof, goal) = (*DEBUG*) debug_print (lazy ("inversion begins")); - let _,metasenv,_,_, _ = proof in + let _,metasenv,_subst,_,_, _ = proof in let (_,context,goalty) = CicUtil.lookup_meta goal metasenv in - let termty,_ = T.type_of_aux' metasenv context term CicUniv.empty_ugraph in + let termty,_ = T.type_of_aux' metasenv context term CicUniv.oblivion_ugraph in let uri, typeno = match termty with | Cic.MutInd (uri,typeno,_) @@ -315,7 +315,7 @@ let inversion_tac ~term = | _ -> assert false in (* let uri = baseuri_of_term termty in *) - let obj,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in + let obj,_ = CicEnvironment.get_obj CicUniv.oblivion_ugraph uri in let name,nleft,arity,cons_list = match obj with Cic.InductiveDefinition (tys,_,nleft,_) -> @@ -336,19 +336,19 @@ let inversion_tac ~term = for n = 1 to arity_consno do a := (Cic.Implicit None)::(!a) done; - (* apply i_inv ? ...? H). *) - Cic.Appl ([Cic.Const(uri,[])] @ !a @ [Cic.Rel 1]) + (* apply i_inv ? ...? H). *) + Cic.Appl ([Cic.Const(uri,[])] @ !a @ [term]) in let t = appl_term (arity_length + (List.length cons_list)) inversor_uri in - let (t1,metasenv,t3,t4, attrs) = proof in + let (t1,metasenv,_subst,t3,t4, attrs) = proof in let (ref_t,_,metasenv'',_) = CicRefine.type_of_aux' metasenv context t - CicUniv.empty_ugraph + CicUniv.oblivion_ugraph in - let proof = (t1,metasenv'',t3,t4, attrs) in + let proof = (t1,metasenv'',_subst,t3,t4, attrs) in let proof3,gl3 = ProofEngineTypes.apply_tactic (P.apply_tac ref_t) (proof,goal) in let patched_new_goals = - let (_,metasenv''',_,_, _) = proof3 in + let (_,metasenv''',_subst,_,_, _) = proof3 in let new_goals = ProofEngineHelpers.compare_metasenvs ~oldmetasenv:metasenv ~newmetasenv:metasenv'' in