Skip to content

verify: attempt theorem_pae_injective_on_types proof (audit C-1 progress)#116

Merged
avrabe merged 1 commit into
mainfrom
verify/theorem-pae-injective-on-types
May 13, 2026
Merged

verify: attempt theorem_pae_injective_on_types proof (audit C-1 progress)#116
avrabe merged 1 commit into
mainfrom
verify/theorem-pae-injective-on-types

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 12, 2026

Second Verus admit attempt, after PR #108's discharge of `lemma_le64_injective`.

Proof structure

Replaces `assume(false)` in `theorem_pae_injective_on_types` with an explicit ~70-line proof:

  1. Establish lengths of every prefix in `spec_pae`'s `Seq::add` chain. `spec_le64` always produces a length-8 sequence (8 explicit elements in the `seq!` macro); `Seq::add` is length-additive.
  2. Contrapositive on `pae1 == pae2`:
    a. Total-length equality → `|type1| == |type2|`
    b. For every index `i`, derive `pae1[16+i] == type1[i]` via the `Seq::add` indexing axiom, applied through the four `.add`s of `spec_pae`. Same chain for `pae2`.
    c. Extensionality (`=~=`) lifts byte-wise agreement to `type1 == type2`, contradicting the `requires type1 != type2`.

This is the natural next-easiest admit after `lemma_le64_injective`: no SHA-256, no crypto, just structural reasoning over `Seq::add`.

Honesty caveat

The proof has not been validated locally — Bazel + Verus tooling was unavailable in the agent's sandbox. The Verus CI job carries `continue-on-error: true` (audit C-1 mask) so the worst case is the proof doesn't discharge and the `assert` chain becomes diagnostic documentation rather than a hard verification gate. The structured `assert` chain in the proof body is itself useful for the next attempt regardless.

What CI tells us

  • ✅ Verus accepts the proof → audit C-1 partial closure advances one step
  • ❌ Verus rejects some step → the failing `assert` gives precise diagnostic info for a follow-up; the `continue-on-error` mask keeps the job from blocking merge

Either way, no regression risk.

Refs: audit C-1.
Verifies (if Verus accepts): CR-3 (parser injectivity, payload-type component of PAE).

Building on PR #108's discharge of lemma_le64_injective, this commit
replaces the `assume(false)` in `theorem_pae_injective_on_types` with
an explicit ~70-line proof. Structure:

  1. Establish lengths of every prefix in `spec_pae`'s `Seq::add`
     chain (spec_le64 → length 8; Seq::add is length-additive).
  2. Contrapositive on `pae1 == pae2`:
       a. Total-length equality → |type1| == |type2|
       b. For every index i, derive pae1[16+i] == type1[i] via the
          Seq::add indexing axiom, applied through the four `.add`s
          of spec_pae. Same chain for pae2.
       c. Extensionality (`=~=`) lifts byte-wise agreement to
          `type1 == type2`, contradicting the `requires type1 != type2`.

This is the natural next-easiest admit after lemma_le64_injective —
no SHA-256, no crypto, just structural reasoning over Seq::add.

The proof has NOT been validated locally because Bazel/Verus tooling
was unavailable in the agent's sandbox. The Verus CI job carries
`continue-on-error: true` (audit C-1 mask) so the worst case is the
proof doesn't discharge and the assert chain becomes diagnostic
documentation rather than a hard verification gate. The structured
`assert` chain in the proof body is itself useful for the next
attempt regardless.

Refs: audit C-1 (incremental closure progressing).
Verifies (if Verus accepts): CR-3 (parser injectivity, payload-type
component of PAE).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 3ee86cb into main May 13, 2026
17 checks passed
@avrabe avrabe deleted the verify/theorem-pae-injective-on-types branch May 13, 2026 04:20
avrabe added a commit that referenced this pull request May 16, 2026
Patch release bundling four PRs:
  #112 — Kani matrix fix + per-job tolerate_failure pattern
  #114 — Cerisier formalization companion docs (mapping + scenarios)
  #115 — bump regorus 0.2.8 → 0.10, fully clears RUSTSEC-2026-0097
  #116 — second Verus admit attempt (theorem_pae_injective_on_types)

Notable: cargo audit ignore-list is down to one entry (rustls-pemfile,
unmaintained-upstream). No actively-fixable RUSTSEC advisories remain.

Audit-related fixes from this release are summarised in the
"Audit follow-ups" sections of the CHANGELOG. Issue #117 (Sigstore
Fulcio cert rotation invalidated our pinned fingerprints) was
surfaced during this cycle and is tracked separately — not blocking
because audit C-4 documents that pinning is currently warn-only.

Trace: skip

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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