|
Download lean/README.md from Snapkitty/hcalc: direct link, hf CLI and curl.
- Browser
- Download file 3.24 kB
-
https://huggingface.co/Snapkitty/hcalc/resolve/main/lean/README.md
- Command line
-
hf download hf://Snapkitty/hcalc/lean/README.md
-
curl -L -o README.md https://huggingface.co/Snapkitty/hcalc/resolve/main/lean/README.md
3.24 kB
HCALC Lean 4 formalization (PRODUCTION)
License: AGPL-3.0-only (see LICENSE)
Copyright (C) 2026 HCALC contributors
Production formalization of the HCALC nested recurrence
[ X_{t+1} = \Xi\bigl(t,; \Lambda_m \cdot C(T_p(X_t))\bigr) ]
frozen to Spec ../spec/PRODUCTION.md (overrides provisional L6 axioms in COHERENCE/AXIOMS).
Provenance
| Part | Source |
|---|---|
| Carrier, Tp Ξ±-diag, C softScale-or-id, Ξm min-formula, Ξ=ΞΎy+g, J=residual, L5 Hyp, L7 InstanceBridge | Spec-file PRODUCTION.md |
| Option B InstanceBridge (not NestedFaithful / not rfl) | Spec-file PRODUCTION.md Β§6 (f5a08da) |
Mathlib β (thin bridge in RealStub) |
Mathlib4 v4.34.1 |
| Foundry L1βL4 (P64, Gershgorin, FoundryStep additive, softProject schedules) | Spec + Foundry PROPERTIES (FoundryAdditive distinct) |
Mathlib
- Toolchain:
leanprover/lean4:v4.34.1(matches Mathlib tagv4.34.1lean-toolchain β no bump needed). - Dependency:
leanprover-community/mathlib@v4.34.1. - Imports used (minimal):
Mathlib.Basic.Real.Basicββ, field/order/abs/min/maxMathlib.Analysis.SpecialFunctions.Log.BasicβReal.log(pulls Exp; Topology transitive only)
finMaxuses coreFin.foldlonly (no Finset /Mathlib.Data.Fin)
- No Topology / MeasureTheory / aesop / grind / large simp sets.
- Proofs are freehand
calc/rw/intro/apply/ elementary single-lemmaexact.
finMax / ββ
finMax = Fin.foldl of max with init 0 (smallest surface; not Finset.univ.sup' / iSup).
Production sites pass nonnegative args (|Β·|, Gershgorin disks); n = 0 yields 0.
Layout
| File | Role |
|---|---|
Hcalc/RealStub.lean |
Thin Mathlib β re-exports + freehand Real lemmas (finMax, softScale, guards) |
Hcalc/Carrier.lean |
Gap-Carrier CLOSED: Carrier n := Fin n β β, ββ |
Hcalc/Foundry.lean |
L1βL4 defs; FoundryAdditive FoundryStep (β nested); Gap-Foundry-* may remain |
Hcalc/Axioms.lean |
L6 defs Tp/C/Ξm/Ξ/J/ContractAlg + L7 InstanceBridge |
Hcalc/Pipeline.lean |
Nested hcalcStep / step / J / optimize |
Hcalc/Convergence.lean |
L5 unique FP + residual under HypContractive |
Hcalc/Invariants.lean |
Structural invariants |
Hcalc/Production.lean |
Stable re-exports for Verify/docs |
Rules
- Zero
sorry/admit. - Production Gap-* are defs/theorems, not opaque axioms.
- Gap-Real-arith for
Realitself is closed (Mathlibβ). Gap-Foundry-* stubs OK if Foundry.State stays opaque. - L7 =
InstanceBridgeOption B (parameter table +toFoundryStepdiagnostic). NotFoundryStep = hcalcStep. - C is state softScale-or-id; does not equal Foundry
softProjecton (Ξ,Ξ) schedules. - Ξ± (Tp weights) is Spec-only.
- No unconditional convergence β L5 under
HypContractiveonly.
Build
source ~/.elan/env
cd /workspace/hcalc/lean
lake update # first time / after mathlib pin change
lake exe cache get # download Mathlib oleans (recommended)
lake build 2>&1 | tee build.log
Toolchain: leanprover/lean4:v4.34.1 + Mathlib v4.34.1.