Skip to content

Monomorphization of higher order function #55

@giuliasindoni

Description

@giuliasindoni

I am trying to use Lean-auto in conjunction with Lean-smt.

I have this example using higher-order functions:

import Mathlib.Tactic
import Smt
import Smt.Auto

axiom world : Type

def F: Type := Nat → world

def G : Type := F → (Nat → Prop)

example (f: F) (p : G) : p f 0 ∨ ¬p f 0 := by
auto
smt

This produces this error: Auto.Monomorphization.ConstInst.ofExpr? :: G is not a `∀`

I could do monomorphization "manually":

example (f: F) (p : G) : p f 0 ∨ ¬p f 0 := by
set myprop := p f 0
smt

and this works, but I would prefer not to do this, especially as I might have many functions of like p in a single formula. Thus, I believe I should use auto.

Could you advise on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions