let proofs =
List.map
(function (_,name,_,_,bo) -> `Proof (aux ~name bo)) funs in
+ let fun_name =
+ List.nth (List.map (fun (_,name,_,_,_) -> name) funs) no
+ in
let decreasing_args =
List.map (function (_,_,n,_,_) -> n) funs in
let jo =
[ K.Premise
{ K.premise_id = gen_id premise_prefix seed;
K.premise_xref = jo.K.joint_id;
- K.premise_binder = Some "tiralo fuori";
+ K.premise_binder = Some fun_name;
K.premise_n = Some no;
}
];
(fun ce continuation ->
let xref = get_xref ce in
B.V([Some "helm", "xref", xref ],
- [B.H([Some "helm", "xref", "ce_"^xref],[ce2pres ce]);
+ [B.H([Some "helm", "xref", "ce_"^xref],
+ [ce2pres_in_proof_context_element ce]);
continuation])) tl continuation in
let hd_xref= get_xref hd in
B.V([],
[B.H([Some "helm", "xref", "ce_"^hd_xref],
- [ce2pres hd]);
+ [ce2pres_in_proof_context_element hd]);
continuation'])
- and ce2pres =
+ and ce2pres_in_joint_context_element = function
+ | `Inductive _ -> assert false (* TODO *)
+ | (`Declaration _) as x -> ce2pres x
+ | (`Hypothesis _) as x -> ce2pres x
+ | (`Proof _) as x -> ce2pres x
+ | (`Definition _) as x -> ce2pres x
+
+ and ce2pres_in_proof_context_element = function
+ | `Joint ho ->
+ B.H ([],(List.map ce2pres_in_joint_context_element ho.Content.joint_defs))
+ | (`Declaration _) as x -> ce2pres x
+ | (`Hypothesis _) as x -> ce2pres x
+ | (`Proof _) as x -> ce2pres x
+ | (`Definition _) as x -> ce2pres x
+
+ and ce2pres =
let module Con = Content in
- function
+ function
`Declaration d ->
(match d.Con.dec_name with
Some s ->
term])
| None ->
prerr_endline "NO NAME!!"; assert false)
- | `Joint ho -> assert false (*
- B.H ([],
- (B.Text ([],"JOINT ")
- :: List.map ce2pres ho.Content.joint_defs)) *)
and acontext2pres ac continuation indent =
let module Con = Content in
B.Text ([],"a proof???")
| Con.ArgMethod s ->
B.Text ([],"a method???")) in
- (make_concl "we proceede by cases on" case_arg) in
+ (make_concl "we proceed by cases on" case_arg) in
let to_prove =
(make_concl "to prove" proof_conclusion) in
B.V
B.Text ([],"a proof???")
| Con.ArgMethod s ->
B.Text ([],"a method???")) in
- (make_concl "we proceede by induction on" arg) in
+ (make_concl "we proceed by induction on" arg) in
let to_prove =
(make_concl "to prove" proof_conclusion) in
B.V