X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_omdoc%2Fcontent2cic.ml;h=2cc72933b884cbaca2eeea3ddc2b1d51ed625db3;hb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1;hp=644f55920bd76e72ebb9529ee62ba54a9e0b658e;hpb=f9fb6aea5ebbb04018ce2b9e4a395339b58d8ff9;p=helm.git diff --git a/helm/ocaml/cic_omdoc/content2cic.ml b/helm/ocaml/cic_omdoc/content2cic.ml index 644f55920..2cc72933b 100644 --- a/helm/ocaml/cic_omdoc/content2cic.ml +++ b/helm/ocaml/cic_omdoc/content2cic.ml @@ -149,10 +149,13 @@ let proof2cic deannotate p = (match conclude.Con.conclude_args with [Con.ArgProof p] -> proof2cic [] p (* empty! *) | _ -> prerr_endline "4"; assert false) - else if (conclude.Con.conclude_method = "ByInduction") then + else if (conclude.Con.conclude_method = "ByInduction" || + conclude.Con.conclude_method = "AndInd" || + conclude.Con.conclude_method = "Exists" || + conclude.Con.conclude_method = "FalseInd") then (match (List.tl conclude.Con.conclude_args) with - Con.Term (C.AAppl - id ((C.AConst(idc,uri,exp_named_subst))::params_and_IP))::args -> + Con.Term (C.AAppl ( + id,((C.AConst(idc,uri,exp_named_subst))::params_and_IP)))::args -> let subst = List.map (fun (u,t) -> (u, deannotate t)) exp_named_subst in let cargs = args2cic premise_env args in @@ -238,22 +241,23 @@ let cobj2obj deannotate (id,params,metasenv,obj) = let canonical_context' = List.map (function - _,None -> None - | _,Some (`Declaration d) - | _,Some (`Hypothesis d) -> + None -> None + | Some (`Declaration d) + | Some (`Hypothesis d) -> (match d with {K.dec_name = Some n ; K.dec_type = t} -> Some (Cic.Name n, Cic.Decl (deannotate t)) | _ -> assert false) - | _,Some (`Definition d) -> + | Some (`Definition d) -> (match d with {K.def_name = Some n ; K.def_term = t} -> - Some (Cic.Name n, Cic.Def (deannotate t)) + Some (Cic.Name n, Cic.Def ((deannotate t),None)) | _ -> assert false) - | _,Some (`Proof d) -> + | Some (`Proof d) -> (match d with {K.proof_name = Some n } -> - Some (Cic.Name n, Cic.Def (proof2cic deannotate d)) + Some (Cic.Name n, + Cic.Def ((proof2cic deannotate d),None)) | _ -> assert false) ) canonical_context in