Skip to content

Commit

Permalink
chore: remove duplicate ToExpr Fin instance (#16405)
Browse files Browse the repository at this point in the history
This is already provided in Lean.
  • Loading branch information
kim-em committed Sep 16, 2024
1 parent 14a4ece commit d76d7eb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Mathlib/Data/Fin/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1516,16 +1516,6 @@ protected theorem zero_mul' [NeZero n] (k : Fin n) : (0 : Fin n) * k = 0 := by

end Mul

open Qq in
instance toExpr (n : ℕ) : Lean.ToExpr (Fin n) where
toTypeExpr := q(Fin $n)
toExpr := match n with
| 0 => finZeroElim
| k + 1 => fun i => show Q(Fin $n) from
have i : Q(Nat) := Lean.mkRawNatLit i -- raw literal to avoid ofNat-double-wrapping
have : Q(NeZero $n) := haveI : $n =Q $k + 1 := ⟨⟩; by exact q(NeZero.succ)
q(OfNat.ofNat $i)

end Fin

set_option linter.style.longFile 1700

0 comments on commit d76d7eb

Please sign in to comment.