This commit incorporates the fix at PR #612, and clean up `Meta/Basic.lean` using Lean 4 features.
16 lines
400 B
Text
16 lines
400 B
Text
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}"
|