File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ protected theorem getElem?_ofFn {f : Fin n → α} :
7171theorem ofFn_zero {f : Fin 0 → α} : ofFn f = [] := by
7272 rw [ofFn, Fin.foldr_zero]
7373
74+ @[simp]
7475theorem 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]
9798theorem 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
180181end List
You can’t perform that action at this time.
0 commit comments