Skip to content

Conversation

@MikaelMayer
Copy link
Contributor

@MikaelMayer MikaelMayer commented Jan 19, 2026

Overview

Specification for migrating Strata to Performant Ordering - a unified variable numbering scheme using globally unique natural numbers.

Problem

Current state: Mixed variable representations

  • Lambda: De Bruijn indices (relative counting, complex shifting)
  • Imperative: String identifiers
  • Soundness issue: old() as operator enables proving false (Soundness issue: old as operator. #257)

Proposed

All variables use unique Nat identifiers from a global counter.

Benefits:

  • Fixes soundness issue (Soundness issue: old as operator. #257)
  • Eliminates De Bruijn index shifting, weakening, lifting
  • Variables stable across transformations
  • Simpler proofs (freshness lemmas vs shifting lemmas)

Key Changes

  1. Replace old() operator with dual identifiers in modifies clauses
  2. NextFree structure tracks fresh variable counter with well-formedness invariants
  3. Leverage existing HasVars typeclass infrastructure
  4. VarContext tracks declaration order for unambiguous display

Seeking Feedback

Specification for review (no implementation). Feedback wanted on approach, integration strategy, and migration phasing.

This spec proposes migrating Strata's variable representation to Performant Ordering - a unified variable numbering scheme using globally unique natural numbers.

Key changes:
- All variables (lambda-bound and imperative) use unique Nat identifiers
- Eliminates De Bruijn index shifting, weakening, and lifting
- Replaces old() construct with dual identifiers in modifies clauses
- Introduces NextFree structure to track fresh variable generation
- Leverages existing HasVars typeclass infrastructure

Files:
- requirements.md: 13 requirements with acceptance criteria
- design.md: Complete technical design and architecture
- tasks.md: Detailed implementation plan across 6 phases
The content is already split into requirements.md, design.md, and tasks.md
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.

1 participant