Skip to content

Redesign boundary analysis + prove boundary_doors_odd for Sperner grid #9044

@rjwalters

Description

@rjwalters

Problem

The current boundary analysis in SpernerGrid.lean is built on an incorrect lemma:

boundary_verts_on_face is mathematically wrong. It claims that when gridAdj s k = none and k < d, all vertices j ≠ k have (s.verts j).onFace k (k-th barycentric coordinate = 0). This is false — cell face position does NOT correspond to barycentric coordinate.

no_boundary_doors_face_lt depends on this incorrect lemma.

Correct Architecture

Step 1: Remove incorrect lemmas

Delete boundary_verts_on_face and no_boundary_doors_face_lt.

Step 2: Prove boundary doors only occur at face d

After fixing boundaryFlip0 (#9043):

  • Face k for 0 < k < d: gridAdj dispatches to interiorFlip which always returns some. No boundary faces.
  • Face 0: boundaryFlip0 returns some for all valid simplices (d=0 excluded, d=1 returns none only on geometric boundary, d≥2 always returns some after fix). So boundary doors at face 0 only for d=1.
  • Face d: boundaryFlipLast returns none iff v₀.coords(incDir(d-1)) = 0. This correctly identifies geometric face incDir(d-1).

Step 3: Characterize boundary doors at face d

When boundaryFlipLast returns none:

  • All vertices v₀, ..., v_{d-1} have incDir(d-1) coordinate = 0 (on geometric face incDir(d-1))
  • Sperner condition on this face: color incDir(d-1) is forbidden
  • A door at face d requires colors {0, ..., d-1} on the face {v₀, ..., v_{d-1}}
  • If incDir(d-1).val < d, color incDir(d-1) is in {0,...,d-1} but forbidden → NOT a door
  • If incDir(d-1).val = d, then miss must be some value < d (since miss ≠ incDir(d-1) = d)
    • The face vertices use colors from {0,...,d-1} \ {miss} ∪ (possibly miss if not on that face)
    • This is the only case where boundary doors at face d can exist

Step 4: Prove boundary_doors_odd by induction on d

Base case (d = 0): Single vertex, no doors, count = 0... hmm, but we need ODD count. Actually for d=0, the standard simplex has a single vertex colored 0, and the panchromatic condition is trivially satisfied. The boundary door count setup needs to be verified for d=0.

Inductive step: Boundary doors at face d of the d-simplex grid correspond to doors in the (d-1)-dimensional boundary triangulation. By induction, this count is odd.

This is the hardest proof in the file and requires constructing the (d-1)-dimensional boundary complex from the face d simplices.

Acceptance Criteria

  • boundary_verts_on_face removed (incorrect)
  • no_boundary_doors_face_lt removed or replaced with correct version
  • boundary_doors_odd proved (0 sorry)
  • sperner_grid end-to-end theorem works

Affected Files

  • proofs/Proofs/SpernerGrid.lean — boundary analysis redesign

Test Plan

  • Docker build: ./proofs/scripts/docker-build.sh Proofs.SpernerGrid with 0 errors
  • sperner_grid theorem compiles with only the CellComplex.sperner sorry (proved in SpernerMathlib4.lean)

Dependencies

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    loom:blockedImplementation blocked, needs help or clarificationloom:curatedEnhanced by Curator, awaiting human approvalresearchResearch agent work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions