The `infix` declaration was generating a delaborator, but it is producing the invalid term ``` ConstantFunction.f myFun 3 <|> fun _ => ConstantFunction.f myFun 4 ``` It is invalid because the `macro_rules` for `<|>` is based on `binop_lazy%` which introduces the `fun _ =>` for us. I tried to use ``` notation:20 a:21 " <|> " b:20 => HOrElse.hOrElse a fun _ : Unit => b ``` but the delaborator generator does not work for this case.
25 lines
991 B
Text
25 lines
991 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 (@instBEq.{0} Nat fun (a b : Nat) => instDecidableEqNat a b) a
|
|
(@OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
|
|
true)
|
|
(instDecidableEqBool
|
|
(@BEq.beq.{0} Nat (@instBEq.{0} Nat fun (a b : Nat) => instDecidableEqNat a b) a
|
|
(@OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
|
|
true)
|
|
(@Eq.{1} Bool
|
|
(@bne.{0} Nat (@instBEq.{0} Nat fun (a b : Nat) => instDecidableEqNat a b) a
|
|
(@OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
|
|
true)
|
|
(@Eq.{1} Bool
|
|
(@bne.{0} Nat (@instBEq.{0} Nat fun (a b : Nat) => instDecidableEqNat a b) a
|
|
(@OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
|
|
true)
|
|
def s : Option Nat :=
|
|
HOrElse.hOrElse (ConstantFunction.f myFun 3) fun x => ConstantFunction.f myFun 4
|