@@ -113,27 +113,33 @@ private meta def hasLinearOrder (u : Level) (α : Q(Type u)) (cls : Q(Type u →
113113
114114/-- Delaborate `max x y` into `x ⊔ y` if the type is not a linear order. -/
115115@ [delab app.Max.max]
116- meta def delabSup : Delab := whenNotPPOption getPPExplicit <| whenPPOption getPPNotation do
117- let_expr f@Max.max α inst _ _ := ← getExpr | failure
118- have u := f.constLevels![0 ]!
119- if ← hasLinearOrder u α q(Max) q($(linearOrderToMax u)) inst then
120- failure -- use the default delaborator
121- let x ← withNaryArg 2 delab
122- let y ← withNaryArg 3 delab
123- let stx ← `($x ⊔ $y)
124- annotateGoToSyntaxDef stx
116+ meta def delabSup : Delab :=
117+ whenNotPPOption getPPExplicit <|
118+ whenPPOption getPPNotation <|
119+ withOverApp 4 do
120+ let_expr f@Max.max α inst _ _ := ← getExpr | failure
121+ have u := f.constLevels![0 ]!
122+ if ← hasLinearOrder u α q(Max) q($(linearOrderToMax u)) inst then
123+ failure -- use the default delaborator
124+ let x ← withNaryArg 2 delab
125+ let y ← withNaryArg 3 delab
126+ let stx ← `($x ⊔ $y)
127+ annotateGoToSyntaxDef stx
125128
126129/-- Delaborate `min x y` into `x ⊓ y` if the type is not a linear order. -/
127130@ [delab app.Min.min]
128- meta def delabInf : Delab := whenNotPPOption getPPExplicit <| whenPPOption getPPNotation do
129- let_expr f@Min.min α inst _ _ := ← getExpr | failure
130- have u := f.constLevels![0 ]!
131- if ← hasLinearOrder u α q(Min) q($(linearOrderToMin u)) inst then
132- failure -- use the default delaborator
133- let x ← withNaryArg 2 delab
134- let y ← withNaryArg 3 delab
135- let stx ← `($x ⊓ $y)
136- annotateGoToSyntaxDef stx
131+ meta def delabInf : Delab :=
132+ whenNotPPOption getPPExplicit <|
133+ whenPPOption getPPNotation <|
134+ withOverApp 4 do
135+ let_expr f@Min.min α inst _ _ := ← getExpr | failure
136+ have u := f.constLevels![0 ]!
137+ if ← hasLinearOrder u α q(Min) q($(linearOrderToMin u)) inst then
138+ failure -- use the default delaborator
139+ let x ← withNaryArg 2 delab
140+ let y ← withNaryArg 3 delab
141+ let stx ← `($x ⊓ $y)
142+ annotateGoToSyntaxDef stx
137143
138144end Mathlib.Meta
139145
0 commit comments