fix(src/library/equations_compiler/elim_match): handle mixing of inaccessible terms and variables
This commit is contained in:
parent
04991692bf
commit
f44cbb896c
2 changed files with 5 additions and 1 deletions
|
|
@ -601,7 +601,7 @@ struct elim_match_fn {
|
|||
for (equation const & eqn : P.m_equations) {
|
||||
equation new_eqn = eqn;
|
||||
new_eqn.m_patterns = tail(eqn.m_patterns);
|
||||
if (is_var_transition) {
|
||||
if (is_var_transition || is_local(head(eqn.m_patterns))) {
|
||||
new_eqn.m_subst = add_subst(eqn.m_subst, head(eqn.m_patterns), head(P.m_var_stack));
|
||||
}
|
||||
new_eqns.push_back(new_eqn);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
example {α : Type} {p q : α → Prop} {x : α} (h : ∀ y, p y → q y) (hx : q x) :
|
||||
∀ y, x = y ∨ p y → q y
|
||||
| x (or.inr p) := h x p
|
||||
| ._ (or.inl rfl) := hx
|
||||
Loading…
Add table
Reference in a new issue