lean4-htt/tests/lean/eagerCoeExpansion.lean.expected.out
Kyle Miller c394a834c3
feat: extract delabAppCore, define withOverApp, and make over-applied projections pretty print (#3083)
To handle delaborating notations that are functions that can be applied
to arguments, extracts the core function application delaborator as a
separate function that accepts the number of arguments to process and a
delaborator to apply to the "head" of the expression.

Defines `withOverApp`, which has the same interface as the combinator of
the same name from std4, but it uses this core function application
delaborator.

Uses `withOverApp` to improve a number of application delaborators,
notably projections. This means Mathlib can stop using `pp_dot` for
structure fields that have function types.

Incidentally fixes `getParamKinds` to specialize default values to use
supplied arguments, which impacts how default arguments are delaborated.

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2024-01-10 13:24:28 +00:00

12 lines
693 B
Text

def h : BV 32 → Array Bool :=
fun x => (fun x => g (f x).val) x
def r : Nat → Prop :=
fun a => if (a == 0) = true then (a != 1) = true else (a != 2) = true
def r : Nat → Prop :=
fun (a : Nat) =>
@ite.{1} Prop (@Eq.{1} Bool (@BEq.beq.{0} Nat instBEqNat a (@OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) Bool.true)
(instDecidableEqBool (@BEq.beq.{0} Nat instBEqNat a (@OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) Bool.true)
(@Eq.{1} Bool (@bne.{0} Nat instBEqNat a (@OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) Bool.true)
(@Eq.{1} Bool (@bne.{0} Nat instBEqNat a (@OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))) Bool.true)
def s : Option Nat :=
HOrElse.hOrElse (myFun.f 3) fun x => myFun.f 4