lean2/tests/lua/proof_state1.lua

13 lines
445 B
Lua
Raw Normal View History

local env = environment()
local A = Local("A", Type)
env = add_decl(env, mk_constant_assumption("eq", Pi(A, mk_arrow(A, A, Prop))))
local eq = Const("eq")
local a = mk_local("a", "a", A)
local b = mk_local("b", "a", A)
local H = Local("H", eq(A, a, b))
local m = mk_metavar("m", Pi(A, a, b, H, eq(A, a, b)))(A, a, b, H)
print(to_proof_state(m, eq(A, a, b)))
local s = to_proof_state(m, eq(A, a, b))
local g = s:goals():head()
print(g)