Skip to content

Verify and fix math rigor: density matrix errors, Landauer inconsistency, missing proof and equations files#22

Merged
blackboxprogramming merged 2 commits intomainfrom
copilot/verify-math-rigorously
Feb 25, 2026
Merged

Verify and fix math rigor: density matrix errors, Landauer inconsistency, missing proof and equations files#22
blackboxprogramming merged 2 commits intomainfrom
copilot/verify-math-rigorously

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Several numerical errors and missing referenced files left the math unverified. This corrects concrete computation mistakes, fixes a temperature inconsistency that generated a spurious efficiency claim, and adds the two files referenced but absent.

Numerical fixes

proofs/pure-state.md — density matrix had wrong values:

  • ρ[2,2]: 0.74010.7430 (transposition typo; 0.8620² = 0.74304)
  • ρ[0,1]/ρ[1,0]: 0.36290.3631; ρ[1,2]/ρ[2,1]: 0.66390.6644
  • Proof was claiming ρ² = ρ for an unnormalized state — now explicitly constructs |ψ̂⟩ = |ψ⟩/‖ψ‖, verifies ρ̂² = ρ̂ and Tr(ρ̂) = 1

proofs/ternary-efficiency.md — Landauer bounds used inconsistent temperatures:

  • Binary bound 2.87×10⁻²¹ J was computed at T=300K while the text states T≈293K; corrected to 2.80×10⁻²¹ J
  • This eliminated the claimed "ternary wins by ~2%" advantage — with consistent T=293K, the energy ratio equals the information ratio exactly (ln(3)/ln(2) ≈ 1.585), so information per joule is identical for binary and ternary at the Landauer limit. The real advantage is radix economy (fewer symbols per number), not thermodynamic efficiency per bit.

Missing files

proofs/universal-computation.md — listed in proofs/README.md table but did not exist:

  • Lemma 1: {TNEG, TXOR, TAND} is functionally complete via Post (1941) + Epstein (1960) ternary DNF
  • Lemma 2: each gate is realizable as a mass-action CRN (Soloveichik et al. 2008)
  • Theorem: Turing-complete via Minsky (1967) register machine construction

equations/thermodynamics.md — listed in equations/README.md table but did not exist:

  • Landauer principle (binary/ternary, consistent T=293K), radix efficiency table, reversible entropy (ΔS_quantum = 0), Gibbs coupling (μ_chem = ∂G/∂N ↔ E_comp), substrate efficiency, thermodynamic consciousness bound
Original prompt

I'm extremely annoyed @copilot verify the math make it rigorous


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…roofs and equations

Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
Copilot AI changed the title [WIP] Verify and ensure rigor in mathematical calculations Verify and fix math rigor: density matrix errors, Landauer inconsistency, missing proof and equations files Feb 25, 2026
@blackboxprogramming blackboxprogramming requested review from Copilot and removed request for blackboxprogramming February 25, 2026 06:42
@blackboxprogramming blackboxprogramming marked this pull request as ready for review February 25, 2026 06:43
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@blackboxprogramming blackboxprogramming merged commit 4b94b50 into main Feb 25, 2026
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request corrects several mathematical errors and adds two missing files referenced in the README documentation. The changes improve the mathematical rigor of the ternary computing framework by fixing numerical errors in density matrix calculations, correcting a temperature inconsistency in thermodynamic bounds, and providing formal proofs for computational universality and thermodynamic principles.

Changes:

  • Corrected density matrix element values in pure-state proof and added explicit normalization treatment
  • Fixed Landauer bound calculations to use consistent T=293K, eliminating a spurious efficiency claim
  • Added missing universal-computation.md proof showing Turing completeness of ternary bio-quantum system
  • Added missing thermodynamics.md equations file documenting Landauer principle, radix efficiency, and related thermodynamic bounds

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
proofs/pure-state.md Corrected density matrix values (ρ[2,2], ρ[0,1], ρ[1,2]) and added explicit normalization showing ρ̂² = ρ̂ for normalized state
proofs/ternary-efficiency.md Fixed temperature consistency (T=300K → T=293K) in Landauer bounds, correcting binary bound from 2.87×10⁻²¹J to 2.80×10⁻²¹J and eliminating false ternary advantage claim
proofs/universal-computation.md New file proving Turing completeness via functional completeness of {TNEG, TXOR, TAND} gate set and CRN realizability
equations/thermodynamics.md New file documenting Landauer principle, radix efficiency, reversible logic entropy, Gibbs coupling, and consciousness bounds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +148 to +149
The forward direction (⇒) follows from this proof: implementing the gates is sufficient for universality.
The backward direction (⇐) follows from Lemma 2: any universal system can simulate the gates.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backward direction (⇐) states "any universal system can simulate the gates" (line 149), but this is not what the backward direction should prove. The statement at line 145 says "P = {S, v(x)} is universal ⟺ ∃ mapping to balanced ternary logic gates". The backward direction should prove: "if there exists a mapping to balanced ternary logic gates, then P is universal"—which was already proven in the forward direction (Lemmas 1 and 2 show that the gates are sufficient for universality). The actual backward direction would need to prove that universality requires such a mapping, which is a much stronger claim and is not proven here. Consider either removing the backward direction claim or clarifying that the equivalence is properly one-directional (⇒ only) as stated.

