Open Proof Network

Problems / erdos-257 / variant-f93b89d8

union of the powers of two bases 2 ≤ a < b

variant-f93b89d8

proved

Restated as hole h_two_bases of erdos-257 (split by 20261023T133841Z-t1023-f1-partial.lean).

$\displaystyle \forall\, a, b \in \mathbb{N},\quad 2 \le a < b \;\Longrightarrow\; \sum_{n \in \{a^k : k \in \mathbb{N}\} \cup \{b^k : k \in \mathbb{N}\}} \frac{1}{2^n - 1} \notin \mathbb{Q}.$

The sum is over the set of all powers of $a$ and of $b$, including $1 = a^0 = b^0$, counted once, as the sum is over a set; every element is at least $1$, so no term meets Lean's junk value at $n = 0$. The bases need not be coprime or multiplicatively independent.

unverified · history

Lean
theorem Opn.erdos_257_powers_of_two_bases :
    ∀ a b : ℕ, 2 ≤ a → a < b →
    Irrational (∑' n : ({n | ∃ k : ℕ, n = a ^ k} ∪ {n | ∃ k : ℕ, n = b ^ k} : Set ℕ),
      (1 : ℝ) / (2 ^ n.1 - 1)) := by
  sorry
Why does it end in sorry?

A statement is written := by sorry: the sorry holds the place of a proof, because a statement file only says what is claimed. A proof the gate checked is its own file, Proof.lean. How to read a proof page →

How it was proved

Proved by Proof.lean, checked by the kernel. Its attestation, 000938, records the gate’s run.

The proof step by step (outline)

Checked by the kernel — an outline of the attested proof below: attestations/000938.json, merge commit 34b54a68ddc1.

