[FMFP] First rework complete

This commit is contained in:
2026-07-06 15:23:34 +02:00
parent 0065a7be05
commit 2227f8ac63
10 changed files with 52 additions and 24 deletions
@@ -1 +1,17 @@
\subsection{Induction on Trees}
\mint{haskell}+data T t = Leaf t | Node1 (T t) | Node2 t (T t) (T t)+
\shade{blue}{Base Case} $T_0 = \{ \texttt{Leaf}\ a \divider a \in t \}$
\shade{green}{Step Case} $T_i = T_{i - 1} \cup \{ \texttt{Node1}\ s \divider s \in T_{i - 1} \} \cup \{ \texttt{Node2}\ a\ l\ r \divider a \in t \text{ and } l, r \in T_{i - 1} \}$
A natural deduction rule structural induction is:
\[
\begin{prooftree}
\hypo{\Gamma \vdash P[x \mapsto \texttt{Leaf}\ a]}
\hypo{\Gamma, P[x \mapsto s] \vdash P[xs \mapsto \texttt{Node1}\ s]}
\hypo{\Gamma, P[x \mapsto l], P[x \mapsto r] \vdash P[ \mapsto \texttt{Node2}\ a\ l\ r]}
\infer3[$(*)$]{\Gamma \vdash \forall x \in \texttt{T}\ t. P}
\end{prooftree}
\]
(*) $a$, $l$, $r$, $s$ not free in $\Gamma, P$