Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Size of smallest subset of {1,2,…,n}\{1, 2, \dots, n\} with distinct subset sums

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Is a(n)/π(n)a(n) / \pi(n) bounded as n→∞n \to \infty? - Robert Israel, Jan 09 2017

A formal proof has been found with the methods described in arxiv/2605.22763.

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:formal_proof
Cite as:NS.05190 [math.NT] · NS.05190v1 for this version
Declaration:OeisA194806.a_div_prime_counting_bounded
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:f318ba44069cb41e87b1f01398281c6ff51633b87d74d85aec8e332399a9797c
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/194806.lean

Formal statement

theorem a_div_prime_counting_bounded : ∃ C : ℝ,
    ∀ n : ℕ, 2 ≤ n → (a n : ℝ) / (Nat.primeCounting n : ℝ) ≤ C
Show the full Challenge.lean (120 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Size of smallest subset of $\{1, 2, \dots, n\}$ with distinct subset sums

Size of the smallest subset $S$ of $T = \{1,2,3,\dots,n\}$
such that $S \cdot S$ contains $T$,
where $S \cdot S$ is the set of all products of elements of $S$.

*References:*
- [A194806](https://oeis.org/A194806)
- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.
-/

@[expose] public section

namespace OeisA194806


open Finset Nat

/-- The set of all products of elements from a Finset S. -/
def setProd (S : Finset ℕ) : Finset ℕ :=
  (S.product S).image fun p : ℕ × ℕ => p.fst * p.snd

/--
Size of the smallest subset $S$ of $T = \{1,2,3,\dots,n\}$
such that $S \cdot S$ contains $T$,
where $S \cdot S$ is the set of all products of elements of $S$.
-/
def a (n : ℕ) : ℕ :=
  if h : n = 0 then 0
  else
    let T_n := Icc 1 n

    -- The set of subsets $S \subseteq T_n$ such that $T_n \subseteq S \cdot S$.
    let valid_subsets : Finset (Finset ℕ) :=
      T_n.powerset.filter (fun S : Finset ℕ => T_n ⊆ setProd S)

    -- Proof that $T_n$ is guaranteed to be a valid subset, ensuring `valid_subsets` is non-empty.
    have T_n_is_valid : T_n ∈ valid_subsets := by
      apply mem_filter.mpr
      constructor
      -- 1. T_n ∈ T_n.powerset (i.e., T_n ⊆ T_n)
      apply mem_powerset.mpr; rfl
      -- 2. T_n ⊆ setProd T_n
      intro k hk

      have one_le_n : 1 ≤ n := Nat.succ_le_of_lt (Nat.pos_of_ne_zero h)
      have h1 : 1 ∈ T_n := mem_Icc.mpr ⟨Nat.le_refl 1, one_le_n⟩

      -- We show k = k * 1 is in setProd T_n
      -- setProd T_n is the image of T_n × T_n under multiplication.
      simp only [setProd, mem_image, Prod.exists]
      use k, 1
      constructor
      -- Show that (k, 1) ∈ T_n × T_n
      · exact mem_product.mpr ⟨hk, h1⟩
      -- Show that k * 1 = k
      · exact Nat.mul_one k

    have h_nonempty : valid_subsets.Nonempty := ⟨T_n, T_n_is_valid⟩

    let sizes := valid_subsets.image Finset.card

    -- The min' function requires proof that the finset is non-empty.
    have h_sizes_nonempty : sizes.Nonempty := h_nonempty.image Finset.card

    -- We return the minimum card of all valid subsets.
    sizes.min' h_sizes_nonempty


@[category test, AMS 11]
lemma a_1 : a 1 = 1 := by rfl

@[category test, AMS 11]
lemma a_2 : a 2 = 2 := by rfl

@[category test, AMS 11]
lemma a_3 : a 3 = 3 := by rfl

@[category test, AMS 11]
lemma a_4 : a 4 = 3 := by rfl

@[category test, AMS 11]
lemma a_5 : a 5 = 4 := by rfl


set_option linter.style.formal_proof_palomar false in
/--
Is $a(n) / \pi(n)$ bounded as $n \to \infty$? - _Robert Israel_, Jan 09 2017

A formal proof has been found with the methods described in
[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).
-/
@[category research solved, AMS 11, formal_proof using formal_conjectures at
"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/194806.wip.lean#L472"]
theorem a_div_prime_counting_bounded : ∃ C : ℝ,
    ∀ n : ℕ, 2 ≤ n → (a n : ℝ) / (Nat.primeCounting n : ℝ) ≤ C := by
    sorry

end OeisA194806

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA194806.a_div_prime_counting_bounded with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_a_div_prime_counting_bounded : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch oeis-194806
nosorry submit oeis-194806 nosorry/oeis-194806/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.