fix(library/definitional/equations): bug in recursive application elimination
This commit is contained in:
parent
cbae6a2ca0
commit
3325d791de
2 changed files with 18 additions and 2 deletions
|
@ -1231,8 +1231,9 @@ class equation_compiler_fn {
|
|||
return Fun(local, new_body);
|
||||
}
|
||||
case expr_kind::Pi: {
|
||||
expr local = mk_local(m_main.mk_fresh_name(), binding_name(e), binding_domain(e), binding_info(e));
|
||||
expr new_body = elim(instantiate(binding_body(e), local), b);
|
||||
expr new_domain = elim(binding_domain(e), b);
|
||||
expr local = mk_local(m_main.mk_fresh_name(), binding_name(e), new_domain, binding_info(e));
|
||||
expr new_body = elim(instantiate(binding_body(e), local), b);
|
||||
return Pi(local, new_body);
|
||||
}}
|
||||
lean_unreachable();
|
||||
|
|
15
tests/lean/run/eq21.lean
Normal file
15
tests/lean/run/eq21.lean
Normal file
|
@ -0,0 +1,15 @@
|
|||
inductive formula :=
|
||||
eqf : nat → nat → formula,
|
||||
impf : formula → formula → formula
|
||||
|
||||
namespace formula
|
||||
definition denote : formula → Prop,
|
||||
denote (eqf n1 n2) := n1 = n2,
|
||||
denote (impf f1 f2) := denote f1 → denote f2
|
||||
|
||||
theorem denote_eqf (n1 n2 : nat) : denote (eqf n1 n2) = (n1 = n2) :=
|
||||
rfl
|
||||
|
||||
theorem denote_impf (f1 f2 : formula) : denote (impf f1 f2) = (denote f1 → denote f2) :=
|
||||
rfl
|
||||
end formula
|
Loading…
Reference in a new issue