Skip to content

feat(MPS/RFP): add unit pair-index structural form#3388

Merged
LionSR merged 2 commits into
mainfrom
codex/rfp-source-isometry-3372
Jun 22, 2026
Merged

feat(MPS/RFP): add unit pair-index structural form#3388
LionSR merged 2 commits into
mainfrom
codex/rfp-source-isometry-3372

Conversation

@LionSR

@LionSR LionSR commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Motivation

Description

  • Added MPSTensor.rfp_nt_structural_full_unit_pair (TNLean/MPS/RFP/StructuralFull.lean): derives from rfp_nt_structural_full by rescaling Λ ↦ Λ / √D and U ↦ √D · U, preserving the decomposition A^i = XΛU^iX⁻¹ while expressing the pair-index sum as δ_{α,α'}δ_{β,β'}.
  • Added rfp_nt_structural_full_blocks_unit_pair: per-block companion theorem.
  • Updated blueprint/src/chapter/ch14_correlations.tex with matching blueprint entries in Chapter 14.
  • Updated docs/paper-gaps/cpsv16_rfp_isometry_scope.tex to record that the scalar normalization comparison is now explicit; trace normalization (tr Λ = 1) and cross-block orthogonality (arXiv:1606.00608, eq. III_isometry) remain open.
  • This PR does not close Prove Appendix B even-chain product-pair factorization #3372: the general even-chain product-of-entangled-pairs factorization for hCore (N >= 2) is a follow-up.

Testing

  • lake build TNLean.MPS.RFP.StructuralFull TNLean.MPS.RFP.CommutingBridge
  • python3 scripts/check_reader_facing_prose.py --root . --diff-base origin/main --ci
  • python3 scripts/blueprint_lean_sync.py --root . --diff-base origin/main --ci
  • git diff --check origin/main...HEAD
  • rg -n '\bsorry\b|\badmit\b|\bnative_decide\b|\bunsafeCast\b|\baxiom\b' TNLean/MPS/RFP/StructuralFull.lean TNLean/MPS/RFP/CommutingBridge.lean || true

Refs #3372


Note

Low Risk
Pure Mathlib rescaling proofs and doc/blueprint sync on top of an existing theorem; no runtime or security-sensitive code.

Overview
Adds unit pair-index variants of the RFP structural isometry theorems so the formal statements match the Cirac et al. convention where the pair-index sum equals Kronecker deltas (not scaled by (D^{-1})).

In Lean, rfp_nt_structural_full_unit_pair is proved from rfp_nt_structural_full by rescaling (\Lambda \mapsto \Lambda/\sqrt{D}) and (U \mapsto \sqrt{D},U), keeping (A^i = X\Lambda U^i X^{-1}) while rewriting the pair-index orthonormality. rfp_nt_structural_full_blocks_unit_pair applies the same per block. Chapter 14 blueprint entries and docs/paper-gaps/cpsv16_rfp_isometry_scope.tex now document both normalization conventions explicitly; trace normalization and cross-block isometry remain out of scope.

Reviewed by Cursor Bugbot for commit 6bb9949. Bugbot is set up for automated code reviews on this repo. Configure here.

@claude claude Bot added formalization Lean 4 formalization task 1606.00608 arXiv:1606.00608 (MPDO RFP) rfp-mpdo Renormalization fixed points and MPDO theory follow-up labels Jun 22, 2026
@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown

PR cleanup

