2014-11-11 20:26:26 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "kernel/environment.h"
|
|
|
|
|
|
|
|
namespace lean {
|
2014-11-11 21:46:36 +00:00
|
|
|
bool has_unit_decls(environment const & env);
|
|
|
|
bool has_eq_decls(environment const & env);
|
|
|
|
bool has_heq_decls(environment const & env);
|
2014-11-11 20:26:26 +00:00
|
|
|
/** \brief Return true iff \c n is the name of a recursive datatype in \c env.
|
|
|
|
That is, it must be an inductive datatype AND contain a recursive constructor.
|
|
|
|
|
|
|
|
\remark Records are inductive datatypes, but they are not recursive.
|
|
|
|
|
2014-11-11 21:24:58 +00:00
|
|
|
\remark For mutually indutive datatypes, \c n is considered recursive
|
2014-11-11 20:26:26 +00:00
|
|
|
if there is a constructor taking \c n.
|
|
|
|
*/
|
|
|
|
bool is_recursive_datatype(environment const & env, name const & n);
|
2014-11-11 21:24:58 +00:00
|
|
|
|
|
|
|
/** \brief Return true iff \c n is an inductive predicate, i.e., an inductive datatype that is in Prop.
|
|
|
|
|
|
|
|
\remark If \c env does not have Prop (i.e., Type.{0} is not impredicative), then this method always return false.
|
|
|
|
*/
|
|
|
|
bool is_inductive_predicate(environment const & env, name const & n);
|
2014-11-11 20:26:26 +00:00
|
|
|
}
|