Outline of Proof.lean, extracted by the gate at 1bd7ca70c9ee from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.

  1. hinf have A.Infinite

    Leaves Irrational (∑' (n : (↑A : Type)), (1 : ℝ) / ((2 : ℝ) ^ (↑n : ℕ) - (1 : ℝ))), with hinf : A.Infinite.

    Uses library Set.Infinite.mono, Set.subset_union_left, Set.infinite_range_of_injective, Nat.pow_right_injective.

    Lean, lines 279–284
      have hinf : A.Infinite := by
        apply Set.Infinite.mono Set.subset_union_left
        have : {n | ∃ k : ℕ, n = a ^ k} = Set.range (fun k : ℕ => a ^ k) := by
          ext n; simp [eq_comm]
        rw [this]
        exact Set.infinite_range_of_injective (Nat.pow_right_injective ha)

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 279–284 at 34b54a68ddc1 ↗

    1. hinf.this have {n : ℕ | ∃ (k : ℕ), n = a ^ k} = Set.range fun (k : ℕ) => a ^ k

      Leaves {n : ℕ | ∃ (k : ℕ), n = a ^ k}.Infinite, with this : {n : ℕ | ∃ (k : ℕ), n = a ^ k} = Set.range fun (k : ℕ) => a ^ k.

      Uses library Set.range Range of a function. , eq_comm.

      Lean, lines 281–282
          have : {n | ∃ k : ℕ, n = a ^ k} = Set.range (fun k : ℕ => a ^ k) := by
            ext n; simp [eq_comm]

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 281–282 at 34b54a68ddc1 ↗

  2. h0 have (0 : ℕ) ∉ A

    Leaves Irrational (∑' (n : (↑A : Type)), (1 : ℝ) / ((2 : ℝ) ^ (↑n : ℕ) - (1 : ℝ))), with h0 : (0 : ℕ) ∉ A.

    Lean, lines 285–288
      have h0 : 0 ∉ A := by
        rintro (⟨k, hk⟩ | ⟨k, hk⟩)
        · exact absurd hk (pow_ne_zero k (by omega)).symm
        · exact absurd hk (pow_ne_zero k (by omega)).symm

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 285–288 at 34b54a68ddc1 ↗

    1. h0.s1 case

      Leaves False, with k : ℕ, hk : (0 : ℕ) = a ^ k.

      Uses library absurd Anything follows from two contradictory hypotheses. , pow_ne_zero.

      Lean, line 287
          · exact absurd hk (pow_ne_zero k (by omega)).symm

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 287 at 34b54a68ddc1 ↗

    2. h0.s2 case

      Leaves False, with k : ℕ, hk : (0 : ℕ) = b ^ k.

      Uses library absurd Anything follows from two contradictory hypotheses. , pow_ne_zero.

      Lean, line 288
          · exact absurd hk (pow_ne_zero k (by omega)).symm

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 288 at 34b54a68ddc1 ↗

  3. s3 obtain ∃ (J : ℕ) (K : ℕ), C + a ^ J + b ^ K ≤ a ^ (J + (1 : ℕ)) ∧ C + a ^ J + b ^ K ≤ b ^ (K + (1 : ℕ))

    Leaves ∃ m ∈ A, ∃ (L : ℕ), (0 : ℕ) < L ∧ (∀ a ∈ A, a < m → (2 : ℕ) ^ a - (1 : ℕ) ∣ L) ∧ (2 : ℕ) ^ C * L ≤ (2 : ℕ) ^ m, with J : ℕ, K : ℕ, hk1 : C + a ^ J + b ^ K ≤ a ^ (J + (1 : ℕ)), hk2 : C + a ^ J + b ^ K ≤ b ^ (K + (1 : ℕ)).

    Lean, line 291
      obtain ⟨J, K, hk1, hk2⟩ := gen_good a b C ha hab

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 291 at 34b54a68ddc1 ↗

  4. s4 case

    Leaves min (a ^ (J + (1 : ℕ))) (b ^ (K + (1 : ℕ))) ∈ A.

    Uses library min_choice.

    Lean, lines 293–295
      · rcases min_choice (a ^ (J + 1)) (b ^ (K + 1)) with h | h <;> rw [h]
        · exact Or.inl ⟨J + 1, rfl⟩
        · exact Or.inr ⟨K + 1, rfl⟩

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 293–295 at 34b54a68ddc1 ↗

    1. s4.s1 case

      Leaves a ^ (J + (1 : ℕ)) ∈ A.

      Uses library Or.inl Or.inl is "left injection" into an Or. , Exists.intro Existential introduction. , rfl rfl : a = a is the unique constructor of the equality type. .

      Lean, line 294
          · exact Or.inl ⟨J + 1, rfl⟩

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 294 at 34b54a68ddc1 ↗

    2. s4.s2 case

      Leaves b ^ (K + (1 : ℕ)) ∈ A.

      Uses library Or.inr Or.inr is "right injection" into an Or. , Exists.intro Existential introduction. , rfl rfl : a = a is the unique constructor of the equality type. .

      Lean, line 295
          · exact Or.inr ⟨K + 1, rfl⟩

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 295 at 34b54a68ddc1 ↗

  5. s5 case

    Leaves (0 : ℕ) < ((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ)).

    Uses library Nat.mul_pos.

    Lean, lines 296–298
      · apply Nat.mul_pos
        · have := Nat.one_lt_two_pow (pow_ne_zero J (by omega : a ≠ 0)); omega
        · have := Nat.one_lt_two_pow (pow_ne_zero K (by omega : b ≠ 0)); omega

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 296–298 at 34b54a68ddc1 ↗

    1. s5.s1 case

      Leaves (0 : ℕ) < (2 : ℕ) ^ a ^ J - (1 : ℕ).

      Lean, line 297
          · have := Nat.one_lt_two_pow (pow_ne_zero J (by omega : a ≠ 0)); omega

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 297 at 34b54a68ddc1 ↗

      1. s5.s1.this have (1 : ℕ) < (2 : ℕ) ^ a ^ J

        Leaves (0 : ℕ) < (2 : ℕ) ^ a ^ J - (1 : ℕ), with this : (1 : ℕ) < (2 : ℕ) ^ a ^ J.

        Uses library Nat.one_lt_two_pow, pow_ne_zero.

        Lean, line 297
            · have := Nat.one_lt_two_pow (pow_ne_zero J (by omega : a ≠ 0)); omega

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 297 at 34b54a68ddc1 ↗

    2. s5.s2 case

      Leaves (0 : ℕ) < (2 : ℕ) ^ b ^ K - (1 : ℕ).

      Lean, line 298
          · have := Nat.one_lt_two_pow (pow_ne_zero K (by omega : b ≠ 0)); omega

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 298 at 34b54a68ddc1 ↗

      1. s5.s2.this have (1 : ℕ) < (2 : ℕ) ^ b ^ K

        Leaves (0 : ℕ) < (2 : ℕ) ^ b ^ K - (1 : ℕ), with this : (1 : ℕ) < (2 : ℕ) ^ b ^ K.

        Uses library Nat.one_lt_two_pow, pow_ne_zero.

        Lean, line 298
            · have := Nat.one_lt_two_pow (pow_ne_zero K (by omega : b ≠ 0)); omega

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 298 at 34b54a68ddc1 ↗

  6. s6 case

    Leaves ∀ a_1 ∈ A, a_1 < min (a ^ (J + (1 : ℕ))) (b ^ (K + (1 : ℕ))) → (2 : ℕ) ^ a_1 - (1 : ℕ) ∣ ((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ)).

    Lean, lines 299–309
      · rintro x (⟨i, rfl⟩ | ⟨i, rfl⟩) ham
        · apply Dvd.dvd.mul_right
          apply Nat.pow_sub_one_dvd_pow_sub_one 2
          have : a ^ i < a ^ (J + 1) := lt_of_lt_of_le ham (min_le_left _ _)
          have := (Nat.pow_lt_pow_iff_right (by omega : 1 < a)).1 this
          exact Nat.pow_dvd_pow a (by omega)
        · apply Dvd.dvd.mul_left
          apply Nat.pow_sub_one_dvd_pow_sub_one 2
          have : b ^ i < b ^ (K + 1) := lt_of_lt_of_le ham (min_le_right _ _)
          have := (Nat.pow_lt_pow_iff_right (by omega : 1 < b)).1 this
          exact Nat.pow_dvd_pow b (by omega)

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 299–309 at 34b54a68ddc1 ↗

    1. s6.s1 case

      Leaves (2 : ℕ) ^ a ^ i - (1 : ℕ) ∣ ((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ)), with i : ℕ, ham : a ^ i < min (a ^ (J + (1 : ℕ))) (b ^ (K + (1 : ℕ))).

      Uses library Dvd.dvd.mul_right Alias of dvd_mul_of_dvd_left. , Nat.pow_sub_one_dvd_pow_sub_one, Nat.pow_dvd_pow.

      Lean, lines 300–304
          · apply Dvd.dvd.mul_right
            apply Nat.pow_sub_one_dvd_pow_sub_one 2
            have : a ^ i < a ^ (J + 1) := lt_of_lt_of_le ham (min_le_left _ _)
            have := (Nat.pow_lt_pow_iff_right (by omega : 1 < a)).1 this
            exact Nat.pow_dvd_pow a (by omega)

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 300–304 at 34b54a68ddc1 ↗

      1. s6.s1.s1 have a ^ i < a ^ (J + (1 : ℕ))

        Leaves a ^ i ∣ a ^ J, with this : a ^ i < a ^ (J + (1 : ℕ)).

        Uses library lt_of_lt_of_le, min_le_left.

        Lean, line 302
              have : a ^ i < a ^ (J + 1) := lt_of_lt_of_le ham (min_le_left _ _)

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 302 at 34b54a68ddc1 ↗

      2. s6.s1.s2 have i < J + (1 : ℕ)

        Leaves a ^ i ∣ a ^ J, with this : i < J + (1 : ℕ).

        Uses library Nat.pow_lt_pow_iff_right.

        Lean, line 303
              have := (Nat.pow_lt_pow_iff_right (by omega : 1 < a)).1 this

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 303 at 34b54a68ddc1 ↗

    2. s6.s2 case

      Leaves (2 : ℕ) ^ b ^ i - (1 : ℕ) ∣ ((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ)), with i : ℕ, ham : b ^ i < min (a ^ (J + (1 : ℕ))) (b ^ (K + (1 : ℕ))).

      Uses library Dvd.dvd.mul_left Alias of dvd_mul_of_dvd_right. , Nat.pow_sub_one_dvd_pow_sub_one, Nat.pow_dvd_pow.

      Lean, lines 305–309
          · apply Dvd.dvd.mul_left
            apply Nat.pow_sub_one_dvd_pow_sub_one 2
            have : b ^ i < b ^ (K + 1) := lt_of_lt_of_le ham (min_le_right _ _)
            have := (Nat.pow_lt_pow_iff_right (by omega : 1 < b)).1 this
            exact Nat.pow_dvd_pow b (by omega)

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 305–309 at 34b54a68ddc1 ↗

      1. s6.s2.s1 have b ^ i < b ^ (K + (1 : ℕ))

        Leaves b ^ i ∣ b ^ K, with this : b ^ i < b ^ (K + (1 : ℕ)).

        Uses library lt_of_lt_of_le, min_le_right.

        Lean, line 307
              have : b ^ i < b ^ (K + 1) := lt_of_lt_of_le ham (min_le_right _ _)

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 307 at 34b54a68ddc1 ↗

      2. s6.s2.s2 have i < K + (1 : ℕ)

        Leaves b ^ i ∣ b ^ K, with this : i < K + (1 : ℕ).

        Uses library Nat.pow_lt_pow_iff_right.

        Lean, line 308
              have := (Nat.pow_lt_pow_iff_right (by omega : 1 < b)).1 this

        targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 308 at 34b54a68ddc1 ↗

  7. s7 case

    Leaves (2 : ℕ) ^ C * (((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ))) ≤ (2 : ℕ) ^ min (a ^ (J + (1 : ℕ))) (b ^ (K + (1 : ℕ))).

    Lean, lines 310–317
      · calc 2 ^ C * ((2 ^ (a ^ J) - 1) * (2 ^ (b ^ K) - 1))
            ≤ 2 ^ C * (2 ^ (a ^ J) * 2 ^ (b ^ K)) :=
              Nat.mul_le_mul_left _ (Nat.mul_le_mul (Nat.sub_le _ _) (Nat.sub_le _ _))
          _ = 2 ^ (C + a ^ J + b ^ K) := by rw [pow_add, pow_add, mul_assoc]
          _ ≤ 2 ^ (min (a ^ (J + 1)) (b ^ (K + 1))) := by
              apply Nat.pow_le_pow_right (by norm_num)
              rw [le_min_iff]
              exact ⟨hk1, hk2⟩

    targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 310–317 at 34b54a68ddc1 ↗

    1. s7.s1 calc (2 : ℕ) ^ C * (((2 : ℕ) ^ a ^ J - (1 : ℕ)) * ((2 : ℕ) ^ b ^ K - (1 : ℕ))) ≤ (2 : ℕ) ^ C * ((2 : ℕ) ^ a ^ J * (2 : ℕ) ^ b ^ K)

      Closes the goal.

      Uses library Nat.mul_le_mul_left, Nat.mul_le_mul, Nat.sub_le.

      Lean, lines 310–312
        · calc 2 ^ C * ((2 ^ (a ^ J) - 1) * (2 ^ (b ^ K) - 1))
              ≤ 2 ^ C * (2 ^ (a ^ J) * 2 ^ (b ^ K)) :=
                Nat.mul_le_mul_left _ (Nat.mul_le_mul (Nat.sub_le _ _) (Nat.sub_le _ _))

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 310–312 at 34b54a68ddc1 ↗

    2. s7.s2 calc

      Closes the goal.

      Uses library pow_add, mul_assoc.

      Lean, line 313
            _ = 2 ^ (C + a ^ J + b ^ K) := by rw [pow_add, pow_add, mul_assoc]

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, line 313 at 34b54a68ddc1 ↗

    3. s7.s3 calc

      Closes the goal.

      Uses library Min.min Returns the lesser of its two arguments. , Nat.pow_le_pow_right, le_min_iff, And.intro And.intro : a → b → a ∧ b is the constructor for the And operation. .

      Lean, lines 314–317
            _ ≤ 2 ^ (min (a ^ (J + 1)) (b ^ (K + 1))) := by
                apply Nat.pow_le_pow_right (by norm_num)
                rw [le_min_iff]
                exact ⟨hk1, hk2⟩

      targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, lines 314–317 at 34b54a68ddc1 ↗

The proof in Lean (Proof.lean)

Checked by the kernel — these bytes are the ones its attestation names: attestations/000938.json, merge commit 34b54a68ddc1.

Proof.lean — its sha256 is the artifact_hash of the attestation below, so these are the bytes the gate checked. Rendered from targets/erdos-257/nodes/variant-f93b89d8/Proof.lean, sha256 77870c49cc5d.
import Mathlib
import Nodes.«variant-f93b89d8».Context

private lemma lac_f_nonneg (n : ℕ) : 0 ≤ (1 : ℝ) / (2 ^ n - 1) := by
  apply div_nonneg zero_le_one
  have : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num)
  linarith

private lemma lac_f_le (n : ℕ) : (1 : ℝ) / (2 ^ n - 1) ≤ 2 * (1 / 2) ^ n := by
  rcases Nat.eq_zero_or_pos n with rfl | hn
  · norm_num
  · have h2 : (2 : ℝ) ≤ 2 ^ n := by
      calc (2 : ℝ) = 2 ^ 1 := by norm_num
        _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn
    have hpos : (0 : ℝ) < 2 ^ n - 1 := by linarith
    have hp : (0 : ℝ) < 2 ^ n := by positivity
    rw [one_div_pow, div_le_iff₀ hpos]
    have e : (2 : ℝ) * (1 / 2 ^ n) * (2 ^ n - 1) = 2 - 2 / 2 ^ n := by
      field_simp
    have h3 : 2 / (2 : ℝ) ^ n ≤ 1 := (div_le_one hp).mpr h2
    linarith

private lemma lac_summable : Summable (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) :=
  Summable.of_nonneg_of_le lac_f_nonneg lac_f_le
    ((summable_geometric_of_lt_one (by norm_num) (by norm_num)).mul_left 2)

private lemma lac_tail_le (A : Set ℕ) (m : ℕ) :
    ∑' k : ℕ, A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) (k + m) ≤ 4 * (1 / 2) ^ m := by
  classical
  have hrw : ∀ k : ℕ, 2 * (1 / 2 : ℝ) ^ (k + m) = (2 * (1 / 2) ^ m) * (1 / 2) ^ k := by
    intro k; rw [pow_add]; ring
  have hg : Summable (fun k : ℕ => 2 * (1 / 2 : ℝ) ^ (k + m)) := by
    simp_rw [hrw]
    exact (summable_geometric_of_lt_one (by norm_num) (by norm_num)).mul_left _
  have hle : ∀ k, A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) (k + m)
      ≤ 2 * (1 / 2 : ℝ) ^ (k + m) := by
    intro k
    rw [Set.indicator_apply]
    split_ifs
    · exact lac_f_le _
    · positivity
  have hs : Summable (fun k : ℕ => A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) (k + m)) :=
    Summable.of_nonneg_of_le (fun k => Set.indicator_nonneg (fun n _ => lac_f_nonneg n) _) hle hg
  calc _ ≤ ∑' k : ℕ, 2 * (1 / 2 : ℝ) ^ (k + m) := Summable.tsum_le_tsum hle hs hg
    _ = 4 * (1 / 2) ^ m := by
      simp_rw [hrw]
      rw [tsum_mul_left, tsum_geometric_of_lt_one (by norm_num) (by norm_num)]
      norm_num
      ring

