- `Def (K.Const,thesis,`Proof p) ->
- p_mtable
- [None,"align","baseline 1";
- None,"equalrows","false";
- None,"columnalign","left";
- None,"helm:xref","id"]
- ([p_mtr []
- [p_mtd []
- (p_mrow []
- [p_mtext []
- ("UNFINISHED PROOF" ^ id ^"(" ^
- String.concat " ; " (List.map UriManager.string_of_uri params)^
- ")")])] ;
- p_mtr []
- [p_mtd []
- (p_mrow []
- [p_mtext [] "THESIS:"])] ;
- p_mtr []
- [p_mtd []
- (p_mrow []
- [p_mphantom []
- (p_mtext [] "__") ;
- term2pres thesis])]] @
- (match metasenv with
- None -> []
- | Some metasenv' ->
- [p_mtr []
- [p_mtd []
- (* Conjectures are in their own table to make *)
- (* diffing the DOM trees easier. *)
- (p_mtable
- [None,"align","baseline 1";
- None,"equalrows","false";
- None,"columnalign","left"]
- ((p_mtr []
- [p_mtd []
- (p_mrow []
- [p_mtext [] "CONJECTURES:"])])::
- List.map
- (function
- (id,n,context,ty) ->
- p_mtr []
- [p_mtd []
- (p_mrow [Some "helm", "xref", id]
- (List.map
- (function
- None ->
- p_mrow []
- [ p_mi [] "_" ;
- p_mo [] ":?" ;
- p_mi [] "_"]
- | Some (`Declaration d)
- | Some (`Hypothesis d) ->
- let
- { K.dec_name = dec_name ;
- K.dec_type = ty } = d
- in
- p_mrow []
- [ p_mi []
- (match dec_name with
- None -> "_"
- | Some n -> n) ;
- p_mo [] ":" ;
- term2pres ty]
- | Some (`Definition d) ->
- let
- { K.def_name = def_name ;
- K.def_term = bo } = d
- in
- p_mrow []
- [ p_mi []
- (match def_name with
- None -> "_"
- | Some n -> n) ;
- p_mo [] ":=" ;
- term2pres bo]
- | Some (`Proof p) ->
- let proof_name = p.K.proof_name in
- p_mrow []
- [ p_mi []
- (match proof_name with
- None -> "_"
- | Some n -> n) ;
- p_mo [] ":=" ;
- proof2pres term2pres p]
- ) (List.rev context) @
- [ p_mo [] "|-" ] @
- [ p_mi [] (string_of_int n) ;
- p_mo [] ":" ;
- term2pres ty ]
- ))
- ]
- ) metasenv'
- ))]]
- ) @
- [p_mtr []
- [p_mtd []
- (p_mrow []
- [proof2pres term2pres p])]])
- | _ -> raise ToDo
+ | `Def (Content.Const, thesis, `Proof p) ->
+ let name = get_name p.Content.proof_name in
+ B.b_v
+ [None,"helm:xref","id"]
+ ([ B.b_text [] ("Proof " ^ name ^ pp_params params);
+ B.b_text [] "Thesis:";
+ B.indent (term2pres thesis) ] @
+ metasenv2pres term2pres metasenv @
+ [proof2pres term2pres p])
+ | `Def (_, ty, `Definition body) ->
+ let name = get_name body.Content.def_name in
+ B.b_v
+ [None,"helm:xref","id"]
+ ([B.b_text [] ("Definition " ^ name ^ pp_params params);
+ B.b_text [] "Type:";
+ B.indent (term2pres ty)] @
+ metasenv2pres term2pres metasenv @
+ [term2pres body.Content.def_term])
+ | `Decl (_, `Declaration decl)
+ | `Decl (_, `Hypothesis decl) ->
+ let name = get_name decl.Content.dec_name in
+ B.b_v
+ [None,"helm:xref","id"]
+ ([B.b_text [] ("Axiom " ^ name ^ pp_params params);
+ B.b_text [] "Type:";
+ B.indent (term2pres decl.Content.dec_type)] @
+ metasenv2pres term2pres metasenv)
+ | _ -> raise ToDo