Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/workflows/lean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,43 @@ jobs:
#print axioms Resource.Bridge.grade_le_sequential
#print axioms Resource.Bridge.hub_ceiling_le
#print axioms Resource.Bridge.embed_tcZero_ne_zero
-- HubCeiling: squeakwell R5–R7 (hub ceiling, reach grade, weighted residue measure)
#print axioms Resource.HubCeiling.factor_le
Comment thread
hyperpolymath marked this conversation as resolved.
Resolved
#print axioms Resource.HubCeiling.single_hub_ceiling
#print axioms Resource.HubCeiling.single_hub_star_ceiling
#print axioms Resource.HubCeiling.lsum_filter_mono
#print axioms Resource.HubCeiling.reachGrade_mono_mat
#print axioms Resource.HubCeiling.reachGrade_mono_set
#print axioms Resource.HubCeiling.one_le_reachGrade
#print axioms Resource.HubCeiling.weightedResidueMeasure
#print axioms Resource.HubCeiling.Witness.maxplus_not_one_top
EOF
out="$(lake env lean /tmp/axcheck.lean 2>&1)"
echo "$out"
if echo "$out" | grep -qiE 'sorry|Classical\.choice'; then
echo "::error::axiom audit failed — sorry or Classical.choice present"
if echo "$out" | grep -qiE 'sorry|Classical\.choice|error'; then
echo "::error::axiom audit failed — sorry, Classical.choice or an elaboration error present"
exit 1
fi
# Lean may wrap a long "depends on axioms: [...]" list over several
# lines, so parse the output with newlines collapsed to spaces.
flat="$(printf '%s' "$out" | tr '\n' ' ')"
# Every audited declaration must yield exactly one parsed verdict;
# an unparseable result fails instead of reading as "no axioms".
expected="$(grep -c '^#print axioms ' /tmp/axcheck.lean)"
verdicts="$(printf '%s' "$flat" \
| grep -oE "does not depend on any axioms|depends on axioms: \[[^]]*\]" \
| wc -l)"
if [ "$verdicts" -ne "$expected" ]; then
echo "::error::axiom audit failed — parsed $verdicts verdicts for $expected '#print axioms' lines"
exit 1
fi
# Allowlist: every printed dependency must be propext or Quot.sound.
# Any other axiom (a project `axiom`, funext, Classical.*) fails the audit.
# grep exits 1 when nothing is left over (the good case); tolerate only that.
extra="$(printf '%s' "$flat" | grep -oE 'depends on axioms: \[[^]]*\]' \
| sed -E 's/.*\[(.*)\]/\1/; s/,/ /g' | tr ' ' '\n' \
| grep -v '^$' | grep -vxE 'propext|Quot\.sound' || test "$?" -eq 1)"
if [ -n "$extra" ]; then
echo "::error::axiom audit failed — axioms outside the allowlist: $extra"
exit 1
fi
7 changes: 5 additions & 2 deletions PROOF-STATUS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type-checked in this environment from what is CI-gated but not re-checked here.
* Toolchain: **Lean 4 v4.35.0** (pinned in `lean-toolchain`), *no Mathlib*
dependency (pure core Lean 4).
* Command: `lake build` after `rm -rf .lake/build` (clean rebuild).
* Result: **Build completed successfully — 20/20 targets**, i.e. every Lean
* Result: **Build completed successfully — 21/21 targets** (2026-11-09, with `HubCeiling`), i.e. every Lean
module type-checks.

Modules (libs `Tropical` + `Resource`):
Expand All @@ -22,7 +22,10 @@ Modules (libs `Tropical` + `Resource`):
* `Resource.lean` aggregator + `Resource/Algebra/{Interface,Ordered,Dioid,ParametricLaws}.lean`
(the ordered-semiring / resource-algebra interface + parametric transport theorem).
* `Resource/Instances/{MaxPlus,MinPlus,MinMax,Linear,Affine}.lean` (concrete semirings).
* `Resource/{Bridge,Closure,Conformance,Stress,EchoBridge}.lean`.
* `Resource/{Bridge,Closure,Conformance,Stress,EchoBridge,HubCeiling}.lean`
(`HubCeiling` added 2026-11-09: hub ceilings, reach grades, weighted residue
measure for `hyperpolymath/squeakwell` rungs R5–R7; built here with
`lake build`, axiom audit `propext`/`Quot.sound` only, no `sorry`).

Reproduce:
[source,sh]
Expand Down
7 changes: 7 additions & 0 deletions Resource.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Resource.EchoBridge
import Resource.Conformance
import Resource.Bridge
import Resource.Closure
import Resource.HubCeiling

/-!
# `Resource` — the resource-grade axis (aggregator)
Expand Down Expand Up @@ -61,4 +62,10 @@ import Resource.Closure
bottleneck). The `EntryBounded` / `AllPairsCosts`
certificate and `matStar` monotonicity mirror
`typed-wasm`'s Idris `Tropical.idr` onto the axis.
* `Resource.HubCeiling` — hub ceilings (`factor_le`, `single_hub_ceiling`,
`single_hub_star_ceiling` under an explicit `IsStar`),
reach grades over an observed set (`reachGrade`,
monotone in matrix and set; `one ⊑` on observed nodes),
and the generic `weightedResidueMeasure`. Serves
`hyperpolymath/squeakwell` rungs R5–R7.
-/
Loading
Loading