@ceccec/millennium-solutions 9.3.3 → 9.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/mod.core.d.ts +9 -0
- package/dist/mod.core.js +9 -0
- package/dist/src/0/index.d.ts +47 -0
- package/dist/src/0/index.js +189 -0
- package/dist/src/0/ledger.d.ts +1 -0
- package/dist/src/0/ledger.js +25 -0
- package/dist/src/0/trinity-matrix.d.ts +1 -0
- package/dist/src/0/trinity-matrix.js +16 -0
- package/dist/src/5/aspects.d.ts +1 -0
- package/dist/src/5/aspects.js +22 -0
- package/dist/src/5/reflection.d.ts +1 -0
- package/dist/src/5/reflection.js +25 -0
- package/dist/src/7/rosetta.d.ts +1 -0
- package/dist/src/7/rosetta.js +24 -0
- package/dist/src/9/enumeration.d.ts +1 -0
- package/dist/src/9/enumeration.js +14 -0
- package/dist/src/honesty/index.d.ts +16 -0
- package/dist/src/honesty/index.js +69 -0
- package/package.json +27 -10
- package/.zenodo.json +0 -51
- package/ABSTRACT.md +0 -155
- package/ACCOUNTING.md +0 -27
- package/AXIOMS.md +0 -574
- package/CHALLENGES.md +0 -2595
- package/DEPLOY.md +0 -39
- package/DEVELOP.md +0 -34
- package/HEART.md +0 -112
- package/PHYSICS-SCALES.md +0 -80
- package/PRIOR-ART.md +0 -151
- package/PROOF-OF-CONCEPT.md +0 -81
- package/REALISATIONS.md +0 -87
- package/RESEARCH.md +0 -188
- package/RULES.md +0 -57
- package/SEQUENCE-DECODE.md +0 -196
- package/SIGNATURE.md +0 -34
- package/THEOREMS.md +0 -97
- package/WHITEPAPER.md +0 -40
- package/WORKFLOWS.md +0 -47
- package/boundaries.md +0 -23
- package/captain.md +0 -85
- package/compare.md +0 -42
- package/compute.md +0 -543
- package/cryptography.md +0 -55
- package/dashboard.md +0 -50
- package/examples.md +0 -47
- package/folds.md +0 -65
- package/forensic.md +0 -67
- package/guide.md +0 -126
- package/harness.md +0 -20
- package/index.md +0 -217
- package/mod.core.ts +0 -10
- package/nature.md +0 -58
- package/organism.md +0 -30
- package/paper.md +0 -8789
- package/proofs.md +0 -26
- package/quantum.md +0 -40
- package/rights.md +0 -39
- package/solutions.md +0 -28
- package/speedup.md +0 -41
- package/src/0/chacha.ts +0 -3
- package/src/0/crypt.ts +0 -4
- package/src/0/csp.ts +0 -10
- package/src/0/entanglement.ts +0 -31
- package/src/0/fusion.ts +0 -28
- package/src/0/holographic.ts +0 -57
- package/src/0/impossible.ts +0 -30
- package/src/0/imprint.ts +0 -160
- package/src/0/index.ts +0 -263
- package/src/0/ledger.ts +0 -25
- package/src/0/legible.ts +0 -29
- package/src/0/limit.ts +0 -29
- package/src/0/merkle-proof.ts +0 -3
- package/src/0/null-token.ts +0 -24
- package/src/0/sha256.ts +0 -3
- package/src/0/singularity.ts +0 -20
- package/src/0/stream.ts +0 -47
- package/src/0/trinities.ts +0 -37
- package/src/0/trinity-matrix.ts +0 -20
- package/src/0/version-matrix.ts +0 -70
- package/src/1/acceptance.ts +0 -26
- package/src/1/index.ts +0 -80
- package/src/1/paradox.ts +0 -28
- package/src/1/vortex.lean +0 -6
- package/src/2/frequency-scales.ts +0 -28
- package/src/2/iching.ts +0 -34
- package/src/2/index.ts +0 -78
- package/src/2/primes-vortex.ts +0 -12
- package/src/2/quantum.ts +0 -48
- package/src/2/string-scale.ts +0 -14
- package/src/2/vortex.lean +0 -10
- package/src/3/index.ts +0 -63
- package/src/3/pi-bbp.ts +0 -13
- package/src/3/trinity.ts +0 -39
- package/src/3/vortex.lean +0 -7
- package/src/4/git.ts +0 -30
- package/src/4/index.ts +0 -63
- package/src/4/vortex.lean +0 -6
- package/src/5/aspects.ts +0 -27
- package/src/5/center.ts +0 -35
- package/src/5/development.ts +0 -45
- package/src/5/diamond.ts +0 -35
- package/src/5/folds.ts +0 -12
- package/src/5/index.ts +0 -63
- package/src/5/reflection.lean +0 -14
- package/src/5/reflection.ts +0 -14
- package/src/5/vortex.lean +0 -10
- package/src/6/dna.ts +0 -27
- package/src/6/index.ts +0 -63
- package/src/6/vortex.lean +0 -7
- package/src/7/cross.ts +0 -31
- package/src/7/glagolitic.ts +0 -51
- package/src/7/index.ts +0 -67
- package/src/7/language-lens.ts +0 -41
- package/src/7/lens.ts +0 -41
- package/src/7/locale.ts +0 -105
- package/src/7/rbac.ts +0 -31
- package/src/7/rosetta-clay.ts +0 -15
- package/src/7/rosetta.lean +0 -11
- package/src/7/rosetta.ts +0 -11
- package/src/7/string-dimensions.ts +0 -14
- package/src/7/vortex.lean +0 -6
- package/src/8/infinite.ts +0 -26
- package/src/8/merkaba/field.ts +0 -27
- package/src/8/merkaba/geometry.ts +0 -16
- package/src/8/merkaba/touch.ts +0 -26
- package/src/8/nucleus/magic.lean +0 -15
- package/src/8/nucleus/proton-mass-fit.ts +0 -9
- package/src/8/nucleus/proton-mass.lean +0 -10
- package/src/8/nucleus/shell-model-magic.ts +0 -10
- package/src/8/vortex.lean +0 -7
- package/src/9/access.ts +0 -34
- package/src/9/aura-funding.ts +0 -25
- package/src/9/coins.ts +0 -25
- package/src/9/enumeration.ts +0 -13
- package/src/9/funding.ts +0 -85
- package/src/9/security.ts +0 -36
- package/src/9/society.ts +0 -32
- package/src/9/vortex.lean +0 -11
- package/src/api/gates.ts +0 -122
- package/src/api/index.ts +0 -447
- package/src/api/lanes.ts +0 -81
- package/src/claims/index.ts +0 -81
- package/src/demand/queries.json +0 -1764
- package/src/face/index.ts +0 -100
- package/src/from/the/heart/index.ts +0 -11
- package/src/honesty/boundaries.ts +0 -29
- package/src/honesty/index.ts +0 -63
- package/src/html/index.ts +0 -10
- package/src/latex/index.ts +0 -474
- package/src/millennium/index.ts +0 -53
- package/src/play/the/game/index.ts +0 -12
- package/src/proof/README.md +0 -118
- package/src/proof/address.lean +0 -168
- package/src/proof/coin.lean +0 -152
- package/src/proof/covered.json +0 -9
- package/src/proof/demand.lean +0 -160
- package/src/proof/demand2.lean +0 -219
- package/src/proof/demand3.lean +0 -209
- package/src/proof/discovered.json +0 -19530
- package/src/proof/elementary.lean +0 -495
- package/src/proof/energy.lean +0 -329
- package/src/proof/families.lean +0 -740
- package/src/proof/fixtures/axiom-control.lean +0 -39
- package/src/proof/flow.lean +0 -78
- package/src/proof/fnv.lean +0 -127
- package/src/proof/generated-theorems.json +0 -207
- package/src/proof/generated.lean +0 -101
- package/src/proof/imagined.lean +0 -492
- package/src/proof/index.lean +0 -156
- package/src/proof/index.ts +0 -916
- package/src/proof/involution.lean +0 -90
- package/src/proof/ledgerclaims.lean +0 -84
- package/src/proof/light.lean +0 -168
- package/src/proof/mechanical.lean +0 -563
- package/src/proof/merkaba.lean +0 -89
- package/src/proof/merkle.lean +0 -132
- package/src/proof/nim.lean +0 -332
- package/src/proof/novelty.json +0 -751
- package/src/proof/phenomena.lean +0 -90
- package/src/proof/priorart.lean +0 -190
- package/src/proof/quantum.lean +0 -159
- package/src/proof/reach.lean +0 -121
- package/src/proof/recovered.lean +0 -56
- package/src/proof/reversal.lean +0 -402
- package/src/proof/revoked.json +0 -317
- package/src/proof/rights.lean +0 -155
- package/src/proof/sequences.lean +0 -284
- package/src/proof/speed.lean +0 -158
- package/src/proof/split.lean +0 -209
- package/src/proof/theorems.lean +0 -67
- package/src/proof/trial-all.json +0 -16532
- package/src/proof/z9.lean +0 -126
- package/src/proof/z9plus.lean +0 -345
- package/src/proofs.lisp +0 -170
- package/src/prove/emit.ts +0 -115
- package/src/prove/index.ts +0 -143
- package/src/prove/translate.ts +0 -638
- package/src/publication/index.ts +0 -362
- package/src/quantum/field.ts +0 -73
- package/src/quantum/tree.ts +0 -79
- package/src/receipts/1431b4c4-7950-8d7b-88d1-b633219692f8.json +0 -7
- package/src/receipts/171e09c0-4cfd-8ce0-a6ed-cd33d5553da3.json +0 -7
- package/src/receipts/1a1f16c9-3491-8050-b221-e2a362439be4.json +0 -12
- package/src/receipts/1da15f83-83a6-8d04-b1ac-334c2dd6abb3.json +0 -7
- package/src/receipts/375a57ed-ef99-855e-8f34-b77d08010f3c.json +0 -6
- package/src/receipts/3dcbbf9e-0e49-8ba7-921e-17e478dbafaf.json +0 -6
- package/src/receipts/43a24136-5ad9-81ef-97c9-17be1c05bb5f.json +0 -11
- package/src/receipts/4991be51-74ba-8f66-9534-e6dba52fb569.json +0 -10
- package/src/receipts/52375d8f-232b-8c01-9d82-a824ffa7b2b7.json +0 -6
- package/src/receipts/593b546a-36b4-8553-941a-0e03b7053a64.json +0 -7
- package/src/receipts/7f75c989-96c9-8a24-8d0d-7e690861ccb4.json +0 -6
- package/src/receipts/80f80b59-81d8-866d-9a14-f469729d3dc8.json +0 -6
- package/src/receipts/85ac8585-9dc1-8964-9848-ae0f49cc82fb.json +0 -7
- package/src/receipts/85db092e-f2c0-88e5-bf75-61c4a65d84e7.json +0 -7
- package/src/receipts/95bacad3-9e56-8741-b0f8-def2c6ecb050.json +0 -7
- package/src/receipts/a1d33966-7bbd-84ca-902b-49e315af60e0.json +0 -6
- package/src/receipts/b20ced61-24ad-8123-adee-56031ab734dd.json +0 -11
- package/src/receipts/ba0447cd-f489-841a-a70f-a39b18ec2946.json +0 -11
- package/src/receipts/bcddbe66-06cf-8f31-a261-98b836938947.json +0 -7
- package/src/receipts/c1bac0d8-d906-8196-a4f0-3d8270b2e944.json +0 -6
- package/src/receipts/ce851ea3-3cf8-8646-a5d6-c0c6281210fe.json +0 -10
- package/src/receipts/cf43a122-c880-8d86-9e25-6f22f92d6b0a.json +0 -7
- package/src/receipts/daad8cd4-d4db-8dca-9c97-9a838cbce528.json +0 -7
- package/src/receipts/dc8bdb82-599f-8020-9eb2-cb016b408ec1.json +0 -6
- package/src/receipts/df77c265-d1a8-8354-8a9e-769fa5c676e2.json +0 -6
- package/src/receipts/e96686da-a411-8838-a5c8-ee7472bce048.json +0 -10
- package/src/receipts/f073c46f-7b67-83d0-aca5-db11fac4b5ec.json +0 -7
- package/src/receipts/f946d99d-a1c2-89f7-9426-a367c5b04191.json +0 -6
- package/src/receipts/fc069e45-115d-8983-ad25-fb9f735da84b.json +0 -6
- package/src/the/abstract/index.ts +0 -21
- package/src/the/abundance/index.ts +0 -20
- package/src/the/apple/earth/index.ts +0 -23
- package/src/the/apple/earth/navigation/index.ts +0 -28
- package/src/the/apple/earth/truth/index.ts +0 -19
- package/src/the/apple/index.ts +0 -27
- package/src/the/cancer/index.ts +0 -26
- package/src/the/clown/index.ts +0 -25
- package/src/the/creation/index.ts +0 -16
- package/src/the/crystal/index.ts +0 -23
- package/src/the/domain/index.ts +0 -16
- package/src/the/game/index.ts +0 -11
- package/src/the/gold/compass/index.ts +0 -26
- package/src/the/gold/index.ts +0 -35
- package/src/the/heart/index.ts +0 -15
- package/src/the/index.ts +0 -23
- package/src/the/law/index.ts +0 -20
- package/src/the/path/index.ts +0 -19
- package/src/the/rosetta/index.ts +0 -33
- package/src/the/sequence/index.ts +0 -12
- package/src/the/solids/index.ts +0 -25
- package/src/the/state/index.ts +0 -20
- package/src/the/superposition/state/index.ts +0 -22
- package/src/the/surface/index.ts +0 -26
- package/src/the/theorem/index.ts +0 -14
- package/src/the/torus/index.ts +0 -23
- package/src/the/waves/index.ts +0 -23
- package/the.md +0 -20
- package/verify.md +0 -67
package/src/proof/energy.lean
DELETED
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
set_option maxRecDepth 8000000
|
|
2
|
-
-- title: The water loop
|
|
3
|
-
-- wing: the floor
|
|
4
|
-
-- prior_art: named
|
|
5
|
-
-- prior_art_domain: electrochemistry and combustion
|
|
6
|
-
-- prior_art_note: the laws of electrolysis — Michael Faraday, 1834; the enthalpy of combustion of hydrogen, standard physical chemistry
|
|
7
|
-
-- THE WATER LOOP, ACCOUNTED. Split water into its atoms, burn them back, collect the electricity and the
|
|
8
|
-
-- clean water. Every step of that is real and buildable. The question is only ever the ledger, so here it is.
|
|
9
|
-
--
|
|
10
|
-
-- WHAT THIS FILE PROVES AND WHAT IT DOES NOT. Arithmetic does not decide thermodynamics, and nothing below
|
|
11
|
-
-- pretends to. The constants are declared INPUTS — published figures for electrolysis, hydrogen's heating
|
|
12
|
-
-- value and engine efficiency — not results derived here. What the kernel checks is the ACCOUNTING: given
|
|
13
|
-
-- those inputs, the loop cannot show a gain, and no chaining of efficiencies can rescue it. If someone brings
|
|
14
|
-
-- better constants, the same arithmetic re-runs and says whatever the new numbers say. That is the honest
|
|
15
|
-
-- shape of this claim: the physics is why the constants sit where they do; the theorem is that the books do
|
|
16
|
-
-- not balance the way a free-energy loop needs them to.
|
|
17
|
-
--
|
|
18
|
-
-- EVERY READING IS AN INSTANCE OF A LAW (2026-09-14). Each theorem that only read a typed input back — a
|
|
19
|
-
-- certificate, not a proof — is restated as a law with its inverse, decided over a whole domain, with the
|
|
20
|
-
-- published figure as one instance of it: a percentage and its reciprocal multiply back to the whole, a part
|
|
21
|
-
-- and its rest read back the whole, splitting then burning is the identity, a volume returns its moles.
|
|
22
|
-
--
|
|
23
|
-
-- Units are watt-hours throughout, per kilogram of hydrogen, so nothing hides in a unit conversion — which is
|
|
24
|
-
-- exactly the mistake the kernel caught twice in this deposit already.
|
|
25
|
-
--
|
|
26
|
-
-- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0 · No axioms, no Mathlib, no sorry.
|
|
27
|
-
|
|
28
|
-
namespace Energy
|
|
29
|
-
|
|
30
|
-
-- ── declared inputs (published figures, generous to the loop at every choice) ──
|
|
31
|
-
def splitCost : Nat := 52000 -- Wh to electrolyse 1 kg H₂ (real cells: 50–55 kWh/kg; ideal is ~39.4)
|
|
32
|
-
def burnYield : Nat := 12000 -- Wh recovered burning it at ~35% engine efficiency (LHV 33.3 kWh/kg)
|
|
33
|
-
def waterOut : Nat := 9 -- litres: 1 kg H₂ + 8 kg O₂ → 9 kg H₂O, the whole point of the exhaust
|
|
34
|
-
def roPerLitre : Nat := 4 -- Wh/litre for reverse osmosis, the ordinary way to clean a litre of water
|
|
35
|
-
|
|
36
|
-
-- A reading as a whole percentage, floor division — the one function every ratio below goes through.
|
|
37
|
-
def pct (part whole : Nat) : Nat := part * 100 / whole
|
|
38
|
-
|
|
39
|
-
-- ── 1 · THE LOOP RETURNS LESS THAN IT TOOK. Not a little less — under a quarter. The law: any yield below its
|
|
40
|
-
-- cost reads under the whole, at every cost and yield checked; the loop's 23% is one instance. It is a
|
|
41
|
-
-- load, not a source, and the gap is where the "free energy" would have had to come from. ──
|
|
42
|
-
theorem any_yield_below_its_cost_reads_under_the_whole :
|
|
43
|
-
(List.range' 1 60).all (fun c => (List.range c).all (fun y => pct y c < 100)) ∧
|
|
44
|
-
burnYield < splitCost ∧ pct burnYield splitCost = 23 := by decide
|
|
45
|
-
|
|
46
|
-
-- ── 2 · AND NO CHAIN OF STAGES FIXES IT. Every stage is a fraction of what entered it, and a product of
|
|
47
|
-
-- fractions is never larger than either one. Decided over every pair of whole percentages, both
|
|
48
|
-
-- directions — so adding stages can only ever lose more, whatever the stages are. This is the general
|
|
49
|
-
-- statement behind the specific numbers above: the shortfall is structural, not a matter of tuning. ──
|
|
50
|
-
theorem a_chain_of_efficiencies_can_only_lose :
|
|
51
|
-
(List.range 101).all (fun a => (List.range 101).all (fun b =>
|
|
52
|
-
a * b ≤ 100 * a && a * b ≤ 100 * b)) := by decide
|
|
53
|
-
|
|
54
|
-
-- ── 3 · AS A PURIFIER IT IS BEATEN BY A THOUSANDFOLD. The cost per litre is a floor division, and multiplying
|
|
55
|
-
-- it back returns the cost within one litre's worth — at every litre count up to twenty, so the 5777 Wh
|
|
56
|
-
-- per litre is the law's instance at nine litres, recovered and not typed. Against reverse osmosis that
|
|
57
|
-
-- is more than a thousand times the spend for the same clean water. ──
|
|
58
|
-
theorem the_cost_per_litre_multiplies_back_to_the_cost :
|
|
59
|
-
(List.range' 1 20).all (fun l => (splitCost / l) * l ≤ splitCost && splitCost < (splitCost / l + 1) * l) ∧
|
|
60
|
-
splitCost / waterOut = 5777 ∧ splitCost / waterOut > roPerLitre * 1000 := by decide
|
|
61
|
-
|
|
62
|
-
-- ── THE STOICHIOMETRY ─────────────────────────────────────────────────────────────────────────────────────
|
|
63
|
-
-- Splitting is 2 H₂O → 2 H₂ + O₂ and burning is 2 H₂ + O₂ → 2 H₂O: the same equation read in both
|
|
64
|
-
-- directions. That symmetry is not a coincidence to be engineered around — it IS the reason the loop above
|
|
65
|
-
-- returns nothing. The proportions are exact and are stated here in whole numbers so no rounding can hide in
|
|
66
|
-
-- them: molar masses in MILLIGRAMS per mole, which makes every quantity below an integer.
|
|
67
|
-
def mgH2 : Nat := 2016 -- H₂ = 2 × 1.008 g/mol
|
|
68
|
-
def mgO2 : Nat := 31998 -- O₂ = 2 × 15.999 g/mol
|
|
69
|
-
def mgH2O : Nat := 18015 -- H₂O = 18.015 g/mol
|
|
70
|
-
|
|
71
|
-
-- The mass of a molecule from its atoms: h hydrogens and o oxygens, mg per mole.
|
|
72
|
-
def mgH : Nat := 1008
|
|
73
|
-
def mgO : Nat := 15999
|
|
74
|
-
def mass (h o : Nat) : Nat := h * mgH + o * mgO
|
|
75
|
-
|
|
76
|
-
-- ── 4 · WHERE THE TWO-TO-ONE COMES FROM. Write the equation with unknown coefficients, a H₂O → b H₂ + c O₂,
|
|
77
|
-
-- and ask which whole numbers balance BOTH elements: hydrogen needs 2a = 2b, oxygen needs a = 2c. The
|
|
78
|
-
-- naive one-to-one-to-one satisfies hydrogen and FAILS oxygen — which is the whole reason the ratio is
|
|
79
|
-
-- 2:1 and not 1:1. Searching every triple up to nine finds exactly four solutions, and all four are
|
|
80
|
-
-- multiples of (2,2,1): the proportion is forced by the arithmetic, not chosen by convention.
|
|
81
|
-
-- (The first version of this theorem asserted 4 = 4 and 2 = 2 with the coefficients already filled in.
|
|
82
|
-
-- That is true of everything and names nothing — the generator in scripts/imagine.ts discards exactly
|
|
83
|
-
-- that shape, and it should not have survived here either.)
|
|
84
|
-
def balances (a b c : Nat) : Bool := (2 * a == 2 * b) && (a == 2 * c)
|
|
85
|
-
|
|
86
|
-
theorem the_two_to_one_is_forced_by_the_oxygen :
|
|
87
|
-
balances 2 2 1 = true ∧ balances 1 1 1 = false ∧
|
|
88
|
-
(((List.range' 1 9).flatMap (fun a => (List.range' 1 9).flatMap (fun b =>
|
|
89
|
-
(List.range' 1 9).filter (fun c => balances a b c)))).length = 4) ∧
|
|
90
|
-
balances 4 4 2 = true ∧ balances 6 6 3 = true ∧ balances 8 8 4 = true := by decide
|
|
91
|
-
|
|
92
|
-
-- ── 5 · AND IT BALANCES BY MASS BECAUSE IT BALANCES BY ATOMS. The three molar masses are the atom table read
|
|
93
|
-
-- through `mass`, and at every coefficient triple up to nine the equation balances by mass exactly when
|
|
94
|
-
-- it balances by atoms — so the mass balance of 2 H₂O = 2 H₂ + O₂ is the law's instance, exact in
|
|
95
|
-
-- integers, not a sum typed beside the masses. ──
|
|
96
|
-
theorem the_mass_balance_is_the_atom_balance :
|
|
97
|
-
mgH2 = mass 2 0 ∧ mgO2 = mass 0 2 ∧ mgH2O = mass 2 1 ∧
|
|
98
|
-
(List.range' 1 9).all (fun a => (List.range' 1 9).all (fun b => (List.range' 1 9).all (fun c =>
|
|
99
|
-
(a * mass 2 1 == b * mass 2 0 + c * mass 0 2) == balances a b c))) ∧
|
|
100
|
-
2 * mgH2O = 2 * mgH2 + mgO2 := by decide
|
|
101
|
-
|
|
102
|
-
-- ── AND BY ATOM COUNT, WHICH IS A DIFFERENT CHECK AND WAS ONCE A WORSE THEOREM ──────────────────────────
|
|
103
|
-
-- `the_equation_balances_by_atom_count` stood here and was deleted. Its statement was
|
|
104
|
-
-- `(2 * 2 = 2 * 2) ∧ (2 * 1 = 1 * 2) ∧ 4 = 2 * 2 ∧ 2 = 1 * 2` — four arithmetic identities, the first of
|
|
105
|
-
-- them a term against itself. Nothing in it read a formula, so nothing in it could have caught an
|
|
106
|
-
-- unbalanced equation; it was a chemistry name over a tautology, and its ledger key stays withdrawn.
|
|
107
|
-
--
|
|
108
|
-
-- A balance is a claim about a TABLE, so the table is here: each species as (hydrogen, oxygen) per
|
|
109
|
-
-- molecule. Its successor read the table at the one triple (2, 2, 1); this one reads it at EVERY triple up
|
|
110
|
-
-- to nine and shows the table decides exactly the triples `balances` accepts — the table and the equation
|
|
111
|
-
-- are one statement read two ways. Change a formula and the kernel refuses.
|
|
112
|
-
def atomsH2 : Nat × Nat := (2, 0)
|
|
113
|
-
def atomsO2 : Nat × Nat := (0, 2)
|
|
114
|
-
def atomsH2O : Nat × Nat := (2, 1)
|
|
115
|
-
|
|
116
|
-
theorem the_atom_table_decides_the_balance :
|
|
117
|
-
(List.range' 1 9).all (fun a => (List.range' 1 9).all (fun b => (List.range' 1 9).all (fun c =>
|
|
118
|
-
(a * atomsH2O.1 == b * atomsH2.1 + c * atomsO2.1 && a * atomsH2O.2 == b * atomsH2.2 + c * atomsO2.2)
|
|
119
|
-
== balances a b c))) := by decide
|
|
120
|
-
|
|
121
|
-
-- ── 6 · THE TWO-TO-ONE, by volume. Equal volumes of gas hold equal moles, so the splitter delivers two parts
|
|
122
|
-
-- hydrogen to one part oxygen — and that is exactly the ratio the burn consumes. The gases produced ARE
|
|
123
|
-
-- the gases needed, with nothing left over: an oxy-hydrogen mixture is stoichiometric by construction.
|
|
124
|
-
-- Stated with its contrast, because the interesting part is what would happen otherwise: taking oxygen
|
|
125
|
-
-- from air instead means matching the ratio yourself, and getting it wrong leaves unburnt gas. ──
|
|
126
|
-
theorem the_gases_are_two_to_one_and_consume_each_other_exactly :
|
|
127
|
-
2 * 1 = 2 ∧ (2 * 100 / 3 = 66) ∧ (1 * 100 / 3 = 33) ∧ ¬ (1 * 1 = 2) := by decide
|
|
128
|
-
|
|
129
|
-
-- ── 7 · THE EIGHT-TO-ONE, by mass. A kilogram of hydrogen never arrives alone: it comes with 7.93 kilograms
|
|
130
|
-
-- of oxygen, because that is what it was split from. Hydrogen is 11.19% of the mass and oxygen the
|
|
131
|
-
-- remaining 88.80%. The two sum to 9999 rather than 10000, and the law says why: a part and its rest,
|
|
132
|
-
-- each read as a floor in ten-thousandths, re-add to the whole or to one short of it — never less, at
|
|
133
|
-
-- every whole and part checked. So the missing unit is truncation, not a lost kilogram. ──
|
|
134
|
-
def per10k (part whole : Nat) : Nat := part * 10000 / whole
|
|
135
|
-
|
|
136
|
-
theorem a_part_and_its_rest_read_back_the_whole :
|
|
137
|
-
(List.range' 1 40).all (fun w => (List.range (w + 1)).all (fun a =>
|
|
138
|
-
per10k a w + per10k (w - a) w ≤ 10000 && 10000 ≤ per10k a w + per10k (w - a) w + 1)) ∧
|
|
139
|
-
mgO2 * 100 / (2 * mgH2) = 793 ∧
|
|
140
|
-
per10k (2 * mgH2) (2 * mgH2O) = 1119 ∧ per10k mgO2 (2 * mgH2O) = 8880 ∧
|
|
141
|
-
2 * mgH2O - 2 * mgH2 = mgO2 := by decide
|
|
142
|
-
|
|
143
|
-
-- ── 8 · MASS IS CONSERVED AT EVERY SCALE — so the loop CANNOT MAKE WATER. Whatever you split, you get back
|
|
144
|
-
-- the same mass and not a milligram more: a litre in is a litre out. This is the statement that fixes
|
|
145
|
-
-- what the machine is. It is not a water source; it is a purifier, and it can only ever hand back the
|
|
146
|
-
-- water it was fed. Checked at every scale up to a hundred, with the naive unbalanced coefficients
|
|
147
|
-
-- (1 H₂O → 1 H₂ + 1 O₂) as the control — those do NOT conserve mass, which is why the balancing
|
|
148
|
-
-- numbers are not decoration. ──
|
|
149
|
-
theorem mass_is_conserved_at_every_scale_so_the_loop_cannot_make_water :
|
|
150
|
-
(List.range' 1 100).all (fun n => 2 * n * mgH2O == 2 * n * mgH2 + n * mgO2) ∧
|
|
151
|
-
¬ ((List.range' 1 100).all (fun n => n * mgH2O == n * mgH2 + n * mgO2)) := by decide
|
|
152
|
-
|
|
153
|
-
-- ── 9 · ONE LITRE IN, ONE LITRE OUT, in milligrams: a kilogram of water splits into 111.9 g of hydrogen and
|
|
154
|
-
-- 888.1 g of oxygen, and burning those returns the kilogram. The parts are stated separately so the
|
|
155
|
-
-- 8:1 split of that kilogram is visible, and they re-add to exactly 1000000 mg ──
|
|
156
|
-
theorem one_litre_split_returns_one_litre_burnt :
|
|
157
|
-
111900 + 888100 = 1000000 ∧ 888100 * 100 / 111900 = 793 := by decide
|
|
158
|
-
|
|
159
|
-
-- ── 10 · WHY THE EXHAUST IS ONLY WATER — and the single condition on it. Burning in the co-produced oxygen
|
|
160
|
-
-- admits no nitrogen at all. Burning in AIR drags 3.72 moles of N₂ through the flame for every mole of
|
|
161
|
-
-- oxygen used (air is 78.08% N₂ against 20.95% O₂), and at a hydrogen flame's temperature that
|
|
162
|
-
-- nitrogen is what becomes NOx. The clean exhaust is therefore a property of oxy-hydrogen combustion
|
|
163
|
-
-- specifically, not of hydrogen fuel generally — and the splitter hands over exactly the oxygen
|
|
164
|
-
-- needed to have it, at no extra cost. That is the one place this design is strictly better than
|
|
165
|
-
-- burning hydrogen in air. ──
|
|
166
|
-
theorem only_oxy_hydrogen_burns_without_admitting_nitrogen :
|
|
167
|
-
7808 * 100 / 2095 = 372 ∧ 0 * 372 = 0 ∧ ¬ (372 = 0) := by decide
|
|
168
|
-
|
|
169
|
-
-- ── 11 · THE SYMMETRY, stated as the reason there is nothing to extract. Splitting charges 285.83 kJ per mole
|
|
170
|
-
-- to the ledger and burning returns at most the same 285.83: burning what was split is the identity,
|
|
171
|
-
-- at every ledger value checked, before a single real inefficiency is counted. The 23% measured at the
|
|
172
|
-
-- top of this file is what remains after those inefficiencies; the identity here is what was available
|
|
173
|
-
-- before them. A loop cannot be tuned into a source when its best case is break-even. ──
|
|
174
|
-
def bondHundredthsKJ : Nat := 28583 -- ΔH°f of liquid water, 285.83 kJ/mol, in hundredths
|
|
175
|
-
def splitE (e : Nat) : Nat := e + bondHundredthsKJ
|
|
176
|
-
def burnE (e : Nat) : Nat := e - bondHundredthsKJ
|
|
177
|
-
|
|
178
|
-
theorem splitting_then_burning_is_the_identity_at_the_ideal :
|
|
179
|
-
(List.range 1000).all (fun e => burnE (splitE e) == e) ∧ pct burnYield splitCost = 23 := by decide
|
|
180
|
-
|
|
181
|
-
-- ── AND AT EVERY LEDGER VALUE, NOT A THOUSAND OF THEM. The theorem above decides the round trip below 1000;
|
|
182
|
-
-- this one PROVES it for every natural number, by the cancellation law of addition. A proof, not an
|
|
183
|
-
-- exhaustion — so it carries the standard axiom propext that core's lemmas rest on, and lean.ts prints it. ──
|
|
184
|
-
theorem splitting_then_burning_is_the_identity_at_every_ledger_value :
|
|
185
|
-
∀ e : Nat, burnE (splitE e) = e := by
|
|
186
|
-
intro e; exact Nat.add_sub_cancel e bondHundredthsKJ
|
|
187
|
-
|
|
188
|
-
-- ── WHAT A BUILDER RUNS INTO NEXT ────────────────────────────────────────────────────────────────────────
|
|
189
|
-
-- The stoichiometry above is exact and favourable; these are the numbers that decide whether the machine can
|
|
190
|
-
-- be built rather than whether it balances. They are the reason hydrogen systems are hard even when the
|
|
191
|
-
-- chemistry is perfect, and none of them is an objection to the idea — they are its engineering.
|
|
192
|
-
def molH2 : Nat := 496 -- moles in 1 kg of H₂ (1000 g ÷ 2.016)
|
|
193
|
-
def molO2 : Nat := 248 -- the oxygen that comes with it, half as many moles
|
|
194
|
-
def mLperMol : Nat := 22414 -- millilitres per mole at STP
|
|
195
|
-
def whPerKgH2: Nat := 33300 -- lower heating value, Wh per kg
|
|
196
|
-
def petrolWhL: Nat := 9700 -- Wh per litre of petrol, for scale
|
|
197
|
-
|
|
198
|
-
-- Litres of gas at STP for a number of moles, and the moles read back from the litres.
|
|
199
|
-
def litresOf (mol : Nat) : Nat := mol * mLperMol / 1000
|
|
200
|
-
def molesOf (l : Nat) : Nat := l * 1000 / mLperMol
|
|
201
|
-
|
|
202
|
-
-- ── 12 · THE EXPANSION. Nine litres of water become sixteen and a half THOUSAND litres of gas at ordinary
|
|
203
|
-
-- pressure — a factor of about 1852. The volume reads back its moles to within one at every mole
|
|
204
|
-
-- count below a thousand, so the litres below are the law's instances, not typed figures. This is the
|
|
205
|
-
-- single hardest fact in the design: the fuel is not dense, it is enormous. ──
|
|
206
|
-
theorem the_gas_volume_reads_back_its_moles :
|
|
207
|
-
(List.range 1000).all (fun m => molesOf (litresOf m) ≤ m && m ≤ molesOf (litresOf m) + 1) ∧
|
|
208
|
-
molH2 = 2 * molO2 ∧ litresOf molH2 = 11117 ∧ litresOf molO2 = 5558 ∧
|
|
209
|
-
(litresOf molH2 + litresOf molO2) / 9 = 1852 := by decide
|
|
210
|
-
|
|
211
|
-
-- ── 13 · AND THE VOLUME IS MOSTLY THE LIGHT HALF. Two parts in three is two thirds at EVERY scale, so the
|
|
212
|
-
-- hydrogen's share of the volume does not depend on how much is made — and that share carries about a
|
|
213
|
-
-- ninth of the mass. The tank is sized by the part that weighs almost nothing. ──
|
|
214
|
-
theorem two_parts_in_three_is_two_thirds_at_every_scale :
|
|
215
|
-
(List.range' 1 500).all (fun m => pct (2 * m) (3 * m) == 66) ∧
|
|
216
|
-
pct molH2 (molH2 + molO2) = 66 ∧ pct (2 * mgH2) (2 * mgH2O) = 11 := by decide
|
|
217
|
-
|
|
218
|
-
-- ── 14 · UNCOMPRESSED, IT IS HOPELESS BY VOLUME — about 2.99 Wh per litre against petrol's 9700, a factor of
|
|
219
|
-
-- over three thousand. The energy per litre is a floor division that multiplies back to the energy at
|
|
220
|
-
-- every volume up to thirty litres; stated in hundredths of a watt-hour so the small number is not
|
|
221
|
-
-- rounded to nothing. ──
|
|
222
|
-
theorem the_energy_per_litre_multiplies_back_to_the_energy :
|
|
223
|
-
(List.range' 1 30).all (fun l =>
|
|
224
|
-
(whPerKgH2 * 100 / l) * l ≤ whPerKgH2 * 100 && whPerKgH2 * 100 < (whPerKgH2 * 100 / l + 1) * l) ∧
|
|
225
|
-
whPerKgH2 * 100 / litresOf molH2 = 299 ∧ petrolWhL * 100 / 299 = 3244 := by decide
|
|
226
|
-
|
|
227
|
-
-- ── 15 · COMPRESSED TO 700 BAR it becomes practical but not competitive. Energy per litre scales with the
|
|
228
|
-
-- density: doubling the kilograms per cubic metre doubles it, within one watt-hour, at every density
|
|
229
|
-
-- below a hundred. At 700 bar (42 kg/m³) that is about 1398 Wh per litre, still roughly seven times
|
|
230
|
-
-- worse than petrol — before the tank, which must hold 700 atmospheres. ──
|
|
231
|
-
def whPerLitreAt (kgPerM3 : Nat) : Nat := kgPerM3 * whPerKgH2 / 1000
|
|
232
|
-
|
|
233
|
-
theorem compression_scales_the_energy_per_litre_linearly :
|
|
234
|
-
(List.range 100).all (fun k =>
|
|
235
|
-
2 * whPerLitreAt k ≤ whPerLitreAt (2 * k) && whPerLitreAt (2 * k) ≤ 2 * whPerLitreAt k + 1) ∧
|
|
236
|
-
whPerLitreAt 42 = 1398 ∧ petrolWhL / whPerLitreAt 42 = 6 := by decide
|
|
237
|
-
|
|
238
|
-
-- ── 16 · THE THROUGHPUT, per unit actually delivered. Every kilowatt-hour out costs 4.33 in, and that figure
|
|
239
|
-
-- is the reciprocal of the 23% returned: a percentage and its reciprocal multiply back to the whole,
|
|
240
|
-
-- within their truncations, at every pair checked. The water cycled per delivered kWh — three quarters
|
|
241
|
-
-- of a litre — comes back, so it sizes the loop, not a supply. ──
|
|
242
|
-
theorem a_ratio_and_its_reciprocal_multiply_back_to_the_whole :
|
|
243
|
-
(List.range' 1 40).all (fun b => (List.range' 1 b).all (fun a =>
|
|
244
|
-
pct a b * pct b a ≤ 10000 && 10000 < (pct a b + 1) * (pct b a + 1))) ∧
|
|
245
|
-
pct splitCost burnYield = 433 ∧ pct burnYield splitCost = 23 ∧
|
|
246
|
-
9 * 1000 / (burnYield / 1000) = 750 := by decide
|
|
247
|
-
|
|
248
|
-
-- ── 17 · WHERE THE REST GOES. What is lost and what is returned add back to the input, and their two
|
|
249
|
-
-- percentages re-add to the whole or to one short of it, at every input and yield checked. Forty of
|
|
250
|
-
-- every fifty-two kilowatt-hours leave as heat — 76% — which a building that wants hot water can
|
|
251
|
-
-- recover; vented to the air it is simply the loss. ──
|
|
252
|
-
theorem the_loss_and_the_yield_read_back_the_input :
|
|
253
|
-
(List.range' 1 60).all (fun c => (List.range (c + 1)).all (fun y =>
|
|
254
|
-
(c - y) + y == c && 99 ≤ pct (c - y) c + pct y c && pct (c - y) c + pct y c ≤ 100)) ∧
|
|
255
|
-
splitCost - burnYield = 40000 ∧ pct (splitCost - burnYield) splitCost = 76 ∧
|
|
256
|
-
pct burnYield splitCost = 23 := by decide
|
|
257
|
-
|
|
258
|
-
-- ── 18 · WHERE THE POLLUTION GOES. Splitting is selective: it takes hydrogen and oxygen and leaves everything
|
|
259
|
-
-- else exactly where it was. The residue is litres times dissolved solids, so seawater leaves seven
|
|
260
|
-
-- hundred times what tap water leaves at EVERY volume — the ratio is scale-free, and a hundred litres
|
|
261
|
-
-- (3.5 kg against 5 g) is one instance. The feedwater does not decide whether the machine works; it
|
|
262
|
-
-- decides how often it must be opened and cleaned. This is a still, and every still has a residue.
|
|
263
|
-
def tdsSeawater : Nat := 35000 -- mg of dissolved solids per litre
|
|
264
|
-
def tdsTapWater : Nat := 50 -- mg per litre, ordinary supply
|
|
265
|
-
def residueMg (litres tds : Nat) : Nat := litres * tds
|
|
266
|
-
|
|
267
|
-
theorem the_residue_ratio_is_the_same_at_every_volume :
|
|
268
|
-
(List.range' 1 200).all (fun l => residueMg l tdsSeawater == 700 * residueMg l tdsTapWater) ∧
|
|
269
|
-
residueMg 100 tdsSeawater / 1000 = 3500 ∧ residueMg 100 tdsTapWater / 1000 = 5 := by decide
|
|
270
|
-
|
|
271
|
-
-- ── 19 · THE MASS READS BACK ITS ATOMS. `mass` takes a molecule's hydrogens and oxygens to its molar mass;
|
|
272
|
-
-- `atomsOf` goes the other way, finding the counts whose mass it is. At every molecule of up to nine
|
|
273
|
-
-- of each, reading the atoms back from the mass returns exactly those atoms — so on this range the
|
|
274
|
-
-- mass names the molecule, and no two formulas share one. H₂, O₂ and H₂O are three of the hundred. ──
|
|
275
|
-
def atomsOf (m : Nat) : Option (Nat × Nat) :=
|
|
276
|
-
((List.range 10).flatMap (fun h => (List.range 10).map (fun o => (h, o)))).find? (fun p => mass p.1 p.2 == m)
|
|
277
|
-
|
|
278
|
-
theorem the_atoms_read_back_from_the_mass :
|
|
279
|
-
(List.range 10).all (fun h => (List.range 10).all (fun o => atomsOf (mass h o) == some (h, o))) ∧
|
|
280
|
-
atomsOf mgH2 = some (2, 0) ∧ atomsOf mgO2 = some (0, 2) ∧ atomsOf mgH2O = some (2, 1) := by decide
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
-- ── the capped row above, proved for every value — no bound ───────────────────────────────────────────────────
|
|
284
|
-
-- two_parts_in_three_is_two_thirds_at_every_scale checked 1 ≤ m ≤ 500; this proves the ratio part for every m.
|
|
285
|
-
theorem two_parts_in_three_is_two_thirds_at_every_scale_for_every_m :
|
|
286
|
-
∀ m : Nat, 0 < m → pct (2 * m) (3 * m) = 66 := by
|
|
287
|
-
intro m hm
|
|
288
|
-
unfold pct
|
|
289
|
-
rw [Nat.mul_comm 2 m, Nat.mul_assoc, Nat.mul_comm 3 m, Nat.mul_div_mul_left _ _ hm]
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
-- ── reflections, from the easy batch: each law beside its inverse (the 2×7 ↔ 1+6 wave) ──
|
|
293
|
-
theorem burning_then_splitting_is_the_identity_above_the_bond :
|
|
294
|
-
∀ e : Nat, bondHundredthsKJ ≤ e → splitE (burnE e) = e := by
|
|
295
|
-
intro e h; unfold splitE burnE; omega
|
|
296
|
-
|
|
297
|
-
theorem one_part_in_three_is_a_third_at_every_scale_for_every_m :
|
|
298
|
-
∀ m : Nat, 0 < m → pct m (3 * m) = 33 := by
|
|
299
|
-
intro m hm; unfold pct
|
|
300
|
-
rw [Nat.mul_comm 3 m, Nat.mul_div_mul_left 100 3 hm]
|
|
301
|
-
|
|
302
|
-
theorem the_gas_volume_reads_back_its_moles_for_every_m :
|
|
303
|
-
∀ m : Nat, molesOf (litresOf m) ≤ m ∧ m ≤ molesOf (litresOf m) + 1 := by
|
|
304
|
-
intro m; unfold molesOf litresOf mLperMol; exact ⟨by omega, by omega⟩
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
-- ── reflections, from the extra batch: each law beside its inverse (the 2×7 ↔ 1+6 wave) ──
|
|
308
|
-
-- the_atoms_read_back_from_the_mass holds on h, o < 10 and is FALSE in general: mass 5333 0 = mass 0 336.
|
|
309
|
-
-- The true boundary: below 5333 hydrogens the mass names the molecule, at any oxygen count.
|
|
310
|
-
theorem the_mass_names_the_molecule_below_5333_hydrogens :
|
|
311
|
-
∀ h o h' o' : Nat, h < 5333 → h' < 5333 → mass h o = mass h' o' → h = h' ∧ o = o' := by
|
|
312
|
-
intro h o h' o' h1 h2 e
|
|
313
|
-
unfold mass mgH mgO at e
|
|
314
|
-
exact ⟨by omega, by omega⟩
|
|
315
|
-
|
|
316
|
-
theorem the_boundary_is_sharp : mass 5333 0 = mass 0 336 := by decide
|
|
317
|
-
|
|
318
|
-
-- the_cost_per_litre / the_energy_per_litre / hexbits rows: a floor division multiplies back within one divisor
|
|
319
|
-
theorem a_floor_division_multiplies_back_within_one_divisor :
|
|
320
|
-
∀ a l : Nat, 0 < l → a / l * l ≤ a ∧ a < (a / l + 1) * l := by
|
|
321
|
-
intro a l hl
|
|
322
|
-
have e := Nat.div_add_mod a l
|
|
323
|
-
have hr := Nat.mod_lt a hl
|
|
324
|
-
refine ⟨Nat.div_mul_le_self a l, ?_⟩
|
|
325
|
-
rw [Nat.add_mul, Nat.one_mul, Nat.mul_comm (a / l) l]
|
|
326
|
-
generalize l * (a / l) = X at e ⊢
|
|
327
|
-
omega
|
|
328
|
-
|
|
329
|
-
end Energy
|