lean2/tests/lua/tactic1.lua
Leonardo de Moura e379034b95 feat(library/tactic): improve 'assumption' tactic
- It uses the unifier in "conservative" mode
- It only affects the current goal

closes #570
2015-05-02 17:33:54 -07:00

9 lines
350 B
Lua

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 = Local("a", A)
local b = Local("b", 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)
local s = to_proof_state(m, eq(A, a, b))