This commit is contained in:
Jon Eugster
2023-03-23 16:00:11 +01:00
parent 10a12a8e77
commit a4623a8241
19 changed files with 66 additions and 72 deletions
@@ -1,17 +0,0 @@
import Mathlib.Algebra.BigOperators.Fin
open BigOperators
open Lean PrettyPrinter Delaborator SubExpr
@[ delab app.Finset.sum]
def delabFinsetSum : Delab := do
guard $ (← getExpr).getAppNumArgs == 5
guard $ ((← getExpr).getArg! 3).isAppOf' ``Finset.univ
guard $ ((← getExpr).getArg! 4).isLambda
withNaryArg 4 do
let α ← withBindingDomain delab
withBindingBodyUnusedName fun n => do
let n : TSyntax `ident := ⟨n⟩
let b ← delab
`(∑ $n:ident : $α, $b)