1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (***************************************************************************)
30 (* Andrea Asperti <asperti@cs.unibo.it> *)
33 (***************************************************************************)
38 split (n-1) (List.tl l) in
43 let is_big_general countterm p =
44 let maxsize = Cexpr2pres.maxsize in
45 let module Con = Content in
46 let rec countp current_size p =
47 if current_size > maxsize then current_size
49 let c1 = (countcontext current_size p.Con.proof_context) in
50 if c1 > maxsize then c1
52 let c2 = (countapplycontext c1 p.Con.proof_apply_context) in
53 if c2 > maxsize then c2
55 countconclude c2 p.Con.proof_conclude
58 countcontext current_size c =
59 List.fold_left countcontextitem current_size c
61 countcontextitem current_size e =
62 if current_size > maxsize then maxsize
66 (match d.Con.dec_name with
67 Some s -> current_size + 4 + (String.length s)
68 | None -> prerr_endline "NO NAME!!"; assert false)
70 (match h.Con.dec_name with
71 Some s -> current_size + 4 + (String.length s)
72 | None -> prerr_endline "NO NAME!!"; assert false)
73 | `Proof p -> countp current_size p
75 (match d.Con.def_name with
77 let c1 = (current_size + 4 + (String.length s)) in
78 (countterm c1 d.Con.def_term)
80 prerr_endline "NO NAME!!"; assert false)
81 | `Joint ho -> maxsize + 1) (* we assume is big *)
83 countapplycontext current_size ac =
84 List.fold_left countp current_size ac
86 countconclude current_size co =
87 if current_size > maxsize then current_size
89 let c1 = countargs current_size co.Con.conclude_args in
90 if c1 > maxsize then c1
92 (match co.Con.conclude_conclusion with
93 Some concl -> countterm c1 concl
96 countargs current_size args =
97 List.fold_left countarg current_size args
99 countarg current_size arg =
100 if current_size > maxsize then current_size
103 Con.Aux _ -> current_size
104 | Con.Premise prem ->
105 (match prem.Con.premise_binder with
106 Some s -> current_size + (String.length s)
107 | None -> current_size + 7)
109 current_size + (String.length lemma.Con.lemma_name)
110 | Con.Term t -> countterm current_size t
111 | Con.ArgProof p -> countp current_size p
112 | Con.ArgMethod s -> (maxsize + 1)) in
113 let size = (countp 0 p) in
117 let is_big = is_big_general (Cexpr2pres.countterm)
121 let module Con = Content in
124 | `Hypothesis d -> d.Con.dec_id
125 | `Proof p -> p.Con.proof_id
126 | `Definition d -> d.Con.def_id
127 | `Joint jo -> jo.Con.joint_id
130 let make_row ?(attrs=[]) items concl =
131 let module P = Mpresentation in
133 P.Mtable _ -> (* big! *)
134 P.Mtable (attrs@[None,"align","baseline 1"; None,"equalrows","false";
135 None,"columnalign","left"],
136 [P.Mtr([],[P.Mtd ([],P.Mrow([],items))]);
137 P.Mtr ([],[P.Mtd ([],P.indented concl)])])
139 P.Mrow(attrs,items@[P.Mspace([None,"width","0.1cm"]);concl]))
142 let make_concl ?(attrs=[]) verb concl =
143 let module P = Mpresentation in
145 P.Mtable _ -> (* big! *)
146 P.Mtable (attrs@[None,"align","baseline 1"; None,"equalrows","false";
147 None,"columnalign","left"],
148 [P.Mtr([],[P.Mtd ([],P.Mtext([None,"mathcolor","Red"],verb))]);
149 P.Mtr ([],[P.Mtd ([],P.indented concl)])])
152 [P.Mtext([None,"mathcolor","Red"],verb);
153 P.Mspace([None,"width","0.1cm"]);
157 let make_args_for_apply term2pres args =
158 let module Con = Content in
159 let module P = Mpresentation in
160 let rec make_arg_for_apply is_first arg row =
162 Con.Aux n -> assert false
163 | Con.Premise prem ->
165 (match prem.Con.premise_binder with
168 P.smallskip::P.Mi([],name)::row
170 P.smallskip::P.Mi([],lemma.Con.lemma_name)::row
174 else P.smallskip::P.Mi([],"_")::row
177 P.smallskip::P.Mi([],"_")::row) in
180 make_arg_for_apply true hd
181 (List.fold_right (make_arg_for_apply false) tl [])
182 | _ -> assert false;;
184 let rec justification term2pres p =
185 let module Con = Content in
186 let module P = Mpresentation in
187 if ((p.Con.proof_conclude.Con.conclude_method = "Exact") or
188 ((p.Con.proof_context = []) &
189 (p.Con.proof_apply_context = []) &
190 (p.Con.proof_conclude.Con.conclude_method = "Apply"))) then
192 make_args_for_apply term2pres p.Con.proof_conclude.Con.conclude_args in
194 P.Mtext([None,"mathcolor","Red"],"by")::P.Mspace([None,"width","0.1cm"])::
195 P.Mtext([],"(")::pres_args@[P.Mtext([],")")])
196 else proof2pres term2pres p
198 and proof2pres term2pres p =
199 let rec proof2pres p =
200 let module Con = Content in
201 let module P = Mpresentation in
206 | `Hypothesis _ -> true
208 ((List.filter is_decl p.Con.proof_context) != []) in
209 let omit_conclusion = (not indent) && (p.Con.proof_context != []) in
211 (match p.Con.proof_conclude.Con.conclude_conclusion with
213 | Some t -> Some (term2pres t)) in
216 conclude2pres p.Con.proof_conclude indent omit_conclusion in
218 acontext2pres p.Con.proof_apply_context presconclude indent in
219 context2pres p.Con.proof_context presacontext in
220 match p.Con.proof_name with
228 ([None,"actiontype","toggle" ; None,"selection","1"],
229 [P.Mtext [] "proof" ; body])
233 ([None,"actiontype","toggle" ; None,"selection","1"],
234 [(make_concl "proof of" ac); body])
236 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
237 None,"columnalign","left"],
238 [P.Mtr ([],[P.Mtd ([],P.Mfenced([],[P.Mtext ([],name)]))]);
239 P.Mtr ([],[P.Mtd ([], P.indented action)])])
241 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
242 None,"columnalign","left";Some "helm", "xref", p.Con.proof_id],
243 [P.Mtr ([],[P.Mtd ([],P.Mfenced([],[P.Mtext ([],name)]))]);
244 P.Mtr ([],[P.Mtd ([], P.indented action)])]) *)
246 and context2pres c continuation =
247 (* we generate a subtable for each context element, for selection
249 The table generated by the head-element does not have an xref;
250 the whole context-proof is already selectable *)
251 let module P = Mpresentation in
257 (fun ce continuation ->
258 let xref = get_xref ce in
259 P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
260 None,"columnalign","left"; Some "helm", "xref", xref ],
261 [P.Mtr([Some "helm", "xref", "ce_"^xref],[P.Mtd ([],ce2pres ce)]);
262 P.Mtr([],[P.Mtd ([], continuation)])])) tl continuation in
263 let hd_xref= get_xref hd in
264 P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
265 None,"columnalign","left"],
266 [P.Mtr([Some "helm", "xref", "ce_"^hd_xref],
267 [P.Mtd ([],ce2pres hd)]);
268 P.Mtr([],[P.Mtd ([], continuation')])])
271 let module P = Mpresentation in
272 let module Con = Content in
275 (match d.Con.dec_name with
277 let ty = term2pres d.Con.dec_type in
279 [P.Mtext([None,"mathcolor","Red"],"Assume");
280 P.Mspace([None,"width","0.1cm"]);
285 prerr_endline "NO NAME!!"; assert false)
287 (match h.Con.dec_name with
289 let ty = term2pres h.Con.dec_type in
291 [P.Mtext([None,"mathcolor","Red"],"Suppose");
292 P.Mspace([None,"width","0.1cm"]);
296 P.Mspace([None,"width","0.1cm"]);
299 prerr_endline "NO NAME!!"; assert false)
301 (match p.Con.proof_name with
302 Some "w" -> prerr_endline ("processing w");
306 (match d.Con.def_name with
308 let term = term2pres d.Con.def_term in
315 prerr_endline "NO NAME!!"; assert false)
317 P.Mtext ([],"jointdef")
319 and acontext2pres ac continuation indent =
320 let module Con = Content in
321 let module P = Mpresentation in
323 (fun p continuation ->
326 P.indented (proof2pres p)
329 P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
330 None,"columnalign","left"; Some "helm","xref",p.Con.proof_id],
331 [P.Mtr([Some "helm","xref","ace_"^p.Con.proof_id],[P.Mtd ([],hd)]);
332 P.Mtr([],[P.Mtd ([], continuation)])])) ac continuation
334 and conclude2pres conclude indent omit_conclusion =
335 let module Con = Content in
336 let module P = Mpresentation in
338 match conclude.Con.conclude_conclusion with
339 Some t when not omit_conclusion ->
340 let concl = (term2pres t) in
341 if conclude.Con.conclude_method = "BU_Conversion" then
342 make_concl "that is equivalent to" concl
344 let conclude_body = conclude_aux conclude in
346 if conclude.Con.conclude_method = "TD_Conversion" then
347 make_concl "that is equivalent to" concl
348 else make_concl "we conclude" concl in
349 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
350 None,"columnalign","left"],
351 [P.Mtr ([],[P.Mtd ([],conclude_body)]);
352 P.Mtr ([],[P.Mtd ([],ann_concl)])])
353 | _ -> conclude_aux conclude in
355 P.indented (P.Mrow ([Some "helm", "xref", conclude.Con.conclude_id],
358 P.Mrow ([Some "helm", "xref", conclude.Con.conclude_id],[tconclude_body])
361 and conclude_aux conclude =
362 let module Con = Content in
363 let module P = Mpresentation in
364 if conclude.Con.conclude_method = "TD_Conversion" then
366 (match conclude.Con.conclude_conclusion with
367 None -> P.Mtext([],"NO EXPECTED!!!")
368 | Some c -> term2pres c) in
370 (match conclude.Con.conclude_args with
371 [Con.ArgProof p] -> p
372 | _ -> assert false) in
374 (match subproof.Con.proof_conclude.Con.conclude_conclusion with
375 None -> P.Mtext([],"NO SYNTH!!!")
376 | Some c -> (term2pres c)) in
378 ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"],
379 [P.Mtr([],[P.Mtd([],make_concl "we must prove" expected)]);
380 P.Mtr([],[P.Mtd([],make_concl "or equivalently" synth)]);
381 P.Mtr([],[P.Mtd([],proof2pres subproof)])])
382 else if conclude.Con.conclude_method = "BU_Conversion" then
384 else if conclude.Con.conclude_method = "Exact" then
386 (match conclude.Con.conclude_args with
387 [Con.Term t] -> term2pres t
388 | _ -> assert false) in
389 (match conclude.Con.conclude_conclusion with
392 [P.Mtext [None, "mathcolor", "red"] "Consider" ; P.smallskip; arg]
393 | Some c -> let conclusion = term2pres c in
395 [arg; P.Mspace([None,"width","0.1cm"]);P.Mtext([],"proves")]
398 else if conclude.Con.conclude_method = "Intros+LetTac" then
399 (match conclude.Con.conclude_args with
400 [Con.ArgProof p] -> proof2pres p
404 (match conclude.Con.conclude_conclusion with
405 None -> P.Mtext([],"NO Conclusion!!!")
406 | Some c -> term2pres c) in
407 (match conclude.Con.conclude_args with
410 ([None,"align","baseline 1"; None,"equalrows","false";
411 None,"columnalign","left"],
412 [P.Mtr([],[P.Mtd([],proof2pres p)]);
414 (make_concl "we proved 1" conclusion))])]);
417 else if (conclude.Con.conclude_method = "ByInduction") then
419 else if (conclude.Con.conclude_method = "Exists") then
421 else if (conclude.Con.conclude_method = "AndInd") then
423 else if (conclude.Con.conclude_method = "Rewrite") then
425 (match (List.nth conclude.Con.conclude_args 6) with
426 Con.ArgProof p -> justification term2pres p
427 | _ -> assert false) in
429 (match List.nth conclude.Con.conclude_args 2 with
430 Con.Term t -> term2pres t
431 | _ -> assert false) in
433 (match List.nth conclude.Con.conclude_args 5 with
434 Con.Term t -> term2pres t
435 | _ -> assert false) in
436 P.Mtable ([None,"align","baseline 1";None,"equalrows","false";
437 None,"columnalign","left"],
438 [P.Mtr ([],[P.Mtd ([],P.Mrow([],[
439 P.Mtext([None,"mathcolor","Red"],"rewrite");
440 P.Mspace([None,"width","0.1cm"]);term1;
441 P.Mspace([None,"width","0.1cm"]);
442 P.Mtext([None,"mathcolor","Red"],"with");
443 P.Mspace([None,"width","0.1cm"]);term2]))]);
444 P.Mtr ([],[P.Mtd ([],P.indented justif)])]);
447 (match conclude.Con.conclude_conclusion with
448 None -> P.Mtext([],"NO Conclusion!!!")
449 | Some c -> term2pres c) in
450 P.Mtable ([None,"align","baseline 1";None,"equalrows","false";
451 None,"columnalign","left"],
452 [P.Mtr ([],[P.Mtd ([],P.Mrow([],[
453 P.Mtext([None,"mathcolor","Red"],"rewrite");
454 P.Mspace([None,"width","0.1cm"]);term1;
455 P.Mspace([None,"width","0.1cm"]);
456 P.Mtext([None,"mathcolor","Red"],"with");
457 P.Mspace([None,"width","0.1cm"]);term2]))]);
458 P.Mtr ([],[P.Mtd ([],P.indented justif)]);
459 P.Mtr ([],[P.Mtd ([],make_concl "we proved 2" conclusion)])]) *)
460 else if conclude.Con.conclude_method = "Apply" then
462 make_args_for_apply term2pres conclude.Con.conclude_args in
464 P.Mtext([None,"mathcolor","Red"],"by")::
465 P.Mspace([None,"width","0.1cm"])::
466 P.Mo([],"(")::pres_args@[P.Mo([],")")])
470 P.Mtext([None,"mathcolor","Red"],"by")::P.Mspace([None,"width","0.1cm"])::
471 P.Mo([],"(")::pres_args@[P.Mo([],")")]) in
472 match conclude.Con.conclude_conclusion with
473 None -> P.Mrow([],[P.Mtext([],"QUA");by])
475 let concl = (term2pres t) in
476 let ann_concl = make_concl "we proved 3" concl in
477 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
478 None,"columnalign","left";
479 Some "helm", "xref", conclude.Con.conclude_id],
480 [P.Mtr ([],[P.Mtd ([],by)]);
481 P.Mtr ([],[P.Mtd ([],ann_concl)])]) *)
484 ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"],
485 [P.Mtr ([],[P.Mtd ([],P.Mtext([],"Apply method" ^ conclude.Con.conclude_method ^ " to"))]);
490 ([None,"align","baseline 1"; None,"equalrows","false";
491 None,"columnalign","left"],
492 args2pres conclude.Con.conclude_args))))])])
494 match conclude.Con.conclude_conclusion with
497 let concl = (term2pres t) in
498 let ann_concl = make_concl "we proved 4" concl in
499 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
500 None,"columnalign","left"],
501 [P.Mtr ([],[P.Mtd ([],body)]);
502 P.Mtr ([],[P.Mtd ([],ann_concl)])]) *)
505 let module P = Mpresentation in
507 (function a -> P.Mtr ([], [P.Mtd ([], arg2pres a)])) l
510 let module P = Mpresentation in
511 let module Con = Content in
514 P.Mtext ([],"aux " ^ n)
515 | Con.Premise prem ->
516 P.Mtext ([],"premise")
524 P.Mtext ([],"method")
526 and byinduction conclude =
527 let module P = Mpresentation in
528 let module Con = Content in
529 let proof_conclusion =
530 (match conclude.Con.conclude_conclusion with
531 None -> P.Mtext([],"No conclusion???")
532 | Some t -> term2pres t) in
533 let inductive_arg,args_for_cases =
534 (match conclude.Con.conclude_args with
536 let l1,l2 = split (int_of_string n) tl in
537 let last_pos = (List.length l2)-1 in
538 List.nth l2 last_pos,l1
539 | _ -> assert false) in
542 (match inductive_arg with
544 P.Mtext ([],"an aux???")
545 | Con.Premise prem ->
546 (match prem.Con.premise_binder with
547 None -> P.Mtext ([],"the previous result")
548 | Some n -> P.Mi([],n))
549 | Con.Lemma lemma -> P.Mi([],lemma.Con.lemma_name)
553 P.Mtext ([],"a proof???")
555 P.Mtext ([],"a method???")) in
556 (make_concl "we proceede by induction on" arg) in
558 (make_concl "to prove" proof_conclusion) in
560 ([None,"align","baseline 1"; None,"equalrows","false";
561 None,"columnalign","left"],
562 P.Mtr ([],[P.Mtd ([],induction_on)])::
563 P.Mtr ([],[P.Mtd ([],to_prove)])::
564 (make_cases args_for_cases))
566 and make_cases args_for_cases =
567 let module P = Mpresentation in
569 (fun p -> P.Mtr ([],[P.Mtd ([],make_case p)])) args_for_cases
572 let module P = Mpresentation in
573 let module Con = Content in
577 (match p.Con.proof_name with
578 None -> P.Mtext([],"no name for case!!")
579 | Some n -> P.Mi([],n)) in
583 `Hypothesis h -> h.Con.dec_inductive
584 | _ -> false) p.Con.proof_context in
593 (match h.Con.dec_name with
596 [P.Mspace([None,"width","0.1cm"]);
599 (term2pres h.Con.dec_type)]
600 | _ -> [P.Mtext ([],"???")]) in
603 P.Mtr ([],[P.Mtd ([],P.Mrow([],
604 P.Mtext([],"Case")::P.Mspace([None,"width","0.1cm"])::name::pattern_aux@
605 [P.Mspace([None,"width","0.1cm"]);
606 P.Mtext([],"->")]))]) in
608 (match p.Con.proof_conclude.Con.conclude_conclusion with
609 None -> P.Mtext([],"No conclusion!!!")
610 | Some t -> term2pres t) in
613 P.indented (make_concl "the thesis becomes" subconcl))]) in
614 let induction_hypothesis =
619 P.Mtr([],[P.Mtd([], P.indented
620 (P.Mtext([],"by induction hypothesis we know:")))]) in
625 (match h.Con.dec_name with
628 P.indented (P.Mrow ([],
632 P.Mspace([None,"width","0.1cm"]);
633 term2pres h.Con.dec_type]))
634 | _ -> assert false in
637 (function ce -> P.Mtr ([], [P.Mtd ([], make_hyp ce)]))
641 acontext2pres_old p.Con.proof_apply_context true in *)
642 let body = conclude2pres p.Con.proof_conclude true false in
644 P.Maction([None,"actiontype","toggle" ; None,"selection","1"],
645 [P.indented (P.Mtext([None,"mathcolor","Red"],"Proof"));
646 acontext2pres p.Con.proof_apply_context body true]) in
647 P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
648 None,"columnalign","left"],
649 pattern::asubconcl::induction_hypothesis@
650 [P.Mtr([],[P.Mtd([],presacontext)])])
653 and andind conclude =
654 let module P = Mpresentation in
655 let module Con = Content in
656 let proof_conclusion =
657 (match conclude.Con.conclude_conclusion with
658 None -> P.Mtext([],"No conclusion???")
659 | Some t -> term2pres t) in
661 (match conclude.Con.conclude_args with
662 [Con.Aux(n);_;Con.ArgProof proof;case_arg] -> proof,case_arg
665 List.map (ContentPp.parg 0) conclude.Con.conclude_args;
669 Con.Aux n -> assert false
670 | Con.Premise prem ->
671 (match prem.Con.premise_binder with
673 | Some n -> [P.Mtext([],"by");P.smallskip;P.Mi([],n)])
675 [P.Mtext([],"by");P.smallskip;P.Mi([],lemma.Con.lemma_name)]
676 | _ -> assert false) in
677 match proof.Con.proof_context with
678 `Hypothesis hyp1::`Hypothesis hyp2::tl ->
680 (match hyp.Con.dec_name with
686 P.Mi([],get_name hyp1);
689 term2pres hyp1.Con.dec_type]) in
693 P.Mi([],get_name hyp2);
696 term2pres hyp2.Con.dec_type]) in
697 (* let body = proof2pres {proof with Con.proof_context = tl} in *)
698 let body = conclude2pres proof.Con.proof_conclude false true in
700 acontext2pres proof.Con.proof_apply_context body false in
702 ([None,"align","baseline 1"; None,"equalrows","false";
703 None,"columnalign","left"],
704 [P.Mtr ([],[P.Mtd ([],
705 P.Mrow([],arg@[P.smallskip;P.Mtext([],"we have")]))]);
706 P.Mtr ([],[P.Mtd ([],preshyp1)]);
707 P.Mtr ([],[P.Mtd ([],P.Mtext([],"and"))]);
708 P.Mtr ([],[P.Mtd ([],preshyp2)]);
709 P.Mtr ([],[P.Mtd ([],presacontext)])]);
712 and exists conclude =
713 let module P = Mpresentation in
714 let module Con = Content in
715 let proof_conclusion =
716 (match conclude.Con.conclude_conclusion with
717 None -> P.Mtext([],"No conclusion???")
718 | Some t -> term2pres t) in
720 (match conclude.Con.conclude_args with
721 [Con.Aux(n);_;Con.ArgProof proof;_] -> proof
724 List.map (ContentPp.parg 0) conclude.Con.conclude_args;
726 match proof.Con.proof_context with
727 `Declaration decl::`Hypothesis hyp::tl
728 | `Hypothesis decl::`Hypothesis hyp::tl ->
730 (match decl.Con.dec_name with
735 [P.Mtext([None,"mathcolor","Red"],"let");
737 P.Mi([],get_name decl);
738 P.Mtext([],":"); term2pres decl.Con.dec_type]) in
741 [P.Mtext([None,"mathcolor","Red"],"such that");
744 P.Mi([],get_name hyp);
747 term2pres hyp.Con.dec_type]) in
748 (* let body = proof2pres {proof with Con.proof_context = tl} in *)
749 let body = conclude2pres proof.Con.proof_conclude false true in
751 acontext2pres proof.Con.proof_apply_context body false in
753 ([None,"align","baseline 1"; None,"equalrows","false";
754 None,"columnalign","left"],
755 [P.Mtr ([],[P.Mtd ([],presdecl)]);
756 P.Mtr ([],[P.Mtd ([],suchthat)]);
757 P.Mtr ([],[P.Mtd ([],presacontext)])]);
758 | _ -> assert false in
765 let content2pres term2pres (id,params,metasenv,obj) =
766 let module K = Content in
767 let module P = Mpresentation in
769 `Def (K.Const,thesis,`Proof p) ->
771 [None,"align","baseline 1";
772 None,"equalrows","false";
773 None,"columnalign","left";
774 None,"helm:xref","id"]
779 ("UNFINISHED PROOF" ^ id ^"(" ^
780 String.concat " ; " (List.map UriManager.string_of_uri params)^
785 [P.Mtext [] "THESIS:"])] ;
791 term2pres thesis])]] @
797 (* Conjectures are in their own table to make *)
798 (* diffing the DOM trees easier. *)
800 [None,"align","baseline 1";
801 None,"equalrows","false";
802 None,"columnalign","left"]
806 [P.Mtext [] "CONJECTURES:"])])::
812 (P.Mrow [Some "helm", "xref", id]
820 | (_,Some (`Declaration d))
821 | (_,Some (`Hypothesis d)) ->
823 { K.dec_name = dec_name ;
824 K.dec_type = ty } = d
833 | (_,Some (`Definition d)) ->
835 { K.def_name = def_name ;
836 K.def_term = bo } = d
845 | (_,Some (`Proof p)) ->
846 let proof_name = p.K.proof_name in
849 (match proof_name with
853 proof2pres term2pres p]
856 [ P.Mi [] (string_of_int n) ;
867 [proof2pres term2pres p])]])
871 let content2pres ~ids_to_inner_sorts =
874 (Cexpr2pres.cexpr2pres_charcount
875 (Content_expressions.acic2cexpr ids_to_inner_sorts p)))