Skip to content

Ring 046: radix economy spec — formal proof that base-3 achieves 99.5% of optimal E(e) #142

Closed

Description

@gHashTag

Ring 046: Radix Economy Formal Spec

Phase: HARDEN | Layer: THEORY | Parent: #126

Problem

The information-theoretic superiority of base-3 over base-2 (E(3)/E(2) = 5.4% advantage) is not encoded as a formal invariant in T27. This is a foundational mathematical justification for the entire project.

Goal

Create specs/math/radix_economy.t27 encoding the radix economy theorem as a formally verifiable invariant.

Formal content

module radix_economy;
use math::constants;

// E(b) = ln(b) / b
// Maximized at b = e = 2.71828...
// E(3) / E(2) = (ln3/3) / (ln2/2) = 2*ln3 / (3*ln2)

const E_BASE3: GF32 = 0.36620;  // ln(3)/3
const E_BASE2: GF32 = 0.34657;  // ln(2)/2
const E_OPTIMAL: GF32 = 0.36788; // 1/e

invariant base3_near_optimal {
  // E(3) >= 99.5% of E(e)
  assert E_BASE3 / E_OPTIMAL >= 0.995,
}

invariant base3_beats_base2 {
  assert E_BASE3 > E_BASE2,
  assert (E_BASE3 - E_BASE2) / E_BASE2 >= 0.054,  // 5.4% advantage
}

invariant trit_info_density {
  // log2(3) = 1.585 bits per trit
  assert LOG2_3 >= 1.584,
  assert LOG2_3 <= 1.586,
}

bench radix_comparison {
  // Verify 27-trit vs 42-bit equivalence
  assert ternary_range(27) == binary_range(43),  // (3^27-1)/2 ~ 2^42
}

Specs to create

  • specs/math/radix_economy.t27

Generated artifacts

  • gen/zig/radix_economy.zig
  • gen/c/radix_economy.c
  • conformance/radix_economy_vectors.json

Acceptance criteria

  • E(3)/E(optimal) >= 0.995 invariant formally encoded
  • E(3) > E(2) invariant present
  • LOG2_3 value within tolerance
  • 27-trit vs 42-bit equivalence bench

Seal requirements

  • seal --save specs/math/radix_economy.t27

Dependencies

  • Ring 025 (math/constants gen) - sealed

Branch: ring/046-radix-economy | Commit: feat(ring-046): radix economy formal spec [SEED-46]

Activity

  1. added this to the EPOCH-01-HARDEN milestone on Apr 6, 2026
  2. 8 remaining items

  3. added a commit that references this issue on Apr 7, 2026
    a4ddf2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions