AFTD Auto-Formalizing Theoretical Domains

Cslib.SKI.Polynomial.eval

defimported Lean

Substitute terms for the free variables of a polynomial

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Relation in
def Cslib.SKI.Polynomial.eval {n : Nat} (Γ : SKI.Polynomial n) (l : List SKI) (hl : List.length l = n) :
    SKI
Defined in
CSLib, `Cslib.SKI.Polynomial.eval`
Lean proof
By Thomas Waring, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 Thomas Waring. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
none listed
Built on 3
Used by 14

Lean source view module on GitHub

open Cslib.SKI
@[inherit_doc]
local infixl:100 " ⬝ " => app

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Relation in
/-- Substitute terms for the free variables of a polynomial -/
def Cslib.SKI.Polynomial.eval {n : Nat} (Γ : SKI.Polynomial n) (l : List SKI) (hl : List.length l = n) :
    SKI :=
  match Γ with
  | .term x => x
  | .var i => l[i]
  | .app Γ Δ => (Γ.eval l hl) ⬝ (Δ.eval l hl)
See it in the graphDiscuss this resultChallenge it