fix(kernel/converter): missing case for local constants
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
2ea1e68f25
commit
6e6f778ecf
2 changed files with 6 additions and 2 deletions
|
@ -86,8 +86,8 @@ definition cast {A B : Type} (H : A = B) (a : A) : B
|
||||||
:= eq_rec a H
|
:= eq_rec a H
|
||||||
|
|
||||||
-- TODO(Leo): check why unifier needs 'help' in the following theorem
|
-- TODO(Leo): check why unifier needs 'help' in the following theorem
|
||||||
theorem cast_refl.{l} {A : Type.{l}} (a : A) : @cast.{l} A A (refl A) a = a
|
theorem cast_refl.{l} {A : Type.{l}} (a : A) : cast (refl A) a = a
|
||||||
:= refl (@cast.{l} A A (refl A) a)
|
:= refl (cast (refl A) a)
|
||||||
|
|
||||||
definition iff (a b : Bool) := (a → b) ∧ (b → a)
|
definition iff (a b : Bool) := (a → b) ∧ (b → a)
|
||||||
infix `↔` 50 := iff
|
infix `↔` 50 := iff
|
||||||
|
|
|
@ -415,6 +415,10 @@ struct default_converter : public converter {
|
||||||
is_def_eq(const_levels(t_n), const_levels(s_n), c, jst))
|
is_def_eq(const_levels(t_n), const_levels(s_n), c, jst))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (is_local(t_n) && is_local(s_n) && mlocal_name(t_n) == mlocal_name(s_n) &&
|
||||||
|
is_def_eq(mlocal_type(t_n), mlocal_type(s_n), c, jst))
|
||||||
|
return true;
|
||||||
|
|
||||||
// At this point, t_n and s_n are in weak head normal form (modulo meta-variables and proof irrelevance)
|
// At this point, t_n and s_n are in weak head normal form (modulo meta-variables and proof irrelevance)
|
||||||
if (is_app(t_n) && is_app(s_n)) {
|
if (is_app(t_n) && is_app(s_n)) {
|
||||||
type_checker::scope scope(c);
|
type_checker::scope scope(c);
|
||||||
|
|
Loading…
Reference in a new issue