8000 feat(schema): add proof profiles, restriction profiles, and proof variants · Issue #2 · Mnehmos/mathcorpus · GitHub
[go: up one dir, main page]

Skip to content

feat(schema): add proof profiles, restriction profiles, and proof variants #2

Closed

Description

@Mnehmos

Problem

Packets currently record tactics and basic metrics but cannot distinguish theorem lookup, normalization, arithmetic automation, induction, witness construction, case analysis, or multi-lemma composition. They also represent only one canonical proof and cannot encode benchmark restrictions.

Scope

Extend MathCorpus with child records for:

  • ProofProfile
  • ProofVariant
  • RestrictionProfile

Suggested profile fields include primary and secondary proof classes, automation level, retrieval depth, planning depth, branch count, witness invention, induction, contradiction, case analysis, and dependency composition.

Proof variants should support canonical, shortest, pedagogical, restricted, interactive, and alternate-model styles without mutating the immutable packet identity.

Restriction profiles should support forbidden tactics, allowed tactics, allowed dependency sets, maximum tactic or dependency counts, and requirements for explicit intermediate claims.

Acceptance criteria

  • Packet schema can reference zero or more versioned child proof variants.
  • Proof-profile vocabulary is documented and validated.
  • Restriction profiles are hash-pinned and reusable across packets.
  • Canonical proof identity remains stable when variants are added.
  • At least five elementary algebra packets are migrated as fixtures.
  • Validation rejects a variant whose statement, packet, environment, or proof hash does not match its parent evidence.

Activity

  1. Mnehmos commented on Jul 12, 2026

    @Mnehmos
    OwnerAuthor

    Implemented (local commit 8c74201, stacked on 7f1ac10 from #1 — not yet pushed, see note on #1):

    • packet.schema.json gains proof_variants[] ($defs.proof_variant / $defs.proof_profile), mirroring MCIP's ProofVariant/ProofProfile shapes from feat(schema): define MathCorpus Interchange Protocol v1 for Proof Search enrichment #1. Styles: canonical, shortest, pedagogical, restricted, interactive, alternate_model. proof_profile carries primary/secondary proof class (theorem_lookup, normalization, arithmetic_automation, induction, witness_construction, case_analysis, multi_lemma_composition), automation level, retrieval/planning depth, branch count, and witness/induction/contradiction/case-analysis flags.
    • Canonical proof identity stays stable: policy.check_proof_variants rejects a variant whose statement or environment hash disagrees with its parent packet, and (for canonical-styled variants specifically) whose proof_body_sha256 disagrees with the packet's own recorded proof hash. Smoke-tested directly.
    • Restriction profiles are hash-pinned and reusable: a new restriction_profiles/ catalog reuses schema/mcip/v1/restriction_profile.schema.json directly (no duplicate schema) so profiles live once and are referenced by (restriction_profile_id, restriction_profile_sha256) from any packet's proof_variants. tools/stamp_restriction_profiles.py stamps record_hash; policy.check_restriction_profile_refs rejects a dangling id or a stale hash pin. tools/validate_packets.py now validates the catalog automatically — no CI change needed beyond the existing invocation.
    • 5 elementary algebra packets migrated: add_assoc, add_comm, add_left_comm, add_mul, add_zero each get a canonical variant; add_assoc and add_mul additionally get a restricted variant pinned to a shared no_ring_automation profile — verified true by reading their actual .lean proof bodies (neither uses ring/ring_nf/noncomm_ring), not fabricated.
    • 4 failure modes smoke-tested against scratch copies: variant statement-hash mismatch, canonical-variant proof-hash mismatch, dangling restriction-profile reference, stale hash pin — all correctly rejected.
    • Full corpus (355 packets) plus the full CI-equivalent pipeline (manifests, split manifest, dedupe, JSONL export, redaction audit) run locally end-to-end: 0 errors.

    Tracked in agents/github_issues/DONE.md, FEATURES.md, HANDOFF.md.

  • added 3 commits that reference this issue on Jul 12, 2026
    8c74201
    928b2be
    ae51810
  • 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

      No labels
      No labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        0