mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-07-27 21:29:09 +02:00
[FMFP] Exam notes for FP almost complete
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
To prove recursive formulas, or more precisely formulated, a formula $P$ (with free variable $n$) for all $n \in \N$,
|
||||
we have can use weak or strong induction.
|
||||
Weak induction may be a \textit{slightly} misleading term, because it isn't necessarily weaker than strong induction.
|
||||
we can use weak or strong induction.
|
||||
Weak induction may be a \textit{slightly} misleading term, because it isn't necessarily weaker than strong induction,
|
||||
for mathematical induction, for structural induction, there is a difference.
|
||||
|
||||
This section has been moved to the very start of the theory part, even though many of the topics mentioned have not been covered in the summary yet,
|
||||
such that all the induction proofs can be covered in the same place.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
\subsection{Structural Induction}
|
||||
In this subsection, we present structural induction over lists.
|
||||
The same concept also applies similarly to trees and more.
|
||||
Weak Structural Induction on treees is presented in the subsequent subsection.
|
||||
Weak Structural Induction on trees is presented in the subsequent subsection.
|
||||
|
||||
For both, we only provide the natural deduction rules, as the proofs proceed analogously to the ones for mathematical induction.
|
||||
|
||||
@@ -25,3 +25,8 @@ For both, we only provide the natural deduction rules, as the proofs proceed ana
|
||||
\infer1[$xs$ not free in $\Gamma$, $ys$ not free in $P(xs)$]{\Gamma \vdash \forall xs . P(xs)}
|
||||
\end{prooftree}
|
||||
\end{align*}
|
||||
|
||||
|
||||
\subsubsection{Generalizing expressions}
|
||||
Sometimes, an expression can be hard to proof straight away because there is a constant in it.
|
||||
In that case, replace that constant, making sure to update both sides of the expression to reflect the change.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
\subsection{Workflow}
|
||||
{\scriptsize the notes in this section may seem a bit over the top,
|
||||
but in the exercise sessions it was mentioned repeatedly that they will heavily deduct points for not following the scheme.
|
||||
One example that was named is that in some exams out of 36 points for a proof, 9 were awarded for simply following the expected structure}
|
||||
\begin{enumerate}
|
||||
\item Determine the exact expression to proof (possibly generalizing it, and if so, state something like ``Consider the generalized statement'')
|
||||
\item Then, start the proof by stating something along the lines of ``We prove $\forall n \in \N P$ by weak mathematical induction on $n$''.
|
||||
\item Depending on the proof type, proceed with base cases, or case analysis. \hl{Important}: State ``Let $m$ be arbitrary'' for free variables,
|
||||
and if there are extra variables introduced by the application (e.g. a \texttt{Leaf} type has value $x$ in it), state ``Fix $x$ and we show $P[t \mapsto \texttt{Leaf} x]$''
|
||||
\item Then, do the step case (if applicable). \hl{Important}: State ``Let $n$ be arbitrary'', or in the case of structural induction, there may be arguments for the type,
|
||||
such as for \texttt{Tree}, then state ``Let \texttt{l::Tree} and \texttt{r::Tree} be arbitrary''.
|
||||
\end{enumerate}
|
||||
Reference in New Issue
Block a user