@@ -249,6 +249,8 @@ \subsection{Lists}
249249The \emph {length } of a list is the number of elements in that list:
250250$ \listlen {\emptylist } \triangleq 0 $ and $ \listlen {v_1,\ldots ,v_k}=k$ .
251251\end {definition }
252+ \texthypertarget {relation-samelength}
253+ We write $ \samelengthop [H]{a}{b}$ to denote that two lists $ a$ and $ b$ have the same length.
252254
253255We use the notation $ a..b$ , where $ a,b\in \Z $ as a shorthand for the interval $ [a\ldots b]$
254256(counting up when $ a \leq b$ and counting down when $ a \geq b$ ).
@@ -1097,18 +1099,34 @@ \subsection{Checked Transitions\label{sec:Checked Transitions}}
10971099\hva\and
10981100\inferrule [de\_ check\_ false]{}{ \decheck (\False , \vcode ) \evalarrow \DynamicError (\vcode ) }
10991101\end {mathpar }
1100- } % END_OF_BACKUP_RULE
1102+ } % END_OF_BACKUP_ORIGINAL_RULE
11011103\RenderRule {de_check}
11021104
11031105\subsection {Boolean Transition Judgments }
11041106\RenderRelation {bool_transition}
1105- We define the following rules to allow us to treat Boolean values as transition judgments,
1106- which in turn allow us to employ \shortcircuitrulemacros {}:
1107+ We use this function defined by the following trivial rule to allow us to treat Boolean values as transition judgments,
1108+ which in turn allows us to employ \shortcircuitrulemacros {}:
1109+ \BackupOriginalRule {
11071110\begin {mathpar }
11081111\inferrule [bool\_ trans\_ true]{}{ \booltrans (\overname {\True }{\cond }) \booltransarrow \overname {\True }{\vresult } }
11091112\hva\and
11101113\inferrule [bool\_ trans\_ false]{}{ \booltrans (\overname {\False }{\cond }) \booltransarrow \overname {\False }{\vresult } }
11111114\end {mathpar }
1115+ } % END_OF_BACKUP_ORIGINAL_RULE
1116+ \RenderRule {bool_transition}
1117+
1118+ This is useful in defining functions that return a Boolean value, where if a condition does not hold,
1119+ there is no need to consider the rest of the premises, and the function can simply return $ \False $ :
1120+ \begin {mathpar }
1121+ \inferrule {
1122+ \booltrans (\vx > \vy ) \booltransarrow \True \ \terminateas \ \False \\\\
1123+ p_2\\\\
1124+ \ldots \\\\
1125+ p_k
1126+ }{
1127+ \textfunc {complex\_ condition}(\vx , \vy ) \booltransarrow \vb
1128+ }
1129+ \end {mathpar }
11121130
11131131\subsection {Judgments Over Optional Data Types }
11141132\hypertarget {def-mapopt}{}
0 commit comments