MCPcopy Create free account
hub / github.com/argumentcomputer/ix / mk_pi

Method mk_pi

crates/kernel/src/lctx.rs:154–162  ·  view source on GitHub ↗

Abstract `body` over `fvars` and wrap it in a chain of `All` (or `Let` for `LDecl` entries) binders, innermost-first. Same shape as [`Self::mk_lambda`] but emits `All` for `CDecl` entries. Mirrors `Lean.LocalContext.mkForall`.

(
    &self,
    intern: &mut InternTable<M>,
    fvars: &[FVarId],
    body: &KExpr<M>,
  )

Source from the content-addressed store, hash-verified

152 /// Same shape as [`Self::mk_lambda`] but emits `All` for `CDecl` entries.
153 /// Mirrors `Lean.LocalContext.mkForall`.
154 pub fn mk_pi(
155 &self,
156 intern: &mut InternTable<M>,
157 fvars: &[FVarId],
158 body: &KExpr<M>,
159 ) -> KExpr<M> {
160 let abstracted = abstract_fvars(intern, body, fvars);
161 self.wrap_binders(intern, fvars, abstracted, /* as_lambda */ false)
162 }
163
164 fn wrap_binders(
165 &self,

Callers

nothing calls this directly

Calls 2

abstract_fvarsFunction · 0.85
wrap_bindersMethod · 0.80

Tested by

no test coverage detected