Field Before After
Title `feat(MPS/RFP): add unit pair-index structural form` unchanged
Body `## Summary` / `## Scope` / `## Validation` headings restructured to `### Motivation` / `### Description` / `### Testing` template; `Refs` → `Addresses #3372`; Cursor Bugbot note preserved
Labels (none) added: `formalization`, `1606.00608`, `rfp-mpdo`, `follow-up` (copied from #3372)
Issue linked to #3372

Conventions: CONTRIBUTING.md

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blueprint & Prose Review — PR 3388

Category A (blueprint ↔ Lean equivalence): 0 issues.

Both new declarations check out:

  • rfp_nt_structural_full_unit_pair — blueprint and Lean hypotheses match (IsNormal, IsRFP, left-canonical hLeft); conclusions agree: invertible X, positive Λ, the unit pair-index identity ∑ᵢ star(Uᵢ_{pq}) · Uᵢ_{p'q'} = δ_{pp'}, and the conjugation form. The deliberate omission of ∑ᵢ (Uᵢ)† Uᵢ = I (present in the parent) is correct for the rescaled U and is consistently absent from both blueprint and Lean.
  • rfp_nt_structural_full_blocks_unit_pair — blockwise version; same analysis holds per block.
  • All \leanok tags (statement and proof) are valid: both Lean proofs are sorry-free and the \lean{...} tags resolve.

Category B (prose quality): 4 issues — see inline comments.

# Location Rule Issue
B1 ch14_correlations.tex proof of thm:rfp_nt_structural_full_unit_pair §"Source-faithful … formula-first" "the pair-index equation loses the factor $D^{-1}$" is a verbal summary; the substitution identity $D \cdot D^{-1}\delta = \delta$ should be displayed
B2 StructuralFull.lean line 446 §1 — prefer mathematical phrasing `rfp_nt_structural_full` used as a cross-reference rather than a mathematical description
B3 StructuralFull.lean lines 457–458 §1 — source-reference shorthand banned `eq:III_isometry` is a LaTeX source label, not a Lean identifier; backtick-wrapping it is the banned shorthand pattern
B4 StructuralFull.lean line 593 §1 — prefer mathematical phrasing `rfp_nt_structural_full_blocks` used as a cross-reference; same issue as B2

B3 is the clearest violation (a LaTeX internal label in backticks). B1 is required by the formula-first rule. B2 and B4 are the softer "use sparingly, prefer mathematical phrasing" guidance — easy to fix with a one-line edit each.

docs/paper-gaps/cpsv16_rfp_isometry_scope.tex was reviewed but is out of scope (developer-facing notes in docs/).

Comment thread blueprint/src/chapter/ch14_correlations.tex Outdated
Comment thread TNLean/MPS/RFP/StructuralFull.lean Outdated
Comment thread TNLean/MPS/RFP/StructuralFull.lean Outdated
Comment thread TNLean/MPS/RFP/StructuralFull.lean Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: feat(MPS/RFP): add unit pair-index structural form

Thank you — the mathematics of the new theorems is correct. rfp_nt_structural_full_unit_pair rescales U₀ ↦ √D·U₀, Λ₀ ↦ Λ₀/√D, leaving the product Λ U (hence A^i = X Λ U^i X⁻¹) invariant while turning the pair-index sum from D⁻¹·δ into the unit δ. The (star s * s) = D cancellation, the positivity Λ₀ k / √D > 0, and the s • L/s • U₀ regrouping all check out. Crucially, the new theorem correctly drops the ∑ᵢ (Uⁱ)ᴴ Uⁱ = 1 conjunct, since in the rescaled convention that contracted identity is D·I, not I. Hypotheses match the parent rfp_nt_structural_full exactly — no smuggled assumptions — and the blueprint/Lean both honestly state that trace-normalization and cross-block orthogonality remain out of scope. Faithfulness rule satisfied.

One 🟡 issue blocks approval (paper-gap note precision), plus two smaller documentation/style points. Details inline.

🟡 Paper-gap note — verdict conflates two normalization conventions

In docs/paper-gaps/cpsv16_rfp_isometry_scope.tex §Conclusion, the sentence claiming the development "exposes both" the contracted identity ∑ᵢ (U_k^i)† U_k^i = I and the unit pair-index orthonormality reads as if both hold for one U_k. They hold for different tensors (the D_k^{-1/2}-normalized U_k of ..._blocks vs. the √D_k-rescaled U_k of ..._blocks_unit_pair, where the contracted identity is D_k·I). Per policy.tex §Classification ("a precise verdict") this should be made convention-explicit. See inline comment.

🟡 Documentation — scope-restriction marker omitted

The parent rfp_nt_structural_full_blocks carries an inline **Scope restriction (source isometry):** marker pointing at the paper-gap note (per CLAUDE.md §Locally-fixable deviations). The two new theorems are equally scope restrictions of Corollary III.cor3 / eq:III_isometry but use only free prose. For greppable consistency, add the marker. See inline comment.

ℹ️ Advisory — unused destructured hypothesis

hU₀_left is bound by the obtain but never used in the new proof; replacing it with _ avoids an unused-variable linter warning.

Note on verification

I verified the proof mathematically; a full lake env lean type-check was not possible here because the layer-5b dependency oleans for StructuralFull.lean are not prebuilt in this environment. The PR reports a successful lake build TNLean.MPS.RFP.StructuralFull; please ensure CI confirms it.

Verdict: REQUEST_CHANGES — resolve the paper-gap note precision and add the scope-restriction markers.

Comment thread docs/paper-gaps/cpsv16_rfp_isometry_scope.tex Outdated
Comment thread TNLean/MPS/RFP/StructuralFull.lean Outdated
Comment thread TNLean/MPS/RFP/StructuralFull.lean Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: feat(MPS/RFP): add unit pair-index structural form

This is a third-party review confirming and extending findings from two prior bot reviews. The mathematics is correct — the rescaling U₀ ↦ √D·U₀, Λ₀ ↦ Λ₀/√D preserves the product Λ U (hence the decomposition A^i = X Λ U^i X⁻¹) while turning the pair-index sum from D⁻¹·δ into the unit δ. The (star s * s) = D cancellation, the positivity argument Λ₀ k / √D > 0, and the s • L/s • U₀ regrouping all check out. The new theorem correctly drops the ∑ᵢ (Uⁱ)ᴴ Uⁱ = 1 conjunct that is not preserved under the rescaling.


🔴 Proof Integrity — No issues.

No sorry, admit, axiom, native_decide, or unsafeCast present in the diff. Build passes (lake build TNLean.MPS.RFP.StructuralFull succeeds).

🔴 Proof Correctness — One advisory issue.

Lines 472–473 (StructuralFull.lean): The obtain block binds hU₀_left from rfp_nt_structural_full, but hU₀_left is never used in the proof. Replace with _ to avoid potential linter warnings. (Also flagged by a prior review.)

🔴 Type Safety — No issues.

No type mismatches, universe issues, or coercion problems. Complex/real conversions are handled correctly with Complex.ofReal_mul, Complex.ofReal_div, exact_mod_cast, etc.

🟡 Mathlib Style — No issues.

Naming follows conventions (camelCase, descriptive names). Tactic usage is appropriate (calc, simp with explicit lemma lists, rw, positivity). No unnecessary opens.

🟡 Performance — No issues.

The proofs use focused simp with explicit lemma sets, calc blocks of moderate depth, and a single positivity call. No risk of decide on large types or unbounded simp.

🟡 Modularity & Duplication — No issues.

The new theorems are genuinely new statements (different normalization convention). No duplication of existing Mathlib results.

🟡 Documentation — Two issues (blocking).

  1. Lines 593–597 (StructuralFull.lean) — rfp_nt_structural_full_blocks_unit_pair docstring: The docstring is brief and neither references the paper-gap note (docs/paper-gaps/cpsv16_rfp_isometry_scope.tex) nor carries a formal **Scope restriction (**)** marker. The parent theorem rfp_nt_structural_full_blocks has a full scope-restriction marker at lines 568–576 linking to the paper-gap note. Per CLAUDE.md §Locally-fixable-deviations, this marker format is required for greppable consistency. Must be fixed before merge.

  2. Lines 445–459 (StructuralFull.lean) — rfp_nt_structural_full_unit_pair docstring: The docstring describes what is not proved in prose and references the paper-gap note, which is good. However, for consistency with rfp_nt_structural_full_blocks, it should also carry the formal **Scope restriction (source isometry):** marker format that explicitly names the missing conditions (tr(Λ)=1, cross-block orthogonality) and links to the paper-gap note. The content is already present; only the marker format needs to be added. (Also flagged by a prior review.) Must be fixed before merge.

  3. Lines 10–35 (StructuralFull.lean) — Module docstring: The module docstring describes the main result (rfp_nt_structural_full) and proof strategy. It should be updated to mention that the file also provides the unit pair-index variants rfp_nt_structural_full_unit_pair and rfp_nt_structural_full_blocks_unit_pair, since they are now first-class theorems in this file.

🟡 Paper-gap Notes — One issue (blocking).

Lines 141–143 of docs/paper-gaps/cpsv16_rfp_isometry_scope.tex §Conclusion:

"The formal development now exposes both the contracted per-block identity ∑_i (U_k^i)^† U_k^i = I and the diagonal pair-index orthonormality in the unit source convention."

Per policy.tex §Classification, the verdict should be "convention-explicit." The contracted identity ∑ (U_k^i)^† U_k^i = I holds for the D_k^{-1/2}-scaled U_k of rfp_nt_structural_full_blocks, while the unit pair-index orthonormality holds for the √D_k-rescaled U_k of rfp_nt_structural_full_blocks_unit_pair. These are different tensors related by rescaling. The current phrasing reads as if both properties hold simultaneously for one U_k. Clarify by adding a phrase like "across the two conventions" or distinguishing which property holds under which normalization choice. (Also flagged by a prior review.) Must be fixed before merge.


Out of Scope (per review instructions)

Blueprint ↔ Lean sync and prose quality are handled by the dedicated Blueprint & Prose Review workflow. Prior reviews flagged prose issues (B1–B4) that remain unaddressed.


Verdict: REQUEST_CHANGES — resolve the documentation scope-restriction markers and the paper-gap note precision before approval.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blueprint ↔ Lean Sync & Prose Review — synchronize pass

All 7 threads from the previous round were resolved above (marked outdated in the updated diff; confirmed fixed).


Category A — Blueprint ↔ Lean equivalence

thm:rfp_nt_structural_full_unit_pair

  • Hypotheses match: IsNormal A ("normal"), IsRFP A ("renormalization fixed point"), hLeft : ∑ i, (A i)ᴴ * A i = 1 ("canonical form II"). ✓
  • Conclusion matches: decomposition $A^i = X\Lambda U^i X^{-1}$ with X.det ≠ 0, all diagonal entries positive, pair-index equation $= \delta_{\alpha\alpha'}\delta_{\beta\beta'}$ encoded as if p = q then 1 else 0. ✓
  • \leanok on statement and proof: no sorry in the proof body. ✓
  • \uses{thm:rfp_nt_structural_full} correctly lists the one dependency. ✓

thm:rfp_nt_structural_full_blocks_unit_pair

  • Blockwise lift of the above; blueprint's "under the hypotheses of Theorem~\ref{thm:rfp_nt_structural_full_blocks}" matches the Lean universal over k. ✓
  • \leanok on statement and proof: proof is fun k => rfp_nt_structural_full_unit_pair (A k) ...; no sorry. ✓
  • \uses{thm:rfp_nt_structural_full_unit_pair} correct. ✓

0 equivalence mismatches. 0 stale \leanok.


Category B — Prose quality

  • Blueprint proof sketch now displays the rescaling calculation $D \cdot D^{-1},\delta_{\alpha\alpha'}\delta_{\beta\beta'} = \delta_{\alpha\alpha'}\delta_{\beta\beta'}$ explicitly. ✓
  • Docstrings use LaTeX cross-references (Theorem~\ref{...}) instead of bare Lean identifiers. ✓
  • Source citations use arXiv:1606.00608, lines 550--554 rather than internal label shorthand. ✓
  • Both docstrings carry the **Scope restriction (source isometry):** marker with paper-gap reference. ✓
  • docs/paper-gaps/ update separates the two normalization conventions clearly (each convention's contracted identity and pair-index equation stated for its own $U_k$). ✓
  • No banned software-engineering terms, no LLM filler patterns, no bare Lean jargon in blueprint prose. ✓

0 prose issues.


Verdict: APPROVE. 0 equivalence mismatches, 0 stale status tags, 0 prose issues.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: feat(MPS/RFP): add unit pair-index structural form (re-review after 6bb9949)

The second commit addressed all issues from the prior three review cycles. The mathematics is correct and the documentation is now precise.

Resolved prior issues

All 7 prior bot review threads have been addressed:

  • Blueprint proof now displays the explicit D * D^{-1} * delta = delta calculation
  • Lean identifier cross-references replaced with Theorem ref
  • eq:III_isometry shorthand replaced with line-range citation
  • Paper-gap note now clearly distinguishes D_k^{-1/2} vs sqrt(D_k) conventions
  • Scope restriction markers added to both new theorems
  • Unused hU0_left hypothesis replaced with underscore

Category-by-category assessment

  • Proof integrity: No sorry, admit, axiom, native_decide, or unsafeCast.
  • Proof correctness: The rescaling Lambda = Lambda0 / sqrt(D), U = sqrt(D) * U0 preserves Lambda * U = Lambda0 * U0 (hence A^i = X * Lambda * U^i * X^{-1}) while transforming the pair-index sum from D^{-1} * delta to the unit delta via star(sqrt(D)) * sqrt(D) = D cancellation. The new theorems correctly drop the sum (U^i)^H * U^i = 1 conjunct that would become D * I under rescaling. All real/complex conversions are correct.
  • Mathlib style: Naming follows conventions (snake_case for theorems). Tactic usage is appropriate (calc, focused simp, positivity). No unnecessary opens.
  • Type safety: No type mismatches or coercion issues. Real.sqrt, Complex.ofReal_*, and exact_mod_cast are used correctly.
  • Performance: Proofs use focused simp with explicit lemma sets; no risk of timeouts.
  • Modularity & duplication: The new theorems are genuinely new statements (different normalization convention). No duplication.
  • Documentation: Both theorems have comprehensive docstrings with displayed equations, Scope restriction markers, and paper-gap note references. Hypotheses match the parent exactly.
  • Paper-gap notes: The updated conclusion now gives a convention-explicit verdict per policy.tex: the contracted identity = I holds in the D_k^{-1/2} convention while the unit pair-index orthonormality holds in the rescaled convention where the contracted identity is instead D_k * I. Remaining gaps (tr(Lambda) = 1 and cross-block orthogonality) are clearly identified.

Verdict: APPROVE — no blocker or requires-changes issues remain.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary — APPROVE

This PR adds two unit-pair-index variants of the RFP structural isometry theorems plus matching blueprint and paper-gap documentation. All issues raised in the previous review cycle have been addressed by the new commits, and I find no new blocking or change-requiring issues.

Proof integrity 🔴 — clean

No sorry, admit, native_decide, unsafeCast, or axiom in TNLean/MPS/RFP/StructuralFull.lean (the rg hits are the English word "admits" in docstrings, not the admit tactic). Both new theorems, MPSTensor.rfp_nt_structural_full_unit_pair and MPSTensor.rfp_nt_structural_full_blocks_unit_pair, are fully proved.

Proof correctness 🔴 — sound

rfp_nt_structural_full_unit_pair is a clean rescaling of rfp_nt_structural_full: it sets Λ ↦ Λ₀/√D, U ↦ √D · U₀. The three obligations are each discharged with explicit calc blocks:

  • Positivity of Λ from div_pos (hΛ₀_pos k) hsR_pos.
  • Unit pair-index sum: ∑ᵢ star(U i p) · U i q = (star s · s) · ∑ᵢ star(U₀ i p) · U₀ i q = D · (if p=q then D⁻¹ else 0) = if p=q then 1 else 0, using hs_star : star s · s = (D:ℂ) (since s = (√D : ℝ) and √D·√D = D). Correct.
  • Decomposition preservation: diag(Λ₀)·U₀ = (s • L)·U₀ = L·(s • U₀) = diag(Λ)·U, so Aⁱ = X·diag(Λ)·Uⁱ·X⁻¹ survives. Correct.

The blueprint proof body now shows the explicit D·D⁻¹ cancellation rather than a verbal summary, addressing the earlier comment.

Type safety 🔴 — clean

D : ℕ with [NeZero D]; hD_ne, hDpos, hsR_ne are all derived from it. The per-block variant correctly threads [∀ k, NeZero (dim k)]. No universe or coercion concerns.

Faithfulness / paper-gap note 🟡 — satisfied

Both theorems are scope restrictions of Corollary III.cor3, properly marked inline with **Scope restriction (source isometry):**, and recorded in docs/paper-gaps/cpsv16_rfp_isometry_scope.tex. Reviewed against docs/paper-gaps/policy.tex: the note is self-contained, introduces its notation, cites the source (arXiv:1606.00608, MPDO-22-12-17-2.tex:543–554 and :583–589), and now gives a precise verdict that cleanly separates the two conventions — the $D_k^{-1/2}$ convention ($\sum_i (U_k^i)^\dagger U_k^i = I$, pair-sum $D_k^{-1}\delta\delta$) versus the rescaled unit convention (pair-sum $\delta\delta$, contracted identity $D_k I$). This fixes the earlier conflation where a single $U_k$ appeared to satisfy both =I and unit orthonormality simultaneously. The note correctly continues to flag the two genuinely open items: source trace-normalization $\operatorname{tr}\Lambda_k = 1$ and the cross-block $\delta_{j,j'}$ orthogonality of eq:III_isometry.

Documentation / style 🟡 — satisfied

Both new declarations carry docstrings with mathematical meaning and scope markers; theorem names are snake_case; line length within limits.

Prior review threads

All 7 previously-open claude threads (the unused hU₀_left now bound as _, the paper-gap conflation, the missing scope markers, and the prose threads) are addressed by the new commits and have been resolved.

Note on validation

Mathlib oleans are not cached in this environment, so I did not run a full lake build; the assessment rests on close reading plus the author's stated lake build TNLean.MPS.RFP.StructuralFull TNLean.MPS.RFP.CommutingBridge. The proofs are elementary rescaling arguments with no fragile automation.

No outstanding 🔴 or 🟡 issues.

@LionSR LionSR merged commit 1b674eb into main Jun 22, 2026
13 checks passed
@LionSR LionSR deleted the codex/rfp-source-isometry-3372 branch June 22, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1606.00608 arXiv:1606.00608 (MPDO RFP) follow-up formalization Lean 4 formalization task rfp-mpdo Renormalization fixed points and MPDO theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prove Appendix B even-chain product-pair factorization

2 participants