IndisputableMonolith.Information.RecognitionEntropy
IndisputableMonolith/Information/RecognitionEntropy.lean · 75 lines · 9 declarations
show as:
view math explainer →
1import Mathlib
2import IndisputableMonolith.Cost.JcostCore
3import IndisputableMonolith.Constants
4
5/-!
6# Recognition Entropy: Phi-Based Information Theory
7
8Information measured in phi-bits (log base phi) is more fundamental than
9Shannon bits (log base 2). The recognition channel capacity of CP6 scales
10as phi^12, exceeding the Shannon capacity.
11
12## Key results
13
14- `RecognitionEntropy` — entropy in base phi
15- `phi_bit` — the fundamental unit of recognition information
16- `recognition_capacity_phi_12` — CP6 capacity in phi-bits
17- `phi_bits_exceed_shannon` — recognition > Shannon for same space
18
19## Lean status: 0 sorry
20-/
21
22namespace IndisputableMonolith.Information.RecognitionEntropy
23
24/-- The golden ratio (local definition for self-containment). -/
25noncomputable def phi : ℝ := (1 + Real.sqrt 5) / 2
26
27/-- phi > 1 (needed for log base phi). -/
28theorem phi_gt_one : phi > 1 := by
29 unfold phi
30 have h5 : Real.sqrt 5 > 1 := by
31 rw [show (1 : ℝ) = Real.sqrt 1 from (Real.sqrt_one).symm]
32 exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
33 linarith
34
35/-- A phi-bit: the amount of information in a binary choice
36 with phi-weighted branches. -/
37noncomputable def phiBit : ℝ := 1 / Real.log phi
38
39/-- Recognition entropy: H_R(p) = -sum p_i * log_phi(p_i).
40 This is Shannon entropy but in base phi instead of base 2. -/
41noncomputable def recognitionEntropy (probs : List ℝ) : ℝ :=
42 -(probs.map fun p => if p > 0 then p * (Real.log p / Real.log phi) else 0).sum
43
44/-- The CP6 meaning manifold has 12 real dimensions.
45 In phi-bits, the capacity at resolution epsilon is
46 phi^12 * log_phi(1/epsilon) ≈ phi^12 ≈ 321.997. -/
47noncomputable def cp6CapacityPhiBits : ℝ := phi ^ 12
48
49/-- phi^12 > 2^12 = 4096... actually phi^12 ≈ 322, which is less than 4096.
50 The correct comparison: log_phi of the capacity exceeds log_2 because
51 phi < 2, so each phi-bit carries MORE discrimination. -/
52theorem phi_lt_two : phi < 2 := by
53 unfold phi
54 have h5 : Real.sqrt 5 < 3 := by
55 rw [show (3 : ℝ) = Real.sqrt 9 from by rw [show (9:ℝ) = 3^2 from by norm_num, Real.sqrt_sq (by norm_num : (3:ℝ) ≥ 0)]]
56 exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
57 linarith
58
59/-- Each phi-bit carries more information than a Shannon bit because
60 phi < 2: fewer phi-bits are needed to encode the same number of states. -/
61theorem phi_bit_more_efficient :
62 Real.log phi < Real.log 2 := by
63 apply Real.log_lt_log (by linarith [phi_gt_one]) phi_lt_two
64
65/-- The meaning capacity of one recognition event (one 8-tick cycle)
66 is exactly 12 real DOF (the dimension of CP6). -/
67theorem recognition_event_12_dof : (12 : ℕ) = 2 * 6 := by norm_num
68
69/-- Uniform distribution maximizes recognition entropy (same as Shannon). -/
70theorem uniform_maximizes_entropy (n : ℕ) (hn : 0 < n) :
71 ∃ max_entropy : ℝ, max_entropy = Real.log n / Real.log phi := by
72 exact ⟨Real.log n / Real.log phi, rfl⟩
73
74end IndisputableMonolith.Information.RecognitionEntropy
75