private lemma liou_int (L : ℕ) (F : Finset ℕ) (hF : ∀ a ∈ F, 2 ^ a - 1 ∣ L)
    (hF0 : ∀ a ∈ F, a ≠ 0) :
    ∃ N : ℤ, (L : ℝ) * ∑ a ∈ F, (1 : ℝ) / (2 ^ a - 1) = N := by
  rw [Finset.mul_sum]
  have : ∀ a ∈ F, ∃ c : ℤ, (L : ℝ) * (1 / ((2 : ℝ) ^ a - 1)) = c := by
    intro a ha
    obtain ⟨c, hc⟩ := hF a ha
    refine ⟨c, ?_⟩
    have h1 : (1 : ℝ) < 2 ^ a := one_lt_pow₀ (by norm_num) (hF0 a ha)
    have h0 : (2 : ℝ) ^ a - 1 ≠ 0 := by linarith
    have hc' : (L : ℝ) = ((2 : ℝ) ^ a - 1) * c := by
      have h2 : 1 ≤ 2 ^ a := Nat.one_le_two_pow
      rw [hc]; push_cast [Nat.cast_sub h2]; ring
    rw [hc']; field_simp
    norm_cast
  choose c hc using this
  refine ⟨∑ a ∈ F.attach, c a.1 a.2, ?_⟩
  push_cast
  rw [← Finset.sum_attach F]
  exact Finset.sum_congr rfl (fun a _ => hc a.1 a.2)

private lemma r2_liou :
    ∀ (A : Set ℕ), A.Infinite → 0 ∉ A →
    (∀ C : ℕ, ∃ m ∈ A, ∃ L : ℕ, 0 < L ∧ (∀ a ∈ A, a < m → 2 ^ a - 1 ∣ L) ∧ 2 ^ C * L ≤ 2 ^ m) →
    Irrational (∑' n : A, (1 : ℝ) / (2 ^ n.1 - 1)) := by
  classical
  intro A _ h0 hA
  rintro ⟨r, hr⟩
  have hsum : Summable (A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1))) :=
    lac_summable.indicator A
  have hrA : (r : ℝ) = ∑' n, A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) n :=
    hr.trans (tsum_subtype A (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)))
  set q : ℕ := r.den with hq
  obtain ⟨m, hmA, L, hL0, hLdvd, hLm⟩ := hA (4 * q)
  have hm1 : 1 ≤ m := by
    rcases Nat.eq_zero_or_pos m with h | h
    · exact absurd (h ▸ hmA) h0
    · exact h
  set F := (Finset.range m).filter (· ∈ A) with hF
  have hsplit := hsum.sum_add_tsum_nat_add m
  have hfin : ∑ i ∈ Finset.range m, A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) i
      = ∑ a ∈ F, (1 : ℝ) / (2 ^ a - 1) := by
    rw [hF, Finset.sum_filter]
    simp [Set.indicator_apply]
  set T := ∑' i, A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) (i + m) with hT
  have hTs : Summable (fun i => A.indicator (fun n : ℕ => (1 : ℝ) / (2 ^ n - 1)) (i + m)) :=
    (summable_nat_add_iff m).mpr hsum
  have hTpos : 0 < T := by
    apply Summable.tsum_pos hTs (fun i => Set.indicator_nonneg (fun n _ => lac_f_nonneg n) _) 0
    rw [zero_add, Set.indicator_of_mem hmA]
    have : (1 : ℝ) < 2 ^ m := one_lt_pow₀ (by norm_num) (by omega)
    apply div_pos one_pos; linarith
  have hTle : T ≤ 4 * (1 / 2) ^ m := lac_tail_le A m
  have hrT : (r : ℝ) = (∑ a ∈ F, (1 : ℝ) / (2 ^ a - 1)) + T := by
    rw [hrA, ← hsplit, hfin]
  obtain ⟨N, hN⟩ := liou_int L F
    (fun a ha => hLdvd a (Finset.mem_filter.1 ha).2 (Finset.mem_range.1 (Finset.mem_filter.1 ha).1))
    (fun a ha h => h0 (h ▸ (Finset.mem_filter.1 ha).2))
  have hPpos : (0 : ℝ) < L := by exact_mod_cast hL0
  have hqr : (r : ℝ) * q = r.num := by
    rw [hq]; exact_mod_cast Rat.mul_den_eq_num r
  have hZ : (q : ℝ) * L * T = ((L : ℤ) * r.num - q * N : ℤ) := by
    push_cast
    rw [← hN, ← hqr]
    have : T = r - ∑ a ∈ F, (1 : ℝ) / (2 ^ a - 1) := by linarith
    rw [this]; ring
  have hqpos : (0 : ℝ) < q := by
    rw [hq]; exact_mod_cast r.den_pos
  have hpos : (0 : ℝ) < (q : ℝ) * L * T := by positivity
  have hge : (1 : ℝ) ≤ (q : ℝ) * L * T := by
    rw [hZ] at hpos ⊢
    have : (0 : ℤ) < (L : ℤ) * r.num - q * N := by exact_mod_cast hpos
    exact_mod_cast this
  have hLm' : (2 : ℝ) ^ (4 * q) * L ≤ 2 ^ m := by exact_mod_cast hLm
  have hbig : (4 * q : ℝ) < 2 ^ (4 * q) := by
    have h1 : 4 * q < 2 ^ (4 * q) := Nat.lt_two_pow_self
    exact_mod_cast h1
  have h2m : (2 : ℝ) ^ m * (1 / 2) ^ m = 1 := by rw [← mul_pow]; norm_num
  have hupper : (q : ℝ) * L * T < 1 := by
    have hA1 : (q : ℝ) * L * T ≤ q * L * (4 * (1 / 2) ^ m) :=
      mul_le_mul_of_nonneg_left hTle (by positivity)
    have hA2 : (2 : ℝ) ^ (4 * q) * ((q : ℝ) * L * (4 * (1 / 2) ^ m))
        ≤ 4 * q * (2 ^ m * (1 / 2) ^ m) := by
      have := mul_le_mul_of_nonneg_right hLm' (by positivity : (0 : ℝ) ≤ 4 * q * (1 / 2) ^ m)
      nlinarith [this]
    rw [h2m, mul_one] at hA2
    have hpow : (0 : ℝ) < 2 ^ (4 * q) := by positivity
    have : (q : ℝ) * L * (4 * (1 / 2) ^ m) < 1 := by
      by_contra hc
      have hc2 := not_lt.mp hc
      nlinarith
    linarith
  linarith


