Skip to content

Commit 04808c5

Browse files
committed
Fix TsallisExtropy sign: revert to 1/(q-1), prove nonneg for all q > 1
SIGN RESOLUTION (4th iteration, now numerically verified): The TsallisExtropy definition went through 4 versions: - V1: p_i with -(1/(q-1)) — equals TsallisEntropy, wrong definition - V2: (1-p_i) with 1/(q-1) — correct complements, J_q >= 0 ✓ - V3: (1-p_i) with 1/(1-q) — WRONG: numerically gives J_q < 0 for q > 1 - V4 (current): (1-p_i) with 1/(q-1) — correct, verified: q=1.5, p=(0.3,0.7) NUMERICAL VERIFICATION: q=1.5, p=(0.3,0.7): J_q = 0.500042 > 0 with 1/(q-1) ✓ Same with 1/(1-q): J_q = -0.500042 < 0 ✗ PROVED: tsallis_extropy_nonneg for ALL q > 1 (not just q > 2) Key insight: (1-p)^(q-1) in [0,1] for (1-p) in [0,1] and q-1 > 0 Uses rpow_le_one from Mathlib. Zero sorry in the proof. Also fixed orphaned docstring (converted /-- to /-! section comment).
1 parent 3a3951a commit 04808c5

1 file changed

Lines changed: 32 additions & 36 deletions

File tree

src/SGC/InformationGeometry/TsallisStatistics.lean

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -335,26 +335,24 @@ lemma grokking_is_scale_free : ScaleFreeRegime GrokkingQParameter := by
335335

336336
/-! ### 8. Tsallis Extropy (Nonlinear SGC Infrastructure) -/
337337

338-
/-- **Tsallis Extropy** (q-extropy, Sati-Kumar definition):
338+
/-- **Tsallis Extropy** (q-extropy, complement-probability form):
339339
340340
J_q(p) = (1/(q-1)) · Σᵢ (1 - pᵢ) · (1 - (1 - pᵢ)^(q-1))
341341
342-
Uses COMPLEMENT probabilities (1-pᵢ), following Sati & Kumar (2021)
343-
and Buono et al. (arXiv:2103.07168).
342+
Uses COMPLEMENT probabilities (1-pᵢ), following Sati & Kumar (2021).
344343
345-
**CRITICAL NOTE**: An earlier version used pᵢ instead of (1-pᵢ).
346-
That definition equals TsallisEntropy identically for normalized distributions
347-
(since p·(1-p^(q-1)) expands to p - p^q, giving J = S). The complement-
348-
probability version is the correct generalization of Shannon extropy
349-
J(p) = -Σ (1-pᵢ) log(1-pᵢ) and is NOT equal to S_q in general.
344+
**SIGN VERIFICATION** (numerically verified for q=1.5, p=(0.3,0.7)):
345+
- Each term (1-pᵢ)·(1-(1-pᵢ)^(q-1)) ≥ 0 for pᵢ ∈ [0,1], q > 1
346+
because (1-pᵢ)^(q-1) ∈ [0,1] when 1-pᵢ ∈ [0,1] and q-1 > 0
347+
- With 1/(q-1) > 0: J_q ≥ 0 ✓
350348
351-
Properties:
352-
- Reduces to Shannon extropy J(p) = -Σ (1-pᵢ) log(1-pᵢ) as q → 1
353-
- Maximum at uniform distribution
354-
- Non-negative for probability distributions with 0 ≤ pᵢ ≤ 1
349+
**DEFINITION HISTORY** (4 iterations):
350+
- V1: pᵢ·(1-pᵢ^(q-1)) with -(1/(q-1)) — equals S_q, wrong definition
351+
- V2: (1-pᵢ)·(1-(1-pᵢ)^(q-1)) with 1/(q-1) — correct, J_q ≥ 0 ✓
352+
- V3: same with 1/(1-q) — WRONG: gives J_q ≤ 0 for q > 1
353+
- V4 (current): back to 1/(q-1) — correct, verified numerically
355354
356355
**References**:
357-
- Lad, Sanfilippo, Agró (2015) — Original Shannon extropy definition
358356
- Sati & Kumar (2021) — Tsallis extropy with complement probabilities
359357
- Buono et al. arXiv:2103.07168 (2021) — Properties and characterizations -/
360358
def TsallisExtropy (q : ℝ) (p : V → ℝ) : ℝ :=
@@ -369,43 +367,41 @@ def TsallisExtropy (q : ℝ) (p : V → ℝ) : ℝ :=
369367
def TsallisEntropy_uniform (q : ℝ) (n : ℕ) : ℝ :=
370368
(n : ℝ) / (q - 1) * (1 - (n : ℝ) ^ (1 - q))
371369

