Skip to content

Add formal verification of multiparty choreography types and projection#32

Open
ib823 wants to merge 1 commit intomainfrom
claude/coq-choreography-projection-7v8Cx
Open

Add formal verification of multiparty choreography types and projection#32
ib823 wants to merge 1 commit intomainfrom
claude/coq-choreography-projection-7v8Cx

Conversation

@ib823
Copy link
Owner

@ib823 ib823 commented Mar 18, 2026

Summary

Adds comprehensive formal verification of multiparty session type (MPST) choreography theory following Honda-Yoshida-Carbone (2008/2016 JACM). Includes 250+ proven theorems covering global choreography types, local session types, projection, duality, well-formedness, and communication safety properties.

Changes

  • ChoreographyTypes.v (1120 lines, 150+ theorems): Formalizes core MPST theory

    • Message payload types (PayNat, PayBool, PayUnit, PayString)
    • Role definitions and equality
    • Global choreography types (GEnd, GVar, GRec, GMsg, GBranch)
    • Local session types (LEnd, LVar, LRec, LSend, LRecv, LSelect, LOffer)
    • Local type duality with involution proof (CT_048)
    • Projection function from global to local types
    • Well-formedness conditions for global types
    • Role collection and interaction duality
    • Projection preserves duality theorem (CT_103)
  • ChoreographyProjection.v (872 lines, 100+ theorems): Formalizes projection correctness

    • Mergeability condition for external choice (CP_001-CP_015)
    • Projection determinism and uniqueness (CP_016-CP_019)
    • Operational semantics: GlobalStep and LocalStep relations
    • Substitution properties for recursion unfolding
    • Subject reduction: stepping preserves projection (CP_045-CP_051)
    • Global progress theorem (CP_052-CP_056)
    • Typed network definitions and properties
    • Protocol fidelity and session fidelity theorems
    • Honda-Yoshida-Carbone communication safety properties
  • _CoqProject: Register new proof files in build system

Type

  • Formal proof

Testing

  • Coq build passes (make in 02_FORMAL/coq/)
  • Zero Admitted statements
  • Zero axioms
  • All 250+ theorems fully proven

Checklist

  • No external dependencies added
  • No Admitted in Coq proofs
  • All theorems constructively proven
  • Follows Honda-Yoshida-Carbone MPST theory (JACM 2016)

https://claude.ai/code/session_01RBfTEumbZAeZ1TLTy2rUH9

…tted)

Formalize multiparty choreography types and projection following
Honda-Yoshida-Carbone (2008/2016 JACM) MPST theory.

ChoreographyTypes.v (150 Qed):
- Global choreography types with roles, message passing, binary choice, recursion
- Local session types with send/recv/select/offer
- Local type duality with involutive proof
- Projection function: global -> local per role
- Projection preserves duality at interaction points
- Well-formedness (no self-interaction)
- Network definitions and choreography deadlock freedom
- Example choreographies (request-response, delegation, choice, recursive)

ChoreographyProjection.v (100 Qed):
- Mergeability condition for external choice branches
- Projection determinism (unique by construction)
- Operational semantics (GlobalStep, LocalStep)
- Subject reduction: stepping preserves projection
- Global progress: well-formed non-terminal types always step
- Protocol fidelity and session fidelity (HYC properties)
- Substitution properties for recursion
- Merge compatibility for uninvolved roles

https://claude.ai/code/session_01RBfTEumbZAeZ1TLTy2rUH9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants