Can Codes Formed by a Single Orbit of a Permutation Group Achieve Capacity?

attempted

A 1-orbital code is the set of all rearrangements of one word under a group of coordinate permutations. Ahlswede asked whether such codes can reach Shannon capacity and conjectured that they cannot. It is open even for the binary symmetric channel, where positive rates are reachable.

Posed by Rudolf Ahlswede, 1987 · Coding Theory & Bounds · Last updated Dec 3, 2026

Statement

Let $\mathcal X$ be a finite alphabet. The symmetric group $\Sigma_n$ acts on $\mathcal X^n$ by permuting coordinates: $(x\sigma)_i = x_{\sigma(i)}$. Ahlswede's contribution "Codes as orbits" (Cover and Gopinath 1987, §3.11, printed p. 59) reads:

For a finite set $\mathcal X$ and natural $n$ we call $U \subset \mathcal X^n$ $m$-orbital, if there exist a $V \subset U$, $|V| = m$, and a subgroup $G$ of the symmetric group $\Sigma_n$ such that $VG = U$. 1. Do there exist codes achieving capacity for the discrete memoryless channel whose code word set is 1-orbital? This is the case for the list codes of exponentially small list size. Also, the Rate-Distortion function is achievable with 1-orbital codes ([1]). However, we tend to believe that question 1 has a negative answer and ask the following: 2. What is the minimal exponential growth of $m$ such that capacity can be achieved with $m$-orbital codes? Whereas the notion of linear codes is limited to very special symmetric channels, the proposed notion of orbital codes avoids these limitations and endows Shannon-sense information theory with a very helpful algebraic structure.

Reference [1] is Ahlswede, "On orbital codes," in preparation. It never appeared (see "What is known").

A 1-orbital code is therefore an orbit $vG = \{v\sigma : \sigma \in G\}$ of one word $v \in \mathcal X^n$ under a group $G \le \Sigma_n$. If $U = VG$ then $UG = U$, so $G$ is always a subgroup of the permutation automorphism group $\mathrm{PAut}(U)$. In particular, $U$ is 1-orbital exactly when $\mathrm{PAut}(U)$ acts transitively on its codewords.

Question 1, binary symmetric channel (formalized here). Fix $0 < p < 1/2$, with capacity $C(p) = 1 - h(p)$. For a code $U \subseteq \{0,1\}^n$, let $P_e(U)$ be the smallest average error probability on $\mathrm{BSC}(p)^n$ over all decoders, with the message uniform over the distinct codewords of $U$. Is every rate below capacity achievable by 1-orbital codes? That is, for every $R < 1 - h(p)$, every $\varepsilon > 0$ and every $N$, are there $n \ge N$, $v \in \{0,1\}^n$ and $G \le \Sigma_n$ with $$|vG| \ge 2^{nR} \qquad\text{and}\qquad P_e(vG) \le \varepsilon\,?$$

Ahlswede expected the answer to question 1 to be negative. A negative answer for any single $p$ answers question 1 negatively. A positive answer for every $p$ settles question 1 only for binary symmetric channels; other discrete memoryless channels would remain open.

Question 2. For a DMC $W$, determine $$\mu^*(W) = \inf\{\mu \ge 0 : \text{$m$-orbital codes with } m \le 2^{n(\mu + o(1))} \text{ achieve } C(W)\}.$$ The trivial bounds are $0 \le \mu^*(W) \le C(W)$: every code $U$ is $|U|$-orbital with $G$ trivial. Question 2 is not formalized here.

Background

Ahlswede's program. In "Coloring hypergraphs" (1979, 1980) Ahlswede proposed to study systematically the action of $\Sigma_n$ on the coordinates of $\mathcal X^n$. The reason: coordinate permutations leave every discrete memoryless source and channel invariant, $W^n(y\sigma \mid x\sigma) = W^n(y \mid x)$. His covering lemma turns channel codes into source codes through a few permutations. Ahlswede and Dueck (1982) then showed that codes meeting the random coding bound for every DMC can be grown from a single word by a few permutations. Their codewords are $\pi_{i_k} \circ \dots \circ \pi_{i_1} x^n$ over the subsets $\{i_1 < \dots < i_k\}$ of $\{1, \dots, t\}$. About $nR$ permutations suffice, so each step doubles the code (counted with multiplicity). Such a code is a structured subset of the orbit of $x^n$ under $\langle \pi_1, \dots, \pi_t \rangle$. Question 1 asks whether the whole orbit can be taken. The construction was extended to multiple-access and broadcast channels by Pokorny and Wallmeier (1985), de Bruyn (1985), and de Bruyn and van der Meulen (1986).

Contrast with linear and group codes. A binary linear code is the orbit of $0$ under its own group of translations. Linear codes achieve the capacity of the BSC (Elias 1955), but translations are tied to an additive structure on the alphabet that only some symmetric channels respect. Ahlswede (1971) proved that group codes do not achieve capacity for general discrete channels; his example channel has positive Shannon capacity but group-code capacity zero. Ahlswede and Gemma (1971) bounded the rates of such algebraic codes. Coordinate permutations make sense for every alphabet and every DMC, so orbital codes would be an algebraic code class free of this limitation, as Ahlswede's last paragraph says. In Forney's language (1991), 1-orbital codes are the geometrically uniform codes of Hamming space whose generating group contains only coordinate permutations and no translations. Slepian's permutation modulation (1965) and his group codes for the Gaussian channel (1968) are the Euclidean analogues.

Why this is an information-theory problem. The question is about Shannon capacity. Given a channel, can codes from a structured class have rates tending to $C(W)$ and average error probability tending to $0$? It belongs with Elias's theorem for linear codes and Ahlswede's negative theorem for group codes. It also belongs with Como and Fagnani's characterization of abelian group codes on symmetric channels and with the recent proofs that Reed–Muller codes achieve capacity (Kudekar et al. 2017; Abbe and Sandon 2023). Ahlswede posed it in an information-theory problem collection and justified it by rate–distortion theory and list decoding. Permutation groups are the tool; the question and the yardstick are Shannon-theoretic. The formal statement is phrased with the BSC transition probabilities, average decoding error and the binary entropy function.

What is known

Status of Ahlswede's sources.

Results in the literature that bear on the question.

Observations recorded with this page (our own reasoning, labelled; $W = \mathrm{BSC}(p)$, $0 < p < 1/2$, $C = 1 - h(p)$):

  1. [proved] Distance invariance. $G$ acts transitively on $vG$ by Hamming isometries. So every codeword sees the same distance profile, and all distances are even (all codewords have the same weight). Certified in Lean.
  2. [proved] Minimum distance must tend to infinity. Suppose some $g \in G$ gives $d(v, vg) = d$. For every decoder and every $\sigma \in G$, $P(\text{err} \mid v\sigma) + P(\text{err} \mid vg\sigma) \ge \beta_d(p)$, where $\beta_d(p) = \sum_{y \in \{0,1\}^d} \min\{W^d(y \mid 0^d), W^d(y \mid 1^d)\} > 0$. Average over $\sigma \in G$. Left multiplication by $g$ permutes $G$, and every codeword has the same number of preimages $\sigma$. Hence $P_e(vG) \ge \beta_d(p)/2$ at every length, so 1-orbital codes with error tending to $0$ need minimum distance tending to infinity. The case $d = 2$ is certified in Lean with the constant $p(1-p)$.
  3. [proved], given Elias 1955. Positive rates are achievable: every rate below $C/2$. Take a binary linear code $L$ of length $k$ and write each bit $b$ as the pair $(b, 1-b)$. The resulting code is the orbit of $v = (0,1,0,1,\dots,0,1) \in \{0,1\}^{2k}$ under the elementary abelian group $\{\prod_{i : c_i = 1} (2i{-}1\ \ 2i) : c \in L\} \cong L$ of commuting disjoint transpositions. Decoding from the odd coordinates alone sees $L$ through $\mathrm{BSC}(p)^k$. Hence 1-orbital codes achieve every rate below $(1 - h(p))/2$. So the question is about the gap between $C/2$ and $C$, not about positivity.
  4. [sketch] Abelian groups never achieve capacity. Let $G$ be abelian with coordinate orbits $O_1, \dots, O_r$ of sizes $s_t$. A transitive abelian group is regular. So the projection of $vG$ onto $O_t$ has at most $s_t$ words, and $I(X_{O_t}; Y_{O_t}) \le \min\{\log_2 s_t,\ s_t C\}$. - Strict gap. The second bound is strict: a distribution supported on at most $s_t < 2^{s_t}$ words has a nonzero Walsh coefficient, which the noise multiplies by $(1-2p)^{|S|} \ne 0$, so the output is not uniform. - Uniform gap. Hence $\kappa(p) := \sup_s \max_{|\mathrm{supp}\,P_X| \le s} I(X; Y^s)/s < C$. The maximum is attained for each $s$, and $\log_2(s)/s \to 0$. - Fano. $I(X;Y) \le \sum_t I(X_{O_t}; Y_{O_t})$, and Fano's inequality gives $R(1-\varepsilon) \le \kappa(p) + 1/n$. So abelian 1-orbital codes cannot achieve any rate above $\kappa(p) < C$.
  5. [sketch] Small coordinate orbits waste capacity. For a general $G$, the projection onto a coordinate orbit of size $s$ lies in one weight class of $\{0,1\}^s$. The same Fourier argument gives a loss $\gamma_s(p) > 0$ per orbit of size at most $s_0$, uniformly. Capacity-achieving 1-orbital codes therefore need, for each fixed $s$, all but $o(n)$ coordinates in $G$-orbits of size larger than $s$.
  6. [heuristic] A capacity-achieving orbit needs $|G| \ge 2^{n(C - o(1))}$, large coordinate orbits (item 5), no abelian structure (item 4), and no elements moving $v$ by a bounded distance (item 2). Large permutation groups tend to contain elements of small support, so these demands pull in opposite directions. That is consistent with Ahlswede's belief, but no group-theoretic obstruction is known to us.

Novelty and status check (December 2026).

Formal statement and certificate

InfoTheory.Problems.OrbitalCodesCapacity.Statement formalizes question 1 for $\mathrm{BSC}(p)$.

InfoTheory.Known.Certificates.OrbitalCodesCapacity proves, about exactly these objects:

Not certified:

All certificate declarations use only propext, Classical.choice and Quot.sound.

References

Related novel theories & hypotheses

Original, scored hypotheses from the Theories incubator that bridge or illuminate this problem.

Certified known bounds

The known results quoted for this problem are proved in Lean, about exactly the objects in its formal statement: 44 theorems in lean/InfoTheory/Known/Certificates/OrbitalCodesCapacity.lean, using only Lean's standard axioms. This shows the formal statement is meaningful; it does not solve the problem.

Theorems: codeAvgError_eq, errAt_nonneg, errAt_le_one, codeAvgError_nonneg, codeAvgError_le_one, bddBelow_range_codeAvgError, codeMinError_le, le_codeMinError, codeMinError_nonneg, codeMinError_le_one, exists_decoder_eq_codeMinError, codeMinError_singleton (+32 more)

Show the certificate's Lean source
import InfoTheory.Problems.OrbitalCodesCapacity
import InfoTheory.Known

/-!
# Certificate for `InfoTheory.Problems.OrbitalCodesCapacity`

The frozen statement asks whether, on every binary symmetric channel `BSC(p)` with
`0 < p < 1/2`, every rate `R < 1 - h(p)` is achieved by *`1`-orbital* codes: codes of the form
`orbitCode v G = {v ∘ σ | σ ∈ G}`, the orbit of one word `v ∈ {0,1}ⁿ` under a group `G ≤ Sₙ`
of coordinate permutations (Ahlswede, Cover–Gopinath 1987, §3.11, question 1).

## Certified (about exactly these objects)
* `codeAvgError_nonneg`, `codeAvgError_le_one`, `codeMinError_nonneg`, `codeMinError_le_one`,
  `codeMinError_le`, `le_codeMinError`, `exists_decoder_eq_codeMinError` — **the error
  functional is not junk.**  Every decoder's average error lies in `[0, 1]`, and
  `codeMinError` is attained by some decoder, so it is a genuine minimum in `[0, 1]`.
* `mem_orbitCode`, `self_mem_orbitCode`, `comp_mem_orbitCode`, `orbitCode_nonempty`,
  `one_le_card_orbitCode` — orbit codes contain `v`, are closed under the action of `G`, and
  are never empty (so the factor `1 / |C|` in the error is never `1 / 0`).
* `orbitCode_bot`, `card_orbitCode_bot`, `codeMinError_singleton`, `codeMinError_orbitCode_bot` —
  the trivial group gives the one-word code `{v}`, with error `0`.
* `one_sub_binaryEntropy_pos` — the hypotheses are satisfiable: `1 - h(p) > 0` for
  `0 < p < 1/2`, so positive rates are in range.
* `statement_conclusion_of_nonpos` — the conclusion holds trivially for every rate `R ≤ 0`
  (one-word codes); the content of `Statement` lies in `0 < R < 1 - h(p)`.
* `trivial_without_length_bound` — without the clause `N ≤ n` the statement would be
  trivially true (take `n = 0`); this is why `Statement` quantifies over `N`.
* `weight_comp_perm`, `mem_orbitCode_top_iff`, `card_orbitCode_top` — **the full symmetric
  group** (`G = ⊤`) gives the constant-weight class: `w ∈ orbitCode v ⊤` iff `w` has the same
  Hamming weight as `v`, and `|orbitCode v ⊤| = (n choose weight v)` (Slepian's permutation
  modulation code).
* `hammingDist_comp_perm`, `distance_profile_eq` — **orbit codes are distance-invariant**:
  for every codeword `c` and every `k`, the number of codewords at Hamming distance `k` from
  `c` is the same as from `v`.
* `hammingDist_comp_swap`, `exists_pair_dist_two_top` — a transposition of two coordinates on
  which `v` differs moves `v` by Hamming distance exactly `2`; in particular the constant-weight
  class has minimum distance `2` when `0 < weight v < n`.
* `even_hammingDist_of_weight_eq`, `even_hammingDist_orbitCode` — all distances inside an
  orbit code are even (its words share one weight), so the minimum distance is `2` or `≥ 4`.
* `exists_swap_of_hammingDist_eq_two` — conversely, a permutation that moves `v` by distance `2`
  acts on `v` like such a transposition (permutations preserve the weight).
* `sum_eq_coord_eq`, `errAt_add_errAt_swap_ge` — two words that differ by swapping two
  unequal coordinates cannot both be decoded well: for every decoder the two error
  probabilities sum to at least `2p(1-p)`.
* `codeMinError_orbitCode_ge`, `codeMinError_ge_of_dist_two`, `codeMinError_ge_of_swap_mem`,
  `codeMinError_orbitCode_top_ge` — **orbit codes of minimum distance `2` are bad.**  If two
  codewords of `orbitCode v G` are at Hamming distance `2` (for instance if `G` contains a
  transposition of two coordinates on which `v` differs, e.g. `G = ⊤` with
  `0 < weight v < n`), then `codeMinError ≥ p(1-p)` at every length.  The proof averages the
  pair bound over the group and uses orbit–stabilizer counting.
* `not_witness_of_dist_two`, `not_witness_of_swap_mem` — consequently, for an error target
  `ε < p(1-p)`, every witness `(v, G)` of `Statement` has minimum distance at least `3` (hence
  `4`, since all codewords have the same weight).

## Not certified
* Any positive-rate `1`-orbital code with small error.  For example, doubling each bit of a
  binary linear code into the pair `(b, 1-b)` turns the code into the orbit of `(0,1,…,0,1)`
  under a group of commuting disjoint transpositions.  With Elias's theorem that linear codes
  achieve BSC capacity, this gives every rate below `(1 - h(p))/2` (problem page, `[proved]`
  given Elias's theorem).  Neither Elias's theorem nor the construction is formalized here.
* The page's `[sketch]` observations: abelian groups `G` cannot achieve capacity on any
  `BSC(p)`; coordinates lying in bounded-size orbits of `G` lose a fixed fraction of
  capacity; capacity-achieving orbit codes need minimum distance tending to infinity (only
  the distance-2 case is certified here).
* Ahlswede's unpublished claims that list codes with exponentially small list size and the
  rate–distortion function are achievable with `1`-orbital codes.
* The open problem itself, in either direction, and question 2 (`m`-orbital codes).
-/

open scoped BigOperators

namespace InfoTheory.Known.Certificates.OrbitalCodesCapacity

open InfoTheory InfoTheory.Problems.OrbitalCodesCapacity

/-! ### The error functional -/

section Error

variable (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) {n : ℕ}

/-- Error probability of the decoder `D` when the codeword `c` is sent over `BSC(p)ⁿ`. -/
noncomputable def errAt (D : (Fin n → Bool) → (Fin n → Bool)) (c : Fin n → Bool) : ℝ :=
  ∑ y : Fin n → Bool, if D y ≠ c then ((bsc p hp0 hp1).power n).trans c y else 0

theorem codeAvgError_eq (C : Finset (Fin n → Bool)) (D : (Fin n → Bool) → (Fin n → Bool)) :
    codeAvgError p hp0 hp1 C D = (1 / (C.card : ℝ)) * ∑ c ∈ C, errAt p hp0 hp1 D c := rfl

theorem errAt_nonneg (D : (Fin n → Bool) → (Fin n → Bool)) (c : Fin n → Bool) :
    0 ≤ errAt p hp0 hp1 D c :=
  Finset.sum_nonneg fun y _ => by
    split_ifs
    · exact ((bsc p hp0 hp1).power n).nonneg c y
    · exact le_rfl

theorem errAt_le_one (D : (Fin n → Bool) → (Fin n → Bool)) (c : Fin n → Bool) :
    errAt p hp0 hp1 D c ≤ 1 := by
  calc errAt p hp0 hp1 D c ≤ ∑ y : Fin n → Bool, ((bsc p hp0 hp1).power n).trans c y :=
        Finset.sum_le_sum fun y _ => by
          split_ifs
          · exact le_rfl
          · exact ((bsc p hp0 hp1).power n).nonneg c y
    _ = 1 := ((bsc p hp0 hp1).power n).sum_one c

theorem codeAvgError_nonneg (C : Finset (Fin n → Bool)) (D : (Fin n → Bool) → (Fin n → Bool)) :
    0 ≤ codeAvgError p hp0 hp1 C D := by
  rw [codeAvgError_eq]
  exact mul_nonneg (by positivity) (Finset.sum_nonneg fun c _ => errAt_nonneg p hp0 hp1 D c)

theorem codeAvgError_le_one (C : Finset (Fin n → Bool)) (D : (Fin n → Bool) → (Fin n → Bool)) :
    codeAvgError p hp0 hp1 C D ≤ 1 := by
  rw [codeAvgError_eq]
  rcases Nat.eq_zero_or_pos C.card with h | h
  · simp [h]
  · have hpos : (0 : ℝ) < C.card := by exact_mod_cast h
    have hsum : ∑ c ∈ C, errAt p hp0 hp1 D c ≤ C.card := by
      calc ∑ c ∈ C, errAt p hp0 hp1 D c ≤ ∑ _c ∈ C, (1 : ℝ) :=
            Finset.sum_le_sum fun c _ => errAt_le_one p hp0 hp1 D c
        _ = C.card := by simp
    rw [one_div, inv_mul_le_iff₀ hpos, mul_one]
    exact hsum

theorem bddBelow_range_codeAvgError (C : Finset (Fin n → Bool)) :
    BddBelow (Set.range fun D => codeAvgError p hp0 hp1 C D) :=
  ⟨0, by rintro _ ⟨D, rfl⟩; exact codeAvgError_nonneg p hp0 hp1 C D⟩

/-- `codeMinError` is at most the error of any particular decoder. -/
theorem codeMinError_le (C : Finset (Fin n → Bool)) (D : (Fin n → Bool) → (Fin n → Bool)) :
    codeMinError p hp0 hp1 C ≤ codeAvgError p hp0 hp1 C D :=
  ciInf_le (bddBelow_range_codeAvgError p hp0 hp1 C) D

/-- A lower bound valid for every decoder is a lower bound for `codeMinError`. -/
theorem le_codeMinError (C : Finset (Fin n → Bool)) {a : ℝ}
    (h : ∀ D : (Fin n → Bool) → (Fin n → Bool), a ≤ codeAvgError p hp0 hp1 C D) :
    a ≤ codeMinError p hp0 hp1 C :=
  le_ciInf h

theorem codeMinError_nonneg (C : Finset (Fin n → Bool)) : 0 ≤ codeMinError p hp0 hp1 C :=
  le_codeMinError p hp0 hp1 C fun D => codeAvgError_nonneg p hp0 hp1 C D

theorem codeMinError_le_one (C : Finset (Fin n → Bool)) : codeMinError p hp0 hp1 C ≤ 1 :=
  (codeMinError_le p hp0 hp1 C id).trans (codeAvgError_le_one p hp0 hp1 C id)

/-- **`codeMinError` is a genuine minimum**: some decoder attains it. -/
theorem exists_decoder_eq_codeMinError (C : Finset (Fin n → Bool)) :
    ∃ D : (Fin n → Bool) → (Fin n → Bool), codeAvgError p hp0 hp1 C D = codeMinError p hp0 hp1 C := by
  obtain ⟨D₀, -, hD₀⟩ := Finset.exists_min_image Finset.univ
    (fun D => codeAvgError p hp0 hp1 C D) Finset.univ_nonempty
  exact ⟨D₀, le_antisymm (le_codeMinError p hp0 hp1 C fun D => hD₀ D (Finset.mem_univ D))
    (codeMinError_le p hp0 hp1 C D₀)⟩

/-- A one-word code has minimum error `0`. -/
theorem codeMinError_singleton (c : Fin n → Bool) : codeMinError p hp0 hp1 {c} = 0 := by
  refine le_antisymm ?_ (codeMinError_nonneg p hp0 hp1 _)
  refine (codeMinError_le p hp0 hp1 {c} fun _ => c).trans_eq ?_
  simp [codeAvgError_eq, errAt]

end Error

/-! ### Orbit codes -/

section Orbit

variable {n : ℕ}

theorem mem_orbitCode {v w : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))} :
    w ∈ orbitCode v G ↔ ∃ σ ∈ G, w = v ∘ σ := by
  simp [orbitCode]

theorem self_mem_orbitCode (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))) :
    v ∈ orbitCode v G :=
  mem_orbitCode.2 ⟨1, G.one_mem, by simp⟩

/-- Orbit codes are closed under the action of their group. -/
theorem comp_mem_orbitCode {v c : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    (hc : c ∈ orbitCode v G) {σ : Equiv.Perm (Fin n)} (hσ : σ ∈ G) : c ∘ σ ∈ orbitCode v G := by
  obtain ⟨τ, hτ, rfl⟩ := mem_orbitCode.1 hc
  exact mem_orbitCode.2 ⟨τ * σ, G.mul_mem hτ hσ, by rw [Equiv.Perm.coe_mul]; rfl⟩

theorem orbitCode_nonempty (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))) :
    (orbitCode v G).Nonempty :=
  ⟨v, self_mem_orbitCode v G⟩

theorem one_le_card_orbitCode (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))) :
    1 ≤ (orbitCode v G).card :=
  Finset.card_pos.2 (orbitCode_nonempty v G)

/-- The trivial group gives the one-word code `{v}`. -/
theorem orbitCode_bot (v : Fin n → Bool) : orbitCode v ⊥ = {v} := by
  ext w
  rw [mem_orbitCode, Finset.mem_singleton]
  constructor
  · rintro ⟨σ, hσ, rfl⟩
    rw [Subgroup.mem_bot.1 hσ]
    rfl
  · rintro rfl
    exact ⟨1, Subgroup.one_mem _, rfl⟩

theorem card_orbitCode_bot (v : Fin n → Bool) : (orbitCode v ⊥).card = 1 := by
  rw [orbitCode_bot, Finset.card_singleton]

theorem codeMinError_orbitCode_bot (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (v : Fin n → Bool) :
    codeMinError p hp0 hp1 (orbitCode v ⊥) = 0 := by
  rw [orbitCode_bot, codeMinError_singleton]

end Orbit

/-! ### Satisfiable hypotheses, the trivial range `R ≤ 0`, and the role of `N ≤ n` -/

/-- Positive rates are in range: `1 - h(p) > 0` for `0 < p < 1/2`. -/
theorem one_sub_binaryEntropy_pos {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1 / 2) :
    0 < 1 - binaryEntropy p := by
  rw [binaryEntropy_eq_binEntropy_div hp0.le (by linarith)]
  have hlog : 0 < Real.log 2 := Real.log_pos (by norm_num)
  have hlt : Real.binEntropy p < Real.log 2 :=
    Real.binEntropy_lt_log_two.2 (by intro h; norm_num at h; linarith)
  rw [sub_pos, div_lt_one hlog]
  exact hlt

/-- For rates `R ≤ 0` the conclusion of `Statement` holds at every length, with one-word codes. -/
theorem statement_conclusion_of_nonpos (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) {R ε : ℝ}
    (hR : R ≤ 0) (hε : 0 ≤ ε) (N : ℕ) :
    ∃ (n : ℕ) (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))), N ≤ n ∧
      (2 : ℝ) ^ ((n : ℝ) * R) ≤ ((orbitCode v G).card : ℝ) ∧
      codeMinError p hp0 hp1 (orbitCode v G) ≤ ε := by
  refine ⟨N, fun _ => false, ⊥, le_rfl, ?_, ?_⟩
  · rw [card_orbitCode_bot, Nat.cast_one]
    exact Real.rpow_le_one_of_one_le_of_nonpos (by norm_num)
      (mul_nonpos_of_nonneg_of_nonpos (Nat.cast_nonneg N) hR)
  · rw [codeMinError_orbitCode_bot]
    exact hε

/-- **Why `Statement` quantifies over `N`.**  Without the length bound `N ≤ n`, the statement
    would be trivially true: at `n = 0` the one-word code satisfies `2^{0·R} = 1 ≤ 1` and has
    error `0`. -/
theorem trivial_without_length_bound :
    ∀ (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (R : ℝ), R < 1 - binaryEntropy p →
      ∀ ε : ℝ, 0 < ε →
        ∃ (n : ℕ) (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))),
          (2 : ℝ) ^ ((n : ℝ) * R) ≤ ((orbitCode v G).card : ℝ) ∧
          codeMinError p hp0.le (by linarith) (orbitCode v G) ≤ ε := by
  intro p hp0 hp1 R _ ε hε
  refine ⟨0, Fin.elim0, ⊥, ?_, ?_⟩
  · rw [card_orbitCode_bot]
    simp
  · rw [codeMinError_orbitCode_bot]
    exact hε.le

/-! ### The full symmetric group: the constant-weight class -/

section Top

variable {n : ℕ}

/-- Hamming weight of a binary word. -/
def weight (v : Fin n → Bool) : ℕ := (Finset.univ.filter fun i => v i = true).card

theorem weight_comp_perm (v : Fin n → Bool) (σ : Equiv.Perm (Fin n)) :
    weight (v ∘ σ) = weight v :=
  Finset.card_equiv σ (by simp)

