Skip to content

Restore imported V3.5 Fierz tactic - #1060

Merged
Vilin97 merged 1 commit into
LeanPool:mainfrom
gpartin:codex/fix-v35-fierz-tactic-api
Nov 27, 2026
Merged

Vilin97 merged 1 commit into
LeanPool:mainfrom
gpartin:codex/fix-v35-fierz-tactic-api

Conversation

@gpartin

@gpartin gpartin commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep the coordinate-level Fierz case solver local to its defining module.
  • Re-export v35FierzFinish after v35_fierz_completeness as a thin wrapper using only that public theorem.
  • Fix the downstream import regression reported in the post-merge review of Reuse proved matrix entries in the Dirac Fierz proof #1057 without changing any theorem, definition, or certificate statement.

Regression test

A separate caller importing only the public Fierz module now compiles:

import LeanPool.LatticeDiracDerivation.V35BilinearCliffordClosure

open LeanDirac.V2

example : v35FierzEntry 0 0 0 0 := by
  v35FierzFinish

Verification

  • lake build LeanPool.LatticeDiracDerivation.V35BilinearCliffordClosure
  • lake build LeanPool.LatticeDiracDerivation.Imports
  • lake exe runLinter LeanPool.LatticeDiracDerivation.Imports
  • lake exe lint-style LeanPool/LatticeDiracDerivation/V35BilinearCliffordClosure.lean
  • python -X utf8 -m lean_pool.quality --static-only
  • python scripts/project-indexes.py --module --check
  • git diff --check
  • source scan found no sorry, admit, axiom, set_option, or #print

This is an AI-assisted follow-up to the API-regression finding on #1057.

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

The repair appears mergeable, with a non-blocking request to save the separate-import regression test.RetriggerView in Greptile

[Low impact] The change is limited to the public tactic for Fierz entry goals.

The repair appears mergeable, with a non-blocking request to save the separate-import regression test.

Findings

  1. P2 Imported tactic lacks a test ▶

Summary

Keeps the coordinate solver local and restores exported v35FierzFinish as a thin call to v35_fierz_completeness.

  • Imported Fierz goals now close through the public completeness theorem.

Reviews (1) · Last reviewed commit: "Restore exported V3.5 Fierz tactic" · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

Statement changes

✅ No statements changed — all 109 tracked declarations across 1 modified file kept their type; only proofs / definition bodies changed.

Statements are compared textually against the merge base (comments and whitespace ignored; by proof terms embedded in a type are treated as proof-irrelevant), the same method as physlib's /check-golf. Anonymous instances and examples are not tracked.

Compile cost of modified files — base → head

Heartbeats: 2,861,048 → 2,862,970 (+1,921, +0.1%). Commands: 128 → 134.

Per-file wall sum: 197.9 s → 268.3 s (+35.6%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal.

Files: 1 compared — 0 cheaper, 0 costlier, 1 within noise (threshold: |Δ heartbeats| ≥ 1,000 and ≥ 1%).

Both sides are elaborated against the merge-base build of the pool — sound when only proofs and definition bodies change; a file whose statements changed may fail there and is flagged ⚠. Heartbeats come from disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted to maxHeartbeats units. Failed measurements are not classified as cheaper or costlier. Δ lines counts added/deleted lines from this PR diff.

File Δ lines HB base HB head Δ HB Δ HB % Wall base (s) Wall head (s)
LeanPool/LatticeDiracDerivation/V35BilinearCliffordClosure.lean +5/-1 2,861,048 2,862,970 +1,921 +0.1% 197.94 268.34
Total +5/-1 2,861,048 2,862,970 +1,921 +0.1% 197.9 268.3

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at 7869980e3ac554c8c0dd4090ef0b9d0bc4ba1240.

  • The coordinate solver stays local and still serves all the existing proof cases. The exported tactic closes an entry goal through the public completeness theorem, which quantifies over all four indices. The theorem and certificate statements are unchanged.
  • The separate-caller check in the PR exercises the original import regression. A saved caller would help detect a future recurrence. The exact-head required checks passed. Lean Action CI

@Vilin97
Vilin97 enabled auto-merge November 27, 2026 22:03
@Vilin97
Vilin97 added this pull request to the merge queue Nov 27, 2026
@Vilin97

Vilin97 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

🤖 LLM review — refactor (gpt-6.2-sol)

Reviewed head: 7869980e3ac554c8c0dd4090ef0b9d0bc4ba1240

Verdict: ✅ approve

The patch makes the coordinate solver local and restores v35FierzFinish for importers through v35_fierz_completeness. In a scratch workspace with the pinned dependencies, the project’s Imports target built and separate module callers closed both concrete and symbolic entry goals.

Aspect Value
Scope tactic export
Introduces tech debt ✅ no
Maintainability ✅ improved
Brittleness ✅ more_robust
Risk ✅ low

Applying the public theorem isolates downstream callers from private coordinate lemmas and arithmetic normalization, with only a 0.1% heartbeat increase in /profile.

Findings (1)

  • missing-regression-test — LeanPool/LatticeDiracDerivation/V35BilinearCliffordClosure.lean:464
    Every checked-in call exercises the local solver, and the example in the PR description passes on both base and head. Adding module to that example reproduces the private-helper error on base and passes on head. Check that version in CI to cover the public import boundary.

Tokens: 2,480,340 in / 12,915 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $10.1151 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

Merged via the queue into LeanPool:main with commit 03eb2d5 Nov 27, 2026
27 checks passed
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.

2 participants