AFTD Auto-Formalizing Theoretical Domains

Cslib.LambdaCalculus.Named.Term.Subst

inductiveimported Lean

Capture-avoiding substitution, as an inference system.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
universe u in
variable {Var : Type u} in
inductive Cslib.LambdaCalculus.Named.Term.Subst [DecidableEq Var] : Term Var → Var → Term Var → Term Var → Prop
Defined in
CSLib, `Cslib.LambdaCalculus.Named.Term.Subst`
Lean proof
By Fabrizio Montesi, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 Fabrizio Montesi. 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 2

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
universe u in
variable {Var : Type u} in
/-- Capture-avoiding substitution, as an inference system. -/
inductive Cslib.LambdaCalculus.Named.Term.Subst [DecidableEq Var] : Term Var → Var → Term Var → Term Var → Prop where
  | varHit : (var x).Subst x r r
  | varMiss : x ≠ y → (var y).Subst x r (var y)
  | absShadow : (abs x m).Subst x r (abs x m)
  | absIn : x ≠ y → y ∉ r.fv → m.Subst x r m' → (abs y m).Subst x r (abs y m')
  | app : m.Subst x r m' → n.Subst x r n' → (app m n).Subst x r (app m' n')
See it in the graphDiscuss this resultChallenge it