(match prem.Con.premise_binder with
Some s -> current_size + (String.length s)
| None -> current_size + 7)
(match prem.Con.premise_binder with
Some s -> current_size + (String.length s)
| None -> current_size + 7)
| Con.Term t -> countterm current_size t
| Con.ArgProof p -> countp current_size p
| Con.ArgMethod s -> (maxsize + 1)) in
| Con.Term t -> countterm current_size t
| Con.ArgProof p -> countp current_size p
| Con.ArgMethod s -> (maxsize + 1)) in
-let make_row items concl =
+let get_xref =
+ let module Con = Content in
+ function
+ `Declaration d
+ | `Hypothesis d -> d.Con.dec_id
+ | `Proof p -> p.Con.proof_id
+ | `Definition d -> d.Con.def_id
+ | `Joint jo -> jo.Con.joint_id
+;;
+
+let make_row ?(attrs=[]) items concl =
- P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
+ P.Mtable (attrs@[None,"align","baseline 1"; None,"equalrows","false";
None,"columnalign","left"],
[P.Mtr([],[P.Mtd ([],P.Mrow([],items))]);
P.Mtr ([],[P.Mtd ([],P.indented concl)])])
| _ -> (* small *)
None,"columnalign","left"],
[P.Mtr([],[P.Mtd ([],P.Mrow([],items))]);
P.Mtr ([],[P.Mtd ([],P.indented concl)])])
| _ -> (* small *)
- P.Mrow([],items@[P.Mspace([None,"width","0.1cm"]);concl]))
+ P.Mrow(attrs,items@[P.Mspace([None,"width","0.1cm"]);concl]))
- P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
+ P.Mtable (attrs@[None,"align","baseline 1"; None,"equalrows","false";
None,"columnalign","left"],
[P.Mtr([],[P.Mtd ([],P.Mtext([None,"mathcolor","Red"],verb))]);
P.Mtr ([],[P.Mtd ([],P.indented concl)])])
| _ -> (* small *)
None,"columnalign","left"],
[P.Mtr([],[P.Mtd ([],P.Mtext([None,"mathcolor","Red"],verb))]);
P.Mtr ([],[P.Mtd ([],P.indented concl)])])
| _ -> (* small *)
[P.Mtext([None,"mathcolor","Red"],verb);
P.Mspace([None,"width","0.1cm"]);
concl]))
[P.Mtext([None,"mathcolor","Red"],verb);
P.Mspace([None,"width","0.1cm"]);
concl]))
let presacontext =
acontext2pres p.Con.proof_apply_context presconclude indent in
context2pres p.Con.proof_context presacontext in
let presacontext =
acontext2pres p.Con.proof_apply_context presconclude indent in
context2pres p.Con.proof_context presacontext in
-(*
- P.Mtable ([("align","baseline 1");("equalrows","false");
- ("columnalign","left")],
- (context2pres_old p.Con.proof_context)@
- (acontext2pres_old p.Con.proof_apply_context indent)@
- [conclude2pres_old p.Con.proof_conclude indent]) in *)
[(make_concl "proof of" ac);
body]) in
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
[(make_concl "proof of" ac);
body]) in
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
- None,"columnalign","left"],
+ None,"columnalign","left";Some "helm", "xref", p.Con.proof_id],
[P.Mtr ([],[P.Mtd ([],P.Mfenced([],[P.Mtext ([],name)]))]);
P.Mtr ([],[P.Mtd ([], P.indented action)])])
and context2pres c continuation =
[P.Mtr ([],[P.Mtd ([],P.Mfenced([],[P.Mtext ([],name)]))]);
P.Mtr ([],[P.Mtd ([], P.indented action)])])
and context2pres c continuation =
P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
- None,"columnalign","left"],
- [P.Mtr([],[P.Mtd ([],ce2pres ce)]);
+ None,"columnalign","left"; Some "helm", "xref", xref ],
+ [P.Mtr([Some "helm", "xref", "ce_"^xref],[P.Mtd ([],ce2pres ce)]);
else
proof2pres p in
P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
else
proof2pres p in
P.Mtable([None,"align","baseline 1"; None,"equalrows","false";
- None,"columnalign","left"],
- [P.Mtr([],[P.Mtd ([],hd)]);
+ None,"columnalign","left"; Some "helm","xref",p.Con.proof_id],
+ [P.Mtr([Some "helm","xref","ace_"^p.Con.proof_id],[P.Mtd ([],hd)]);
- and acontext2pres_old ac indent =
- let module P = Mpresentation in
- List.map
- (function p ->
- if indent then
- P.Mtr ([], [P.Mtd ([], P.indented (proof2pres p))])
- else
- P.Mtr ([],
- [P.Mtd ([], proof2pres p)])) ac
-
- and conclude2pres_old conclude indent =
- let module P = Mpresentation in
- if indent then
- P.Mtr ([], [P.Mtd ([], P.indented (conclude_aux conclude))])
- else
- P.Mtr ([],
- [P.Mtd ([], conclude_aux conclude)])
-
and conclude_aux conclude =
let module Con = Content in
let module P = Mpresentation in
and conclude_aux conclude =
let module Con = Content in
let module P = Mpresentation in
None -> P.Mtext([],"NO SYNTH!!!")
| Some c -> (term2pres c)) in
P.Mtable
None -> P.Mtext([],"NO SYNTH!!!")
| Some c -> (term2pres c)) in
P.Mtable
- ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"],
+ ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"; Some "helm", "xref", conclude.Con.conclude_id],
[P.Mtr([],[P.Mtd([],make_concl "we must prove" expected)]);
P.Mtr([],[P.Mtd([],make_concl "or equivalently" synth)]);
P.Mtr([],[P.Mtd([],proof2pres subproof)])])
[P.Mtr([],[P.Mtd([],make_concl "we must prove" expected)]);
P.Mtr([],[P.Mtd([],make_concl "or equivalently" synth)]);
P.Mtr([],[P.Mtd([],proof2pres subproof)])])
(match conclude.Con.conclude_conclusion with
None -> P.Mtext([],"NO Conclusion!!!")
| Some c -> term2pres c) in
(match conclude.Con.conclude_conclusion with
None -> P.Mtext([],"NO Conclusion!!!")
| Some c -> term2pres c) in
[arg;P.Mspace([None,"width","0.1cm"]);P.Mtext([],"proves")] conclusion
else if conclude.Con.conclude_method = "Intros+LetTac" then
let conclusion =
[arg;P.Mspace([None,"width","0.1cm"]);P.Mtext([],"proves")] conclusion
else if conclude.Con.conclude_method = "Intros+LetTac" then
let conclusion =
[Con.ArgProof p] ->
P.Mtable
([None,"align","baseline 1"; None,"equalrows","false";
[Con.ArgProof p] ->
P.Mtable
([None,"align","baseline 1"; None,"equalrows","false";
- None,"columnalign","left"],
+ None,"columnalign","left";
+ Some "helm", "xref", conclude.Con.conclude_id],
[P.Mtr([],[P.Mtd([],proof2pres p)]);
P.Mtr([],[P.Mtd([],
(make_concl "we proved *" conclusion))])]);
[P.Mtr([],[P.Mtd([],proof2pres p)]);
P.Mtr([],[P.Mtd([],
(make_concl "we proved *" conclusion))])]);
None -> P.Mtext([],"NO Conclusion!!!")
| Some c -> term2pres c) in
P.Mtable ([None,"align","baseline 1";None,"equalrows","false";
None -> P.Mtext([],"NO Conclusion!!!")
| Some c -> term2pres c) in
P.Mtable ([None,"align","baseline 1";None,"equalrows","false";
- None,"columnalign","left"],
+ None,"columnalign","left";
+ Some "helm", "xref", conclude.Con.conclude_id],
[P.Mtr ([],[P.Mtd ([],P.Mrow([],[
P.Mtext([None,"mathcolor","Red"],"rewrite");
P.Mspace([None,"width","0.1cm"]);term1;
[P.Mtr ([],[P.Mtd ([],P.Mrow([],[
P.Mtext([None,"mathcolor","Red"],"rewrite");
P.Mspace([None,"width","0.1cm"]);term1;
let concl = (term2pres t) in
let ann_concl = make_concl "we proved" concl in
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
let concl = (term2pres t) in
let ann_concl = make_concl "we proved" concl in
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
- None,"columnalign","left"],
+ None,"columnalign","left";
+ Some "helm", "xref", conclude.Con.conclude_id],
[P.Mtr ([],[P.Mtd ([],by)]);
P.Mtr ([],[P.Mtd ([],ann_concl)])])
else let body =
P.Mtable
[P.Mtr ([],[P.Mtd ([],by)]);
P.Mtr ([],[P.Mtd ([],ann_concl)])])
else let body =
P.Mtable
- ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"],
+ ([None,"align","baseline 1"; None,"equalrows","false"; None,"columnalign","left"; Some "helm", "xref", conclude.Con.conclude_id],
[P.Mtr ([],[P.Mtd ([],P.Mtext([],"Apply method" ^ conclude.Con.conclude_method ^ " to"))]);
P.Mtr ([],
[P.Mtd ([],
[P.Mtr ([],[P.Mtd ([],P.Mtext([],"Apply method" ^ conclude.Con.conclude_method ^ " to"))]);
P.Mtr ([],
[P.Mtd ([],
(match prem.Con.premise_binder with
None -> P.Mtext ([],"the previous result")
| Some n -> P.Mi([],n))
(match prem.Con.premise_binder with
None -> P.Mtext ([],"the previous result")
| Some n -> P.Mi([],n))
acontext2pres_old p.Con.proof_apply_context true in *)
let body = conclude2pres p.Con.proof_conclude true in
let presacontext =
acontext2pres_old p.Con.proof_apply_context true in *)
let body = conclude2pres p.Con.proof_conclude true in
let presacontext =
- acontext2pres p.Con.proof_apply_context body true in
+ P.Maction([None,"actiontype","toggle" ; None,"selection","1"],
+ [P.indented (P.Mtext([None,"mathcolor","Red"],"Proof"));
+ acontext2pres p.Con.proof_apply_context body true]) in
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
None,"columnalign","left"],
pattern::asubconcl::induction_hypothesis@
P.Mtable ([None,"align","baseline 1"; None,"equalrows","false";
None,"columnalign","left"],
pattern::asubconcl::induction_hypothesis@