private lemma u23_gap (a b : ℕ) : (2 : ℤ) ^ b ≤ |(2 : ℤ) ^ a - 3 * 2 ^ b| := by
  rcases le_or_gt a b with hab | hab
  · have : (2 : ℤ) ^ a ≤ 2 ^ b := pow_le_pow_right₀ (by norm_num) hab
    have hp0 : (0 : ℤ) < 2 ^ b := by positivity
    rw [abs_of_neg (by linarith)]
    linarith
  · obtain ⟨d, rfl⟩ : ∃ d, a = b + d + 1 := ⟨a - b - 1, by omega⟩
    have e : (2 : ℤ) ^ (b + d + 1) - 3 * 2 ^ b = 2 ^ b * (2 * 2 ^ d - 3) := by ring
    rw [e, abs_mul, abs_of_pos (by positivity : (0 : ℤ) < 2 ^ b)]
    have h1 : 1 ≤ |(2 : ℤ) * 2 ^ d - 3| := by
      rcases Nat.eq_zero_or_pos d with h | h
      · subst h; norm_num
      · have : (2 : ℤ) ≤ 2 ^ d := by
          calc (2 : ℤ) = 2 ^ 1 := by norm_num
            _ ≤ 2 ^ d := pow_le_pow_right₀ (by norm_num) h
        rw [abs_of_pos (by linarith)]; linarith
    have hp : (0 : ℤ) < 2 ^ b := by positivity
    nlinarith

