[O] A4 P2.3.b simplify

This commit is contained in:
Hykilpikonna
2021-11-09 14:20:10 -05:00
parent db431a96eb
commit cd13f3a0db
+2 -4
View File
@@ -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, \\