Polish release docs and add CI checks

- Correct stale references and headline-path wording in READMEs and Lean docstrings
- Document build steps, comparator requirements, sweep scope, and coverage
- Unify Apache headers across Lean and C++ sources
- Add a bwrap-free axiom audit for the headline theorems
- Add a Gitea workflow running lake build, the axiom audit, C++ tests, and coverage
- Match LLVM coverage tool versions to the compiler and recreate stale build dirs
This commit is contained in:
andrew committed 2026-11-17 21:29:16 -05:00
1 parent 73e371fb40
commit 273ad72f0c
34 files changed
+431 -133

No files matched your search

+11 -11
View File
@@ -743,7 +743,7 @@ theorem compatible_iff_bridge_general {db : DB} {r : RangeRead} {A : List Key} {
The necessity half of the reduction never cites an end theorem directly: it needs
only one full-compatible witness `db₀` and a single-key perturbation that breaks
the targeted factor. The generic statement below is the notes' Lemma 7.1: a sound
the targeted factor. The generic statement below is the factor-toggle lemma: a sound
range can omit a key `k` only if flipping `k`'s membership in a compatible
database preserves compatibility. Since the flip is outside the range, soundness
forces compatibility on the flipped database; if that fails, `k` is necessary.
@@ -766,7 +766,7 @@ theorem agreeOn_toggle_of_not_mem (cr : ConflictRange) (db : DB) {k : Key} (hk :
AgreeOn cr db (toggle db k) :=
(keys_toggle_of_not_mem cr db hk).symm
/-- **Factor-toggle (Lemma 7.1).** If some database is compatible with `(r, res)` but
/-- **Factor-toggle.** If some database is compatible with `(r, res)` but
flipping the membership of `k` there breaks compatibility, then `k` is necessary:
any sound range omitting `k` would see both databases as agreeing, so soundness
would transfer the compatibility, contradicting the break. -/
@@ -782,9 +782,9 @@ theorem necessary_of_toggle {r : RangeRead} {res : Result} {k : Key}
/-- **The factor-toggle lemma.** Suppose compatibility factors as `φ₁ ∧ φ₂` on
databases, some database `db₀` satisfies both factors, and flipping the membership
of `k` in `db₀` breaks `φ₁`. Then no range omitting `k` is sound: such a range sees
`db₀` and its flip as agreeing, so soundness would carry `φ₁`. This is the notes'
Lemma 7.1, and it is the form the necessity constructions use — only the one
targeted factor must break. -/
`db₀` and its flip as agreeing, so soundness would carry `φ₁`. This is the
factor-toggle lemma in factored form, and it is the form the necessity
constructions use — only the one targeted factor must break. -/
theorem not_sound_of_factor_toggle {r : RangeRead} {res : Result} {cr : ConflictRange}
{φ₁ φ₂ : DB → Prop} {db₀ : DB} {k : Key}
(hcomp : ∀ db, RangeRead.Compatible db r res ↔ (φ₁ db ∧ φ₂ db))
@@ -796,7 +796,7 @@ theorem not_sound_of_factor_toggle {r : RangeRead} {res : Result} {cr : Conflict
(hs db₀ (toggle db₀ k) (agreeOn_toggle_of_not_mem cr db₀ hk)).mp hc₀
exact hnot ((hcomp (toggle db₀ k)).mp hc₁).1
/-- **Factor-toggle necessity.** Under the factorization of Lemma 7.1, a single
/-- **Factor-toggle necessity.** Under the factorization above, a single
database whose flip breaks one factor makes `k` necessary. -/
theorem necessary_of_factor_toggle {r : RangeRead} {res : Result} {k : Key}
{φ₁ φ₂ : DB → Prop} {db₀ : DB}
@@ -810,7 +810,7 @@ theorem necessary_of_factor_toggle {r : RangeRead} {res : Result} {k : Key}
/-!
## The joint base construction
Section 7's necessity argument does not transfer soundness from the end pair; it
The necessity argument does not transfer soundness from the end pair; it
exhibits a single database `db₀` that is compatible with the *full* result and whose
flip at `k` breaks the targeted end factor. That object is named here: a *lower joint
base* for `k` is a full-compatible database whose flip makes the lower boundary read
@@ -821,7 +821,7 @@ factorization.
/-- A **lower joint base** for `k`: a database compatible with the full complete
result `⟨L, false⟩` (via the bridge) whose flip at `k` makes the lower boundary read
nonempty, i.e. breaks the lower factor. This is the section-7 witness that turns the
nonempty, i.e. breaks the lower factor. This is the joint-base witness that turns the
empty lower certificate into `Necessary r res k`. -/
def LowerJointBase (r : RangeRead) (L : List Key) (k : Key) : Prop :=
∃ db₀ : DB, bridge r L db₀ ∧
@@ -1132,7 +1132,7 @@ theorem NecessaryRange.mono {r : RangeRead} {res : Result} {a b a' b' : WithTop
middle interval `[cr₁.end_, cr₂.begin)` is necessary, the upper end range `cr₂` is
necessary, and the intervals are ordered (`cr₁.begin ≤ cr₂.begin` and
`cr₁.end_ ≤ cr₂.end_`), then the hull `[cr₁.begin, cr₂.end_)` is necessary. This is
exactly section 7's assembly: everything below the reported keys is the lower end,
exactly the hull assembly: everything below the reported keys is the lower end,
the interior is convexity, and everything above is the upper end. -/
theorem necessaryRange_hull_of_chain {r : RangeRead} {res : Result}
{cr₁ cr₂ : ConflictRange}
@@ -1185,7 +1185,7 @@ theorem minimal_hull_of_minimal_ends {r : RangeRead} {res : Result}
/-- **Necessity of the hull from the joint bases.** With the lower joint bases below
the reported keys, the interior necessary by convexity, and the upper joint bases
above, the hull's necessary range is assembled. This is section 7's necessity
above, the hull's necessary range is assembled. This is the hull necessity
assembly: the ends via factor-toggle joint witnesses, the middle free. -/
theorem necessaryRange_hull_of_jointBases {r : RangeRead} {res : Result} {L : List Key}
{cr₁ cr₂ : ConflictRange} (hrev : r.reverse = false) (hL : L ≠ [])
@@ -1201,7 +1201,7 @@ theorem necessaryRange_hull_of_jointBases {r : RangeRead} {res : Result} {L : Li
hmid (necessaryRange_of_upperJointBaseRange hrev hL hpair hlim hres hhi) hmin hmax
/-- **Minimality of the hull from the joint bases and hull soundness.** This is the
end-to-end shape of the section-7 necessity argument: the end ranges are established
end-to-end shape of the necessity argument: the end ranges are established
by the joint bases (factor-toggle), the interior by convexity over the reported keys
(`necessaryRange_between_reported`), and the only remaining hypothesis is soundness
of the hull — the soundness half of the reduction. -/