mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-07-27 21:29:09 +02:00
12 lines
514 B
TeX
12 lines
514 B
TeX
\subsection{Other types of induction}
|
|
\subsubsection{Induction over Lists}
|
|
To prove $P$ for all $xs$ in \texttt{[T]}, we do the following:
|
|
|
|
\shade{blue}{Base case} We prove that $P[xs \mapsto []]$ is correct
|
|
|
|
\shade{green}{Step case} We prove that $\forall y :: T, ys :: [T]. P[xs \mapsto ys] \rightarrow P[xs \mapsto y : ys]$, or in other words:
|
|
We fix arbitrary $y :: T$ and $ys :: [T]$, which both are not free in $P$.
|
|
We then apply our induction hypothesis $P[xs \mapsto ys]$ to prove $P[xs \mapsto y : ys]$
|
|
|
|
|