File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff 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/--
You can’t perform that action at this time.
0 commit comments