Skip to content

Commit 79254d0

Browse files
authored
chore: restore @[simp] to List.ofFn_succ (#8427)
1 parent c28b052 commit 79254d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Init/Data/List/OfFn.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ protected theorem getElem?_ofFn {f : Fin n → α} :
7171
theorem ofFn_zero {f : Fin 0 → α} : ofFn f = [] := by
7272
rw [ofFn, Fin.foldr_zero]
7373

74+
@[simp]
7475
theorem ofFn_succ {n} {f : Fin (n + 1) → α} : ofFn f = f 0 :: ofFn fun i => f i.succ :=
7576
ext_get (by simp) (fun i hi₁ hi₂ => by
7677
cases i
@@ -91,7 +92,7 @@ theorem ofFn_add {n m} {f : Fin (n + m) → α} :
9192
ofFn f = (ofFn fun i => f (i.castLE (Nat.le_add_right n m))) ++ (ofFn fun i => f (i.natAdd n)) := by
9293
induction m with
9394
| zero => simp
94-
| succ m ih => simp [ofFn_succ_last, ih]
95+
| succ m ih => simp [-ofFn_succ, ofFn_succ_last, ih]
9596

9697
@[simp]
9798
theorem ofFn_eq_nil_iff {f : Fin n → α} : ofFn f = [] ↔ n = 0 := by
@@ -175,6 +176,6 @@ theorem ofFnM_pure [Monad m] [LawfulMonad m] {n} {f : Fin n → α} :
175176
unfold Id.run
176177
induction n with
177178
| zero => simp
178-
| succ n ih => simp [ofFnM_succ_last, ofFn_succ_last, ih]
179+
| succ n ih => simp [-ofFn_succ, ofFnM_succ_last, ofFn_succ_last, ih]
179180

180181
end List

0 commit comments

Comments
 (0)