Lemma 2 — Embedding, extraction, and idempotence
OpenBergerSchwichtenberg1991V2.lemma_2Two raw terms are -equivalent exactly when their indexed families agree. Extracting from any embedded term gives an -equivalent representative. Standardizing an already standardized term again at the same prefix returns the same syntax.
import Definitions.Def_BergerSchwichtenberg1991V2_Syntax
namespace BergerSchwichtenberg1991V2
/-- Lemma 2 (p. 205). The families distinguish α-classes, extraction recovers an
α-variant, and standardizing again at the same prefix gives the same term. These
statements apply also to raw terms without a typing derivation. -/
theorem lemma_2 :
(∀ r s : Term, AlphaEq r s ↔ EMB r = EMB s) ∧
(∀ r : Term, AlphaEq (EXTRACT (EMB r)) r) ∧
(∀ (r : Term) (k : Index), EMB (EMB r k) k = EMB r k) := by sorry
end BergerSchwichtenberg1991V2Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6)
Let an index be any finite Boolean list, including the empty list . For a raw term and index , is the raw term obtained by giving each abstraction binder the indexed name formed by prefixing its root-to-binder path with . Paths append into an abstraction body or the left child of an application and into the right child of an application. A variable is its name, indexed or natural-number, together with its type. A bound occurrence takes its nearest matching binder's new name, and a free occurrence keeps its full variable. Two terms are -equivalent precisely when their trees of abstraction types, bound-variable types and binder paths, and unchanged free variables are equal. For an index-to-term function , put equal to the maximum length of any index on a variable occurrence or binder in or , using if there are no such indices. Then , where is the list of zero bits. For all raw terms , and are -equivalent if and only if the functions and are equal. For every raw term , is -equivalent to . For every raw term and every index , as raw terms, with no prefix condition on this equality. All three claims include open and ill-typed raw terms.