2013-07-24 07:32:01 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-09-13 10:35:29 +00:00
|
|
|
#include "kernel/expr.h"
|
2013-07-24 07:32:01 +00:00
|
|
|
|
|
|
|
namespace lean {
|
|
|
|
/**
|
2013-09-13 19:49:03 +00:00
|
|
|
\brief Replace the free variables with indices 0, ..., n-1 with s[n-1], ..., s[0] in e.
|
2013-07-24 07:32:01 +00:00
|
|
|
|
|
|
|
\pre s[0], ..., s[n-1] must be closed expressions (i.e., no free variables).
|
|
|
|
*/
|
2013-08-03 19:20:01 +00:00
|
|
|
expr instantiate_with_closed(expr const & e, unsigned n, expr const * s);
|
|
|
|
inline expr instantiate_with_closed(expr const & e, expr const & s) { return instantiate_with_closed(e, 1, &s); }
|
2013-08-03 18:45:51 +00:00
|
|
|
|
|
|
|
/**
|
2013-09-13 19:49:03 +00:00
|
|
|
\brief Replace the free variables with indices 0, ..., n-1 with s[n-1], ..., s[0] in e.
|
2013-08-03 18:45:51 +00:00
|
|
|
*/
|
2013-08-03 19:20:01 +00:00
|
|
|
expr instantiate(expr const & e, unsigned n, expr const * s);
|
|
|
|
inline expr instantiate(expr const & e, expr const & s) { return instantiate(e, 1, &s); }
|
2013-07-24 07:32:01 +00:00
|
|
|
}
|