Well-kindedness of signature encoding (Theorem 7, existing model)
ProvedNishtAbel2024.theorem7_encoding_well_kindedLet be a kinding context whose size declarations are well formed, let be an unannotated type of simple kind , and let be polarities. If the published polarized encoding relation transforms into while generating size declarations , then universally quantifying those generated sizes gives a well-kinded type:
This establishes the kinding part of signature encoding needed before pattern and spine elaboration.
Formalization Note This is exactly the first conjunct of the existing bundled Theorems 7–9 and Lemmas 3–5 statement, with no added assumptions or restricted syntax. The published encoding relation has extra target-kinding certificates and disjointness premises relative to the printed rules; completeness for all source encodings and global freshness conventions is a separate obligation. The result concerns the existing kinding and bounded-binder rules and does not establish the polarity-classification lemmas or semantic soundness.
import Definitions.Def_NishtAbel2024_Inference
namespace NishtAbel2024
theorem theorem7_encoding_well_kinded :
(∀ (πstar π : Polarity) (Δ : KindingCtx) (A A' : TypeExpr) (Ψ : SizeCtx),
SizeCtxWf Δ.sizes →
FwKindCheck Δ A .star →
EncodeType πstar π Δ A Ψ A' →
KindCheck Δ (TypeExpr.forallSizes Ψ A') .star) := by
sorry
end NishtAbel2024