Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
semorrison committed Sep 23, 2024
1 parent 1769ea4 commit 3ef63b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lean/run/2670.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def enumFromTR' (n : Nat) (l : List α) : List (Nat × α) :=

open List in
theorem enumFrom_eq_enumFromTR' : @enumFrom = @enumFromTR' := by
funext α n l; simp [enumFromTR', -Array.size_toArray]
funext α n l; simp only [enumFromTR']
let f := fun (a : α) (n, acc) => (n-1, (n-1, a) :: acc)
let rec go : ∀ l n, l.foldr f (n + l.length, []) = (n, enumFrom n l)
| [], n => rfl
| a::as, n => by
rw [← show _ + as.length = n + (a::as).length from Nat.succ_add .., List.foldr, go as]
simp [enumFrom, f]
rw [Array.foldr_eq_foldr_data]
rw [Array.foldr_eq_foldr_toList]
simp [go] -- Should close the goal

0 comments on commit 3ef63b2

Please sign in to comment.