lean4-htt/src/frontends/lean/prenum.h
Leonardo de Moura 70d489db25 feat(frontends/lean): remove prenum macro
We now encode prenum using expr_lit
2018-06-14 15:46:35 -07:00

23 lines
774 B
C++

/*
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "runtime/mpz.h"
#include "kernel/expr.h"
namespace lean {
/** \brief Create a pre-numeral. We create pre-numerals at parsing time. The elaborator is responsible for
encoding them using the polymorphic operations zero, one, bit0 and bit1
\remark Fully elaborated terms do not contain pre-numerals */
expr mk_prenum(mpz const & v);
/** \brief Return true iff \c e is a pre-numeral */
bool is_prenum(expr const & e);
/** \brief Return the value stored in the pre-numeral
\pre is_prenum(e) */
mpz prenum_value(expr const & e);
void initialize_prenum();
void finalize_prenum();
}