fix(kernel/converter): missing case for local constants

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-30 12:57:25 -07:00
parent 2ea1e68f25
commit 6e6f778ecf
2 changed files with 6 additions and 2 deletions

View file

@ -86,8 +86,8 @@ definition cast {A B : Type} (H : A = B) (a : A) : B
:= eq_rec a H
-- 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
:= refl (@cast.{l} A A (refl A) a)
theorem cast_refl.{l} {A : Type.{l}} (a : A) : cast (refl A) a = a
:= refl (cast (refl A) a)
definition iff (a b : Bool) := (a → b) ∧ (b → a)
infix `↔` 50 := iff

View file

@ -415,6 +415,10 @@ struct default_converter : public converter {
is_def_eq(const_levels(t_n), const_levels(s_n), c, jst))
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)
if (is_app(t_n) && is_app(s_n)) {
type_checker::scope scope(c);