Skip to content

proof: generate Lean-to-Zig finite-matrix differential fixtures #3

Open

Description

@SMC17

Objective

Turn the initial Lean finite-matrix oracle into a machine-checked cross-language conformance gate rather than two implementations that merely look similar.

Scope

  • K3, LP, FDE, and Ł3 truth tables and designated values.
  • Canonical validity and countervaluation claims in src/logic/manyvalued.zig.
  • Generated, deterministic fixture format consumed by Zig tests.
  • Lean theorem statements remain stable during automated proof generation.

Acceptance gates

  • Lean exports or checks every operation table used by Zig.
  • A deterministic tool produces a checked fixture with provenance and schema version.
  • Zig replays every fixture and rejects at least one mutated table/value/designation fixture.
  • lake build passes under the pinned toolchain.
  • CI nanoda check passes with sorryAx forbidden.
  • zig build test and TRUST_OK pass.
  • Documentation distinguishes kernel proof from Lean-to-Zig translation assurance.

Aristotle boundary

Aristotle may propose proofs and general lemmas. Raw generated output is not accepted until statement diff review, kernel compilation, independent checking, and Zig differential replay all pass.

Activity

  1. added
    enhancement
    correctness
    proof
    on Jul 21, 2026
  2. SMC17 commented on Aug 4, 2026

    @SMC17
    OwnerAuthor

    Progress note (v0.21)

    Many-valued side now has native Zig fragments that this issue can later differential against:

    • paraconsistent/lp.zig — Belnap-Dunn four-valued / LP (T/F/B/N)
    • fuzzy/fuzzy.zig — Gödel / product / Łukasiewicz + Kleene 3-valued

    The Lean→Zig fixture pipeline, lake build gate, and mutation rejection of corrupted tables remain open work under this issue. Not closing.

  3. SMC17 commented on Aug 4, 2026

    @SMC17
    OwnerAuthor

    Zig-side ready (v0.24)

    src/manyvalued/fixtures.zig now provides:

    • Schema version 1 tables for K3, LP, Ł3 (FDE via existing paraconsistent/lp)
    • Double-negation integrity check
    • Mutation rejection test (mutateAndReject)
    • Contract documented in docs/LEAN_ORACLE.md

    Remaining gates on this issue are Lean-side: lake build, fixture export/provenance, CI nanoda with sorryAx forbidden. Zig differential consumer is in place.

  4. added
    type: feature
    priority: P2
    status: ready
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctnessenhancementpriority: P2proofstatus: readytype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions