Skip to content

Commit

Permalink
refactor: avoid relying on rfl's behavior on ground terms (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeata authored Sep 25, 2024
1 parent 1745fbd commit c57ab80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Batteries/Data/Fin/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ theorem list_succ (n) : list (n+1) = 0 :: (list n).map Fin.succ := by
theorem list_succ_last (n) : list (n+1) = (list n).map castSucc ++ [last n] := by
rw [list_succ]
induction n with
| zero => rfl
| zero => simp [last]
| succ n ih =>
rw [list_succ, List.map_cons castSucc, ih]
simp [Function.comp_def, succ_castSucc]

theorem list_reverse (n) : (list n).reverse = (list n).map rev := by
induction n with
| zero => rfl
| zero => simp [last]
| succ n ih =>
conv => lhs; rw [list_succ_last]
conv => rhs; rw [list_succ]
Expand Down

0 comments on commit c57ab80

Please sign in to comment.