2014-05-21 18:31:34 +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
|
|
|
|
*/
|
|
|
|
#include "kernel/inductive/inductive.h"
|
2014-07-29 17:00:40 +00:00
|
|
|
#include "kernel/record/record.h"
|
2014-07-05 17:59:53 +00:00
|
|
|
#include "library/inductive_unifier_plugin.h"
|
2014-05-21 18:31:34 +00:00
|
|
|
|
|
|
|
namespace lean {
|
|
|
|
using inductive::inductive_normalizer_extension;
|
2014-07-29 17:00:40 +00:00
|
|
|
using record::record_normalizer_extension;
|
2014-05-21 18:31:34 +00:00
|
|
|
|
|
|
|
/** \brief Create a HoTT (Homotopy Type Theory) compatible environment */
|
|
|
|
environment mk_hott_environment(unsigned trust_lvl) {
|
2014-07-05 17:59:53 +00:00
|
|
|
environment env = environment(trust_lvl,
|
|
|
|
false /* Type.{0} is proof relevant */,
|
|
|
|
true /* Eta */,
|
|
|
|
false /* Type.{0} is predicative */,
|
|
|
|
list<name>(name("Id")) /* Exact equality types are proof irrelevant */,
|
2014-07-29 17:00:40 +00:00
|
|
|
/* builtin support for inductive and record datatypes */
|
|
|
|
compose(std::unique_ptr<normalizer_extension>(new inductive_normalizer_extension()),
|
|
|
|
std::unique_ptr<normalizer_extension>(new record_normalizer_extension())));
|
2014-07-05 17:59:53 +00:00
|
|
|
return set_unifier_plugin(env, mk_inductive_unifier_plugin());
|
2014-05-21 18:31:34 +00:00
|
|
|
}
|
|
|
|
}
|