Skip to content

Commit

Permalink
Added Nat sort for index counting
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiang-Feng committed Apr 14, 2017
1 parent 2662c2e commit 2f6f0f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 140.tex
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ \subsection{Formal Specification of Programs}

Post-conditions for functions on lists often involve:
\begin{enumerate}
\item Checking a property of a list and its length compared to the given list (e.g. $\#xs = \#ys \land \forall i \left(i < \#xs \rightarrow P\left(ys!!i\right)\right)$ where $ys = f(x)$).
\item Checking a property of an item and its presence in the given list (e.g. $\exists i \left(i < \#xs \land xs!!i = y\right) \land P\left(y\right)$ where $y = f(x)$).
\item Checking a property of a list and its length compared to the given list (e.g. $\#xs = \#ys \land \forall i:\mbox{Nat} \left(i < \#xs \rightarrow P\left(ys!!i\right)\right)$ where $ys = f(x)$).
\item Checking a property of an item and its presence in the given list (e.g. $\exists i:\mbox{Nat} \left(i < \#xs \land xs!!i = y\right) \land P\left(y\right)$ where $y = f(x)$).
\end{enumerate}

\section{Checking Validity}
Expand Down

0 comments on commit 2f6f0f2

Please sign in to comment.