private lemma u23_bad (C J : ℕ) (hJ : 1 ≤ J)
    (hbad : ¬ ∃ k : ℕ, 3 ^ J + C ≤ 2 ^ k ∧ 2 ^ k + C ≤ 2 * 3 ^ J) :
    ∃ x : ℕ, |(2 : ℤ) ^ x - 3 ^ J| < C := by
  set k := Nat.log 2 (3 ^ J) with hk
  have h1 : 2 ^ k ≤ 3 ^ J := Nat.pow_log_le_self 2 (by positivity)
  have h2 : 3 ^ J < 2 ^ (k + 1) := Nat.lt_pow_succ_log_self (by norm_num) _
  have h3 : 2 ^ (k + 1) = 2 * 2 ^ k := by ring
  by_cases hc : 3 ^ J + C ≤ 2 ^ (k + 1)
  · have hc2 : ¬ (2 ^ (k + 1) + C ≤ 2 * 3 ^ J) := fun h => hbad ⟨k + 1, hc, h⟩
    refine ⟨k, ?_⟩
    have : (3 : ℤ) ^ J - 2 ^ k < C := by
      have : 2 * 3 ^ J < 2 ^ (k + 1) + C := by omega
      have h' : (2 : ℤ) * 3 ^ J < 2 ^ (k + 1) + C := by exact_mod_cast this
      rw [pow_succ] at h'
      linarith
    have h0 : (2 : ℤ) ^ k ≤ 3 ^ J := by exact_mod_cast h1
    rw [abs_of_nonpos (by linarith)]
    linarith
  · refine ⟨k + 1, ?_⟩
    have h' : (2 : ℤ) ^ (k + 1) < 3 ^ J + C := by exact_mod_cast (not_le.mp hc)
    have h0 : (3 : ℤ) ^ J < 2 ^ (k + 1) := by exact_mod_cast h2
    rw [abs_of_pos (by linarith)]
    linarith

