summaryrefslogtreecommitdiff
path: root/Day9.lean
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2023-12-09 21:21:09 +0100
committerAndreas Grois <andi@grois.info>2023-12-09 21:21:09 +0100
commit1ebf51d73981f521c70e5e30fd1bf19977cfb306 (patch)
tree3621594a2c40b9789cbfc61aa056ba5d9a4a859f /Day9.lean
parent14b20b12a06abffb37e7ddd7527a0ace64121b4e (diff)
Day9: Simplify proof of termination
Diffstat (limited to 'Day9.lean')
-rw-r--r--Day9.lean2
1 files changed, 1 insertions, 1 deletions
diff --git a/Day9.lean b/Day9.lean
index 24cd19d..0d28d27 100644
--- a/Day9.lean
+++ b/Day9.lean
@@ -30,7 +30,7 @@ private def extrapolate : List Int → Int
if a == 0 && as.all (· == 0) then
0
else
- have : List.length (Day9.differences (a :: as)) < Nat.succ (List.length as) := by
+ have : (differences (a :: as)).length < as.length + 1 := by
simp_arith[differences]
induction (as) <;> simp_arith[differences]
case cons b bs hb => rw[←differences_length_independent_arg]