fix(library/tactic/inversion_tactic): missing normalization step in the inversion_tactic
This commit is contained in:
parent
d52af105d7
commit
143143e94c
2 changed files with 29 additions and 1 deletions
|
@ -359,7 +359,7 @@ class inversion_tac {
|
||||||
buffer<expr> hyps;
|
buffer<expr> hyps;
|
||||||
g.get_hyps(hyps);
|
g.get_hyps(hyps);
|
||||||
expr const & h = hyps.back();
|
expr const & h = hyps.back();
|
||||||
expr const & h_type = mlocal_type(h);
|
expr const & h_type = m_tc.whnf(mlocal_type(h)).first;
|
||||||
buffer<expr> I_args;
|
buffer<expr> I_args;
|
||||||
expr const & I = get_app_args(h_type, I_args);
|
expr const & I = get_app_args(h_type, I_args);
|
||||||
name const & I_name = const_name(I);
|
name const & I_name = const_name(I);
|
||||||
|
|
28
tests/lean/run/sigma_match.lean
Normal file
28
tests/lean/run/sigma_match.lean
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
open sigma
|
||||||
|
|
||||||
|
constant hom.{l₁ l₂} {A : Type.{l₁}} {B : Type.{l₂}} (a : A) (b : B) : Type.{max l₁ l₂}
|
||||||
|
|
||||||
|
definition arrow_ob [reducible] (A B : Type) : Type :=
|
||||||
|
Σ (a : A) (b : B), hom a b
|
||||||
|
|
||||||
|
definition src1 {A B : Type} (x : arrow_ob A B) : A :=
|
||||||
|
match x with
|
||||||
|
⟨a, b, h⟩ := a
|
||||||
|
end
|
||||||
|
|
||||||
|
definition src2 {A B : Type} : arrow_ob A B → A,
|
||||||
|
src2 ⟨a, _, _⟩ := a
|
||||||
|
|
||||||
|
definition src3 {A B : Type} (x : arrow_ob A B) : A :=
|
||||||
|
match x with
|
||||||
|
⟨a, _, _⟩ := a
|
||||||
|
end
|
||||||
|
|
||||||
|
example (A B : Type) (x : arrow_ob A B) : src1 x = src2 x :=
|
||||||
|
rfl
|
||||||
|
|
||||||
|
example (A B : Type) (x : arrow_ob A B) : src1 x = src3 x :=
|
||||||
|
rfl
|
||||||
|
|
||||||
|
example (A B : Type) (x : arrow_ob A B) : src2 x = src3 x :=
|
||||||
|
rfl
|
Loading…
Reference in a new issue