lean4-htt/src/library/tactic/subst_tactic.h

26 lines
995 B
C++

/*
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "library/tactic/tactic_state.h"
namespace lean {
/** \brief Given (H : lhs = rhs), replace lhs with rhs in the goal \c mvar. If symm == true, then replace rhs with lhs.
The replaced term must be a local constant. If renames is not nullptr, then hypotheses renamed by revert/intro
are stored in \c renames.
\pre is_metavar(mvar)
\pre is_local(H)
\pre mctx.get_metavar_decl(mvar) != none
\pre typeof(H) is an equality
\pre symm == false ==> is_local(lhs(typeof(H)))
\pre symm == false ==> is_local(rhs(typeof(H))) */
expr subst(environment const & env, options const & opts, transparency_mode const & m, metavar_context & mctx,
expr const & mvar, expr const & H, bool symm, name_map<name> * renames);
void initialize_subst_tactic();
void finalize_subst_tactic();
}