Lemma 4.3 — Terms of token type have a free variable
OpenAehligSchwichtenberg2002V2.lemma_4_3Every well-typed term of type has a nonempty set of free variables. Its typing context is therefore nonempty.
import Definitions.Def_AehligSchwichtenberg2002V2_Bounds
namespace AehligSchwichtenberg2002V2
theorem lemma_4_3 {Γ : Context} {t : Term}
(ht : HasType Γ t .diamond) :
Γ ≠ [] ∧ freeVars t ≠ [] := by sorry
end AehligSchwichtenberg2002V2Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6)
For every context and raw term , if then is nonempty and the list of distinct free variables of is nonempty. The types are generated by , , arrows , tensors , products , and lists . A variable is a pair of a natural-number identifier and a type. Equality of variables compares both entries. The terms are variables, constants, abstractions , pairs , applications , and braces . Successive applications associate to the left and arrow chains associate to the right. The constants and have declared type . For every type , the constants and have declared types and . For all types , has declared type . Contexts are lists of variables. A context is a union of two operand contexts if each variable belongs to the result exactly when it belongs to at least one operand. A disjoint union additionally requires that the operands have no common variable. These relations permit arbitrary ordering and repetitions within a context. The typing relation is generated by the variable rule in any context containing that variable, and the constant rule in any context with the declared constant type. An abstraction has type in if has declared type and has type in a union of and the singleton list . An application has type in a disjoint union of contexts typing at and at . The pair has type if has type and has type in the same context. A term of product type gives applications and of types and in its context. If has Boolean type and both and have type in a shared context disjoint from the context of , then has type in their disjoint union. For distinct variables of types , respectively, has type in a disjoint union of a context typing at and a context disjoint from , provided has type in a union of and . If has type and has type in the empty context, has type in the context of . The free occurrences of a variable term are its singleton list and a constant contributes none. An abstraction filters the occurrences of its binder from those of its body, a pair or application concatenates the two occurrence lists from left to right, and braces use the occurrence list of their contents. The list retains the first occurrence of each distinct variable in the resulting list.