Proposition 2.13 — Canonical forms of normal almost closed terms
OpenABHS2004V2.proposition_2_13The outer constructors of a normal affinely typed term with only token variables free are those prescribed by its type.
import Definitions.Def_ABHS2004V2_TermSystem
namespace ABHS2004V2
/-- Proposition 2.13. A normal term with only diamond variables free has a
canonical outer form determined by its type. -/
theorem proposition_2_13 {w : Term} {τ : Ty}
(ht : HasType w τ) (hac : IsAlmostClosed w) (hnorm : IsNormal w) :
HasCanonicalNormalForm τ w := by sorry
end ABHS2004V2Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6)
For every term and type , assume has type , every free variable occurrence of has type , and there is no one-step reduct of . The free-variable condition includes the empty list of free occurrences. The step used for normality contracts a beta redex, tensor elimination on tensor introduction, a product projection on product introduction, sum elimination on an injection, or an iterator applied to a seed on a nil or cons list. The cons case requires a syntactic list tail. These contractions can occur at the root or through descendants reached by going into either child of applications and iterators.
The conclusion gives these syntactic shapes for , by case on .
- For the unit type , , the unit constant.
- For , is a variable with recorded type .
- For , is a nil constant, or a chain of fully applied cons constants with the same shape required recursively of the tail . The list-shape test accepts any nil tag and any cons tag at each node.
- For , there are terms with , where is tensor introduction.
- For the product , there are a type and terms with , where is product introduction.
- For the sum , either for some or for some .
- For a function type , is some abstraction , some constant applied on the left to a list of arguments, or some . The argument list in the constant case can be empty.
The typing judgment gives a variable its recorded type, a constant its declared type, and the type when has type . To type at , the rules require at , at , and disjoint free-variable lists in the sense of no shared member. To type at , they require at and a closed at , with arrows associated to the right. A variable is a pair of a natural-number identifier and a type. Its sole occurrence is free as a variable term. Constants contribute no occurrences, abstractions remove all occurrences of the binder, and applications and iterators concatenate their children's free-occurrence lists.