21 lines
678 B
C++
21 lines
678 B
C++
/*
|
|
Copyright (c) 2018 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Author: Leonardo de Moura
|
|
*/
|
|
#include "kernel/type_checker.h"
|
|
#include "library/aux_recursors.h"
|
|
#include "library/constants.h"
|
|
|
|
namespace lean {
|
|
bool is_cases_on_recursor(environment const & env, name const & n) {
|
|
return ::lean::is_aux_recursor(env, n) && n.get_string() == "cases_on";
|
|
}
|
|
|
|
expr mk_lc_unreachable(type_checker::state & s, local_ctx const & lctx, expr const & type) {
|
|
type_checker tc(s, lctx);
|
|
level lvl = sort_level(tc.ensure_type(type));
|
|
return mk_app(mk_constant(get_lc_unreachable_name(), {lvl}), type);
|
|
}
|
|
}
|