private lemma u23_good (C : ℕ) : ∃ J k : ℕ, 3 ^ J + C ≤ 2 ^ k ∧ 2 ^ k + C ≤ 2 * 3 ^ J := by
  have hJ : 5 * C + 1 ≤ 3 ^ (5 * C + 1) := (Nat.lt_pow_self (by norm_num)).le
  have hJ1 : 1 ≤ 5 * C + 1 := by omega
  set J := 5 * C + 1 with hJdef
  by_contra hno
  simp only [not_exists, not_and, not_le] at hno
  have hb1 : ¬ ∃ k : ℕ, 3 ^ J + C ≤ 2 ^ k ∧ 2 ^ k + C ≤ 2 * 3 ^ J :=
    fun ⟨k, h1, h2⟩ => absurd h2 (not_le.mpr (hno J k h1))
  have hb2 : ¬ ∃ k : ℕ, 3 ^ (J + 1) + C ≤ 2 ^ k ∧ 2 ^ k + C ≤ 2 * 3 ^ (J + 1) :=
    fun ⟨k, h1, h2⟩ => absurd h2 (not_le.mpr (hno (J + 1) k h1))
  obtain ⟨x, hx⟩ := u23_bad C J hJ1 hb1
  obtain ⟨y, hy⟩ := u23_bad C (J + 1) (by omega) hb2
  have hg := u23_gap y x
  have hJz : (5 * C + 1 : ℤ) ≤ 3 ^ J := by exact_mod_cast hJ
  have e : (2 : ℤ) ^ y - 3 * 2 ^ x = ((2 : ℤ) ^ y - 3 ^ (J + 1)) - 3 * ((2 : ℤ) ^ x - 3 ^ J) := by ring
  have h4 : |(2 : ℤ) ^ y - 3 * 2 ^ x| < 4 * C := by
    rw [e]
    calc |((2 : ℤ) ^ y - 3 ^ (J + 1)) - 3 * ((2 : ℤ) ^ x - 3 ^ J)|
        ≤ |(2 : ℤ) ^ y - 3 ^ (J + 1)| + |3 * ((2 : ℤ) ^ x - 3 ^ J)| := abs_sub _ _
      _ = |(2 : ℤ) ^ y - 3 ^ (J + 1)| + 3 * |(2 : ℤ) ^ x - 3 ^ J| := by
          rw [abs_mul]; norm_num
      _ < C + 3 * C := by linarith
      _ = 4 * C := by ring
  have h5 : (3 : ℤ) ^ J - C < 2 ^ x := by
    have := neg_abs_le ((2 : ℤ) ^ x - 3 ^ J)
    linarith
  linarith

private lemma gen_good (a b C : ℕ) (ha : 2 ≤ a) (hab : a < b) :
    ∃ J K : ℕ, C + a ^ J + b ^ K ≤ a ^ (J + 1) ∧ C + a ^ J + b ^ K ≤ b ^ (K + 1) := by
  by_cases h23 : a = 2 ∧ b = 3
  · obtain ⟨rfl, rfl⟩ := h23
    obtain ⟨J, k, h1, h2⟩ := u23_good C
    refine ⟨k, J, ?_, ?_⟩
    · rw [pow_succ]; omega
    · rw [pow_succ]; omega
  have hb4 : 4 ≤ b := by omega
  have hC1 : C < 4 ^ C := Nat.lt_pow_self (by norm_num)
  have hC2 : 4 ^ C ≤ b ^ C := Nat.pow_le_pow_left (by omega) C
  set X := b ^ (C + 1) with hXdef
  have hX : 4 * C + 4 ≤ X := by
    have : b ^ C * 4 ≤ b ^ C * b := Nat.mul_le_mul_left _ hb4
    rw [hXdef, pow_succ]; omega
  have hZdef : b ^ (C + 1 + 1) = X * b := pow_succ b (C + 1)
  set Z := b ^ (C + 1 + 1) with hZ
  have hZX : 4 * X ≤ Z := by
    rw [hZdef]; have := Nat.mul_le_mul_left X hb4; linarith
  have hQ : 4 * Z ≤ b ^ (C + 1 + 1 + 1) := by
    have e : b ^ (C + 1 + 1 + 1) = Z * b := by rw [hZ]; exact pow_succ b (C + 1 + 1)
    rw [e]; have := Nat.mul_le_mul_left Z hb4; linarith
  have hZ0 : Z ≠ 0 := by positivity
  set J := Nat.log a Z with hJ
  have hY1 : a ^ J ≤ Z := Nat.pow_log_le_self a hZ0
  have hY2 : Z < a ^ (J + 1) := Nat.lt_pow_succ_log_self (by omega) Z
  by_cases h : C + a ^ J + X ≤ Z
  · exact ⟨J, C + 1, by omega, by omega⟩
  · push_neg at h
    rcases Nat.lt_or_ge a 3 with ha2 | ha3
    · have ha2' : a = 2 := by omega
      subst ha2'
      refine ⟨J + 1, C + 1 + 1, ?_, ?_⟩
      · have e1 : 2 ^ (J + 1 + 1) = 2 ^ (J + 1) * 2 := pow_succ 2 (J + 1)
        have e2 : 2 ^ (J + 1) = 2 ^ J * 2 := pow_succ 2 J
        omega
      · have e2 : 2 ^ (J + 1) = 2 ^ J * 2 := pow_succ 2 J
        omega
    · refine ⟨J, C + 1 + 1, ?_, ?_⟩
      · have e1 : a ^ (J + 1) = a ^ J * a := pow_succ a J
        have : a ^ J * 3 ≤ a ^ J * a := Nat.mul_le_mul_left _ ha3
        omega
      · omega