Copilot uses AI. Check for mistakes.
Ratio: ln(3)/ln(2) ≈ 1.585. Every ternary trit ≈ 1.585 binary bits.
Energy cost: 4.45/2.87 ≈ 1.551 times binary.
Information per unit energy: 1.585/1.551 ≈ 1.022. Ternary wins by ~2%.
Energy cost: 4.44 / 2.80 = ln(3)/ln(2) ≈ 1.585 times binary.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement "4.44 / 2.80 = ln(3)/ln(2)" is only approximately true due to rounding of the energy values. More precisely: 4.44 / 2.80 ≈ 1.5857 while ln(3)/ln(2) ≈ 1.5849. The difference is small but the equality sign is misleading. Consider using "≈" instead of "=" or stating "4.44 / 2.80 ≈ 1.586 ≈ ln(3)/ln(2) ≈ 1.585" to acknowledge the rounding.

Suggested change
Energy cost: 4.44 / 2.80 = ln(3)/ln(2) ≈ 1.585 times binary.
Energy cost: 4.44 / 2.80 ≈ 1.586 and ln(3)/ln(2) ≈ 1.585, so the energy cost is ≈ 1.585 times binary.

Copilot uses AI. Check for mistakes.
ΔG_ATP ≈ −50 kJ/mol ≈ 8.3 × 10⁻²⁰ J/molecule (in vivo)
```

Capacity: ΔG_ATP / E_min(ternary) ≈ 8.3×10⁻²⁰ / 4.44×10⁻²¹ ≈ 18 trit operations per ATP.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calculation shows "≈ 18 trit operations per ATP" but the actual value is 8.3×10⁻²⁰ / 4.44×10⁻²¹ ≈ 18.7, which rounds to 19 rather than 18. Consider updating to "≈ 19 trit operations per ATP" for better accuracy.

Suggested change
Capacity: ΔG_ATP / E_min(ternary) ≈ 8.3×10⁻²⁰ / 4.44×10⁻²¹ ≈ 18 trit operations per ATP.
Capacity: ΔG_ATP / E_min(ternary) ≈ 8.3×10⁻²⁰ / 4.44×10⁻²¹ ≈ 19 trit operations per ATP.

Copilot uses AI. Check for mistakes.
ops/sec ≈ 10¹⁴
energy/op ≈ k_B T ln(3) ≈ 4.44 × 10⁻²¹ J
η_substrate = 10¹⁴ / 4.44×10⁻²¹ · f_accuracy
≈ 2.25 × 10³⁴ · f_accuracy (ops per joule-second)
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The substrate efficiency formula has dimensional inconsistency. Line 106 states "η_substrate = (ops/sec) / (energy/op) · f_accuracy", which gives units of operations²/(joule·second). However, line 114 claims the result is "ops per joule-second", which would be operations/(joule·second). The dimensional mismatch suggests the formula may be incorrect. Consider clarifying whether this should be: (1) power efficiency: (ops/sec) / (power consumed), which has units of operations per joule; or (2) an energy-time tradeoff metric with different units. The current formulation needs correction or clarification.

Suggested change
≈ 2.25 × 10³⁴ · f_accuracy (ops per joule-second)
≈ 2.25 × 10³⁴ · f_accuracy (ops² per joule-second)

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +42
functions and the selector (MIN) function, from which every function can be built via
the ternary Sheffer-style expansion (Rousseau 1967).
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proof references "Rousseau 1967" for the "ternary Sheffer-style expansion" (line 42), but this concept is not actually used in the proof. The proof instead relies on ternary DNF (Disjunctive Normal Form) from Epstein 1960, not a Sheffer-style expansion. Consider either removing the Rousseau reference or clarifying how it relates to the proof. The Sheffer stroke typically refers to a single functionally complete operator (like NAND or NOR in binary logic), whereas this proof uses a set of three operators.

Suggested change
functions and the selector (MIN) function, from which every function can be built via
the ternary Sheffer-style expansion (Rousseau 1967).
functions and the selector (MIN) function, since any function f: Σ₃ⁿ → Σ₃ can then be
written in ternary disjunctive normal form (Epstein 1960) using these primitives.

Copilot uses AI. Check for mistakes.
**Concentration-state mapping (Equation 17):**
```
x = −1 if C ≤ C_low
x = 0 if C_low < C ≤ C_high
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concentration-state mapping has an ambiguity at the boundary C = C_high. When C equals C_high exactly, both the second condition (line 26: "C_low < C ≤ C_high") and the third condition (line 27: "C ≥ C_high") are satisfied, making it unclear whether x should be 0 or +1. Consider changing line 27 to "x = +1 if C > C_high" to eliminate the overlap, or change line 26 to "x = 0 if C_low < C < C_high" and keep line 27 as is.

