[O] A4 P2.3.b simplify
This commit is contained in:
@@ -156,10 +156,8 @@ We need to prove: $\forall i \in \{0, \dots, |M| - 3\}, M[i] + 6 = M[i + 2] $
|
||||
\\
|
||||
Let's start with a true statement: \\
|
||||
$N[-2] = N[-2]$ \\
|
||||
Since $M[:-1] = (N \cup \{ N[-2] + 6 \})[:-1] = N$, \\
|
||||
$M[:-1][|N| - 2] = M[|N| - 2] = N[-2]$ \\
|
||||
Since $M$ has one extra entry than $N$, $|M| = |N| + 1$ \\
|
||||
$M[|N| - 2] = M[|N| + 1 - 3] = M[|M| - 3] = M[-3] = N[-2]$ \\
|
||||
Since $N[-2] = (N \cup \{ N[-2] + 6 \})[-3] = M[-3]$, \\
|
||||
$M[-3] = N[-2]$ \\
|
||||
Add 6 to both sides: \\
|
||||
$M[-3] + 6 = N[-2] + 6$ \\
|
||||
Since $M[-1] = (N \cup \{ N[-2] + 6 \})[-1] = N[-2] + 6$ is it's last entry, \\
|
||||
|
||||
Reference in New Issue
Block a user