lean4-htt/tests/lean/forallMetaBounded.lean
Leonardo de Moura a230fe2d06 fix: forallMetaTelescope issue
This commit incorporates the fix at PR #612, and clean up
`Meta/Basic.lean` using Lean 4 features.
2021-08-06 09:47:10 -07:00

16 lines
400 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Lean
open Lean Lean.Meta
def Set (α : Type) : Type :=
α → Prop
def Set.empty {α : Type} : Set α :=
fun a => False
def Set.insert (s : Set α) (a : α) : Set α :=
fun x => x = a s a
#eval show MetaM Unit from do
let insertType ← inferType (mkConst `Set.insert)
let ⟨mvars, bInfos, resultType⟩ ← forallMetaBoundedTelescope insertType 3
println! "{resultType}"