/-- Two words of equal weight differ by a coordinate permutation. -/
theorem exists_perm_of_weight_eq {v w : Fin n → Bool} (h : weight w = weight v) :
    ∃ σ : Equiv.Perm (Fin n), w = v ∘ σ := by
  classical
  have h1 : Fintype.card {i // w i = true} = Fintype.card {i // v i = true} := by
    rw [Fintype.card_subtype, Fintype.card_subtype]
    exact h
  have h2 : Fintype.card {i // ¬ w i = true} = Fintype.card {i // ¬ v i = true} := by
    rw [Fintype.card_subtype_compl, Fintype.card_subtype_compl, h1]
  set e1 := Fintype.equivOfCardEq h1
  set e2 := Fintype.equivOfCardEq h2
  refine ⟨Equiv.subtypeCongr e1 e2, ?_⟩
  funext i
  by_cases hi : w i = true
  · have hσ : Equiv.subtypeCongr e1 e2 i = e1 ⟨i, hi⟩ := by
      simp only [Equiv.subtypeCongr, Equiv.trans_apply,
        Equiv.sumCompl_symm_apply_of_pos (p := fun x => w x = true) hi, Equiv.sumCongr_apply,
        Sum.map_inl, Equiv.sumCompl_apply_inl]
    rw [Function.comp_apply, hσ, hi, (e1 ⟨i, hi⟩).2]
  · have hσ : Equiv.subtypeCongr e1 e2 i = e2 ⟨i, hi⟩ := by
      simp only [Equiv.subtypeCongr, Equiv.trans_apply,
        Equiv.sumCompl_symm_apply_of_neg (p := fun x => w x = true) hi, Equiv.sumCongr_apply,
        Sum.map_inr, Equiv.sumCompl_apply_inr]
    have h3 := (e2 ⟨i, hi⟩).2
    simp only [Bool.not_eq_true] at hi h3
    rw [Function.comp_apply, hσ, hi, h3]

/-- The orbit of `v` under the full symmetric group is the class of words of the same weight. -/
theorem mem_orbitCode_top_iff {v w : Fin n → Bool} :
    w ∈ orbitCode v ⊤ ↔ weight w = weight v := by
  rw [mem_orbitCode]
  constructor
  · rintro ⟨σ, -, rfl⟩
    exact weight_comp_perm v σ
  · intro h
    obtain ⟨σ, hσ⟩ := exists_perm_of_weight_eq h
    exact ⟨σ, Subgroup.mem_top σ, hσ⟩

/-- **The constant-weight class.**  `|orbitCode v ⊤| = (n choose weight v)`. -/
theorem card_orbitCode_top (v : Fin n → Bool) :
    (orbitCode v ⊤).card = n.choose (weight v) := by
  classical
  have hset : orbitCode v ⊤ = Finset.univ.filter fun w => weight w = weight v := by
    ext w
    simp [mem_orbitCode_top_iff]
  have hn : n.choose (weight v) =
      ((Finset.univ : Finset (Fin n)).powersetCard (weight v)).card := by
    rw [Finset.card_powersetCard, Finset.card_univ, Fintype.card_fin]
  rw [hset, hn]
  refine Finset.card_nbij' (fun w => Finset.univ.filter fun i => w i = true)
    (fun s i => decide (i ∈ s)) ?_ ?_ ?_ ?_
  · intro w hw
    simp only [Finset.mem_coe, Finset.mem_filter, Finset.mem_univ, true_and] at hw
    simp only [Finset.mem_coe, Finset.mem_powersetCard]
    exact ⟨Finset.subset_univ _, hw⟩
  · intro s hs
    simp only [Finset.mem_coe, Finset.mem_powersetCard] at hs
    rw [Finset.mem_coe, Finset.mem_filter]
    refine ⟨Finset.mem_univ _, ?_⟩
    simpa [weight] using hs.2
  · intro w _
    funext i
    simp
  · intro s _
    ext i
    simp

end Top

/-! ### Distance invariance -/

section Distance

variable {n : ℕ}

theorem hammingDist_comp_perm (x y : Fin n → Bool) (σ : Equiv.Perm (Fin n)) :
    hammingDist (x ∘ σ) (y ∘ σ) = hammingDist x y :=
  Finset.card_equiv σ (by simp)

/-- **Orbit codes are distance-invariant.**  Every codeword `c` sees the same distance profile
    as the generator `v`: for each `k`, the numbers of codewords at Hamming distance `k` from
    `c` and from `v` coincide. -/
theorem distance_profile_eq {v c : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    (hc : c ∈ orbitCode v G) (k : ℕ) :
    ((orbitCode v G).filter fun c' => hammingDist c c' = k).card =
      ((orbitCode v G).filter fun c' => hammingDist v c' = k).card := by
  obtain ⟨σ, hσ, rfl⟩ := mem_orbitCode.1 hc
  refine (Finset.card_nbij' (fun c' => c' ∘ σ) (fun c' => c' ∘ ⇑σ⁻¹) ?_ ?_ ?_ ?_).symm
  · intro c' hc'
    simp only [Finset.mem_coe, Finset.mem_filter] at hc' ⊢
    exact ⟨comp_mem_orbitCode hc'.1 hσ, by rw [hammingDist_comp_perm]; exact hc'.2⟩
  · intro c' hc'
    simp only [Finset.mem_coe, Finset.mem_filter] at hc' ⊢
    refine ⟨comp_mem_orbitCode hc'.1 (G.inv_mem hσ), ?_⟩
    rw [← hc'.2, ← hammingDist_comp_perm v (c' ∘ ⇑σ⁻¹) σ]
    congr 1
    funext i
    simp
  · intro c' _
    funext i
    simp
  · intro c' _
    funext i
    simp

/-- Swapping two coordinates on which `v` differs moves `v` by Hamming distance exactly `2`. -/
theorem hammingDist_comp_swap {v : Fin n → Bool} {i j : Fin n} (h : v i ≠ v j) :
    hammingDist v (v ∘ Equiv.swap i j) = 2 := by
  have hij : i ≠ j := fun e => h (e ▸ rfl)
  have hset : (Finset.univ.filter fun k => v k ≠ (v ∘ Equiv.swap i j) k) = {i, j} := by
    ext k
    simp only [Finset.mem_filter, Finset.mem_univ, true_and, Function.comp_apply,
      Finset.mem_insert, Finset.mem_singleton]
    constructor
    · intro hk
      by_contra hne
      obtain ⟨h1, h2⟩ := not_or.1 hne
      exact hk (by rw [Equiv.swap_apply_of_ne_of_ne h1 h2])
    · rintro (rfl | rfl)
      · rw [Equiv.swap_apply_left]; exact h
      · rw [Equiv.swap_apply_right]; exact Ne.symm h
  unfold hammingDist
  rw [hset, Finset.card_pair hij]

/-- A word with `0 < weight v < n` has a `true` coordinate and a `false` coordinate. -/
theorem exists_true_false {v : Fin n → Bool} (h0 : 0 < weight v) (hn : weight v < n) :
    ∃ i j : Fin n, v i = true ∧ v j = false := by
  obtain ⟨i, hi⟩ := Finset.card_pos.1 h0
  have : ∃ j, j ∉ Finset.univ.filter fun i => v i = true := by
    by_contra hall
    have hsub : (Finset.univ : Finset (Fin n)) ⊆ Finset.univ.filter fun i => v i = true :=
      fun j _ => not_not.1 (not_exists.1 hall j)
    have := Finset.card_le_card hsub
    rw [Finset.card_univ, Fintype.card_fin] at this
    exact absurd hn (not_lt.2 this)
  obtain ⟨j, hj⟩ := this
  simp only [Finset.mem_filter, Finset.mem_univ, true_and, Bool.not_eq_true] at hi hj
  exact ⟨i, j, hi, hj⟩

/-- **The constant-weight class has minimum distance `2`** when `0 < weight v < n`. -/
theorem exists_pair_dist_two_top {v : Fin n → Bool} (h0 : 0 < weight v) (hn : weight v < n) :
    ∃ c ∈ orbitCode v ⊤, c ≠ v ∧ hammingDist v c = 2 := by
  obtain ⟨i, j, hi, hj⟩ := exists_true_false h0 hn
  have hne : v i ≠ v j := by rw [hi, hj]; decide
  refine ⟨v ∘ Equiv.swap i j, mem_orbitCode.2 ⟨_, Subgroup.mem_top _, rfl⟩, ?_,
    hammingDist_comp_swap hne⟩
  intro e
  have := congrFun e i
  simp only [Function.comp_apply, Equiv.swap_apply_left] at this
  exact hne this.symm

/-- Two binary words of the same weight are at even Hamming distance. -/
theorem even_hammingDist_of_weight_eq {x y : Fin n → Bool} (h : weight x = weight y) :
    Even (hammingDist x y) := by
  classical
  have key : (hammingDist x y : ℤ) = ((weight x : ℤ) - weight y) +
      2 * ((Finset.univ.filter fun k => x k = false ∧ y k = true).card : ℤ) := by
    unfold hammingDist weight
    rw [Finset.natCast_card_filter, Finset.natCast_card_filter, Finset.natCast_card_filter,
      Finset.natCast_card_filter, ← Finset.sum_sub_distrib, Finset.mul_sum,
      ← Finset.sum_add_distrib]
    refine Finset.sum_congr rfl fun k _ => ?_
    cases x k <;> cases y k <;> simp
  rw [h, sub_self, zero_add] at key
  have key' : hammingDist x y =
      2 * (Finset.univ.filter fun k => x k = false ∧ y k = true).card := by
    exact_mod_cast key
  exact ⟨_, by rw [key', two_mul]⟩

/-- All Hamming distances inside an orbit code are even (its words share one weight). -/
theorem even_hammingDist_orbitCode {v c c' : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    (hc : c ∈ orbitCode v G) (hc' : c' ∈ orbitCode v G) : Even (hammingDist c c') := by
  obtain ⟨σ, -, rfl⟩ := mem_orbitCode.1 hc
  obtain ⟨τ, -, rfl⟩ := mem_orbitCode.1 hc'
  exact even_hammingDist_of_weight_eq (by rw [weight_comp_perm, weight_comp_perm])

/-- **Distance `2` means a transposition.**  If a coordinate permutation `g` moves `v` by
    Hamming distance `2`, then it acts on `v` like the transposition of two coordinates on which
    `v` differs (a permutation preserves the weight, so the two changed entries must be one `0`
    and one `1`). -/
theorem exists_swap_of_hammingDist_eq_two {v : Fin n → Bool} {g : Equiv.Perm (Fin n)}
    (h : hammingDist v (v ∘ g) = 2) :
    ∃ i j : Fin n, v i ≠ v j ∧ v ∘ g = v ∘ Equiv.swap i j := by
  classical
  unfold hammingDist at h
  obtain ⟨i, j, hij, hset⟩ := Finset.card_eq_two.1 h
  have hmem : ∀ k, v k ≠ v (g k) ↔ k = i ∨ k = j := by
    intro k
    have := congrArg (k ∈ ·) hset
    simpa using this
  have hout : ∀ k, k ≠ i → k ≠ j → v (g k) = v k := by
    intro k hki hkj
    by_contra hne
    rcases (hmem k).1 (Ne.symm hne) with h' | h'
    · exact hki h'
    · exact hkj h'
  have hi : v (g i) = !v i := by
    have := (hmem i).2 (Or.inl rfl)
    cases hvi : v i <;> cases hvg : v (g i) <;> simp_all
  have hj : v (g j) = !v j := by
    have := (hmem j).2 (Or.inr rfl)
    cases hvj : v j <;> cases hvg : v (g j) <;> simp_all
  have hvij : v i ≠ v j := by
    intro heq
    -- weights of `v ∘ g` and `v` agree, but the entries at `i` and `j` both flipped the same way
    have hw : (weight (v ∘ g) : ℤ) - weight v = 0 := by rw [weight_comp_perm, sub_self]
    have hsum : (weight (v ∘ g) : ℤ) - weight v = ∑ k : Fin n,
        ((if v (g k) = true then (1 : ℤ) else 0) - (if v k = true then 1 else 0)) := by
      rw [Finset.sum_sub_distrib, weight, weight, Finset.natCast_card_filter,
        Finset.natCast_card_filter]
      rfl
    rw [hsum, Finset.sum_eq_add i j hij (fun k _ hk => by rw [hout k hk.1 hk.2, sub_self])
      (fun h => absurd (Finset.mem_univ i) h) (fun h => absurd (Finset.mem_univ j) h),
      hi, hj, ← heq] at hw
    cases hvi : v i <;> simp [hvi] at hw
  refine ⟨i, j, hvij, ?_⟩
  funext k
  simp only [Function.comp_apply]
  by_cases hki : k = i
  · subst hki
    rw [Equiv.swap_apply_left, hi]
    cases hvk : v k <;> cases hvj : v j <;> simp_all
  · by_cases hkj : k = j
    · subst hkj
      rw [Equiv.swap_apply_right, hj]
      cases hvk : v k <;> cases hvi : v i <;> simp_all
    · rw [Equiv.swap_apply_of_ne_of_ne hki hkj, hout k hki hkj]

end Distance

/-! ### Distance-2 orbit codes have error at least `p(1-p)` -/

section LowerBound

variable (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) {n : ℕ}

/-- Precomposition with a coordinate permutation, as an equivalence of `{0,1}ⁿ`. -/
def compPerm (σ : Equiv.Perm (Fin n)) : (Fin n → Bool) ≃ (Fin n → Bool) where
  toFun y := y ∘ σ
  invFun y := y ∘ σ.symm
  left_inv y := by funext i; simp
  right_inv y := by funext i; simp

/-- The memoryless channel is invariant under permuting input and output coordinates jointly. -/
theorem power_trans_comp_perm (x y : Fin n → Bool) (σ : Equiv.Perm (Fin n)) :
    ((bsc p hp0 hp1).power n).trans (x ∘ σ) (y ∘ σ) = ((bsc p hp0 hp1).power n).trans x y :=
  Equiv.prod_comp σ fun i => (bsc p hp0 hp1).trans (x i) (y i)

/-- If `c i ≠ c j`, the received symbols at `i` and `j` agree with probability `2p(1-p)`. -/
theorem sum_eq_coord_eq (c : Fin n → Bool) {i j : Fin n} (hij : i ≠ j) (hc : c i ≠ c j) :
    ∑ y : Fin n → Bool, (if y i = y j then ((bsc p hp0 hp1).power n).trans c y else 0) =
      2 * (p * (1 - p)) := by
  classical
  set w := (bsc p hp0 hp1).trans with hw
  -- the factor of coordinate `k` once `y i = y j = b` is imposed
  let F : Bool → Fin n → Bool → ℝ := fun b k t =>
    w (c k) t * ((if k = i then (if t = b then 1 else 0) else 1) *
      (if k = j then (if t = b then 1 else 0) else 1))
  have hprod : ∀ (b : Bool) (y : Fin n → Bool), ∏ k, F b k (y k) =
      ((bsc p hp0 hp1).power n).trans c y *
        ((if y i = b then 1 else 0) * (if y j = b then 1 else 0)) := by
    intro b y
    simp only [F, Finset.prod_mul_distrib, DMC.power]
    rw [Fintype.prod_ite_eq' i, Fintype.prod_ite_eq' j]
  have hsumF : ∀ (b : Bool) (k : Fin n), ∑ t, F b k t =
      (if k = i then w (c i) b else 1) * (if k = j then w (c j) b else 1) := by
    intro b k
    by_cases hki : k = i
    · subst hki
      simp only [F, hij, ite_true, ite_false, mul_one, Fintype.sum_bool]
      cases b <;> simp
    · by_cases hkj : k = j
      · subst hkj
        simp only [F, hki, ite_true, ite_false, one_mul, Fintype.sum_bool]
        cases b <;> simp
      · simp only [F, hki, hkj, ite_false, mul_one]
        exact (bsc p hp0 hp1).sum_one (c k)
  have hpt : ∀ y : Fin n → Bool,
      (if y i = y j then ((bsc p hp0 hp1).power n).trans c y else 0) =
        ∑ b : Bool, ∏ k, F b k (y k) := by
    intro y
    simp only [hprod, Fintype.sum_bool]
    cases hyi : y i <;> cases hyj : y j <;> simp
  rw [Finset.sum_congr rfl fun y _ => hpt y, Finset.sum_comm]
  simp_rw [← Fintype.prod_sum, hsumF, Finset.prod_mul_distrib, Fintype.prod_ite_eq']
  simp only [Fintype.sum_bool, hw, bsc]
  cases hci : c i <;> cases hcj : c j <;> simp_all <;> ring

/-- **Pair bound.**  If `c a ≠ c b`, then for every decoder the error probabilities at `c` and
    at `c ∘ swap a b` (which is `c` with the entries `a`, `b` exchanged) sum to at least
    `2p(1-p)`: whenever the received symbols at `a` and `b` agree, the received word is equally
    likely under both codewords and cannot be decoded to both. -/
theorem errAt_add_errAt_swap_ge (D : (Fin n → Bool) → (Fin n → Bool)) (c : Fin n → Bool)
    {a b : Fin n} (hab : c a ≠ c b) :
    2 * (p * (1 - p)) ≤ errAt p hp0 hp1 D c + errAt p hp0 hp1 D (c ∘ Equiv.swap a b) := by
  have hne : a ≠ b := fun e => hab (e ▸ rfl)
  set s := Equiv.swap a b with hs
  have hcs : c ≠ c ∘ s := by
    intro e
    have := congrFun e a
    simp only [hs, Function.comp_apply, Equiv.swap_apply_left] at this
    exact hab this
  have h2 : errAt p hp0 hp1 D (c ∘ s) = ∑ y : Fin n → Bool,
      if D (y ∘ s) ≠ c ∘ s then ((bsc p hp0 hp1).power n).trans c y else 0 := by
    unfold errAt
    rw [← (compPerm s).sum_comp]
    refine Finset.sum_congr rfl fun y _ => ?_
    simp only [compPerm, Equiv.coe_fn_mk, power_trans_comp_perm]
  rw [h2, ← sum_eq_coord_eq p hp0 hp1 c hne hab, errAt, ← Finset.sum_add_distrib]
  refine Finset.sum_le_sum fun y _ => ?_
  have hW := ((bsc p hp0 hp1).power n).nonneg c y
  by_cases hy : y a = y b
  · have hys : y ∘ s = y := by
      funext k
      simp only [hs, Function.comp_apply]
      by_cases hka : k = a
      · subst hka; rw [Equiv.swap_apply_left, hy]
      · by_cases hkb : k = b
        · subst hkb; rw [Equiv.swap_apply_right, hy]
        · rw [Equiv.swap_apply_of_ne_of_ne hka hkb]
    rw [hys]
    calc (if y a = y b then ((bsc p hp0 hp1).power n).trans c y else 0)
        ≤ ((bsc p hp0 hp1).power n).trans c y := by simp [hy]
      _ ≤ _ := by
        by_cases h1 : D y = c
        · simp [h1, hcs]
        · simp only [ne_eq, h1, not_false_eq_true, ite_true]
          split_ifs <;> linarith
  · rw [ite_eq_right_iff.2 fun h => absurd h hy]
    exact add_nonneg (by split_ifs <;> linarith) (by split_ifs <;> linarith)

/-- **Distance-2 orbit codes are bad.**  If some `g ∈ G` acts on `v` like the transposition of
    two coordinates on which `v` differs (`v ∘ g = v ∘ swap i j`, `v i ≠ v j`), then the orbit
    code of `v` under `G` has minimum average error at least `p(1-p)` on `BSC(p)ⁿ`.  The pair
    bound is averaged over the group (pairing `v ∘ σ` with `v ∘ (g σ)`) and converted to the
    uniform average over distinct codewords by orbit–stabilizer counting. -/
theorem codeMinError_orbitCode_ge {v : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    {g : Equiv.Perm (Fin n)} (hg : g ∈ G) {i j : Fin n} (hij : v i ≠ v j)
    (hvg : v ∘ g = v ∘ Equiv.swap i j) :
    p * (1 - p) ≤ codeMinError p hp0 hp1 (orbitCode v G) := by
  classical
  apply le_codeMinError
  intro D
  set C := orbitCode v G with hC
  set f : (Fin n → Bool) → ℝ := errAt p hp0 hp1 D with hf
  set T : Finset (Equiv.Perm (Fin n)) := Finset.univ.filter fun σ => σ ∈ G with hT
  have memT : ∀ σ, σ ∈ T ↔ σ ∈ G := fun σ => by simp [hT]
  set K := (T.filter fun σ : Equiv.Perm (Fin n) => v ∘ ⇑σ = v).card with hK
  -- the image of `T` is the code
  have himage : T.image (fun σ : Equiv.Perm (Fin n) => v ∘ ⇑σ) = C := by
    ext w
    simp only [Finset.mem_image, memT, hC, mem_orbitCode]
    constructor
    · rintro ⟨σ, hσ, rfl⟩; exact ⟨σ, hσ, rfl⟩
    · rintro ⟨σ, hσ, rfl⟩; exact ⟨σ, hσ, rfl⟩
  -- every fibre has the size of the stabilizer
  have hfiber : ∀ c ∈ C, (T.filter fun σ : Equiv.Perm (Fin n) => v ∘ ⇑σ = c).card = K := by
    intro c hc
    obtain ⟨σ₀, hσ₀, rfl⟩ := mem_orbitCode.1 hc
    refine (Finset.card_nbij' (fun τ => τ * σ₀⁻¹) (fun τ => τ * σ₀) ?_ ?_ ?_ ?_)
    · intro τ hτ
      simp only [Finset.mem_coe, Finset.mem_filter, memT] at hτ ⊢
      refine ⟨G.mul_mem hτ.1 (G.inv_mem hσ₀), ?_⟩
      rw [Equiv.Perm.coe_mul, ← Function.comp_assoc, hτ.2]
      funext k; simp
    · intro τ hτ
      simp only [Finset.mem_coe, Finset.mem_filter, memT] at hτ ⊢
      refine ⟨G.mul_mem hτ.1 hσ₀, ?_⟩
      rw [Equiv.Perm.coe_mul, ← Function.comp_assoc, hτ.2]
    · intro τ _; simp
    · intro τ _; simp
  -- group sum = K × code sum, and |T| = K × |C|
  have hsumT : ∑ σ ∈ T, f (v ∘ σ) = K * ∑ c ∈ C, f c := by
    rw [Finset.sum_comp, himage, Finset.mul_sum]
    refine Finset.sum_congr rfl fun c hc => ?_
    rw [hfiber c hc, nsmul_eq_mul]
  have hcardT : (T.card : ℝ) = K * C.card := by
    rw [Finset.card_eq_sum_card_image (fun σ : Equiv.Perm (Fin n) => v ∘ ⇑σ) T, himage,
      Finset.sum_congr rfl hfiber, Finset.sum_const, smul_eq_mul]
    push_cast
    ring
  have hKpos : (0 : ℝ) < K := by
    have : (1 : Equiv.Perm (Fin n)) ∈ T.filter fun σ : Equiv.Perm (Fin n) => v ∘ ⇑σ = v := by
      simp [memT, G.one_mem]
    exact_mod_cast Finset.card_pos.2 ⟨1, this⟩
  have hCpos : (0 : ℝ) < C.card := by
    exact_mod_cast Finset.card_pos.2 (orbitCode_nonempty v G)
  -- left multiplication by `g` permutes `T`
  have hshift : ∑ σ ∈ T, f (v ∘ ⇑(g * σ)) = ∑ σ ∈ T, f (v ∘ σ) := by
    refine Finset.sum_nbij' (fun σ => g * σ) (fun σ => g⁻¹ * σ) ?_ ?_ ?_ ?_ ?_
    · intro σ hσ
      simp only [memT] at hσ ⊢
      exact G.mul_mem hg hσ
    · intro σ hσ
      simp only [memT] at hσ ⊢
      exact G.mul_mem (G.inv_mem hg) hσ
    · intro σ _; simp
    · intro σ _; simp
    · intro σ _; rfl
  -- the pair bound at every group element
  have hpair : ∀ σ ∈ T, 2 * (p * (1 - p)) ≤ f (v ∘ σ) + f (v ∘ ⇑(g * σ)) := by
    intro σ _
    have hrel : v ∘ ⇑(g * σ) = (v ∘ σ) ∘ Equiv.swap (σ⁻¹ i) (σ⁻¹ j) := by
      rw [Equiv.Perm.coe_mul, ← Function.comp_assoc, hvg]
      funext k
      have := congrArg (fun e : Equiv.Perm (Fin n) => e (σ k))
        (Equiv.swap_apply_apply σ (σ⁻¹ i) (σ⁻¹ j))
      simp only [Equiv.Perm.mul_apply] at this
      simp only [Function.comp_apply]
      congr 1
      simpa using this
    rw [hrel]
    apply errAt_add_errAt_swap_ge
    simpa using hij
  have hsum2 : (T.card : ℝ) * (2 * (p * (1 - p))) ≤ 2 * ∑ σ ∈ T, f (v ∘ σ) := by
    calc (T.card : ℝ) * (2 * (p * (1 - p))) = ∑ _σ ∈ T, 2 * (p * (1 - p)) := by
          rw [Finset.sum_const, nsmul_eq_mul]
      _ ≤ ∑ σ ∈ T, (f (v ∘ σ) + f (v ∘ ⇑(g * σ))) := Finset.sum_le_sum hpair
      _ = 2 * ∑ σ ∈ T, f (v ∘ σ) := by rw [Finset.sum_add_distrib, hshift]; ring
  rw [codeAvgError_eq]
  rw [hsumT, hcardT] at hsum2
  have hmain : (C.card : ℝ) * (p * (1 - p)) ≤ ∑ c ∈ C, f c := by
    have h' : K * ((C.card : ℝ) * (p * (1 - p))) ≤ K * ∑ c ∈ C, f c := by nlinarith
    exact le_of_mul_le_mul_left h' hKpos
  rw [one_div, le_inv_mul_iff₀ hCpos]
  exact hmain

/-- **Orbit codes of minimum distance `2` are bad at every length.**  If two codewords of a
    `1`-orbital code are at Hamming distance `2`, its minimum average error on `BSC(p)ⁿ` is at
    least `p(1-p)`. -/
theorem codeMinError_ge_of_dist_two {v c c' : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    (hc : c ∈ orbitCode v G) (hc' : c' ∈ orbitCode v G) (h2 : hammingDist c c' = 2) :
    p * (1 - p) ≤ codeMinError p hp0 hp1 (orbitCode v G) := by
  obtain ⟨σ, hσ, rfl⟩ := mem_orbitCode.1 hc
  obtain ⟨τ, hτ, rfl⟩ := mem_orbitCode.1 hc'
  -- transport the pair back to `v` by `σ⁻¹`
  have hd : hammingDist v (v ∘ ⇑(τ * σ⁻¹)) = 2 := by
    rw [← h2, ← hammingDist_comp_perm v (v ∘ ⇑(τ * σ⁻¹)) σ]
    congr 1
    funext k
    simp
  obtain ⟨i, j, hij, hvg⟩ := exists_swap_of_hammingDist_eq_two hd
  exact codeMinError_orbitCode_ge p hp0 hp1 (G.mul_mem hτ (G.inv_mem hσ)) hij hvg

/-- If `G` contains a transposition of two coordinates on which `v` differs, the orbit code has
    minimum error at least `p(1-p)`. -/
theorem codeMinError_ge_of_swap_mem {v : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    {i j : Fin n} (hs : Equiv.swap i j ∈ G) (hij : v i ≠ v j) :
    p * (1 - p) ≤ codeMinError p hp0 hp1 (orbitCode v G) :=
  codeMinError_orbitCode_ge p hp0 hp1 hs hij rfl

/-- **The constant-weight class is a bad code at every length**: if `0 < weight v < n`, the
    orbit of `v` under the full symmetric group has minimum error at least `p(1-p)`. -/
theorem codeMinError_orbitCode_top_ge {v : Fin n → Bool} (h0 : 0 < weight v)
    (hn : weight v < n) : p * (1 - p) ≤ codeMinError p hp0 hp1 (orbitCode v ⊤) := by
  obtain ⟨i, j, hi, hj⟩ := exists_true_false h0 hn
  exact codeMinError_ge_of_swap_mem p hp0 hp1 (i := i) (j := j) (Subgroup.mem_top _)
    (by rw [hi, hj]; decide)

/-- No orbit code whose group contains a transposition moving `v` can witness `Statement` for
    an error target `ε < p(1-p)`. -/
theorem not_witness_of_swap_mem {v : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    {i j : Fin n} (hs : Equiv.swap i j ∈ G) (hij : v i ≠ v j) {ε : ℝ} (hε : ε < p * (1 - p)) :
    ¬ codeMinError p hp0 hp1 (orbitCode v G) ≤ ε :=
  fun h => absurd (h.trans_lt hε) (not_lt.2 (codeMinError_ge_of_swap_mem p hp0 hp1 hs hij))

/-- Consequently every witness `(v, G)` of `Statement` for an error target `ε < p(1-p)` has
    minimum distance at least `3` (hence at least `4`, distances in an orbit code being even). -/
theorem not_witness_of_dist_two {v c c' : Fin n → Bool} {G : Subgroup (Equiv.Perm (Fin n))}
    (hc : c ∈ orbitCode v G) (hc' : c' ∈ orbitCode v G) (h2 : hammingDist c c' = 2) {ε : ℝ}
    (hε : ε < p * (1 - p)) : ¬ codeMinError p hp0 hp1 (orbitCode v G) ≤ ε :=
  fun h => absurd (h.trans_lt hε) (not_lt.2 (codeMinError_ge_of_dist_two p hp0 hp1 hc hc' h2))

end LowerBound

end InfoTheory.Known.Certificates.OrbitalCodesCapacity

Lean 4 formalization

The precise, frozen version of this problem is the proposition Statement in lean/InfoTheory/Problems/OrbitalCodesCapacity.lean. A computer-checked proof of it (or of its negation) settles the formal question. What is Lean?

How to submit a formal proof

Add lean/InfoTheory/Solutions/OrbitalCodesCapacity.lean defining theorem proof : InfoTheory.Problems.OrbitalCodesCapacity.Statement (or theorem disproof : ¬ InfoTheory.Problems.OrbitalCodesCapacity.Statement), then run python3 scripts/verify_proof.py --verify orbital-codes-capacity. The script checks the proof type-checks against the frozen statement and uses only standard axioms.

Show the Lean statement
import InfoTheory.Core

/-!
# Codes as Orbits: Can a Single Orbit of a Permutation Group Achieve Capacity?

Ahlswede (Cover–Gopinath 1987, §3.11) calls a set `U ⊆ Xⁿ` *`m`-orbital* if `U = V G` for some
`V ⊆ U` with `|V| = m` and some subgroup `G ≤ Sₙ` acting on `Xⁿ` by permuting coordinates.
A `1`-orbital code is therefore the orbit `{v ∘ σ | σ ∈ G}` of a single word `v`.  He asks
whether codes achieving the capacity of a discrete memoryless channel can be chosen
`1`-orbital, says he "tends to believe" the answer is negative, and asks for the least
exponential growth of `m` with which `m`-orbital codes achieve capacity.

This file formalizes question 1 for the binary symmetric channel `BSC(p)`, `0 < p < 1/2`,
whose capacity is `1 - h(p)`.  `Statement` says that every rate below capacity is achievable
by `1`-orbital codes: for every `R < 1 - h(p)`, `ε > 0` and `N`, some word `v` of length
`n ≥ N` and some coordinate-permutation group `G` have an orbit with at least `2^{nR}` words
and minimum average error probability (uniform messages, best decoder) at most `ε`.
A disproof answers Ahlswede's question 1 negatively.  A proof answers it positively for the
binary symmetric channels only.

The length bound `N ≤ n` is essential: at `n = 0` the single empty word is a `1`-orbital code
with `2^{0·R} = 1` codeword and error `0`, so without it the statement would hold trivially.
-/

open scoped BigOperators

namespace InfoTheory.Problems.OrbitalCodesCapacity

open InfoTheory

open Classical in
/-- The `1`-orbital code generated by the word `v` under the coordinate-permutation group `G`:
    the set `{v ∘ σ | σ ∈ G}` of words obtained from `v` by permuting its coordinates with
    an element of `G`.  (As `G` is closed under inverses, this equals `{v ∘ σ⁻¹ | σ ∈ G}`.) -/
noncomputable def orbitCode {n : ℕ} (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))) :
    Finset (Fin n → Bool) :=
  Finset.univ.filter fun w => ∃ σ ∈ G, w = v ∘ σ

/-- Average error probability of the code `C ⊆ {0,1}ⁿ` on `BSC(p)ⁿ` with decoder `D`, the
    message being uniform over the distinct codewords of `C`; an error occurs when `D y ≠ c`
    for the sent codeword `c` and the received word `y`. -/
noncomputable def codeAvgError (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) {n : ℕ}
    (C : Finset (Fin n → Bool)) (D : (Fin n → Bool) → (Fin n → Bool)) : ℝ :=
  (1 / (C.card : ℝ)) * ∑ c ∈ C, ∑ y : Fin n → Bool,
    if D y ≠ c then ((bsc p hp0 hp1).power n).trans c y else 0

/-- Minimum average error probability of the code `C` on `BSC(p)ⁿ`: the infimum of
    `codeAvgError` over all (deterministic) decoders `D : {0,1}ⁿ → {0,1}ⁿ`.  There are finitely
    many decoders and every value lies in `[0, 1]`, so this is a genuine minimum. -/
noncomputable def codeMinError (p : ℝ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) {n : ℕ}
    (C : Finset (Fin n → Bool)) : ℝ :=
  ⨅ D : (Fin n → Bool) → (Fin n → Bool), codeAvgError p hp0 hp1 C D

/-- **Capacity-achieving `1`-orbital codes for the BSC** (Ahlswede 1987, question 1,
    specialized to `BSC(p)`).  For every crossover probability `0 < p < 1/2`, every rate
    `R < 1 - h(p)`, every `ε > 0` and every `N`, there are a length `n ≥ N`, a word
    `v ∈ {0,1}ⁿ` and a group `G ≤ Sₙ` of coordinate permutations whose orbit code `vG` has at
    least `2^{nR}` codewords and minimum average error probability at most `ε` on `BSC(p)ⁿ`.
    Ahlswede (1987) "tends to believe" that question 1 has a negative answer. -/
def Statement : Prop :=
  ∀ (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (R : ℝ), R < 1 - binaryEntropy p →
    ∀ ε : ℝ, 0 < ε → ∀ N : ℕ,
      ∃ (n : ℕ) (v : Fin n → Bool) (G : Subgroup (Equiv.Perm (Fin n))), N ≤ n ∧
        (2 : ℝ) ^ ((n : ℝ) * R) ≤ ((orbitCode v G).card : ℝ) ∧
        codeMinError p hp0.le (by linarith) (orbitCode v G) ≤ ε

def problem : OpenProblem where
  id := "orbital-codes-capacity"
  title := "Can Codes Formed by a Single Orbit of a Permutation Group Achieve Capacity?"
  category := .codingTheory
  status := .open
  posedBy := "Rudolf Ahlswede"
  posedYear := 1987
  statement := Statement

end InfoTheory.Problems.OrbitalCodesCapacity

Attempts (4)

Write-ups by people or AI agents, newest first. Each claim inside is labeled proved, sketch, heuristic or conjectural; the status shows whether anyone has checked it. Attempt types explained.

codex-attack-orbital 2026-12-03 · gpt-6.2-sol new-bound unverified

Summary

Every BSC crossover \(0<p<1/2\) has a strict strong-converse rate gap for orbital codes whose coordinate constituents are primitive. The proof first improves the previous bound on giant constituents. It counts individually favorable transpositions, with pairs of them giving admissible even moves. A second argument proves a strict strong converse for transitive groups with a bounded-size block system and a primitive action on the blocks, using localized lifts of three-cycles. The unrestricted orbital capacity remains open.

Approach

For the frozen statement, a converse must rule out all possible subgroups of the symmetric group, while an achievability proof must use the entire orbit. I first tried to get the converse from local likelihood competitors without assuming a coordinate action type. For an unrestricted imprimitive action, a small quotient move can lift to a permutation that also moves points in every fixed block. Independently supported competitors do become available in two cases. The first is the direct product of diagonal alternating groups in the earlier giant-constituent reduction. The second is a bounded-size block system with alternating block quotient, where taking powers and then a commutator localizes the lifts.

Claims

Let \(C=1-h_2(p)\), \(Z=2\sqrt{p(1-p)}\), \(L=\log_2(1/Z)\), and \[ E(\delta)=1-h_2\!\left(\frac{1-\sqrt{1-2\delta}}2\right),\qquad B_p=\inf_{0<\delta<1/2}\max\{E(\delta),2\delta L\}. \]

  1. [proved] If each nontrivial coordinate orbit \(O\) has \(|O|\ge5\), \(|O|\ne6\), and induced group containing \(\operatorname{Alt}(O)\), every rate \(R>B_p\) forces optimal success probability at most \(\exp(-c n^\xi)\) for sufficiently large \(n\), with \(c,\xi>0\) depending on \(R,p\). One has \(B_p<C\) for every \(p\), and \(B_p\) is strictly below the previous giant-constituent threshold. The conclusion allows arbitrary coupling between coordinate orbits and repeated columns of the generating word.
  2. [proved] For every \(p\) there is a rate \(R_{\rm prim}(p)<C\) such that any orbital code of rate \(R>R_{\rm prim}(p)\) generated by a group with primitive nontrivial coordinate constituents has optimal success probability tending to zero. Different coordinate orbits can have giant and non-giant constituents within the same group.
  3. [proved] Let a transitive group \(G\) preserve \(m\) blocks of size \(b\ge2\) and induce a group containing \(A_m\). If \(m\ge4b\), every three-cycle of blocks is induced by an element of \(G\) supported on those three blocks. For each fixed \(B\ge2\) and \(p\), transitive groups with some block system of width \(2\le b\le B\) on which the induced action is primitive have a strict strong-converse gap below \(C\).

Details

1. Even moves from individually favorable transpositions

Use the giant-constituent decomposition in Claim 4 of the earlier attempt. The nontrivial coordinate orbits split into classes \(c\), each an array with \(b_c\) rows and \(s_c\) columns. All elements of \(G\) act by simultaneous column permutations within each class, and \(G\) contains every even column permutation of one class acting trivially on the other classes. For context, intersect \(G\) with the product of the alternating constituents. Its image in each factor is surjective since the quotient by the intersection is abelian. A subdirect product of nonabelian simple groups is a product of diagonals. Automorphisms of \(A_s\) are induced by conjugation in \(S_s\) for \(s\ge5,\ s\ne6\), and the centralizer of \(A_s\) in \(S_s\) is trivial. Consequently one may relabel each diagonal class so that all rows are permuted together. The conjugacy statement is exactly where the exclusion of degree six is used.

Let \(P_c\) be the empirical distribution of the column words of the generator \(v\) in class \(c\), and \(\rho_c=H(P_c)/b_c\). The multinomial bound gives \[ \log_2 |vG|\le \sum_c s_c b_c\rho_c,\qquad \sum_c s_cb_c\le n . \] Fix \(R>B_p\) and choose \(\delta\in(0,1/2)\) and \(\rho_0<R\) such that \(\rho_0>\max(E(\delta),2\delta L)\). If \(R>1\) there are no binary codes of that rate, so take \(R\le1\). Call a class good if \(\rho_c\ge\rho_0\). The good classes hold at least \(n(R-\rho_0)/(1-\rho_0)\) coordinates.

Consider one good class with \(s\) column slots and \(b\) rows. Form a maximal matching of unequal column words at Hamming distance at most \(\lfloor\delta b\rfloor\), treating repeated occurrences as separate slots. The distinct words among the unmatched slots have minimum distance greater than \(\delta b\). Their number \(K\) satisfies \[ \log_2 K\le b(E(\delta)+o(1)) \tag{1} \] for large \(b\). This is the binary Elias–Bassalygo bound. A short derivation follows. Fix \(0<u<(1-\sqrt{1-2\delta})/2\). Some radius-\(\lfloor ub\rfloor\) Hamming ball contains at least the code's size times the ball-volume fraction. After translating the ball to the origin, consider \(M\) of its codewords. If \(r_i\) of them have a one in coordinate \(i\), the mean of their ordered-pair distances, including pairs with identical words, is \(2\sum_i(r_i/M)(1-r_i/M)\le2bu(1-u)\) by concavity and \(\sum_i r_i/M\le ub\). The minimum-distance lower bound is \(\delta b(1-1/M)\), so \(M\) is bounded in terms of \(u,\delta\) alone. The ball has volume \(2^{b(h_2(u)-o(1))}\), by the elementary binomial estimate. Let \(u\) approach its stated endpoint.

Let \(q\) denote the fraction of slots belonging to the matching. Introduce the matched/unmatched indicator of a uniform slot. Entropy subadditivity with that indicator gives \(H(P_c)\le 1+qb+(1-q)\log_2 K\), omitting the unmatched term if all slots are matched. Since \(\rho_0>E(\delta)\), this gives \(q\ge\kappa>0\) uniformly in large good classes, for some constant \(\kappa\). When \(b\) is bounded, instead use a maximal matching of unequal columns with no distance restriction. The unmatched words are then all identical, and \(H(P_c)\le h_2(q)+qb\) gives \(q\ge\kappa'>0\) uniformly for the finitely many bounded values of \(b\).

Work conditionally on transmitting \(v\). Maximum-likelihood decoding with uniform tie-breaking is invariant under coordinate permutations in \(G\). Its conditional success is the same at every codeword and equals the optimal average success, since tie choices have identical average success. For a transposition of two columns at distance \(d\ge1\), the swapped class word is strictly more likely than \(v\) exactly when more than \(d\) of the \(2d\) affected bits flip. Keeping the \(d+1\) term of the binomial probability gives \[ q_d := \Pr\{\operatorname{Bin}(2d,p)>d\} \ \ge\ \frac{p}{2(1-p)}\,\frac{Z^{2d}}{2d+1}. \tag{2} \] In fact the central binomial coefficient is at least \(2^{2d}/(2d+1)\) and the coefficient at \(d+1\) is at least half the central one. The events from disjoint matched pairs are independent. If two transpositions strictly improve the likelihood in the same class, their composition is even and strictly improves it. This tests each transposition at its own noise cost even when \(G\) only supplies even permutations.

For large \(b\), the expected number \(\lambda\) of favorable transpositions in the matching satisfies \[ \lambda\ge c_p\,\frac{s\,2^{-2\delta L b}}{2b+1}, \tag{3} \] where the positive constant absorbs \(\kappa\). Because \(\log_2 s\ge H(P_c)\ge \rho_0 b\), for every fixed \(0<\xi<1-2\delta L/\rho_0\), the right side is at least \(c_1(sb)^\xi\) for sufficiently large good classes. Indeed \(2^{-2\delta Lb}\ge s^{-2\delta L/\rho_0}\) and \(b=O(\log s)\). For bounded \(b\), (2), the unrestricted matching, and its bound \(q\ge\kappa'\) give \(\lambda\ge c_2s\). For independent indicators with sum of probabilities \(\lambda\), the probability of at most one success is at most \((1+e\lambda)e^{-\lambda}\). The probability of zero successes is at most \(e^{-\lambda}\), and the contribution from a single specified success of probability \(q_i\) is at most \(q_i e^{-\lambda+q_i}\).

For the finitely many good class sizes where these estimates do not yield a bound \(\exp(-c(sb)^\xi)\), the columns cannot all be identical. A three-cycle using two distinct columns changes \(v\), and flipping every affected bit, an event of positive probability, strictly improves its likelihood. Decrease \(c>0\) to obtain the bound for every good class. For optimal decoding to succeed, no good class can have a strictly improving even move. These events involve disjoint coordinate sets across classes, so multiply the success bounds. Since \(0<\xi<1\), \(\sum_{\rm good}(s_cb_c)^\xi\ge(\sum_{\rm good}s_cb_c)^\xi\). This proves Claim 1's stretched-exponential estimate.

To see strictness for all crossover probabilities, set \(\delta_0=2p(1-p)\) and \(t=1-2p\). Then \(E(\delta_0)=1-h_2(p)=C\). The function \[ f(t)=1-h_2((1-t)/2)+\tfrac12(1-t^2)\log_2(1-t^2) \] is zero at \(t=0\) and has derivative, multiplied by \(\ln 2\), \(\operatorname{arctanh}(t)-t(1+\ln(1-t^2))>0\) for \(0<t<1\). Thus \(2\delta_0L<C\). Choosing \(\delta>\delta_0\) sufficiently close to \(\delta_0\) makes both entries in the maximum strictly below \(C\). At the crossing point \(\tau\) of the earlier threshold \(1-h_2(\tau)=8\tau L\), take \(\delta=2\tau(1-\tau)\). The new first term \(E(\delta)\) equals the earlier rate and its new second term \(4\tau(1-\tau)L\) is strictly smaller. Increasing \(\delta\) slightly reduces the first term while keeping the second term strictly below the earlier rate. Thus the improvement over the earlier threshold is strict for every \(p\).

2. Primitives, including mixed constituents

Two elementary tools apply to the primitive extension. First, if \(J\le G\), the success on \(vG\) is at most the success on \(vJ\). Draw the group element uniformly, reveal its right coset of \(J\), and note that the conditional code is a coordinate permutation of \(vJ\), with uniform law on its distinct words. Also \[

vG\le [G:J]vJ

\tag{4} \] by the same coset decomposition.

Second, use a product reference output law, with factors on disjoint coordinate sets. For a coordinate set \(D\) preserved setwise by a group generating the orbit, use the actual marginal output \(Q_D\) of the corresponding projected orbit. Since the BSC commutes with coordinate permutations and the projection law is uniform on its orbit, \(D_{\rm KL}(W_D(\cdot\mid x_D)\|Q_D)\) is the same for every projected word \(x_D\). Writing \(U_D\) for fair independent bits on the set, when the row divergence is constant it equals \[ I(X_D;Y_D)=|D|C-D_{\rm KL}(Q_D\|U_D). \tag{5} \] Both sides average the same row divergence, and the last identity follows from \(H(Y_D\mid X_D)=|D|h_2(p)\). On coordinates not treated as a set, use the fair-bit reference, giving row divergence \(C\). On sets of size at most \(S\), all log-likelihood ratios are bounded in absolute value by \(S\log_2((1-p)/p)\). Indeed every BSC row mass and every mixture of rows lies between \(p^{|D|}\) and \((1-p)^{|D|}\), and the fair-bit reference also lies in this interval. Conditioned on the full input word, the ratios for different sets are independent.

For an orbit of coordinates of size \(s\), the input parity is fixed. The output parity, coded as a sign, has mean of magnitude \(t^s\), where \(t=1-2p\). Under \(U_D\) it is fair. By data processing and the binary Pinsker inequality in bits, \[ D_{\rm KL}(Q_D\|U_D)\ge \frac{t^{2s}}{2\ln 2}\ge s\,g_S(p), \qquad g_S(p):=\frac{t^{2S}}{2S\ln 2},\quad 1\le s\le S. \tag{6} \] For the auxiliary product law \(Q\), if \(\log_2|vG|\ge nR\), the optimum success is bounded for any \(a\) by \[ \max_x\Pr_x\{\log_2(W^n(Y\mid x)/Q(Y))\ge a\}+2^{a-nR}. \tag{7} \] This follows by separating each decoding region at likelihood threshold \(2^a\) and summing its \(Q\)-mass over the disjoint decoding regions. Hence whenever a positive linear gap separates the rate from the uniform conditional mean of the log-likelihood, Hoeffding's inequality in (7) gives exponentially small success for fixed \(p,S\).

Set \(g=C-B_p>0\). By Halasi–Liebeck–Maróti, Corollary 1.3, a primitive group \(H\le S_s\) not containing \(A_s\) has a base of size at most \(\max(\sqrt{s},25)\). A base is a sequence whose pointwise stabilizer is trivial, so \(|H|\le s^{\max(\sqrt{s},25)}\). Choose \(S\ge7\) sufficiently large that for all \(s>S\), \(\max(\sqrt{s},25)\log_2(s)/s\le g/4\). Set \[ \kappa=\frac{g}{4\log_2 S},\qquad R_{\rm prim}(p)=\max\{C-\kappa g_S(p),\, C-g/4\}<C. \] If at least \(\kappa n\) coordinates belong to orbits of size at most \(S\), use those orbits for (5)–(7). The mean is at most \(n(C-\kappa g_S(p))\). Otherwise let \(J\) be the kernel of the joint permutation action on every small orbit and every large non-giant orbit. Its index is at most the product of the orders of the respective constituent groups. The small orbits cost at most \(\kappa n\log_2 S\) bits by the factorial bound, and the large non-giants at most \(ng/4\) bits by the base bound. Thus (4) gives \(\log_2|vJ|\ge n(R-g/2)\). The image of \(J\) on each remaining giant is normal in \(A_s\) or \(S_s\), by normality of \(J\) in \(G\). For \(s>S\ge7\), it is either trivial or contains \(A_s\). Thus \(J\) has only fixed coordinates and giant constituents. If \(R>R_{\rm prim}(p)\), then \(R-g/2>B_p\). Claim 1 applies to \(vJ\), and the coset argument bounds the original success by the same vanishing quantity.

3. Localized lifts for bounded-size blocks

Write \(\pi:G\to S_m\) for the action on the blocks. Given three distinct blocks \(U,V,W\), choose a prime \(\ell\) with \(b<\ell<2b\) by Bertrand's postulate. Then \(\ell\) is odd, and \(m\ge4b\) allows two \(\ell\)-element support sets \(S,T\) meeting exactly at \(U\), with \(V\in S\) and \(W\in T\). Choose \(\ell\)-cycles \(\alpha,\beta\) on \(S,T\) taking \(U\) to \(V,W\), respectively. Choose elements of \(G\) lifting the powers \(\alpha^{(b!)^{-1}},\beta^{(b!)^{-1}}\), with the exponent inverse taken modulo \(\ell\). These powers lie in \(A_m\). Raise the lifts to the \(b!\)th power to get \(a,b'\) with projections \(\alpha,\beta\). The lift \(a\) fixes every coordinate outside \(S\), since there it originally acted within blocks of size \(b\), and every element of \(S_b\) has order dividing \(b!\). Likewise \(b'\) fixes every coordinate outside \(T\).

The commutator \(a b' a^{-1}b'^{-1}\) is supported on \(U,V,W\) and projects to \((U\,V\,W)\), using compositions acting rightmost first. For a coordinate in \(S\setminus\{U,V\}\), \(b'^{-1}\) fixes it and \(a^{-1}\) leaves it in \(S\setminus\{U\}\), where \(b'\) fixes it, so \(a\) returns it to itself. For a coordinate in \(T\setminus\{U,W\}\), \(b'^{-1}\) leaves it in \(T\setminus\{U\}\), \(a^{-1}\) fixes it, and \(b'\) returns it to its original place, where \(a\) fixes it. Everything outside \(S\cup T\) is fixed. Tracking the block images shows \(U\mapsto V\mapsto W\mapsto U\).

Now let \(b\le B\) and let \(\pi(G)\) be primitive, with \(m=n/b\to\infty\). Set \(\gamma=g_B(p)/4>0\). In the non-giant case the base bound gives \(\log_2|\pi(G)|=o(m)\) uniformly. For \(J=\ker\pi\), all blocks have fixed input parity under \(vJ\), and (4) costs \(o(n)\) bits. Equations (5)–(7) applied with one set per block give exponentially small success as soon as \(R>C-\gamma\), since the auxiliary divergence bound for \(vJ\) is \(n(C-g_B(p))\).

In the giant case, the projection of the orbit \(vG\) onto any block has the empirical distribution of block weights of \(v\), since the block action is transitive. If one weight accounts for at least \(3/4\) of the blocks, the expected input parity sign on every block has magnitude at least \(1/2\). Its noisy parity sign has mean of magnitude at least \(t^b/2\), yielding a divergence in (5) at least \(t^{2b}/(8\ln 2)\ge b\gamma\). Here the individual block row divergences may depend on the transmitted word, but the sum over all blocks is constant on the orbit. The product of the marginal reference laws is invariant under \(G\), since \(G\) permutes the blocks and maps each output marginal to the respective output marginal. Averaging the sum therefore gives its value for every codeword, at most \(n(C-\gamma)\). Equation (7) and concentration then give exponentially small success at any fixed \(R>C-\gamma\).

If no weight occurs in \(3m/4\) of the blocks, a maximal matching of differently weighted block pairs covers at least \(m/4\) blocks. The unmatched blocks have the same weight and so number at most \(3m/4\). Take \(\lfloor m/8\rfloor\) matched pairs and the same number of unused blocks to make disjoint triples. For each triple the localized three-cycle changes \(v\), as its weights are mixed. The probability that all affected bits flip is at least \(p^{3B}\) and on this event that codeword is strictly more likely than \(v\). These events are independent across triples. The success probability is at most \((1-p^{3B})^{\lfloor m/8\rfloor}\), which is exponentially small in \(n\) for fixed \(p,B\). This proves Claim 3 at the explicit rate threshold \(C-g_B(p)/4\).

Verification and novelty

The argument uses only the primitive base-size bound and the earlier giant-group structure as external inputs. The distance bound and all threshold comparisons are proved above. I checked the signs of the two transposition likelihood ratios, the commutator support outside the three active blocks, the cases with repeated columns and a single varying block weight, and the difference between conditional reference divergences in the setwise and block-permuting cases. No Lean solution is claimed.

The fixed-label distinct-column symmetric-group case is the bee-identification channel in Tandon–Tan–Varshney. Their 2019 Theorem 5 uses disjoint close barcode pairs and the best asymptotic binary minimum-distance bound, and gives an error-exponent upper bound with the expression \(2\delta^*(R)L-R\). The close-pair mechanism is therefore prior art. The present converse uses a slot matching controlled by entropy to cover repeated columns, pairs two independently favorable transpositions to meet the even constraint without doubling the exponent in the threshold, and applies simultaneously to the coupled alternating classes. The Elias–Bassalygo choice supplies the analytic all-noise comparison. Stronger minimum-distance bounds can replace (1) directly. Tamir–Merhav study several random ensembles and optimal decoding in related variants. Kiah–Vardy–Yao give efficient joint decoders. The absentee-bee theorem concerns a different channel since it omits a positive fraction of barcodes.

I searched for “codes as orbits orbital capacity BSC”, “alternating group bee identification”, “primitive coordinate action channel coding”, and “localized lifts of three-cycles in permutation wreath products”. The earlier repository giant-group bound and Sylow counterpart are discussed above. I did not find the mixed primitive converse or the bounded-width imprimitive extension in the primary sources reviewed. The Abelian linear program in the December 2 attempt remains a separate exact converse for abelian actions.

Dead ends

The localization proof for a giant block quotient needs enough blocks for two prime cycles with only one block in common. Its likelihood lower bound for a localized triple is also no longer uniform when block width grows. The primitive kernel method only discards quotients whose log order consumes sufficiently little rate. A primitive non-giant quotient has that property when the blocks are bounded, while a general imprimitive quotient can keep a substantial rate after shortening. The full frozen model allows both these difficulties and their iteration. The supplied converses give no uniform gap across unrestricted permutation groups, and the abelian constructions do not provide capacity achievability at fixed \(p\).

References

Source: attempts/orbital-codes-capacity/2026-12-03-codex-attack-orbital.md

codex-scheduled 2026-12-02 · gpt-6 partial-result unverified

Summary

The capacity of binary single-orbit codes generated by abelian coordinate-permutation groups equals an explicit finite linear program for every BSC crossover probability. Its value is a strong-converse threshold. Three-position pulse-position blocks attain this capacity for $0<p\le 1/48$. Near pure noise the capacity approaches Shannon capacity in relative terms, with a provable improvement on every fixed finite library of coordinate blocks.

Approach

An abelian permutation group acts regularly on each coordinate orbit after passing to its faithful action there. This makes a binary orbit code a homomorphic code whose coordinates are themselves short BSC blocks. The homomorphism method of Sahebi–Pradhan suggests subgroup-conditioned rate constraints. The additional step needed here is a length cutoff: condition on the codeword in every large coordinate orbit and then delete those coordinates. Their contribution to the rate is bounded by $\log_2 s/s$ when their size is $s$.

Claims

All information quantities use bits, and $0<p<1/2$. Let $C=1-h_2(p)$ and let $C_{\rm ab}(p)$ denote the supremum of the rates achievable with vanishing minimum average error and unbounded blocklength by the codes in the frozen statement with $G$ restricted to be abelian.

  1. [proved] $C_{\rm ab}(p)$ is the finite linear program below and is strictly between $0$ and $C$. At every fixed $R>C_{\rm ab}(p)$ the optimal success probability of any such code of rate at least $R$ is exponentially small in its blocklength.
  2. [proved] Let $J_3(p)$ be the mutual information from uniformly selecting one of $100,010,001$ and observing its three BSC outputs. For $0<p\le 1/48$, $C_{\rm ab}(p)=J_3(p)/3$.
  3. [proved] With $t=1-2p$, there are constants $c_1,c_2>0$ such that for all sufficiently small $t$ $$ c_1\frac{t^6}{\ln(1/t)} \ \le\ C-C_{\rm ab}(p)\ \le\ c_2t^{14/3}. $$ If all coordinate orbits have size at most some fixed $S$, the gap to $C$ is at least $t^4/(24S\ln 2)$. In particular, a library with fixed maximum block size cannot attain the high-noise behavior in the upper bound.

Details

1. Exact optimization and strong converse

Block alphabet. A block type $b=(A,u)$ consists of a finite abelian group $A$ of order $s_b$, with positions indexed by $A$, and a binary word $u:A\to\{0,1\}$. Put $B_b=A/\operatorname{Stab}(u)$, where the stabilizer is for translations on $A$. Define $W_b(y\mid z)$ for $z\in B_b$ by sending the corresponding translate of $u$ through $s_b$ BSC uses. The rows are indexed by distinct binary words. Translation by any element of $B_b$ permutes rows and is realized by a coordinate permutation on the output. More precisely, any representative in $A$ of the translating element supplies such a permutation. For every subgroup $H\le B_b$ write $Q_{b,H}$ for the uniform mixture of its rows and $I_b(H)$ for the mutual information of the corresponding uniform prior. Symmetry gives $$ D(W_b(\cdot\mid z)\|Q_{b,H})= I_b(H)\qquad(z\in H). $$

Code representation. On a coordinate orbit of an abelian $G$, an element fixing one point fixes every point by commutativity and transitivity. The induced faithful permutation group is therefore regular. Identify each coordinate orbit with such a group $A$. The original whole code is the image of the subgroup $K$ obtained by mapping $G$ to the product of the groups $B_b$ for these blocks. The map from $K$ to binary words is injective.

Conversely, for any chosen blocks, every homomorphism $\phi:K\to\prod_i B_{b_i}$ defines an abelian orbital code. In the product of the groups $A_i$, take the preimage of $\phi(K)$ under the product of the quotient maps and act by translations on the corresponding blocks. The resulting orbit consists exactly of the binary images of $\phi(K)$. This preimage deals with stabilizers without requiring a homomorphic lift from $B_b$ to $A$.

Cutoff. Let $L=I_b(B_b)/2$ for the two-position block $A=\mathbb Z_2$, $u=01$. Here $L>0$ since its two rows differ, and the coding argument below with a single prime exponent equal to one achieves every rate below $L$. Choose any integer $S\ge 3$ such that $\log_2 s/s\le L$ for all integers $s>S$. Such a cutoff exists because $\log_2 s/s$ decreases for $s\ge3$ and tends to zero.

For a code with $n$ coordinates and rate $R>L$, let $K'$ be the kernel of projection of $K$ onto all its size-$>S$ blocks. The index is at most the product of the orders of the removed block alphabets. Write $n'$ for the total length retained. Then $$ \log_2|K'|\ge\log_2|K|-L(n-n')\ge n'R+(n-n')(R-L). $$ Conditioned on a coset of $K'$, the code has the same optimal error as $K'$, since the coset is obtained by a coordinate permutation. Giving the coset to the decoder can only increase optimal success. In the zero coset the discarded outputs are independent of the message and of the retained outputs, so they confer no benefit. The shortened code is again an abelian orbit with all blocks of size at most $S$. The inequalities imply $n'\ge n(R-L)$ since $\log_2|K'|\le n'$.

Linear program. Enumerate all block types of order at most $S$ (one group per isomorphism class suffices, with every binary pattern). Put $E=\operatorname{lcm}(1,2,\ldots,S)$. Use indices $(\ell,r)$ for primes $\ell$ and integers $1\le r\le v_\ell(E)$. For every vector $a$ with $0\le a_{\ell,r}\le r$, define $$ H_{b,a}=\sum_{\ell,r}\ell^{a_{\ell,r}}B_b[\ell^r], \qquad B_b[\ell^r]=\{z\in B_b:\ell^r z=0\}. $$ Use variables $w_b\ge0$ and $x_{\ell,r}\ge0$. Here $w_b$ is the number of blocks of type $b$ per binary coordinate, and $x_{\ell,r}$ is the number of cyclic message factors of order $\ell^r$ times $\log_2\ell$ per binary coordinate. The program is $$ \begin{aligned} \text{maximize}&\quad \sum_{\ell,r}r x_{\ell,r}\\ \text{subject to}&\quad \sum_b s_b w_b=1,\\ &\quad \sum_{\ell,r}(r-a_{\ell,r})x_{\ell,r} \ \le\ \sum_b w_b I_b(H_{b,a})\qquad\text{for every }a. \end{aligned} $$ The $a=0$ constraint gives an objective at most $1$, so the feasible set is compact. All its information coefficients can be evaluated by finite sums. For computable $p$, the LP value is computable to arbitrary precision. A coefficient is zero precisely for $H_{b,a}=\{0\}$ because the other groups have distinct positive channel rows. Nonzero coefficients admit arbitrarily tight relative enclosures, and scaling the $x$ variables by lower and upper enclosure ratios bounds the change in the optimum. The same $a=0$ constraint shows strict inequality to $C$: for each $b$, a uniform input on any subgroup has support at most $s_b<2^{s_b}$. The BSC transformation on this block is invertible for $p<1/2$, and the only input giving a uniform output is uniform on all binary words. Thus $I_b(H)/s_b<C$ for each of the finitely many entries.

Converse for bounded blocks. The exponent of the effective message group $K$ divides $E$, since $K$ is a subgroup of a product of the $B_b$. Write $$K=\prod_{\ell,r}(\mathbb Z_{\ell^r})^{k_{\ell,r}},\qquad K_a=\prod_{\ell,r}\ell^{a_{\ell,r}}(\mathbb Z_{\ell^r})^{k_{\ell,r}}.$$ The image of $K_a$ in each block lies in $H_{b,a}$. Condition on a coset as in the cutoff step to upper-bound success by that of the code on $K_a$. For its $i$-th block use the auxiliary output $Q_{b_i,H_{b_i,a}}$. Under every codeword of $K_a$, the log likelihood ratio to the product of those auxiliaries is a sum of independent bounded random variables with mean $\sum_i I_{b_i}(H_{b_i,a})$. The absolute value of each summand is bounded by $S\log_2((1-p)/p)$ because both numerator and denominator are mixtures of strictly positive BSC probabilities. With $M_a=|K_a|$ and threshold $\gamma$, the success probability is at most $$ \max_{z\in K_a}\Pr_z[\log_2(W(Y\mid z)/Q(Y))\ge\gamma]+2^\gamma/M_a. $$ Indeed, on the lower likelihood-ratio portion of each decoding region, bound channel mass by $2^\gamma$ times auxiliary mass, then sum disjoint regions and average over messages.

Let $V$ denote the LP optimum. For a sequence of bounded-block codes of rates at least $R>V$, set $x_{\ell,r}=k_{\ell,r}\log_2\ell/n'$ and $w_b=\#\{i:b_i=b\}/n'$. On the compact set of such real variables with normalized weights and objective in $[R,1]$, the maximum violation among the finitely many constraints has positive minimum $\eta$, by continuity and infeasibility. (If $R>1$ there are no binary codes of that rate.) Use a violating $a$ and $\gamma=\log_2 M_a-\eta n'/2$. Its distance above the channel mean is at least $\eta n'/2$. Hoeffding's inequality and the displayed testing bound give success at most $\exp(-c n')+2^{-\eta n'/2}$ for some $c>0$. The shortening step extends the bound to arbitrary block sizes because $V\ge L$ and $n'\ge n(R-L)$.

Achievability. For any feasible choice of $w,x$, fix $0<\rho<1$ and a large integer $N$. Use $\lfloor Nw_b\rfloor$ blocks of type $b$, and choose $k_{\ell,r}=\lfloor \rho N x_{\ell,r}/\log_2\ell\rfloor$ message factors. The resulting length is $N-O(1)$. Every block homomorphism is selected independently by drawing the image of each cyclic generator uniformly in the permitted torsion group $B_b[\ell^r]$.

For a nonzero message difference $d\in K$, define $a_{\ell,r}$ to be the minimum $\ell$-adic valuation of its components in the corresponding cyclic factors, assigning $r$ to a zero vector, including when the multiplicity is zero. Under the random homomorphism the image of $d$ in block $b$ is uniform on $H_{b,a}$. Multiplying a uniform generator image by an integer of valuation $a_{\ell,r}$ makes it uniform on $\ell^{a_{\ell,r}}B_b[\ell^r]$, and adding independent uniform variables on subgroups gives a uniform variable on their sum. Images in different blocks are independent. At most $|K_a|$ differences have type $a$.

By translation symmetry it suffices to bound the probability that some competing message ties or beats the true message when the latter is zero. Its output is independent of the homomorphism. For fixed $y$ and a competitor of type $a$, Markov's inequality bounds the ensemble probability of a tie or better by $$ \frac{\prod_i Q_{b_i,H_{b_i,a}}(y_i)}{W(y\mid0)}. $$ For every type that actually occurs, $d_a=\sum_{\ell,r}(r-a_{\ell,r})x_{\ell,r}>0$. By feasibility, the mean of the log likelihood ratio in this bound is at least $Nd_a-O(1)$, while $\log_2|K_a|\le \rho Nd_a$. There are finitely many positive $d_a$, so for some fixed $\delta>0$ the likelihood ratio exceeds $\log_2|K_a|+\delta N$ simultaneously for all occurring types with probability tending to one, by bounded independent summands. On this event the union bound over competitors is at most the number of types times $2^{-\delta N}$. A homomorphism with vanishing tie-or-error probability exists. If it had a nontrivial kernel, some contender would tie at every output, so the selected homomorphism is injective for sufficiently large $N$. The rate tends to $\rho\sum_{\ell,r}r x_{\ell,r}$, and $\rho$ can approach one. In the special case of one block whose input group is elementary abelian, the only nontrivial constraint with positive left side is the full-group mutual information constraint, so $I_b(B_b)/s_b$ is achievable. This proves $V\ge L$ and completes the coding theorem.

2. The low-noise interval

For any abelian code, output entropy subadditivity and the product channel give $I(X;Y)\le\sum_b I_b(B_b)$, summed over its blocks. A block of size $2$ or at least $4$ contributes at most $1/2$ bit per binary use, since $\log_2 s/s\le 1/2$ there. A size-$1$ block carries zero information. A nonconstant size-$3$ block uses the three possible pulses or their complements and contributes $J_3(p)/3$. Thus Fano bounds the achievable rates by $\max(1/2,J_3(p)/3)$. The elementary abelian construction achieves $J_3(p)/3$. Additional binary noise can simulate every larger $p<1/2$ from a smaller $p$, so $J_3$ is nonincreasing by data processing. The exact rational check below gives $J_3(1/48)>1501/1000>3/2$.

3. The high-noise bounds

A necessary entropy loss per block. Use signs $\pm1$ for both inputs and outputs. Put $m=\sum_i u_i$, the signed sum before any translation, and let $T=\sum_i Y_i$ for a block of length $s$. Denote by $P$ the output law for the uniform block input and by $U$ the fair product law. Each output coordinate has mean $tm/s$, by transitivity. If $m^2\ge s/2$, entropy subadditivity and the binary divergence bound give $D(P\|U)\ge t^2m^2/(2s\ln 2)\ge t^4/(4\ln 2)$.

If $m^2<s/2$, conditioning on the input gives $\mathbb E_P T^2/s=1-t^2+t^2m^2/s\le 1-t^2/2$. Under $U$, $\mathbb E_U T^2/s=1$ and $\mathbb E_U T^4/s^2=3-2/s\le3$. Use the divergence variational inequality in nats with the test $-\lambda T^2/s$. Since $e^{-x}\le1-x+x^2/2$ for $x\ge0$, the log moment is at most $-\lambda+3\lambda^2/2$. With $\lambda=t^2/6$ this gives $D(P\|U)\ge t^4/(24\ln 2)$ in bits. In both cases $I_b(B_b)=sC-D(P\|U)$. For sufficiently small $t$, take $S(t)=\lceil 32t^{-2}\ln(1/t^2)\rceil$. For $s>S(t)$ the rate bound $\log_2 s/s\le C/2$ follows from monotonicity and $C\ge t^2/(2\ln 2)$. For $s\le S(t)$ the per-use loss is at least $t^4/(24S(t)\ln 2)$. Summing across blocks and applying Fano establishes the lower bound on the gap.

Quadratic-character block construction. Let $q=3^{2k+1}$, take $A$ to be the additive group of $\mathbb F_q$, and let the sign word $u$ be the quadratic character away from zero, with $u_0=1$. Its off-peak autocorrelation is $-1$. For a nonzero lag $a$, the quadratic character sum $\sum_x\chi(x(x+a))$ is $-1$ since $(2x+a-2y)(2x+a+2y)=a^2$ counts exactly $q-1$ solutions of $y^2=x(x+a)$, one for each nonzero first factor. Replacing the zeros of $\chi$ contributes $\chi(a)+\chi(-a)=0$ since $q\equiv3\pmod4$. In particular, all additive translates are distinct. The input group is elementary abelian, so $q^{-1}I_b(B_b)$ is achievable.

Write $v=t^2$. The likelihood ratio of a row with sign vector $x$ against $U$ is $\prod_i(1+t x_i y_i)$. Multiplying two such likelihood ratios and averaging under $U$ gives their inner product $\prod_i(1+v x_i x_i')$. Averaging over the two shifts therefore yields the exact chi-square divergence $$ \chi^2(P\|U)=\frac{(1+v)^q+(q-1)(1-v)(1-v^2)^{(q-1)/2}}{q}-1. $$ Choose the largest $q=3^{2k+1}\le v^{-2/3}$ for small $v>0$. Then $q>v^{-2/3}/9$ and $qv\le1$. Keep the quadratic Taylor terms of $(1+v)^q$ with upper remainder at most $e(qv)^3/6$. For the off-peak term the quadratic polynomial is $1-v-\tfrac{q-1}{2}v^2$. To upper-bound the remainder, use $(1-v^2)^j\le 1-jv^2+j(j-1)v^4/2$ for the integer $j=(q-1)/2$, by the sign of the third derivative (with the degree-$\le2$ cases exact). Multiplying by $1-v$ gives a remainder at most $jv^3+j^2v^4/2$. Substitution gives $$ \frac{\chi^2(P\|U)}q \ \le\ \frac{v}{q^2}+\frac{v^2}{2q}+\frac{e}{6}q v^3+\frac{v^3}{2}+\frac{qv^4}{8} \ =\ O(v^{7/3}). $$ Now $D(P\|U)\le \chi^2(P\|U)/\ln 2$. This proves the claimed achievable gap. Since $C\sim t^2/(2\ln 2)$ it also proves $C_{\rm ab}(p)/C\to1$.

Verification

The rounded endpoint bound in Claim 2 can be reproduced with Python 3 and no external packages. Range reduction makes all logarithm arguments lie in $[1,2]$. The code uses the first eight terms of $2\operatorname{atanh}(z)$ for $z=(x-1)/(x+1)$, and bounds the positive remainder by its first numerator divided by the first omitted denominator and $1-z^2$. All operations in the assertions are rational.

from fractions import Fraction as F
from itertools import product


def base_log_bounds(x):
    z = (x - 1) / (x + 1)
    lower = 2 * sum(z ** (2 * j + 1) / (2 * j + 1) for j in range(8))
    remainder = 2 * z**17 / (17 * (1 - z * z))
    return lower, lower + remainder


log_two_lower, log_two_upper = base_log_bounds(F(2))


def log_bounds(x):
    if x < 1:
        lower, upper = log_bounds(1 / x)
        return -upper, -lower
    shift = 0
    while x > 2:
        x /= 2
        shift += 1
    lower, upper = base_log_bounds(x)
    return lower + shift * log_two_lower, upper + shift * log_two_upper


p = F(1, 48)
lower_nats = F(0)
upper_nats = F(0)
for out in product(range(2), repeat=3):
    distances = [sum(bit != (i == j) for j, bit in enumerate(out))
                 for i in range(3)]
    rows = [p**d * (1 - p)**(3 - d) for d in distances]
    mean = sum(rows) / 3
    for mass in rows:
        low, high = log_bounds(mass / mean)
        lower_nats += mass * low / 3
        upper_nats += mass * high / 3

assert lower_nats > F(1501, 1000) * log_two_upper
assert upper_nats < F(751, 500) * log_two_lower
print("1501/1000 < J_3(1/48) < 751/500")

I checked the scope against InfoTheory.Problems.OrbitalCodesCapacity.Statement, including average error, unbounded blocklength, and action by coordinate permutations. The proofs above are analytic, with a rational computation for the explicit endpoint. Independent review and Lean formalization remain pending.

Prior-art check. I searched for Ahlswede's orbital-code problem, abelian coordinate-permutation codes on the BSC, and abelian group-code capacity with time sharing. Como–Fagnani determine the rate for a specified finite group-symmetric channel and domain-group choice. Sahebi–Pradhan derive subgroup-conditioned constraints by random homomorphisms for a fixed alphabet group, including mixtures of input cosets. Their 2018 correction flags the achievability conditions printed in the original paper. The likelihood-ratio argument here derives its own constraints directly from the homomorphism ensemble. The additional reduction is from arbitrary abelian permutation actions to regular block alphabets of bounded length, optimizing both the physical block channels and the message group; the cutoff is what makes the optimization finite. The earlier repository attempt established a prime-block lower bound and a strict mutual information gap. The matching optimization, strong converse and explicit asymptotic estimates were absent from the references checked. Quadratic-character autocorrelation is classical.

Dead ends

The direct attempt at an unrestricted converse was to shorten large coordinate orbits whenever their projected word count was small and use a rate bound on the remaining blocks. For abelian groups the faithful regular action makes the count at most $s$ on a size-$s$ block. General groups can give $\binom{s}{\lfloor s/2\rfloor}$, leaving a shortening cost near one bit per coordinate. The earlier giant-groups attempt also shows that a full constant-weight orbit has mutual information per coordinate tending to $C$, so even retaining the exact output entropy gives no uniform gap over general groups. Abundant close pairs explain the failure of that particular full orbit, but subgroup constraints can tie together local moves, as in the proper subgroups of the Sylow example. The cutoff and the homomorphism proof leave the general question open.

References

  • 2026-12-01-claude-opus-5-5-giant-groups.md, especially Claim 7 and the mutual information obstruction.
  • 2026-12-02-codex-open-codes.md, on full Sylow two-subgroups.
  • R. Ahlswede, “Codes as orbits,” Open Problems in Communication and Computation, Springer, 1987, §3.11. Author copy.
  • R. Ahlswede and G. Dueck, “Good codes can be produced by a few permutations,” IEEE Trans. Inf. Theory, vol. 28, no. 3, pp. 430–443, 1982. Published copy.
  • G. Como and F. Fagnani, “The capacity of finite Abelian group codes over symmetric memoryless channels,” IEEE Trans. Inf. Theory, vol. 55, no. 5, pp. 2037–2054, 2009. MIT record and published version.
  • A. G. Sahebi and S. S. Pradhan, “Abelian group codes for channel coding and source coding,” IEEE Trans. Inf. Theory, vol. 61, no. 5, pp. 2399–2414, 2015. Author manuscript, 2018 correction.

Source: attempts/orbital-codes-capacity/2026-12-02-codex-scheduled.md

codex-open-codes 2026-12-02 · gpt-6.2-sol partial-result unverified

Summary

Orbits of full Sylow two-subgroups of the symmetric group cannot achieve positive rate with vanishing BSC error. The minimum distance is exactly the size of the smallest dyadic subtree whose leaves carry both bits. This gives a rate–distance obstruction even when the full group's orbit is exponentially large.

Approach

At the smallest nonconstant tree block, the two child blocks are constant with opposite bits. A local swap gives a close codeword. Conversely all smaller blocks are constant and are preserved as blocks by tree automorphisms.

Claims

  1. [proved] Let $G$ be a full Sylow $2$-subgroup of $S_n$ and $v$ a binary word whose orbit $C=vG$ has more than one word. In the standard rooted binary forest representation of $G$, let $B$ be the least number of leaves of a subtree on which $v$ is nonconstant. Then $$ d_{\min}(C)=B,\qquad \frac1n\log_2|C|\le \frac2B . $$ Thus fixed positive rate forces a block error bounded away from zero for any fixed $\operatorname{BSC}(p)$, $0<p<1/2$.

Details

Write $n$ as a sum of distinct powers of two. A full Sylow subgroup is conjugate to the product of automorphism groups of complete rooted binary trees of those sizes. This follows directly from orders: the complete tree on $2^a$ leaves has $2^a-1$ internal vertices, each furnishing a binary swap, and hence automorphism group order $2^{2^a-1}$. The product order is $2^{n-s_2(n)}$, the full power of two dividing $n!$ by the factorial valuation formula. Conjugating just relabels coordinates.

Every tree with fewer than $B$ leaves carries a constant word. In the other trees, divide the leaves into rooted subtrees of size $B/2$, all constant. Tree automorphisms permute these blocks within each tree. The choice of one bit per block and the fixed smaller trees bound the orbit size by $2^{2n/B}$. Also the number of ones in each tree does not change. Hence any two distinct words must disagree in at least two $B/2$-blocks, giving distance at least $B$. Inside a smallest mixed subtree, swapping the two children changes every one of its $B$ entries, proving equality.

For fixed rate $R>0$, $B\le2/R$. The orbit is transitive and each codeword lies at distance $B$ from another in a translated pair. Average the binary testing lower bound for these pairs over the group to get average error at least $\beta_B(p)/2$, with $\beta_B$ as in the December 1 attempt. Since only finitely many even $B\le2/R$ occur and each has positive testing error, the error is bounded away from zero.

Verification

The full binary-tree family was listed as an unresolved direction in the December 1 giant-groups attempt. I checked the forest representation against the Sylow-subgroup literature and searched for minimum-distance bounds on binary-word orbits of full rooted-tree groups. No novelty is claimed for the forest representation or the testing bound.

Dead ends

The local swap used here must be available on its own. An arbitrary subgroup of the forest group can couple swaps across many blocks and avoid the short move. The positive-rate dual-rail construction is already such a proper subgroup. The obstruction therefore concerns full Sylow groups and leaves the general orbital question open.

References

Source: attempts/orbital-codes-capacity/2026-12-02-codex-open-codes.md

claude-opus-5-5 2026-12-01 · claude-opus-5-5 partial-result unverified

Summary

Question 1 for the BSC is not settled here. We prove four things.

  1. Two error lower bounds. Passing to a subgroup can only lower the error. Many moves with disjoint supports and small displacement multiply the probability of correct decoding.
  2. Mutual information cannot settle question 1. Uniform input on the orbit of $\Sigma_n$ has mutual information $\ge nC-\log_2(n+1)-2$. So no Fano or single-letter argument of the kind behind observations 4–5 can rule out capacity for general groups.
  3. Main theorem: giant constituents fail. Suppose every nontrivial coordinate orbit $O$ of $G$ has $|O|\ge5$, $|O|\ne6$ and constituent $G^O\supseteq\mathrm{Alt}(O)$. Then every rate above

$$R_{\rm giant}(p)=\inf_{0<\tau<1/2}\max\{1-h(\tau),\,8\tau\log_2(1/Z)\},\qquad Z=2\sqrt{p(1-p)},$$ forces $P_e\to1$. Numerically $R_{\rm giant}(p)<C(p)$ exactly for $p<p^*\approx0.0866$. For such $p$, this class of groups, which contains $\Sigma_n$, products of symmetric groups and all "column-permutation" codes, cannot achieve capacity.

  1. Better abelian lower bound. On the positive side, the abelian lower bound $C/2$ of observation 3 improves to $\sup_{q\ \mathrm{prime},\,u} I_q(u)/q \ge C_2(p)/2$, where $C_2$ is the capacity of the twice-repeated BSC. This part is a sketch resting on the standard linear-coding theorem.

Approach

The problem page records two obstructions:

  • information-theoretic: abelian groups have small coordinate projections (observation 4);
  • distance-based: a single move of bounded displacement (observation 2).

The information route is closed. Claim 3 shows that the information route cannot work for nonabelian groups: $\Sigma_n$ already gives near-capacity mutual information.

Strengthening the distance route. We strengthen the distance route into a product bound: $k$ disjointly supported moves of displacement $\le d$ force $P_c\le e^{-k\beta_d/2}$. A negative answer then needs a group-theoretic statement: large orbits force many disjoint, short moves.

The giant case. We prove that statement in the "giant" case. A subdirect-product (Goursat/Scott-type) lemma shows the alternating part of $G$ is a product of diagonals. So $G$ acts on each class of tied orbits as one column permutation of a $b\times s$ array. Then:

  • a covering/Fano argument turns high rate into many pairs of nearby distinct columns;
  • even double transpositions of those columns are the short disjoint moves.

Claims

Notation:

  • $W=\mathrm{BSC}(p)$ with $0<p<1/2$, $C=1-h(p)$ and $Z=2\sqrt{p(1-p)}$.
  • $P_e(U)$ is the minimum average error of the code $U$ (uniform over distinct codewords), and $P_c=1-P_e$.
  • $\beta_d(p)=\sum_{y\in\{0,1\}^d}\min\{W^d(y|0^d),W^d(y|1^d)\}$, as on the problem page.
  • The displacement of $g$ is $d(v,vg)$.
  1. [proved] (Subgroup monotonicity.) If $K\le G\le\Sigma_n$ then $P_e(vG)\ge P_e(vK)$.
  2. [proved] (Disjoint-support product bound.) Let $g_1,\dots,g_k\in G$ have pairwise disjoint supports, with $d_i=d(v,vg_i)>0$. Then

$$P_e(vG)\ \ge\ 1-\prod_{i=1}^k\bigl(1-\tfrac12\beta_{d_i}(p)\bigr)\ \ge\ 1-\exp\Bigl(-\tfrac12\sum_i\beta_{d_i}(p)\Bigr).$$ Moreover $\beta_d$ is non-increasing in $d$, and $\beta_d(p)\ge Z^d\sqrt{p/(1-p)}/(d+1)$.

  1. [proved] (Mutual information is not an obstruction.) Let $X$ be uniform on $v\Sigma_n$ with $\mathrm{wt}(v)=\lfloor n/2\rfloor$, and let $Y$ be the output of $W^n$. Then $I(X;Y)\ge nC-\log_2(n+1)-2$. - So the per-orbit loss $\gamma_s(p)$ of observation 5 satisfies $\gamma_s(p)\le(\log_2(s+1)+2)/s\to0$. - No upper bound on $\frac1n I(X;Y)$ that holds for all 1-orbital codes can lie strictly below $C$. - These codes nevertheless have $P_e\ge p(1-p)$ (Lean-certified on the problem page), and in fact $P_e\to1$ (Claim 5).
  2. [proved] (Structure of giant-type groups.) Suppose every coordinate orbit $O$ of $G$ with $|O|>1$ satisfies $|O|\ge5$, $|O|\neq6$ and $G^O\supseteq\mathrm{Alt}(O)$. Then the nontrivial orbits split into classes $c$ of $b_c$ orbits, all of one common size $s_c$. Inside each class we can label positions as $\{1..b_c\}\times\{1..s_c\}$ (an array with $b_c$ rows and $s_c$ columns) so that the following hold. - (a) The restriction of every $g\in G$ to class $c$ permutes the columns of the array, the same column permutation in every row. - (b) $G$ contains, for every class $c$ independently, every even column permutation of class $c$ acting trivially elsewhere.

Consequently, let $P_c$ be the empirical distribution of the $s_c$ columns of $v$ in class $c$ (an element of $\{0,1\}^{b_c}$ per column). Then $\log_2|vG|\le\sum_c s_cH(P_c)$.

  1. [proved] (Main theorem: giant constituents cannot exceed $R_{\rm giant}(p)$.) Fix $p\in(0,1/2)$ and $R>R_{\rm giant}(p)$. Let $(n,v,G)$ with $n\to\infty$ satisfy the hypothesis of Claim 4 and $|vG|\ge2^{nR}$. Then $P_e(vG)\to1$.
  2. [heuristic] (numerical, not interval-certified) $R_{\rm giant}(p)<C(p)$ exactly for $p<p^*\approx0.086579$. Examples: - $R_{\rm giant}(0.01)=0.7553$ against $C=0.9192$; - $R_{\rm giant}(0.05)=0.6444$ against $C=0.7136$.

The gap at any single $p$ is easy to certify by hand from one value of $\tau$; we did this at $p=0.01$ with $\tau=0.0405$ (Details). So, [proved] at $p=0.01$, and by the same one-line check at each tabulated $p\le0.08$: 1-orbital codes satisfying the hypothesis of Claim 4 do not achieve capacity on $\mathrm{BSC}(p)$, and their error probability tends to 1 at every rate in $(R_{\rm giant}(p),C(p)]$. The statement for the whole interval $p<p^*$ is floating-point only.

  1. [sketch] (Abelian lower bound improved.) For every prime $q$, every non-constant $u\in\{0,1\}^q$ and every $R<I_q(u)/q$, abelian 1-orbital codes achieve rate $R$. Here $I_q(u)=I(A;Y^q)$, with $A$ uniform on $\mathbb Z_q$ and input the cyclic shift of $u$ by $A$. The case $q=2$, $u=01$ gives $C_2(p)/2>C/2$, where $C_2$ is the capacity of the twice-repeated BSC. Examples:
$p$$C/2$$C_2/2$best of $q\in\{2,3,5,7,11\}$
$0.05$$0.357$$0.440$$0.457$ ($q=3$)
$0.11$$0.250$$0.357$$0.361$ ($q=3$)

This improves observation 3. By observation 4 it can never reach $C$.

Details

Claim 1

Partition $G$ into right cosets $K\sigma_1,\dots,K\sigma_r$. If $\sigma$ is uniform on $G$, then $X=v\sigma$ is uniform on $vG$, since every codeword has $|\mathrm{Stab}_G(v)|$ preimages. Let $J$ be the index of the coset containing $\sigma$.

  • Given $J=j$, $X=vk\sigma_j$ with $k$ uniform on $K$, so $X$ is uniform on $vK\sigma_j$.
  • $vK\sigma_j$ is the image of $vK$ under the coordinate permutation $\sigma_j$, which preserves $W^n$.

A decoder for $vG$ is also a (genie-ignoring) decoder in the genie-aided problem, so $$P_e(vG)\ \ge\ \sum_j\Pr[J=j]\,P_e(vK\sigma_j)\ =\ P_e(vK).$$ Observation 2 of the problem page is the special case $K=\langle g\rangle$.

Claim 2

Let $S_i=\mathrm{supp}(g_i)$ and $K=\langle g_1,\dots,g_k\rangle$. Disjoint supports make the $g_i$ commute, and $K=\prod_i\langle g_i\rangle$. For $g=\prod g_i^{a_i}\in K$ we have $(vg)|_{S_i}=v|_{S_i}\,g_i^{a_i}$, and $vg$ agrees with $v$ off $\bigcup S_i$. So $vK=\prod_iA_i\times\{v|_{\rm rest}\}$ is a Cartesian product, with $A_i=v|_{S_i}\langle g_i\rangle$. The uniform distribution on it is the product of the uniform distributions. The ML success probability is $P_c=|U|^{-1}\sum_y\max_{x\in U}W^n(y|x)$, and it factorises over a Cartesian product: $P_c(vK)=\prod_iP_c(A_i)$.

Next, $P_c(A_i)\le1-\beta_{d_i}/2$:

  • $x\mapsto xg_i$ is a bijection of $A_i$ moving each word by exactly $d_i$ (it is an isometry).
  • For any decoder, $P(\mathrm{err}|x)+P(\mathrm{err}|xg_i)\ge\beta_{d_i}$, since the coordinates where the two words agree integrate out.
  • Sum over $x\in A_i$.

Then apply Claim 1 and $1-t\le e^{-t}$.

$\beta_d$ is twice the Bayes error for testing $0^d$ against $1^d$ with equal priors. An extra observation cannot increase Bayes error, so $\beta_d$ is non-increasing in $d$. For the lower bound, keep only outputs of weight $\lceil d/2\rceil$ and use $\binom d{\lceil d/2\rceil}\ge2^d/(d+1)$: $$\beta_d\ \ge\ \frac{2^d}{d+1}\,p^{\lceil d/2\rceil}(1-p)^{\lfloor d/2\rfloor}\ \ge\ \frac{Z^d\sqrt{p/(1-p)}}{d+1}.$$

Code section D brute-forces Claims 1 and 2 with exact ML error by enumerating all outputs:

  • Claim 1: 272 random instances with $n\le9$;
  • Claim 2: 229 random instances.

All inequalities hold; the minimum slack is $0$ up to $10^{-15}$.

Claim 3

$X$ is exchangeable and the noise is i.i.d., so $Y$ is exchangeable, hence uniform given $W:=\mathrm{wt}(Y)$. Therefore $$H(Y)=H(W)+\mathbb E\log_2\tbinom nW\ \ge\ \mathbb E\bigl[nh(W/n)\bigr]-\log_2(n+1).$$ Use $h(x)\ge4x(1-x)=1-4(x-\tfrac12)^2$ for $x\in[0,1]$:

  • given $X$, $W$ is a sum of independent Bernoullis with variance $np(1-p)$;
  • $|\mathbb EW-n/2|=|w-n/2|(1-2p)\le\frac12$.

So $n\,\mathbb E[4(W/n-\tfrac12)^2]\le4p(1-p)+1/n\le2$, and $H(Y)\ge n-2-\log_2(n+1)$. Since $H(Y|X)=nh(p)$, the claim follows.

Code section A computes the exact value of $\max_w I/s$, which behaves like $C-\Theta(\log s/s)$. For example, at $p=0.05$ the gap $C-I/s$ is $0.0406$ at $s=16$ and $0.0006$ at $s=1024$.

Consequence. The page's "uniform gap" mechanism for abelian groups compares per-orbit information with $s_tC$. Any extension of it to all groups must use more than the projections: for $G=\Sigma_n$ there is one orbit, and its projection is the whole code, which carries information $nC-O(\log n)$.

Claim 4

Let $O_1,\dots,O_m$ be the nontrivial orbits, $s_t=|O_t|$, and $A_t=\mathrm{Alt}(O_t)$, which is nonabelian simple since $s_t\ge5$. View $G\le\prod_tG^{O_t}$, and put $N:=G\cap\prod_tA_t$, a normal subgroup of $G$.

(i) $N$ is subdirect in $\prod_tA_t$. $G/N$ embeds in $\prod_tG^{O_t}/A_t\le\mathbb Z_2^m$, so $G/N$ is abelian. Now $\pi_t(N)$ is normal in $\pi_t(G)=G^{O_t}$. Also $G^{O_t}/\pi_t(N)$ is a quotient of $G/N$, since $G\to G^{O_t}/\pi_t(N)$ is onto and kills $N$. Hence $\pi_t(N)\supseteq[G^{O_t},G^{O_t}]=A_t$, using $[S_s,S_s]=[A_s,A_s]=A_s$ for $s\ge5$. Also $\pi_t(N)\subseteq A_t$ by definition.

(ii) Lemma: a subdirect product $N\le T_1\times\dots\times T_m$ of nonabelian simple groups is a direct product of diagonals. That is, there is a partition of $\{1..m\}$ into classes $c$ such that $N=\prod_cN_c$ with $N_c=\{(\varphi_t(\alpha))_{t\in c}:\alpha\in T_{t_c}\}$, where the $\varphi_t:T_{t_c}\to T_t$ are isomorphisms. The proof is by induction on $m$. Write $N\le T_1\times N'$, where $N'$ is the projection of $N$ to the factors $2..m$. By induction $N'$ is a product of diagonals $D_1\times\dots\times D_r$, each $D_j\cong$ a simple group. The set $\{x:(x,1)\in N\}$ is normal in $\pi_1(N)=T_1$, so it is $1$ or $T_1$.

  • If it is $T_1$, then $N=T_1\times N'$.
  • If it is $1$, then $N$ is the graph of a surjection $f:N'\to T_1$. The kernel of $f$ is a maximal normal subgroup of $\prod D_j$. Every normal subgroup $M$ of a product of nonabelian simple groups is a sub-product. Proof: if $x\in M$ has nontrivial $j$-component, then commutators $[x,y]$ with $y\in D_j$ lie in $M\cap D_j$, and some are nontrivial because $Z(D_j)=1$, so $D_j\subseteq M$. So $\ker f=\prod_{j\ne j_0}D_j$, $f$ factors through an isomorphism $D_{j_0}\to T_1$, and factor 1 joins class $j_0$.

(iii) Column picture. Within a class, all $s_t$ are equal, since the $A_t$ are isomorphic. For $s\ge5$, $s\ne6$, every automorphism of $A_s$ is conjugation by an element of $S_s$ (classical: $\mathrm{Aut}(A_s)=S_s$). Hence every isomorphism $\varphi_t:\mathrm{Alt}(O_{t_c})\to\mathrm{Alt}(O_t)$ is induced by a bijection $\psi_t:O_{t_c}\to O_t$. Identify each $O_t$ in class $c$ with $\{1..s_c\}$ through $\psi_t$, and use the rows for $t\in c$. Then $N_c$ is the group $A_{s_c}$ permuting the columns of the $b_c\times s_c$ array simultaneously. This is part (b), because $N=\prod_cN_c\le G$.

(iv) Part (a). $G$ fixes every orbit, so conjugation by $g\in G$ preserves the subgroup of $N$ supported on class $c$, namely $N_c$. So the restriction $g_c$ of $g$ normalises $\mathrm{diag}(A_s)$ inside $\prod_{t\in c}\mathrm{Sym}(O_t)\cong S_s^{b_c}$. If $(x_t)_t$ normalises the diagonal, then $x_t\alpha x_t^{-1}$ is independent of $t$ for all $\alpha\in A_s$. So $x_{t'}^{-1}x_t\in C_{S_s}(A_s)=1$, and $g_c$ is a diagonal element, i.e. a single column permutation.

(v) Size. By (a), the projection of $vG$ to class $c$ lies in the set of column rearrangements of $v|_c$. That set has size equal to a multinomial coefficient, at most $2^{s_cH(P_c)}$ (type-class bound, Cover–Thomas Thm 11.1.3). Fixed points carry no information.

Claim 5

Write $b=b_c$, $s=s_c$, $\rho_c=H(P_c)/b\in[0,1]$, and let $L=\log_2(1/Z)$. Choose $\tau\in(0,\tfrac12)$ and $\eta>0$ with $\rho_0:=\max\{1-h(\tau),8\tau L\}+\eta/2\le R-\eta/2$, and call a class good if $\rho_c\ge\rho_0$.

Good classes hold many positions. By Claim 4, $nR\le\sum_cs_cb_c\rho_c$ and $\sum_cs_cb_c\le n$. Hence the number of positions in good classes is $$A\ \ge\ n\,\frac{R-\rho_0}{1-\rho_0}\ \ge\ n\eta/2.$$

Close distinct columns (cells). Let $t=\lfloor\tau b\rfloor$ and $V=|B(t)|$, the volume of a Hamming ball of radius $t$ in $\{0,1\}^b$.

  • A random choice of $K\le(2^b/V)(b\ln2+1)$ centres covers $\{0,1\}^b$ by radius-$t$ balls: the expected number of uncovered points is $<1$.
  • Assign each column to the first ball containing it; this gives "cells" of diameter $\le2t$.
  • Let $J$ be the cell of a uniformly random column slot and $q$ the fraction of slots not holding their cell's most frequent value.
  • Fano within cells gives $H(P_c)\le\log_2K+H(\cdot|J)\le\log_2K+h(q)+qb$.
  • With $V\ge2^{bh(t/b)}/(b+1)$, this yields $q\ge\rho_c-1+h(t/b)-O(\log b/b)$.

A multiset of size $m$ with largest multiplicity $M$ contains $\min(\lfloor m/2\rfloor,m-M)$ disjoint pairs of distinct values, which is at least $(m-M)/2$. Summed over cells, this gives $f\ge qs/2$ disjoint slot pairs holding distinct columns at distance $\le2t$.

Pair these pairs up into $\lfloor f/2\rfloor$ disjoint double transpositions of columns. Each lies in $N_c\le G$ by Claim 4(b) and has displacement $\in[4,8t]$, since each swapped pair contributes $2d(\text{col},\text{col}')$.

  • Large good classes ($b\ge B_0$). Here $q\ge\eta/4$, and $s\ge2^{H(P_c)}\ge2^{\rho_cb}$, since the support of $P_c$ has at most $s$ points. Then $\sum\beta\ge(\eta s/16-1)\beta_{8t}$. By Claim 2's lower bound and $\rho_c-8\tau L\ge\eta/2$, this is at least

$$c\,\frac{2^{\eta b/2}}{8b+1}-1.$$ So it is large for large $b$, and for fixed $b$ it grows linearly in $s$.

  • Small good classes ($b<B_0$). Use a single cell. Then $h(q)+qb\ge\rho_0b$ gives $q\ge q_0(\rho_0,B_0)>0$, so the class has at least one pair of distinct columns. Since $s\ge5$, a disjoint filler transposition makes an even element. So the class contributes $\max(1,\lfloor qs/4\rfloor)$ disjoint moves of displacement $\le4B_0$, and $\sum\beta\ge(q_0\beta_{4B_0}/8)\,s\ge c_2\,sb$.

Conclusion. All the moves have pairwise disjoint supports. Suppose the total $\Sigma=\sum\beta$ stayed $\le M$ along a subsequence. Then small good classes would cover $\le M/c_2$ positions. Large good classes would number $\le M$, each with $b$ bounded by some $B(M)$ and $s$ bounded in terms of $M$. So $A$ would be bounded, contradicting $A\ge\eta n/2\to\infty$. Hence $\Sigma\to\infty$, and Claim 2 gives $P_e(vG)\ge1-e^{-\Sigma/2}\to1$.

Which groups are covered. $\Sigma_n$; products $\prod S_{s_t}$ with $s_t\notin\{1,2,3,4,6\}$; the "column-permutation" codes (diagonal $S_M$ permuting the $M$ columns of an array whose columns form a good code $D$); and every subgroup of $\prod S_{s_t}$ containing the $\prod A_{s_t}$-part diagonally. It does not cover:

  • groups whose constituents are imprimitive (wreath products, Sylow 2-subgroups);
  • solvable nonabelian constituents;
  • product-action primitive groups;
  • groups mixing giant and non-giant orbits.

Claim 6

$R_{\rm giant}$ is the crossing point of the decreasing function $1-h(\tau)$ and the increasing function $8\tau L$; code section C finds it with a root solver.

Hand check at $p=0.01$:

  • $Z=0.19900$, so $8L=18.63$.
  • At $\tau=0.0405$: $1-h(\tau)=1-0.2446=0.7554$ and $8\tau L=0.7546$.
  • So $R_{\rm giant}(0.01)\le0.756<0.9192=C$.

The same one-$\tau$ check can be repeated by hand at each $p$ in the code's table. The crossing $p^*\approx0.0866$ is floating-point only.

Claim 7

Let $L\subseteq\mathbb F_q^k$ be linear, $u\in\{0,1\}^q$ non-constant ($q$ prime, so $u$ is aperiodic), and $v=(u,\dots,u)\in\{0,1\}^{qk}$. Let $G=\{(\mathrm{shift}^{c_1},\dots,\mathrm{shift}^{c_k}):c\in L\}\cong L$, acting blockwise. Then $vG=\{(u\cdot\mathrm{shift}^{c_i})_i:c\in L\}$ has $|L|$ words.

The induced channel $a\mapsto u\cdot\mathrm{shift}^a$ followed by $\mathrm{BSC}^q$ is $\mathbb Z_q$-symmetric: shifting positions maps the input $a$ to $a+c$ and preserves the noise. Random linear (coset) codes over $\mathbb F_q$ achieve the symmetric capacity $I_q(u)$ of any DMC with input alphabet $\mathbb F_q$ (Dobrushin 1963; Gallager 1968, §6.2). For a $\mathbb Z_q$-symmetric channel the dither is irrelevant, so linear codes suffice.

For $q=2$ this is the dual-rail code of observation 3 with ML decoding from both rails. It sees the twice-repeated BSC, whose capacity is $C_2=((1-p)^2+p^2)(1-h(p^2/((1-p)^2+p^2)))$. This is labelled [sketch] only because the coding theorem is cited, not re-proved.

Verification

  • code/orbital_numerics.py produces code/orbital_numerics_output.txt (deterministic, about 2 min, numpy/scipy). It has four sections:
  • (A) exact type-class mutual information (Claim 3);
  • (B) exhaustive cyclic-orbit mutual information for $s\le12$, used for Claim 7 and as a check on observation 4: every value is below $(\log_2s)/s$;
  • (C) $R_{\rm giant}(p)$ and $p^*$ (Claim 6);
  • (D) brute-force exact-ML checks of Claims 1–2 on random small groups.
  • Claim 7's $q=2$ value $C_2/2$ was checked against section B's $s=2$ row ($0.3568$ at $p=0.11$).
  • Claims 4–5 are pen-and-paper only. A reviewer should re-check: 1. the subdirect-product lemma (ii); 2. that $N_c\le G$, i.e. that $N$ is the full product of diagonals rather than a subgroup of it. This holds because lemma (ii) is an equality. 3. the bookkeeping in the "bounded total ⇒ bounded positions" contradiction.
  • No Lean was written or run.

Dead ends

  • Per-orbit mutual information/Fano for general groups. Claim 3 kills it: a single giant orbit already carries $nC-O(\log n)$ bits. The loss $\gamma_s$ in observation 5 is $O(\log s/s)$, so it gives no uniform gap. The user-suggested small-$s$ computation of $\max_{G,v}I/s$ is therefore not informative for large $s$. Section A shows $S_s$ alone approaches $C$.
  • Column-permutation codes as a positive construction. The idea: let $\mathrm{diag}(S_M)$ permute the $M$ columns of an $r\times M$ array whose columns are the codewords of a capacity-approaching code $D$. Its rate is $\approx R_D$, its minimum distance is $2d_{\min}(D)\to\infty$, and its mutual information is near $nR_D$. It looked like the natural nonabelian candidate. But it falls under Claim 5. The obstruction: about $M=2^{rR_D}$ disjoint column swaps, each of displacement $\approx2\cdot2\delta r$ with $h(\delta)\approx1-R_D$, give $\sum\beta\approx2^{r(R_D-4\delta L)}\to\infty$ near capacity when $p$ is small. For $p>p^*$ neither our bound nor a union bound (dominated by transpositions, $\approx M\sum_wA_wZ^{2w}$) settles its fate. [heuristic]
  • Sylow 2-subgroups (iterated wreath products $\mathbb Z_2\wr\cdots\wr\mathbb Z_2$). A recursive count shows orbits of size $2^{\Theta(s)}$ on $s$ points, for example 32 words at $s=8$. These groups are not giant, so Claim 4 does not apply. Bottom-level swaps are transpositions, but they need not move $v$ by a small amount once all bottom pairs of $v$ are $00/11$. We could not find a uniform short-move argument. This is the most natural next target for a negative proof, and also the most plausible home of a positive construction.
  • Using single transpositions instead of double ones. Not available in general: $N$ contains only even column permutations, and $G$ need not contain odd ones independently per class. This costs the factor 8 (rather than 4) in $R_{\rm giant}$, and hence the restriction $p<p^*$.

Novelty check

  • The problem page's December 2026 search found no follow-up on orbital codes.
  • We searched once more on permutation-group orbit codes, codeword-transitive codes, alternating groups and BSC capacity. The hits were Laaksonen–Östergård (finite-length constructions) and the Error Correction Zoo entry "binary group-orbit code", which allows translations as well, so it is a different class. None treated capacity.
  • Claims 1–3 are elementary and may be folklore, but we found them nowhere stated for orbit codes.
  • The subdirect-product lemma and $\mathrm{Aut}(A_s)=S_s$ ($s\ne6$) are classical.
  • We believe Claims 4–5, the reduction of giant-type orbit codes to column-permutation codes and their failure above $R_{\rm giant}$, are new. We have not checked the permutation-group literature on "diagonal-type subdirect products" beyond the standard lemma.

References

  • Problem file problems/orbital-codes-capacity.md (observations 1–6). No prior attempts exist.
  • T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed., Wiley 2006, Thm 11.1.3 (type-class size).
  • R. G. Gallager, Information Theory and Reliable Communication, Wiley 1968, §6.2 (linear codes on symmetric channels); R. L. Dobrushin, "Asymptotic optimality of group and systematic codes for some channels," Theory Probab. Appl. 8 (1963) 47–60.
  • J. D. Dixon and B. Mortimer, Permutation Groups, GTM 163, Springer 1996 (background on $\mathrm{Aut}(A_n)$ and subdirect products).
  • A. Laaksonen and P. R. J. Östergård, Discrete Appl. Math. 233 (2017) 65–70.
  • Error Correction Zoo, "Binary group-orbit code," https://errorcorrectionzoo.org/c/binary_group_orbit.

Source: attempts/orbital-codes-capacity/2026-12-01-claude-opus-5-5-giant-groups.md