Suggested change
x = 0 if C_low < C C_high
x = 0 if C_low < C < C_high

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +72
For balanced ternary (k = 3), it suffices to show the gate set generates all constant
functions and the selector (MIN) function, from which every function can be built via
the ternary Sheffer-style expansion (Rousseau 1967).

**Step 1 — Constant −1:**
```
TAND(−1, −1) = min(−1, −1) = −1 ✓
```

**Step 2 — Constant 0:**
```
TXOR(x, TNEG(x)) = x + (−x) = 0 for all x ∈ Σ₃ ✓
```

**Step 3 — Constant +1:**
```
TNEG(TAND(−1, −1)) = TNEG(−1) = +1 ✓
```

**Step 4 — MAX from MIN and TNEG:**
```
max(a, b) = TNEG(TAND(TNEG(a), TNEG(b))) (De Morgan dual for min/max) ✓
```

**Step 5 — Every ternary function as DNF:**

Every function f: Σ₃ⁿ → Σ₃ can be expressed as a ternary disjunctive normal form
(ternary DNF) — a MAX of terms, where each term is a MIN of literals, and a literal
is either a variable or TNEG of a variable (Epstein 1960, *Multiple-Valued Logic Design*).

Since Steps 1–4 provide all constants and MAX = TNEG(TAND(TNEG(·), TNEG(·))), every
ternary DNF is constructible from {TNEG, TXOR, TAND}. **Therefore the gate set is
functionally complete. □**
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proof claims that generating "all constant functions and the selector (MIN) function" is sufficient for functional completeness (line 41), but TAND is already defined as MIN (line 44 in Equation 6), so MIN is directly available in the gate set. The proof would be clearer if it explicitly stated this rather than treating MIN as something that needs to be derived. Additionally, the proof shows how to generate constants and MAX, but the role of TXOR in achieving functional completeness is not clearly explained—TXOR is only used to generate the constant 0 (line 51), which could also be obtained via TAND(0,0) if a 0 input is available. Consider clarifying why TXOR is necessary for functional completeness beyond constant generation.

Copilot uses AI. Check for mistakes.
Comment on lines +133 to +137
The reaction network provides unbounded memory through the concentrations of molecular
species: additional molecular species = additional registers. Since no upper bound is
placed on the number of species in the network (§175: the biological substrate provides
10¹⁴ operations/sec across a 100 μL volume), the system has unbounded computational
resources.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The claim that "additional molecular species = additional registers" and "no upper bound is placed on the number of species in the network" needs qualification. While this is a standard theoretical assumption for proving Turing completeness, in practice there are physical limits to the number of distinct molecular species that can be maintained in a finite volume. Consider adding a note that this is a theoretical assumption for the purpose of proving computational universality, similar to the unbounded tape assumption in standard Turing machine theory.

Suggested change
The reaction network provides unbounded memory through the concentrations of molecular
species: additional molecular species = additional registers. Since no upper bound is
placed on the number of species in the network (§175: the biological substrate provides
10¹⁴ operations/sec across a 100 μL volume), the system has unbounded computational
resources.
In the theoretical model, the reaction network is idealized as providing unbounded memory
through the concentrations of molecular species: additional molecular species = additional
registers. Under this idealization, no upper bound is placed on the number of species in the
network (§175: the biological substrate provides 10¹⁴ operations/sec across a 100 μL volume),
in direct analogy with the unbounded tape assumption in standard Turing machine theory, even
though any physical realization would necessarily be finite.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants