X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Ftactics%2Finversion.ml;h=e7adcb7a8ac5145496b50e431a4fb5a2750ca9c8;hb=d738a2c22023d2f6df4c60faf4dd18eb1a8ad970;hp=74117f7109dd596602e0d1ee26a23c7a1cd132da;hpb=ec7717f5e0dd4c295ba1cfd57a0a6a46170490ef;p=helm.git diff --git a/components/tactics/inversion.ml b/components/tactics/inversion.ml index 74117f710..e7adcb7a8 100644 --- a/components/tactics/inversion.ml +++ b/components/tactics/inversion.ml @@ -224,7 +224,7 @@ let private_inversion_tac ~term = parameters_tys goalty uri_of_eq in (*DEBUG*) debug_print (lazy ("cut term " ^ CicPp.ppterm cut_term)); debug_print (lazy ("CONTEXT before apply HCUT: " ^ - (CicMetaSubst.ppcontext [] context ))); + (CicMetaSubst.ppcontext ~metasenv [] context ))); debug_print (lazy ("termty " ^ CicPp.ppterm termty)); (* cut DXn=DXn \to GOAL *) let proof1,gl1 = PET.apply_tactic (P.cut_tac cut_term) (proof,goal) in @@ -255,7 +255,7 @@ let private_inversion_tac ~term = debug_print (lazy ("Right param: " ^ (CicPp.ppterm (Cic.Appl rightparameters)))); debug_print (lazy ("CONTEXT before refinement: " ^ - (CicMetaSubst.ppcontext [] context ))); + (CicMetaSubst.ppcontext ~metasenv [] context ))); (*DEBUG*) debug_print (lazy ("private inversion: term before refinement: " ^ CicPp.ppterm t)); let (ref_t,_,metasenv'',_) = CicRefine.type_of_aux' metasenv context t @@ -306,14 +306,17 @@ let inversion_tac ~term = let (_,metasenv,_,_) = 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 uri = baseuri_of_term termty in + let uri, typeno = + match termty with + | Cic.MutInd (uri,typeno,_) + | Cic.Appl(Cic.MutInd (uri,typeno,_)::_) -> uri,typeno + | _ -> assert false + in + (* let uri = baseuri_of_term termty in *) let obj,_ = CicEnvironment.get_obj CicUniv.empty_ugraph uri in let name,nleft,arity,cons_list = match obj with Cic.InductiveDefinition (tys,_,nleft,_) -> - (*we suppose there is only one inductiveType in the definition, - so typeno=0 identically *) - let typeno = 0 in let (name,_,arity,cons_list) = List.nth tys typeno in (name,nleft,arity,cons_list) |_ -> assert false