/* 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 #include #include #include "util/list.h" #include "kernel/environment.h" #include "kernel/context.h" namespace lean { namespace inductive { /** \brief Return a normalizer extension for inductive dataypes. */ std::unique_ptr mk_extension(); /** \brief Introduction rule */ typedef std::tuple intro_rule; /** \brief Inductive datatype */ typedef std::tuple // introduction rules for this datatype > inductive_decl; /** \brief Declare a finite set of mutually dependent inductive datatypes. */ environment add_inductive(environment const & env, level_param_names const & level_params, telescope const & params, list const & decls, // By default the resultant inductive datatypes live in max(level_params), // we can add an offset/lift k, and the resultant type is succ^k(max(level_params)). // If none is provided, then for impredicative environments the result types are Bool/Prop (level 0) optional const & univ_offset = optional(0)); /** \brief Declare a single inductive datatype. */ environment add_inductive(environment const & env, name const & ind_name, // name of new inductive datatype level_param_names const & level_params, // level parameters telescope const & params, // parameters telescope const & indices, // indices list const & intro_rules, // introduction rules optional const & univ_offset = optional(0)); } }