答案1
用常规方法绘制的线条array
:
\documentclass{article}
\usepackage{eqparbox,amsmath}
\begin{document}
\[
\begin{array}{| r @{} l }
P ~ : ~ & [\text{Num}] \mapsto \text{Bool} \\
\rule[-10pt]{0pt}{0pt}Q ~ : ~ & \text{Num} \mapsto [\text{Num}] \mapsto \text{Bool} \\
\cline{1-1}
\multicolumn{2}{|l}{\rule{0pt}{12pt}\eqmakebox[lhs][r]{$P.xs$} ~ \doteq ~ Q.0.xs} \\
\multicolumn{2}{|l}{\eqmakebox[lhs][r]{$Q.n.[]$} ~ \doteq ~ \text{True}} \\
\multicolumn{2}{|l}{\eqmakebox[lhs][r]{$Q.n.(x \triangleright xs)$} ~ \doteq ~ n \geq 0 \wedge Q.(n + x)xs}
\end{array}
\]
\end{document}
Struts:参见表格中的列和行填充