Skip to content

refactor: mathlib-only umbrella import downgrades from shake (2026-07-17 cycle 4) #4544

Description

@phasetr

Scope

Apply mathlib-only umbrella import downgrades suggested by shake output. A downgrade is included if and only if:

  • All removed imports are Mathlib.* modules
  • All added imports are Mathlib.* modules
  • Change is self-contained within a single file

Each file's downgrade is mechanically independent and can be reverted if shake produces a false positive.

Exclusions (BAN LIST)

Do not include:

Acceptance Gates

All the following must pass locally and in CI before merge:

  1. lake build IsingModel completes with zero warnings
  2. lake exe GKSTest passes all tests
  3. audit_gate.py --full exits with code 0
  4. Umbrella-preservation grep check: git diff <base>..HEAD | grep -E '^[+-].*IsingModel' | wc -l equals 0
  5. Per-file revert rule: for any file where shake suggested a false positive, revert that file's changes only (do not revert the entire PR)

Related Context

Outcome (2026-07-17, build-verified)

9 of 13 designed blocks applied; 4 reverted as build-proven false positives (shake
suggestions are candidates only — lake build is the arbiter, per the #4541 governance note).
See .self-local/reports/implement-4544-2026-07-17.md for the full per-file table.

Reverted (4, all build errors on apply):

  • Basic.leanderiving Fintype needs Tactic.DeriveFintype (shake dropped it)
  • Hamiltonian.leanring tactic needs more than Tactic.Ring.Basic
  • Inequalities/WeightedExpectation.lean — same ring tactic gap
  • ClusterExpansion/MayerCore/SurjectiveLogWeight.leanpositivity tactic gap

Applied (9): Dobrushin/SingleSiteInfluence.lean, ClusterExpansion/RootedParentActive.lean,
ComplexAnalyticity/Compactness.lean, Peierls/LiminfBound.lean, Peierls/LowTempTail.lean,
Concrete/.../MassContinuityUniformInfLipschitz.lean, ClusterExpansion/SourceLogCoefficient.lean,
ClusterExpansion/PiFinsetSeparation.lean, TransferMatrix/LayerCylinderGraph.lean.

Gates: lake build IsingModel zero warnings, lake exe GKSTest PASS, audit_gate.py --full
PASS (V1/V2/V3), umbrella-preservation grep empty (verified independently by issue-manager:
git diff -U0 69da4efb..HEAD -- IsingModel/ | grep -E '^[+-]import IsingModel' → 0 matches).

Deferred (not this PR): 668 IsingModel.* umbrella downgrades + 298 coupled chains remain
enumerated-and-deferred pending an explicit umbrella-convention ruling from the user. This
exhausts the mathlib-only subset of the third /goal issuance; the repo-internal 668/298 set
requires user decision before any future cycle can proceed on it.

PR Reference

Closed by #4545.

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