You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rust checker: propagate the additive-& / multiplicative-⊗ product split #109
The mechanised solo-core now distinguishes two linear products (ADR-007):
intro
elim
usage
&TWith
With t1 t2
Fst / Snd
shared
⊗TTensor
Tensor t1 t2
let (x,y)=e
split
The Rust type checker (crates/my-lang/src/types.rs) predates this split. To keep the implementation faithful to its spec (the mechanised kernel leads the checker, per proofs/ALIGNMENT-PLAN.md §2), the checker should gain the same distinction.
Task
Add the two product type formers to Ty (additive & and multiplicative ⊗), replacing/clarifying any single "pair" type.
Introduction: & shares the usage context across both components; ⊗ splits it.
Elimination: & → projections (Fst/Snd); ⊗ → a two-binder let (x,y) = e form.
Unit tests mirroring the kernel rules (T_With/T_Fst/T_Snd and T_Tensor/T_LetPair), in the style of the existing Echo tests.
Notes
Surface syntax for ⊗ / let-pair is a separate concern (parser slice); this issue is the type-checker core.
Echo handling (Ty::Echo, is_assignable_from) is unaffected.
Acceptance
Ty carries both products; assignability/usage-splitting matches the kernel; tests green.
DESIGN DECISION REQUIRED. Issue tracks alignment of Rust type checker with mechanised solo-core's two linear products (additive & TWith vs multiplicative ⊗ TTensor). Requires: (1) choosing product discipline, (2) updating Ty enum, (3) implementing introduction/elimination forms, (4) adding unit tests. Blocked on ADR-007 clarification and F1.4 preservation proof strategy. Cannot be auto-resolved; needs human design input.
Activity
hyperpolymath commentedon Aug 12, 2026
DESIGN DECISION REQUIRED. Issue tracks alignment of Rust type checker with mechanised solo-core's two linear products (additive & TWith vs multiplicative ⊗ TTensor). Requires: (1) choosing product discipline, (2) updating Ty enum, (3) implementing introduction/elimination forms, (4) adding unit tests. Blocked on ADR-007 clarification and F1.4 preservation proof strategy. Cannot be auto-resolved; needs human design input.