Skip to content

Commit d7a4357

Browse files
committed
chore(Data/Vector): golf ofFn_get
1 parent 09610fd commit d7a4357

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Mathlib/Data/Vector/Basic.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,8 @@ theorem get_ofFn {n} (f : Fin n → α) (i) : get (ofFn f) i = f i := by
164164

165165
@[simp]
166166
theorem ofFn_get (v : Vector α n) : ofFn (get v) = v := by
167-
rcases v with ⟨l, rfl⟩
168-
apply toList_injective
169-
dsimp
170-
simpa only [toList_ofFn] using List.ofFn_get _
167+
ext
168+
apply List.Vector.get_ofFn
171169

172170
/-- The natural equivalence between length-`n` vectors and functions from `Fin n`. -/
173171
def _root_.Equiv.vectorEquivFin (α : Type*) (n : ℕ) : Vector α n ≃ (Fin n → α) :=

0 commit comments

Comments
 (0)