/-- Erdős 257 for the union of the powers of two integer bases `2 ≤ a < b`:
`∑_{n ∈ {a^k} ∪ {b^k}} 1/(2^n - 1)` is irrational. This generalises
`Opn.erdos_257_powers_of_two_and_three` (the case `a = 2`, `b = 3`) to every pair of bases, with
no independence condition on `a` and `b`. Each part is a divisibility chain, so below `m` the
partial sum has the common denominator `(2^(a^J) - 1)(2^(b^K) - 1)`, where `a^J` and `b^K` are
the largest powers below `m`, and Liouville's criterion (`Opn.erdos_257_liouville_criterion`)
applies once `m - a^J - b^K` is unbounded along such `m`. Put `Z = b^(K+1)` and let `a^J` be the
largest power of `a` with `a^J ≤ Z`. Either `m = Z` has margin `Z - b^K - a^J ≥ C`, or `a^J` lies
within `b^K + C` of `Z`; in that case `m = a^(J+1)` (when `a ≥ 3`) or `m = 2^(J+2)` (when `a = 2`
and `b ≥ 4`) has margin at least `2 b^K - 2C`. Only the pair `(2, 3)` needs more: there the
Diophantine step `|2^y - 3·2^x| ≥ 2^x` from the proof of the two-and-three case is used. The
proof is elementary and complete. -/
theorem Opn.erdos_257_powers_of_two_bases :
    ∀ a b : ℕ, 2 ≤ a → a < b →
    Irrational (∑' n : ({n | ∃ k : ℕ, n = a ^ k} ∪ {n | ∃ k : ℕ, n = b ^ k} : Set ℕ),
      (1 : ℝ) / (2 ^ n.1 - 1)) := by
  intro a b ha hab
  set A : Set ℕ := {n | ∃ k : ℕ, n = a ^ k} ∪ {n | ∃ k : ℕ, n = b ^ k} with hA
  have hinf : A.Infinite := by
    apply Set.Infinite.mono Set.subset_union_left
    have : {n | ∃ k : ℕ, n = a ^ k} = Set.range (fun k : ℕ => a ^ k) := by
      ext n; simp [eq_comm]
    rw [this]
    exact Set.infinite_range_of_injective (Nat.pow_right_injective ha)
  have h0 : 0 ∉ A := by
    rintro (⟨k, hk⟩ | ⟨k, hk⟩)
    · exact absurd hk (pow_ne_zero k (by omega)).symm
    · exact absurd hk (pow_ne_zero k (by omega)).symm
  apply r2_liou A hinf h0
  intro C
  obtain ⟨J, K, hk1, hk2⟩ := gen_good a b C ha hab
  refine ⟨min (a ^ (J + 1)) (b ^ (K + 1)), ?_, (2 ^ (a ^ J) - 1) * (2 ^ (b ^ K) - 1), ?_, ?_, ?_⟩
  · rcases min_choice (a ^ (J + 1)) (b ^ (K + 1)) with h | h <;> rw [h]
    · exact Or.inl ⟨J + 1, rfl⟩
    · exact Or.inr ⟨K + 1, rfl⟩
  · apply Nat.mul_pos
    · have := Nat.one_lt_two_pow (pow_ne_zero J (by omega : a ≠ 0)); omega
    · have := Nat.one_lt_two_pow (pow_ne_zero K (by omega : b ≠ 0)); omega
  · rintro x (⟨i, rfl⟩ | ⟨i, rfl⟩) ham
    · apply Dvd.dvd.mul_right
      apply Nat.pow_sub_one_dvd_pow_sub_one 2
      have : a ^ i < a ^ (J + 1) := lt_of_lt_of_le ham (min_le_left _ _)
      have := (Nat.pow_lt_pow_iff_right (by omega : 1 < a)).1 this
      exact Nat.pow_dvd_pow a (by omega)
    · apply Dvd.dvd.mul_left
      apply Nat.pow_sub_one_dvd_pow_sub_one 2
      have : b ^ i < b ^ (K + 1) := lt_of_lt_of_le ham (min_le_right _ _)
      have := (Nat.pow_lt_pow_iff_right (by omega : 1 < b)).1 this
      exact Nat.pow_dvd_pow b (by omega)
  · calc 2 ^ C * ((2 ^ (a ^ J) - 1) * (2 ^ (b ^ K) - 1))
        ≤ 2 ^ C * (2 ^ (a ^ J) * 2 ^ (b ^ K)) :=
          Nat.mul_le_mul_left _ (Nat.mul_le_mul (Nat.sub_le _ _) (Nat.sub_le _ _))
      _ = 2 ^ (C + a ^ J + b ^ K) := by rw [pow_add, pow_add, mul_assoc]
      _ ≤ 2 ^ (min (a ^ (J + 1)) (b ^ (K + 1))) := by
          apply Nat.pow_le_pow_right (by norm_num)
          rw [le_min_iff]
          exact ⟨hk1, hk2⟩

What is known

Work on it

No explainer yet. This proof written as a journal would print it, labelled unverified, is the next thing a writer could add, by pull request (D-3, D-36; the guide shows how).

Write the explainer →

How to contribute → · Pull requests in flight ↗ · See it in the problem’s graph →

Record

Statement: the Lean file and its words (2 versions)

Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.

import Mathlib
import Nodes.«variant-f93b89d8».Context

/-- Erdős 257 for the union of the powers of two integer bases `2 ≤ a < b`:
`∑_{n ∈ {a^k} ∪ {b^k}} 1/(2^n - 1)` is irrational. This generalises
`Opn.erdos_257_powers_of_two_and_three` (the case `a = 2`, `b = 3`) to every pair of bases, with
no independence condition on `a` and `b`. Each part is a divisibility chain, so below `m` the
partial sum has the common denominator `(2^(a^J) - 1)(2^(b^K) - 1)`, where `a^J` and `b^K` are
the largest powers below `m`, and Liouville's criterion (`Opn.erdos_257_liouville_criterion`)
applies once `m - a^J - b^K` is unbounded along such `m`. Put `Z = b^(K+1)` and let `a^J` be the
largest power of `a` with `a^J ≤ Z`. Either `m = Z` has margin `Z - b^K - a^J ≥ C`, or `a^J` lies
within `b^K + C` of `Z`; in that case `m = a^(J+1)` (when `a ≥ 3`) or `m = 2^(J+2)` (when `a = 2`
and `b ≥ 4`) has margin at least `2 b^K - 2C`. Only the pair `(2, 3)` needs more: there the
Diophantine step `|2^y - 3·2^x| ≥ 2^x` from the proof of the two-and-three case is used. The
proof is elementary and complete. -/
theorem Opn.erdos_257_powers_of_two_bases :
    ∀ a b : ℕ, 2 ≤ a → a < b →
    Irrational (∑' n : ({n | ∃ k : ℕ, n = a ^ k} ∪ {n | ∃ k : ℕ, n = b ^ k} : Set ℕ),
      (1 : ℝ) / (2 ^ n.1 - 1)) := by
  sorry

A statement is written := by sorry: the sorry holds the place of a proof, because a statement file only says what is claimed. A proof the gate checked is its own file, Proof.lean. How to read a proof page →