372-
/-- **The Entropy-Extropy Complementarity** (with corrected TsallisExtropy):
370+
/-! #### Entropy-Extropy Complementarity Note
373371
374-
With the Sati-Kumar definition J_q(p) = (1/(q-1)) Σ (1-pᵢ)(1-(1-pᵢ)^(q-1)),
375-
the entropy and extropy are genuinely complementary measures.
372+
For the BINARY case (n=2): S_q + J_q = S_q(1/2, 1/2) is constant.
373+
For n > 2: the sum depends on p and is NOT constant (Buono et al. 2021).
376374
377-
For the BINARY case (n=2, p = (p₁, 1-p₁)):
378-
S_q(p) + J_q(p) = S_q(1/2, 1/2) = (1 - 2^(1-q)) / (q-1)
375+
**ERROR HISTORY**: Two previous axioms about S_q + J_q were false and removed:
376+
- V1: S_q + J_q = 2·S_q (wrong TsallisExtropy definition)
377+
- V2: S_q + J_q = S_q(uniform) (false for n > 2)
379378
380-
For the general n-state case, the sum S_q + J_q depends on p and is NOT
381-
constant. The Buono et al. (2021) Proposition 2.3 gives the pointwise identity
382-
but the general sum-constant property holds only for Shannon (q→1) and binary (n=2).
379+
The SGC framework uses EscortEntropyGap, not S_q + J_q. -/
383380

384-
**ERROR HISTORY**: Two previous versions of this axiom were false:
385-
- Version 1: S_q + J_q = 2·S_q (false: used wrong TsallisExtropy definition)
386-
- Version 2: S_q + J_q = S_q(uniform) (false for n > 2 with Sati-Kumar J_q)
387-
Both errors caught by independent review; counterexample: q=1.5, n=3.
381+
/-- Tsallis extropy is non-negative for all q > 1.
388382
389-
The correct approach for the SGC framework does NOT require S_q + J_q = const.
390-
The EscortEntropyGap S_q(p) - S_q(P_q(p)) is the correct irreversibility
391-
functional regardless of the extropy identity.
383+
Each term (1-pᵢ)·(1-(1-pᵢ)^(q-1)) ≥ 0 because:
384+
- (1-pᵢ) ∈ [0,1] when pᵢ ∈ [0,1]
385+
- (1-pᵢ)^(q-1) ∈ [0,1] when (1-pᵢ) ∈ [0,1] and q-1 > 0
386+
- Therefore 1-(1-pᵢ)^(q-1) ∈ [0,1], and both factors are non-negative
392387
393-
**References**:
394-
- Buono et al. arXiv:2103.07168, Proposition 2.3
395-
- Sati & Kumar (2021) — Tsallis extropy characterization -/
396-
theorem tsallis_extropy_nonneg (q : ℝ) (hq : 2 < q)
388+
With 1/(q-1) > 0 for q > 1, the product is non-negative. -/
389+
theorem tsallis_extropy_nonneg (q : ℝ) (hq : 1 < q)
397390
(p : V → ℝ) (hp_nonneg : ∀ v, 0 ≤ p v) (hp_le_one : ∀ v, p v ≤ 1) :
398391
0 ≤ TsallisExtropy q p := by
399392
unfold TsallisExtropy
400393
apply mul_nonneg
401394
· apply div_nonneg one_pos.le; linarith
402395
· apply Finset.sum_nonneg; intro v _
403396
apply mul_nonneg
404-
· linarith [hp_nonneg v, hp_le_one v]
405-
· have h_comp_nn : 01 - p v := by linarith [hp_le_one v]
397+
· linarith [hp_le_one v]
398+
· -- 0 ≤ 1 - (1-p)^(q-1): need (1-p)^(q-1) ≤ 1
399+
-- For x ∈ [0,1] and α > 0: x^α ≤ 1
400+
have h_comp_nn : 01 - p v := by linarith [hp_le_one v]
406401
have h_comp_le : 1 - p v ≤ 1 := by linarith [hp_nonneg v]
407-
have : (1 - p v) ^ (q - 1) ≤ 1 - p v :=
408-
rpow_le_self_of_le_one_of_one_lt _ _ h_comp_nn h_comp_le (by linarith)
402+
-- (1-p)^(q-1) ≤ (1-p)^0 = 1 when 1-p ≤ 1 (by rpow_le_one)
403+
have h_rpow_le : (1 - p v) ^ (q - 1) ≤ 1 :=
404+
rpow_le_one h_comp_nn h_comp_le (by linarith)
409405
linarith
410406

411407
/-- **The Escort Entropy-Extropy Gap**: The irreversibility functional for nonlinear SGC.

0 commit comments

Comments
 (0)