Skip to content

Commit f133cf2

Browse files
authored
fix: delete obsolete csimp (leanprover-community#1110)
1 parent 7ec35d2 commit f133cf2

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Batteries/Data/ByteArray.lean

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,6 @@ theorem ofFn_succ (f : Fin (n+1) → UInt8) :
144144
@[simp] theorem getElem_ofFn (f : Fin n → UInt8) (i) (h : i < (ofFn f).size) :
145145
(ofFn f)[i] = f ⟨i, size_ofFn f ▸ h⟩ := get_ofFn f ⟨i, h⟩
146146

147-
private def ofFnAux (f : Fin n → UInt8) : ByteArray := go 0 (mkEmpty n) where
148-
go (i : Nat) (acc : ByteArray) : ByteArray :=
149-
if h : i < n then go (i+1) (acc.push (f ⟨i, h⟩)) else acc
150-
termination_by n - i
151-
152-
@[csimp] private theorem ofFn_eq_ofFnAux : @ofFn = @ofFnAux := by
153-
funext n f; ext1; simp [ofFnAux, Array.ofFn, data_ofFnAux, mkEmpty]
154-
where
155-
data_ofFnAux {n} (f : Fin n → UInt8) (i) {acc} :
156-
(ofFnAux.go f i acc).data = Array.ofFn.go f i acc.data := by
157-
rw [ofFnAux.go, Array.ofFn.go]; split; rw [data_ofFnAux f (i+1), data_push]; rfl
158-
termination_by n - i
159-
160147
/-! ### map/mapM -/
161148

162149
/--

0 commit comments

Comments
 (0)