In words, unverified — what this statement says; written by t1022-g, drafted with Claude Opus 5.5 via Claude Code, 2026-10-23; no one has read it against the Lean and signed it.

Draft · drafted, by the model named above

$\displaystyle \forall\, a, b \in \mathbb{N},\quad 2 \le a < b \;\Longrightarrow\; \sum_{n \in \{a^k : k \in \mathbb{N}\} \cup \{b^k : k \in \mathbb{N}\}} \frac{1}{2^n - 1} \notin \mathbb{Q}.$

The sum is over the set of all powers of $a$ and of $b$, including $1 = a^0 = b^0$, counted once, as the sum is over a set; every element is at least $1$, so no term meets Lean's junk value at $n = 0$. The bases need not be coprime or multiplicatively independent.

Rendered from gloss/23f58465737d….md · Improve these words →

History: 2 versions on record
  1. 2026-10-23 · written by t1022-g, drafted with Claude Opus 5.5 via Claude Code · not signed · gloss/23f58465737d….md · the first version of its chain

    Read this version

    $\displaystyle \forall\, a, b \in \mathbb{N},\quad 2 \le a < b \;\Longrightarrow\; \sum_{n \in \{a^k : k \in \mathbb{N}\} \cup \{b^k : k \in \mathbb{N}\}} \frac{1}{2^n - 1} \notin \mathbb{Q}.$

    The sum is over the set of all powers of $a$ and of $b$, including $1 = a^0 = b^0$, counted once, as the sum is over a set; every element is at least $1$, so no term meets Lean's junk value at $n = 0$. The bases need not be coprime or multiplicatively independent.

  2. 2026-10-23 · written by t1023-f3, drafted with Claude Opus 5.5 (claude-opus-5-5); words by t1022-g, filed by t1023-f3 · not signed · current · gloss/4b463a7e8a55….md · diff to its predecessor

    Read this version

    $\displaystyle \forall\, a, b \in \mathbb{N},\quad 2 \le a < b \;\Longrightarrow\; \sum_{n \in \{a^k : k \in \mathbb{N}\} \cup \{b^k : k \in \mathbb{N}\}} \frac{1}{2^n - 1} \notin \mathbb{Q}.$

    The sum is over the set of all powers of $a$ and of $b$, including $1 = a^0 = b^0$, counted once, as the sum is over a set; every element is at least $1$, so no term meets Lean's junk value at $n = 0$. The bases need not be coprime or multiplicatively independent.

Diff of 4b463a7e8a55 against 23f58465737d
(the words are the same)

Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).

Rendered from targets/erdos-257/nodes/variant-f93b89d8/Statement.lean. Origin: variant (partial).

Attestation: pass, 7 of 7 checks

Checked by the kernel — the gate’s record of the run: attestations/000938.json, merge commit 34b54a68ddc1.

Verdict pass, from attestations/000938.json.

Submitter
t1022-g
Toolchain
leanprover/lean4:v4.33.1 (hash f54d0bc916bf76a7fae460ce9d078ccd1f74aeb4fd12c4b6546bca28b6aa1c63)
Mathlib
0df444a360eaa60ab8c11dca51a86af692955474
Reviewer
none needed (intermediate)
StepCheckResult
1toolchainpass
2pathspass
4kernel-replaypass
5axiomspass
6hazardspass
7witnesspass
8depspass
Witness

Checked by the kernel — step 7 passed in the run its attestation records: attestations/000938.json, merge commit 34b54a68ddc1.

Witness.lean — checked at step 7 of the run recorded below: pass. Rendered from targets/erdos-257/nodes/variant-f93b89d8/Witness.lean, sha256 56f371fbc155.
import Mathlib

theorem witness : ∃ (a : ℕ) (b : ℕ), (2 : ℕ) ≤ a ∧ a < b := ⟨2, 3, le_refl 2, by norm_num⟩

No gloss yet: no one has written in words what this witness says (D-3 v3.30); the Lean above is the witness. How to write one →

Relation to the problem’s statement

Checked by the kernel — checked at admission (D-30); no proof of the node is implied.

Relation.lean — the implication between this variant and the problem’s statement, checked by the gate when the variant was admitted and immutable after (D-30). Rendered from targets/erdos-257/nodes/variant-f93b89d8/Relation.lean, sha256 0f2806e140de.
-- relation: partial
import Mathlib

/-! The variant is a partial form of the root (D-30, `partial`): the root, applied to the
infinite union of the powers of two bases. -/

theorem relation :
    (∀ (A : Set ℕ), A.Infinite → Irrational (∑' n : A, (1 : ℝ) / (2 ^ n.1 - 1))) →
    ∀ a b : ℕ, 2 ≤ a → a < b →
    Irrational (∑' n : ({n | ∃ k : ℕ, n = a ^ k} ∪ {n | ∃ k : ℕ, n = b ^ k} : Set ℕ),
      (1 : ℝ) / (2 ^ n.1 - 1)) := by
  intro h a b ha _
  apply h
  apply Set.Infinite.mono Set.subset_union_left
  have : {n | ∃ k : ℕ, n = a ^ k} = Set.range (fun k : ℕ => a ^ k) := by
    ext n; simp [eq_comm]
  rw [this]
  exact Set.infinite_range_of_injective (Nat.pow_right_injective ha)

No gloss yet: no one has written in words what this relation says (D-3 v3.30); the Lean above is the relation. How to write one →

Acknowledged findings (2)

Untrusted contributor text — the prover’s justification for a finding.

Untrusted: acknowledgment of a div-zero finding at 1 / (2 ^ ↑n - 1)

n ranges over powers a^k, b^k with a, b ≥ 2, all ≥ 1, so 2^n - 1 ≥ 1; the root uses the same expression.

Untrusted contributor text — the prover’s justification for a finding.

Untrusted: acknowledgment of a off-by-one-range finding at 2 ≤ a

bases must be at least 2: base 1 gives the one-element set {1} and base 0 gives {0,1}; 2 ≤ a is the intended inclusive bound.

How to read this page