Problems / erdos-1050 / proof 1
Proof 1 of 1
Proof 1 · root · by t1001-1050a, merged in e80916551a30.
The statement
Statement not audited — fidelity mechanical-only; QA pass incomplete; no signer yet.
theorem Opn.erdos_1050 :
Irrational (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 1) - 3)) := by
sorryA 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 →
Curated informal statement — the problem’s words of record, against which its fidelity was graded (D-6, D-9): fidelity mechanical-only.
Erdős Problem 1050. The series $\sum_{n=1}^\infty \frac{1}{2^n - 3}$ is irrational. The source sum runs over $n \ge 1$; as a tsum over ℕ (which starts at $0$) it is reindexed $n \mapsto n + 1$, i.e. $\sum_{n=0}^\infty 1/(2^{n+1} - 3)$.
In words, unverified — what this statement says; written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06; no one has read it against the Lean and signed it. A gloss of a root is not its words of record: the curated statement above is (D-9).
Draft · drafted, by the model named above
This file states the theorem Opn.erdos_1050: the real number $\displaystyle \sum_{n=0}^{\infty} \frac{1}{2^{n+1}-3}$ is irrational.
In detail:
- The sum is Lean's
∑'over all natural numbers $n = 0, 1, 2, \dots$ (Mathlib's unconditional sum, atsum). Each term is the real number $1/(2^{n+1}-3)$, computed in $\mathbb{R}$. The terms are $-1, 1, \tfrac{1}{5}, \tfrac{1}{13}, \tfrac{1}{29}, \dots$; the first, at $n = 0$, is $1/(2-3) = -1$. - Re-indexed with $m = n+1$, this is the sum $\sum_{m \ge 1} 1/(2^m - 3)$ of Erdős problem 1050. The file's own comment says the statement is imported, as stated, from google-deepmind/formal-conjectures (
FormalConjectures/ErdosProblems/1050.lean, Apache-2.0). Irrational xis Mathlib's predicate: $x$ is not equal to $p/q$, read as a real number, for any rational $p/q$.- Two Lean conventions do not come into play here, but a reader should know the file leans on neither. Division by zero is defined to be $0$ in Lean; no denominator $2^{n+1}-3$ is zero (it is $-1$ at $n = 0$ and at least $1$ afterwards). And
∑'of a family that is not summable is defined to be $0$; the statement itself does not assert that the series converges, so the claim is about thetsumas Lean defines it. (The series does converge absolutely, since its terms are eventually bounded by a multiple of $2^{-n}$, so thetsumis the ordinary sum; the merged proof checks summability in its stephT.)
The statement has no hypotheses and no free variables. The file imports all of Mathlib; its body is sorry, the placeholder a statement file carries in place of a proof.
Rendered from gloss/27192f22f314….md · Improve these words →
Fidelity: statement unchecked Nobody other than its author has yet judged whether the Lean says what the conjecture says. The kernel cannot decide this; a person must. protocol: fidelity: mechanical-only . Rendered from targets/erdos-1050/nodes/erdos-1050/Statement.lean.
The proof, dependencies first
3 statements on this proof. Each statement comes before the statements whose proofs use it. A step’s outline is folded; open it for its goal, what it uses and its Lean lines. How to read a proof page →
erdos-1050--h1-v2--h3 proved
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.
theorem erdos_1050__h1_v2__h3 : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n := by sorryA statement is written
:= by sorry: thesorryholds 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 f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1), 2026-10-18; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\displaystyle \forall n\in\mathbb{N}\ \ \exists d\in\mathbb{N}:\qquad d>0,\quad d^2\le 2^{3n^2},\quad d\,Q_x(n)\in\mathbb{Z},\quad d\,A_q(n)\in\mathbb{Z}$
For every natural number $n$ there is a natural number $d>0$ with $d^2\le 2^{3n\cdot n}$ (compared as real numbers) such that $d\,Q_x(n)$ and $d\,A_q(n)$ are integers (each written as: some $z\in\mathbb{Z}$ equals that rational), so $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$ of size at most $2^{3n^2/2}$. The functions $Q_c:\mathbb{N}\times\mathbb{N}\to\mathbb{Q}$, $Q_x:\mathbb{N}\to\mathbb{Q}$ and $A_q:\mathbb{N}\to\mathbb{Q}$ are fixed by hypotheses as $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$, $Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\,(3/2^n)^k$ and $A_q(n)=\sum_{k=0}^{n}\bigl(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\bigr)(3/2^n)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$. Exponents are natural numbers (subtraction in them stops at $0$, $k(k-1)/2$ is natural-number division), division is in $\mathbb{Q}$ with $x/0=0$ so the $j=k$ term of the inner sum of $A_q$ is $0$, and where these functions are used $k\le n$, so no other exponent is truncated.
Rendered from gloss/45b53c635f7e….md · Improve these words →
History: 4 versions on record, 1 withdrawn
2026-10-06 · written by t1006-w3, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · gloss/b4cf913714f6….md · the first version of its chain
Read this version
This file states the theorem
erdos_1050__h1_v2__h3, which the gate wrote from the holehdenof a merged partial proof.The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following formulas, so these are the only functions it speaks about:
- $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\displaystyle\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$;
- $Q_x(n)=\displaystyle\sum_{k=0}^{n}Q_c(n,k)\,\Big(\frac{3}{2^n}\Big)^k$;
- $A_q(n)=\displaystyle\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$.
Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used below, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$.
The conclusion: for every natural number $n$ there is a natural number $d$ such that
- $d>0$;
- $d^2\le 2^{3n^2}$ (compared as real numbers);
- $d\,Q_x(n)$ is an integer, and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number).
So $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$.
2026-10-06 · written by t1006-w3, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · withdrawn · gloss/d9dbd43701b0….md · diff to its predecessor
Read this version
This file states the theorem
erdos_1050__h1_v2__h3, which the gate wrote from the holehdenof a merged partial proof.The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following three formulas, so these are the only functions it speaks about: $$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1},$$ $$Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ $$A_q(n)=\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}.$$
Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used here, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$.
The conclusion: for every natural number $n$ there is a natural number $d$ with $d>0$ and $d^2\le 2^{3n^2}$ (compared as real numbers) such that $d\,Q_x(n)$ is an integer and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). So $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$.
2026-10-06 · written by t1006-w3, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · gloss/30a6d33d96aa….md · diff to its predecessor
Read this version
This file states the theorem
erdos_1050__h1_v2__h3, which the gate wrote from the holehdenof a merged partial proof.The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following three formulas, so these are the only functions it speaks about: $$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1},$$ $$Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ $$A_q(n)=\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}.$$
Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used here, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$.
The conclusion: for every natural number $n$ there is a natural number $d$ with $d>0$ and $d^2\le 2^{3n^2}$ (compared as real numbers) such that $d\,Q_x(n)$ is an integer and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). Thus $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$.
2026-10-18 · written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1) · not signed · current · gloss/45b53c635f7e….md · diff to its predecessor
Read this version
$\displaystyle \forall n\in\mathbb{N}\ \ \exists d\in\mathbb{N}:\qquad d>0,\quad d^2\le 2^{3n^2},\quad d\,Q_x(n)\in\mathbb{Z},\quad d\,A_q(n)\in\mathbb{Z}$
For every natural number $n$ there is a natural number $d>0$ with $d^2\le 2^{3n\cdot n}$ (compared as real numbers) such that $d\,Q_x(n)$ and $d\,A_q(n)$ are integers (each written as: some $z\in\mathbb{Z}$ equals that rational), so $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$ of size at most $2^{3n^2/2}$. The functions $Q_c:\mathbb{N}\times\mathbb{N}\to\mathbb{Q}$, $Q_x:\mathbb{N}\to\mathbb{Q}$ and $A_q:\mathbb{N}\to\mathbb{Q}$ are fixed by hypotheses as $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$, $Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\,(3/2^n)^k$ and $A_q(n)=\sum_{k=0}^{n}\bigl(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\bigr)(3/2^n)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$. Exponents are natural numbers (subtraction in them stops at $0$, $k(k-1)/2$ is natural-number division), division is in $\mathbb{Q}$ with $x/0=0$ so the $j=k$ term of the inner sum of $A_q$ is $0$, and where these functions are used $k\le n$, so no other exponent is truncated.
Diff of
d9dbd43701b0againstb4cf913714f6@@ -1,17 +1,10 @@ This file states the theorem `erdos_1050__h1_v2__h3`, which the gate wrote from the hole `hden` of a merged partial proof. -The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following formulas, so these are the only functions it speaks about: +The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following three formulas, so these are the only functions it speaks about: +$$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1},$$ +$$Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ +$$A_q(n)=\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}.$$ -- $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\displaystyle\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$; -- $Q_x(n)=\displaystyle\sum_{k=0}^{n}Q_c(n,k)\,\Big(\frac{3}{2^n}\Big)^k$; -- $A_q(n)=\displaystyle\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$. +Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used here, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$. -Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used below, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$. - -The conclusion: for every natural number $n$ there is a natural number $d$ such that - -- $d>0$; -- $d^2\le 2^{3n^2}$ (compared as real numbers); -- $d\,Q_x(n)$ is an integer, and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). - -So $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$. +The conclusion: for every natural number $n$ there is a natural number $d$ with $d>0$ and $d^2\le 2^{3n^2}$ (compared as real numbers) such that $d\,Q_x(n)$ is an integer and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). So $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$.
Diff of
30a6d33d96aaagainstb4cf913714f6@@ -1,17 +1,10 @@ This file states the theorem `erdos_1050__h1_v2__h3`, which the gate wrote from the hole `hden` of a merged partial proof. -The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following formulas, so these are the only functions it speaks about: +The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following three formulas, so these are the only functions it speaks about: +$$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1},$$ +$$Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ +$$A_q(n)=\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}.$$ -- $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\displaystyle\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$; -- $Q_x(n)=\displaystyle\sum_{k=0}^{n}Q_c(n,k)\,\Big(\frac{3}{2^n}\Big)^k$; -- $A_q(n)=\displaystyle\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$. +Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used here, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$. -Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used below, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$. - -The conclusion: for every natural number $n$ there is a natural number $d$ such that - -- $d>0$; -- $d^2\le 2^{3n^2}$ (compared as real numbers); -- $d\,Q_x(n)$ is an integer, and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). - -So $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$. +The conclusion: for every natural number $n$ there is a natural number $d$ with $d>0$ and $d^2\le 2^{3n^2}$ (compared as real numbers) such that $d\,Q_x(n)$ is an integer and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). Thus $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$.
Diff of
45b53c635f7eagainst30a6d33d96aa@@ -1,10 +1,3 @@ -This file states the theorem `erdos_1050__h1_v2__h3`, which the gate wrote from the hole `hden` of a merged partial proof. +$$\forall n\in\mathbb{N}\ \ \exists d\in\mathbb{N}:\qquad d>0,\quad d^2\le 2^{3n^2},\quad d\,Q_x(n)\in\mathbb{Z},\quad d\,A_q(n)\in\mathbb{Z}$$ -The statement is about three functions $Q_c:\mathbb N\times\mathbb N\to\mathbb Q$, $Q_x:\mathbb N\to\mathbb Q$ and $A_q:\mathbb N\to\mathbb Q$. It takes as hypotheses that they are given by the following three formulas, so these are the only functions it speaks about: -$$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1},$$ -$$Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ -$$A_q(n)=\sum_{k=0}^{n}\Big(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}.$$ - -Exponents are natural numbers: subtraction in them is truncated at $0$, and $k(k-1)/2$ is natural-number division (with $k-1=0$ when $k=0$). Where these functions are used here, $k\le n$, so no other exponent is truncated. Division is Lean's division of rationals, in which $x/0=0$: the term $j=k$ of the inner sum in $A_q$ has denominator $2^0-1=0$ and so contributes $0$. - -The conclusion: for every natural number $n$ there is a natural number $d$ with $d>0$ and $d^2\le 2^{3n^2}$ (compared as real numbers) such that $d\,Q_x(n)$ is an integer and $d\,A_q(n)$ is an integer (each written as: some $z\in\mathbb Z$ equals that rational number). Thus $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$, and $d\le 2^{3n^2/2}$. +For every natural number $n$ there is a natural number $d>0$ with $d^2\le 2^{3n\cdot n}$ (compared as real numbers) such that $d\,Q_x(n)$ and $d\,A_q(n)$ are integers (each written as: some $z\in\mathbb{Z}$ equals that rational), so $d$ is a common denominator of $Q_x(n)$ and $A_q(n)$ of size at most $2^{3n^2/2}$. The functions $Q_c:\mathbb{N}\times\mathbb{N}\to\mathbb{Q}$, $Q_x:\mathbb{N}\to\mathbb{Q}$ and $A_q:\mathbb{N}\to\mathbb{Q}$ are fixed by hypotheses as $Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i=0}^{k-1}\frac{2^{n-i}-1}{2^{i+1}-1}\prod_{i=0}^{n-1}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$, $Q_x(n)=\sum_{k=0}^{n}Q_c(n,k)\,(3/2^n)^k$ and $A_q(n)=\sum_{k=0}^{n}\bigl(\sum_{j=0}^{k}\frac{Q_c(n,j)}{2^{k-j}-1}\bigr)(3/2^n)^k+Q_x(n)\sum_{j=0}^{n-1}\frac{3}{2^{j+1}-3}$. Exponents are natural numbers (subtraction in them stops at $0$, $k(k-1)/2$ is natural-number division), division is in $\mathbb{Q}$ with $x/0=0$ so the $j=k$ term of the inner sum of $A_q$ is $0$, and where these functions are used $k\le n$, so no other exponent is truncated.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
Checked by the kernel — an outline of the proof attested in attestations/000292.json, merge commit
2987e49b6fb3.Outline of
Proof.lean, extracted by the gate at82834c4684b8from 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.id1_testhave∀ (n j : ℕ), j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withid1_test : ∀ (n j : ℕ), j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 26–37
have id1_test : ∀ (n j : ℕ) (hj : j ≤ n), (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - 1)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1) := by intro n j hj induction j with | zero => simp | succ j ih => have ih' := ih (by omega) rw [Finset.prod_range_succ, ← ih'] obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩ rw [hm, Finset.prod_range_succ, show n - (j + 1) = m by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 26–37 at
2987e49b6fb3↗id1_test.s1case routine: simpLeaves
(∏ i ∈ Finset.range (0 : ℕ), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (0 : ℕ)), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withhj : (0 : ℕ) ≤ n.Uses library
Nat.zeroZero, the smallest natural number. .Lean, line 31
| zero => simp
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 31 at
2987e49b6fb3↗id1_test.s2caseLeaves
(∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withj : ℕ,ih : j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)),hj : j + (1 : ℕ) ≤ n.Uses library
Nat.succThe successor of a natural numbern. ,Finset.prod_range_succ.Lean, lines 32–37
| succ j ih => have ih' := ih (by omega) rw [Finset.prod_range_succ, ← ih'] obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩ rw [hm, Finset.prod_range_succ, show n - (j + 1) = m by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 32–37 at
2987e49b6fb3↗id1_test.s2.ih'have(∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
(∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withih' : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Lean, line 33
have ih' := ih (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 33 at
2987e49b6fb3↗id1_test.s2.s2obtain∃ (m : ℕ), n - j = m + (1 : ℕ)Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (n - x) - (1 : ℚ))) * ((2 : ℚ) ^ (n - j) - (1 : ℚ)) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withm : ℕ,hm : n - j = m + (1 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 35
obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 35 at
2987e49b6fb3↗
lower_testhave∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withlower_test : ∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_pow_eq_pow_sum,Finset.prod_range_reflect.Lean, lines 38–52
have lower_test : ∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ (j * (j - 1) / 2) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1) := by intro j have h1 : ∀ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ i * (2 ^ (j - 1 - i + 1) - 1) := by intro i hi have hi' := Finset.mem_range.mp hi rw [mul_sub, ← pow_add, show i + (j - 1 - i + 1) = j by omega] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, Finset.prod_range_reflect (fun s => ((2 : ℚ) ^ (s + 1) - 1)) j] congr 1 congr 1 have := Finset.sum_range_id_mul_two j omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 38–52 at
2987e49b6fb3↗lower_test.h1have∀ i ∈ Finset.range j, (2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ))Leaves
∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ i ∈ Finset.range j, (2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,mul_subAlias ofmul_sub_left_distrib. ,pow_add.Lean, lines 42–46
have h1 : ∀ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ i * (2 ^ (j - 1 - i + 1) - 1) := by intro i hi have hi' := Finset.mem_range.mp hi rw [mul_sub, ← pow_add, show i + (j - 1 - i + 1) = j by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 42–46 at
2987e49b6fb3↗lower_test.h1.hi'havei < jLeaves
(2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ)), withhi' : i < j.Uses library
Finset.mem_range.Lean, line 44
have hi' := Finset.mem_range.mp hi
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 44 at
2987e49b6fb3↗
lower_test.thishave(∑ i ∈ Finset.range j, i) * (2 : ℕ) = j * (j - (1 : ℕ))Leaves
∑ i ∈ Finset.range j, i = j * (j - (1 : ℕ)) / (2 : ℕ), withthis : (∑ i ∈ Finset.range j, i) * (2 : ℕ) = j * (j - (1 : ℕ)).Uses library
Finset.sum_range_id_mul_twoGauss' summation formula .Lean, line 51
have := Finset.sum_range_id_mul_two j
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 51 at
2987e49b6fb3↗
upper_testhave∀ (j n : ℕ), j ≤ n → ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withupper_test : ∀ (j n : ℕ), j ≤ n → ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_Ico_eq_prod_range,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_range,pow_mul.Lean, lines 53–65
have upper_test : ∀ (j n : ℕ) (hj : j ≤ n), ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - 2 ^ i) = (-1) ^ (n - j) * 2 ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc j n = Finset.Ico (j + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show n + 1 - (j + 1) = n - j by omega] have h1 : ∀ t ∈ Finset.range (n - j), ((2 : ℚ) ^ j - 2 ^ (j + 1 + t)) = (-1) * 2 ^ j * (2 ^ (t + 1) - 1) := by intro t _ rw [show j + 1 + t = j + (t + 1) by ring, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 53–65 at
2987e49b6fb3↗upper_test.ehaveFinset.Ioc j n = Finset.Ico (j + (1 : ℕ)) (n + (1 : ℕ))Leaves
∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withe : Finset.Ioc j n = Finset.Ico (j + (1 : ℕ)) (n + (1 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ioc,Finset.mem_Ico.Lean, lines 57–58
have e : Finset.Ioc j n = Finset.Ico (j + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 57–58 at
2987e49b6fb3↗upper_test.h1have∀ t ∈ Finset.range (n - j), (2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (t + (1 : ℕ)) - (1 : ℚ))Leaves
∏ k ∈ Finset.range (n - j), ((2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + k)) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ t ∈ Finset.range (n - j), (2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (t + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_add.Lean, lines 60–63
have h1 : ∀ t ∈ Finset.range (n - j), ((2 : ℚ) ^ j - 2 ^ (j + 1 + t)) = (-1) * 2 ^ j * (2 ^ (t + 1) - 1) := by intro t _ rw [show j + 1 + t = j + (t + 1) by ring, pow_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 60–63 at
2987e49b6fb3↗
rhs_testhave∀ (j n : ℕ), j ≤ n → (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withrhs_test : ∀ (j n : ℕ), j ≤ n → (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_Ico_eq_prod_range,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_range,pow_mul,Finset.prod_range_add.Lean, lines 66–82
have rhs_test : ∀ (j n : ℕ) (hj : j ≤ n), (∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = (-1) ^ n * 2 ^ (j * n) * ∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc n (2 * n) = Finset.Ico (n + 1) (2 * n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show 2 * n + 1 - (n + 1) = n by omega] have h1 : ∀ t ∈ Finset.range n, ((2 : ℚ) ^ j - 2 ^ (n + 1 + t)) = (-1) * 2 ^ j * (2 ^ ((n - j) + t + 1) - 1) := by intro t _ rw [show n + 1 + t = j + ((n - j) + t + 1) by omega, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul, show 2 * n - j = (n - j) + n by omega, Finset.prod_range_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 66–82 at
2987e49b6fb3↗rhs_test.ehaveFinset.Ioc n ((2 : ℕ) * n) = Finset.Ico (n + (1 : ℕ)) ((2 : ℕ) * n + (1 : ℕ))Leaves
(∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withe : Finset.Ioc n ((2 : ℕ) * n) = Finset.Ico (n + (1 : ℕ)) ((2 : ℕ) * n + (1 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ioc,Finset.mem_Ico.Lean, lines 71–72
have e : Finset.Ioc n (2 * n) = Finset.Ico (n + 1) (2 * n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 71–72 at
2987e49b6fb3↗rhs_test.h1have∀ t ∈ Finset.range n, (2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (n - j + t + (1 : ℕ)) - (1 : ℚ))Leaves
(∏ k ∈ Finset.range n, ((2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + k))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ t ∈ Finset.range n, (2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (n - j + t + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_add.Lean, lines 74–78
have h1 : ∀ t ∈ Finset.range n, ((2 : ℚ) ^ j - 2 ^ (n + 1 + t)) = (-1) * 2 ^ j * (2 ^ ((n - j) + t + 1) - 1) := by intro t _ rw [show n + 1 + t = j + ((n - j) + t + 1) by omega, pow_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 74–78 at
2987e49b6fb3↗
id1_fullhave∀ (n j : ℕ), j ≤ n → (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withid1_full : ∀ (n j : ℕ), j ≤ n → (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.prod_union,mul_right_cancel₀,pow_add.Lean, lines 83–126
have id1_full : ∀ (n j : ℕ) (hj : j ≤ n), (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K) := by intro n j hj have hPne : ∀ m : ℕ, ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + 1) - 1) ≠ 0 := by intro m refine Finset.prod_ne_zero_iff.mpr (fun s _ => ?_) have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test n j hj] field_simp [hPne] have hG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test (2 * n - j) n (by omega), show 2 * n - j - n = n - j by omega] field_simp [hPne] have hsplit : (Finset.range (n + 1)).erase j = Finset.range j ∪ Finset.Ioc j n := by ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omega have hdisj : Disjoint (Finset.range j) (Finset.Ioc j n) := by rw [Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_range, Finset.mem_Ioc] at hx hx' omega have hR := rhs_test j n hj obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hj have hsign : (-1 : ℚ) ^ (j + m) = (-1) ^ j * (-1) ^ (j + m - j) := by rw [← pow_add]; congr 1; omega have ha : 2 * (j * (j - 1) / 2) = j * (j - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have hexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j) := by rw [show j + m - j = m by omega] rcases j with _ | i · simp · simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha] rw [hG1, hG2, hsplit, Finset.prod_union hdisj, lower_test, upper_test j (j + m) hj] apply mul_right_cancel₀ (hPne (j + m - j)) rw [hR, hsign, hexp, pow_add, pow_add, pow_add] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 83–126 at
2987e49b6fb3↗id1_full.hPnehave∀ (m : ℕ), ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhPne : ∀ (m : ℕ), ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_ne_zero_iff.Lean, lines 90–94
have hPne : ∀ m : ℕ, ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + 1) - 1) ≠ 0 := by intro m refine Finset.prod_ne_zero_iff.mpr (fun s _ => ?_) have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 90–94 at
2987e49b6fb3↗id1_full.hPne.thishave(1 : ℚ) < (2 : ℚ) ^ (s + (1 : ℕ))Leaves
(2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (s + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 93
have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 93 at
2987e49b6fb3↗
id1_full.hG1have∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_div_distrib.Lean, lines 95–99
have hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test n j hj] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 95–99 at
2987e49b6fb3↗id1_full.hG2have∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_div_distrib.Lean, lines 100–104
have hG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test (2 * n - j) n (by omega), show 2 * n - j - n = n - j by omega] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 100–104 at
2987e49b6fb3↗id1_full.hsplithave(Finset.range (n + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j nLeaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhsplit : (Finset.range (n + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j n.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.mem_erase,Finset.mem_range,Finset.mem_union,Finset.mem_Ioc.Lean, lines 105–106
have hsplit : (Finset.range (n + 1)).erase j = Finset.range j ∪ Finset.Ioc j n := by ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 105–106 at
2987e49b6fb3↗id1_full.hdisjhaveDisjoint (Finset.range j) (Finset.Ioc j n)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhdisj : Disjoint (Finset.range j) (Finset.Ioc j n).Uses library
DisjointTwo elements of a lattice are disjoint if their inf is the bottom element. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.disjoint_left,Finset.mem_range,Finset.mem_Ioc.Lean, lines 107–111
have hdisj : Disjoint (Finset.range j) (Finset.Ioc j n) := by rw [Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_range, Finset.mem_Ioc] at hx hx' omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 107–111 at
2987e49b6fb3↗id1_full.hRhave(∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhR : (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Lean, line 112
have hR := rhs_test j n hj
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 112 at
2987e49b6fb3↗id1_full.s7obtain∃ (k : ℕ), n = j + kLeaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withm : ℕ,hj : j ≤ j + m,hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (j + m), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))),hG2 : ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * (j + m) - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range (j + m), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))),hsplit : (Finset.range (j + m + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j (j + m),hdisj : Disjoint (Finset.range j) (Finset.Ioc j (j + m)),hR : (∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ (j + m) * (2 : ℚ) ^ (j * (j + m)) * ∏ s ∈ Finset.range ((2 : ℕ) * (j + m) - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.exists_eq_add_of_le.Lean, line 113
obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hj
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 113 at
2987e49b6fb3↗id1_full.hsignhave(-1 : ℚ) ^ (j + m) = (-1 : ℚ) ^ j * (-1 : ℚ) ^ (j + m - j)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhsign : (-1 : ℚ) ^ (j + m) = (-1 : ℚ) ^ j * (-1 : ℚ) ^ (j + m - j).Uses library
pow_add.Lean, lines 114–115
have hsign : (-1 : ℚ) ^ (j + m) = (-1) ^ j * (-1) ^ (j + m - j) := by rw [← pow_add]; congr 1; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 114–115 at
2987e49b6fb3↗id1_full.hahave(2 : ℕ) * (j * (j - (1 : ℕ)) / (2 : ℕ)) = j * (j - (1 : ℕ))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withha : (2 : ℕ) * (j * (j - (1 : ℕ)) / (2 : ℕ)) = j * (j - (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_pred_self.Lean, line 116
have ha : 2 * (j * (j - 1) / 2) = j * (j - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 116 at
2987e49b6fb3↗id1_full.hexphavej * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j).Lean, lines 117–122
have hexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j) := by rw [show j + m - j = m by omega] rcases j with _ | i · simp · simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 117–122 at
2987e49b6fb3↗id1_full.hexp.s1case routine: simpLeaves
(0 : ℕ) * ((0 : ℕ) + m) = (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) + (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) * m.id1_full.hexp.s2case routine: simp, nlinarithLeaves
(i + (1 : ℕ)) * (i + (1 : ℕ) + m) = (i + (1 : ℕ)) * (i + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (i + (1 : ℕ)) + (i + (1 : ℕ)) * (i + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (i + (1 : ℕ)) * m.Uses library
Nat.add_sub_cancel.Lean, lines 121–122
· simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 121–122 at
2987e49b6fb3↗
lagr_evalhave∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withlagr_eval : ∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.CC ais the constant polynomiala. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq.Lean, lines 128–161
have lagr_eval : ∀ (n : ℕ) (x : ℕ → ℚ) (hx : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) (N : ℚ[X]) (hNdeg : N.degree ≤ n) (r : ℕ → ℚ) (hr : ∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j)), N = ∑ j ∈ Finset.range (n + 1), C (r j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)) := by intro n x hx N hNdeg r hr have hinj : Set.InjOn x (Finset.range (n + 1) : Set ℕ) := by intro i hi j hj h simp only [Finset.coe_range, Set.mem_Iio] at hi hj exact hx i (by omega) j (by omega) h apply Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq ((Finset.range (n + 1)).image x) · rw [Finset.card_image_of_injOn hinj, Finset.card_range] refine lt_of_le_of_lt (Polynomial.degree_sub_le _ _) (max_lt ?_ ?_) · exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n) · refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self n · intro y hy obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega rw [← hr k hk', Polynomial.eval_finset_sum, Finset.sum_eq_single k] · simp [Polynomial.eval_prod] · intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero] · intro h; exact absurd hk htargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 128–161 at
2987e49b6fb3↗lagr_eval.hinjhaveSet.InjOn x (↑(Finset.range (n + (1 : ℕ))) : Set ℕ)Leaves
N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)), withhinj : Set.InjOn x (↑(Finset.range (n + (1 : ℕ))) : Set ℕ).Uses library
Set.InjOnfis injective onsif the restriction offtosis injective. ,Finset.rangerange nis the set of natural numbers less thann. ,SetA set is a collection of elements of some typeα. ,Finset.coe_range,Set.mem_Iio.Lean, lines 133–136
have hinj : Set.InjOn x (Finset.range (n + 1) : Set ℕ) := by intro i hi j hj h simp only [Finset.coe_range, Set.mem_Iio] at hi hj exact hx i (by omega) j (by omega) htargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 133–136 at
2987e49b6fb3↗lagr_eval.s2caseLeaves
(N - ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).degree < (↑(Finset.image x (Finset.range (n + (1 : ℕ)))).card : WithBot ℕ).Uses library
Finset.card_image_of_injOn,Finset.card_range,lt_of_le_of_lt,Polynomial.degree_sub_le,max_lt.Lean, lines 138–151
· rw [Finset.card_image_of_injOn hinj, Finset.card_range] refine lt_of_le_of_lt (Polynomial.degree_sub_le _ _) (max_lt ?_ ?_) · exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n) · refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self ntargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 138–151 at
2987e49b6fb3↗lagr_eval.s2.s1caseLeaves
N.degree < (↑(n + (1 : ℕ)) : WithBot ℕ).Uses library
lt_of_le_of_lt,Nat.lt_succ_self.Lean, line 140
· exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 140 at
2987e49b6fb3↗lagr_eval.s2.s2caseLeaves
(∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).degree < (↑(n + (1 : ℕ)) : WithBot ℕ).Uses library
lt_of_le_of_lt,Polynomial.degree_sum_le,Finset.sup_lt_iff,WithBot.bot_lt_coe,Polynomial.degree_mul_le,add_le_add,Polynomial.degree_C_le,Polynomial.degree_prod_le,zero_add,Nat.lt_succ_self.Lean, lines 141–151
· refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self ntargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 141–151 at
2987e49b6fb3↗lagr_eval.s2.s2.thishave∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree = (↑n : WithBot ℕ)Leaves
(0 : WithBot ℕ) + ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree < (↑(n + (1 : ℕ)) : WithBot ℕ), withthis : ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree = (↑n : WithBot ℕ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,WithBotAttach⊥to a type. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.degree_X_sub_C,Finset.sum_const,Finset.card_erase_of_mem$\#(s \setminus \{a\}) = \#s - 1$ if $a \in s$. ,Finset.card_range,Nat.add_sub_cancel.Lean, lines 146–149
have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 146–149 at
2987e49b6fb3↗
lagr_eval.s3caseLeaves
∀ x_1 ∈ Finset.image x (Finset.range (n + (1 : ℕ))), Polynomial.eval x_1 N = Polynomial.eval x_1 (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).Uses library
Polynomial.eval_finset_sumAlias ofPolynomial.eval_finsetSum. ,Finset.sum_eq_single.Lean, lines 152–161
· intro y hy obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega rw [← hr k hk', Polynomial.eval_finset_sum, Finset.sum_eq_single k] · simp [Polynomial.eval_prod] · intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero] · intro h; exact absurd hk htargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 152–161 at
2987e49b6fb3↗lagr_eval.s3.s1obtain∃ a ∈ Finset.range (n + (1 : ℕ)), x a = yLeaves
Polynomial.eval (x k) N = Polynomial.eval (x k) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))), withk : ℕ,hk : k ∈ Finset.range (n + (1 : ℕ)),hy : x k ∈ Finset.image x (Finset.range (n + (1 : ℕ))).Uses library
Finset.mem_image.Lean, line 153
obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 153 at
2987e49b6fb3↗lagr_eval.s3.hk'havek ≤ nLeaves
Polynomial.eval (x k) N = Polynomial.eval (x k) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))), withhk' : k ≤ n.Lean, line 154
have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 154 at
2987e49b6fb3↗lagr_eval.s3.hk'.thishavek < n + (1 : ℕ)Leaves
k ≤ n, withthis : k < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 154
have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 154 at
2987e49b6fb3↗
lagr_eval.s3.s3case routine: simpLeaves
r k * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (x k - x i) = Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r k) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).Uses library
Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod.Lean, line 156
· simp [Polynomial.eval_prod]
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 156 at
2987e49b6fb3↗lagr_eval.s3.s4caseLeaves
∀ b ∈ Finset.range (n + (1 : ℕ)), b ≠ k → Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r b) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase b, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) = (0 : ℚ).Uses library
Polynomial.eval_mul,Polynomial.eval_C,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Finset.prod_eq_zero,Finset.mem_erase,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,Ne.symm,MulZeroClass.mul_zeroZero is a right absorbing element for multiplication .Lean, lines 157–160
· intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 157–160 at
2987e49b6fb3↗lagr_eval.s3.s5caseLeaves
k ∉ Finset.range (n + (1 : ℕ)) → Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r k) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) = (0 : ℚ).Uses library
absurdAnything follows from two contradictory hypotheses. .Lean, line 161
· intro h; exact absurd hk h
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 161 at
2987e49b6fb3↗
deriv_prod_evalhave∀ (S : Finset ℕ) (x : ℕ → ℚ) (z : ℚ), Polynomial.eval z ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) (∏ i ∈ S, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = ∑ l ∈ S, ∏ i ∈ S.erase l, (z - x i)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withderiv_prod_eval : ∀ (S : Finset ℕ) (x : ℕ → ℚ) (z : ℚ), Polynomial.eval z ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) (∏ i ∈ S, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = ∑ l ∈ S, ∏ i ∈ S.erase l, (z - x i).Uses library
FinsetFinset αis the type of finite sets of elements ofα. ,Polynomial.derivativederivative pis the formal derivative of the polynomialp,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,Polynomial.derivative_prod_finset,Polynomial.eval_finset_sumAlias ofPolynomial.eval_finsetSum. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod.Lean, lines 163–168
have deriv_prod_eval : ∀ (S : Finset ℕ) (x : ℕ → ℚ) (z : ℚ), (derivative (∏ i ∈ S, (X - C (x i)))).eval z = ∑ l ∈ S, ∏ i ∈ S.erase l, (z - x i) := by intro S x z rw [Polynomial.derivative_prod_finset, Polynomial.eval_finset_sum] refine Finset.sum_congr rfl (fun l _ => ?_) simp [Polynomial.eval_prod]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 163–168 at
2987e49b6fb3↗deriv_prod_eval_nodehave∀ (S : Finset ℕ) (x : ℕ → ℚ), ∀ k ∈ S, Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) (∏ i ∈ S, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = ∏ i ∈ S.erase k, (x k - x i)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withderiv_prod_eval_node : ∀ (S : Finset ℕ) (x : ℕ → ℚ), ∀ k ∈ S, Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) (∏ i ∈ S, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = ∏ i ∈ S.erase k, (x k - x i).Uses library
FinsetFinset αis the type of finite sets of elements ofα. ,Polynomial.derivativederivative pis the formal derivative of the polynomialp,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,Finset.sum_eq_single.Lean, lines 170–176
have deriv_prod_eval_node : ∀ (S : Finset ℕ) (x : ℕ → ℚ) (k : ℕ) (hk : k ∈ S), (derivative (∏ i ∈ S, (X - C (x i)))).eval (x k) = ∏ i ∈ S.erase k, (x k - x i) := by intro S x k hk rw [deriv_prod_eval, Finset.sum_eq_single k] · intro l hl hlk exact Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hlk, hk⟩) (by ring) · intro h; exact absurd hk htargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 170–176 at
2987e49b6fb3↗deriv_prod_eval_node.s1caseLeaves
∀ b ∈ S, b ≠ k → ∏ i ∈ S.erase b, (x k - x i) = (0 : ℚ).Uses library
Finset.prod_eq_zero,Finset.mem_erase,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,Ne.symm.Lean, lines 174–175
· intro l hl hlk exact Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hlk, hk⟩) (by ring)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 174–175 at
2987e49b6fb3↗deriv_prod_eval_node.s2caseLeaves
k ∉ S → ∏ i ∈ S.erase k, (x k - x i) = (0 : ℚ).Uses library
absurdAnything follows from two contradictory hypotheses. .Lean, line 176
· intro h; exact absurd hk h
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 176 at
2987e49b6fb3↗
lagr_derivhave∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → ∀ k ≤ n, Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, r j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) + r k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withlagr_deriv : ∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → ∀ k ≤ n, Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, r j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) + r k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.derivativederivative pis the formal derivative of the polynomialp,Polynomial.derivative_sum,Polynomial.eval_finset_sumAlias ofPolynomial.eval_finsetSum. ,Finset.add_sum_eraseTaking a sum overs : Finset ιis the same as adding the value on a single elementf ato the sum overs.erase a. ,add_comm.Lean, lines 178–194
have lagr_deriv : ∀ (n : ℕ) (x : ℕ → ℚ) (hx : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) (N : ℚ[X]) (hNdeg : N.degree ≤ n) (r : ℕ → ℚ) (hr : ∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j)) (k : ℕ) (hk : k ≤ n), (derivative N).eval (x k) = ∑ j ∈ (Finset.range (n + 1)).erase k, r j * ∏ i ∈ ((Finset.range (n + 1)).erase j).erase k, (x k - x i) + r k * ∑ l ∈ (Finset.range (n + 1)).erase k, ∏ i ∈ ((Finset.range (n + 1)).erase k).erase l, (x k - x i) := by intro n x hx N hNdeg r hr k hk have hkmem : k ∈ Finset.range (n + 1) := Finset.mem_range.mpr (by omega) conv_lhs => rw [lagr_eval n x hx N hNdeg r hr] rw [Polynomial.derivative_sum, Polynomial.eval_finset_sum, ← Finset.add_sum_erase _ _ hkmem, add_comm] congr 1 · refine Finset.sum_congr rfl (fun j hj => ?_) have hjk : j ≠ k := Finset.ne_of_mem_erase hj rw [Polynomial.derivative_C_mul, Polynomial.eval_mul, Polynomial.eval_C, deriv_prod_eval_node _ x k (Finset.mem_erase.mpr ⟨Ne.symm hjk, hkmem⟩)] · rw [Polynomial.derivative_C_mul, Polynomial.eval_mul, Polynomial.eval_C, deriv_prod_eval]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 178–194 at
2987e49b6fb3↗lagr_deriv.hkmemhavek ∈ Finset.range (n + (1 : ℕ))Leaves
Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, r j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) + r k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i), withhkmem : k ∈ Finset.range (n + (1 : ℕ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.mem_range.Lean, line 186
have hkmem : k ∈ Finset.range (n + 1) := Finset.mem_range.mpr (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 186 at
2987e49b6fb3↗lagr_deriv.s2caseLeaves
∑ x_1 ∈ (Finset.range (n + (1 : ℕ))).erase k, Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) ((Polynomial.C : ℚ → Polynomial ℚ) (r x_1) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase x_1, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, r j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i).Uses library
Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.derivative_C_mul,Polynomial.eval_mul,Polynomial.eval_C,Finset.mem_erase,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,Ne.symm.Lean, lines 190–193
· refine Finset.sum_congr rfl (fun j hj => ?_) have hjk : j ≠ k := Finset.ne_of_mem_erase hj rw [Polynomial.derivative_C_mul, Polynomial.eval_mul, Polynomial.eval_C, deriv_prod_eval_node _ x k (Finset.mem_erase.mpr ⟨Ne.symm hjk, hkmem⟩)]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 190–193 at
2987e49b6fb3↗lagr_deriv.s2.hjkhavej ≠ kLeaves
Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) ((Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = r j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i), withhjk : j ≠ k.Uses library
Finset.ne_of_mem_erase.Lean, line 191
have hjk : j ≠ k := Finset.ne_of_mem_erase hj
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 191 at
2987e49b6fb3↗
lagr_deriv.s3caseLeaves
Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) ((Polynomial.C : ℚ → Polynomial ℚ) (r k) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))) = r k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i).Uses library
Polynomial.derivative_C_mul,Polynomial.eval_mul,Polynomial.eval_C.Lean, line 194
· rw [Polynomial.derivative_C_mul, Polynomial.eval_mul, Polynomial.eval_C, deriv_prod_eval]
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 194 at
2987e49b6fb3↗
formula3have∀ (n k : ℕ), k ≤ n → ∀ (Qc : ℕ → ℕ → ℚ), (∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) → ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withformula3 : ∀ (n k : ℕ), k ≤ n → ∀ (Qc : ℕ → ℕ → ℚ), (∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) → ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.sum_union,Finset.sum_range_succ,Nat.sub_self,pow_zero,sub_self,div_zero,add_zero.Lean, lines 196–307
have formula3 : ∀ (n k : ℕ) (hk : k ≤ n) (Qc : ℕ → ℕ → ℚ) (hQc : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K)), ∑ j ∈ Finset.range (k + 1), Qc n j / ((2 : ℚ) ^ (k - j) - 1) = Qc n k * 2 ^ k * (∑ K ∈ Finset.Ioc n (2 * n), 1 / ((2 : ℚ) ^ k - 2 ^ K) - ∑ i ∈ (Finset.range (n + 1)).erase k, 1 / ((2 : ℚ) ^ k - 2 ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by intro n k hk Qc hQc set x : ℕ → ℚ := fun i => (2 : ℚ) ^ i with hxdef have hxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j := by intro i _ j _ h have h' : (2 : ℚ) ^ i = 2 ^ j := h exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast h') have hxne : ∀ a b : ℕ, a ≠ b → (2 : ℚ) ^ a - 2 ^ b ≠ 0 := by intro a b hab h apply hab exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast (sub_eq_zero.mp h)) set S := (Finset.range (n + 1)).erase k with hS set T := Finset.Ioc n (2 * n) with hT set N : ℚ[X] := ∏ K ∈ T, (X - C ((2 : ℚ) ^ K)) with hN have hNdeg : N.degree ≤ n := by rw [hN, Polynomial.degree_prod] rw [Finset.sum_congr rfl (fun K _ => Polynomial.degree_X_sub_C ((2 : ℚ) ^ K)), Finset.sum_const, hT, Nat.card_Ioc] simp omega have hkmem : k ∈ Finset.range (n + 1) := Finset.mem_range.mpr (by omega) have hr : ∀ j ≤ n, (Qc n j * 2 ^ j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j) := by intro j hj rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, hxdef] exact hQc j hj have hD := lagr_deriv n x hxinj N hNdeg (fun j => Qc n j * 2 ^ j) hr k hk have hD2 : (derivative N).eval (x k) = ∑ K ∈ T, ∏ a ∈ T.erase K, (x k - 2 ^ a) := by rw [hN, deriv_prod_eval] set P := ∏ i ∈ S, (x k - x i) with hP have hPne : P ≠ 0 := by rw [hP] refine Finset.prod_ne_zero_iff.mpr (fun i hi => hxne k i (Ne.symm (Finset.ne_of_mem_erase hi))) have hNk : N.eval (x k) = (Qc n k * 2 ^ k) * P := by rw [← hr k hk] have hNk' : N.eval (x k) = ∏ K ∈ T, (x k - 2 ^ K) := by rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C] -- (a) have ha : ∀ j ∈ S, ∏ i ∈ ((Finset.range (n + 1)).erase j).erase k, (x k - x i) = P / (x k - x j) := by intro j hj have hne : x k - x j ≠ 0 := hxne k j (Ne.symm (Finset.ne_of_mem_erase hj)) rw [Finset.erase_right_comm, eq_div_iff hne, mul_comm, hP, Finset.mul_prod_erase S (fun i => x k - x i) hj] have hb : ∀ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = P / (x k - x l) := by intro l hl have hne : x k - x l ≠ 0 := hxne k l (Ne.symm (Finset.ne_of_mem_erase hl)) rw [eq_div_iff hne, mul_comm, hP, Finset.mul_prod_erase S (fun i => x k - x i) hl] have hc : ∀ K ∈ T, ∏ a ∈ T.erase K, (x k - 2 ^ a) = N.eval (x k) / (x k - 2 ^ K) := by intro K hK have hKn : n < K := (Finset.mem_Ioc.mp hK).1 have hne : x k - 2 ^ K ≠ 0 := hxne k K (by omega) rw [eq_div_iff hne, mul_comm, hNk', Finset.mul_prod_erase T (fun a => x k - 2 ^ a) hK] rw [← hS] at hD rw [hD2, Finset.sum_congr rfl hc] at hD have hD3 : ∑ j ∈ S, Qc n j * 2 ^ j * ∏ i ∈ ((Finset.range (n + 1)).erase j).erase k, (x k - x i) = ∑ j ∈ S, Qc n j * 2 ^ j * (P / (x k - x j)) := Finset.sum_congr rfl (fun j hj => by rw [ha j hj]) have hD4 : ∑ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = ∑ l ∈ S, P / (x k - x l) := Finset.sum_congr rfl hb rw [hD3, hD4, hNk] at hD -- key: sum over S of r_j / (x k - x j) = r_k * beta have key : ∑ j ∈ S, (Qc n j * 2 ^ j) / (x k - x j) = (Qc n k * 2 ^ k) * (∑ K ∈ T, 1 / (x k - 2 ^ K) - ∑ i ∈ S, 1 / (x k - x i)) := by have e1 : ∑ K ∈ T, Qc n k * 2 ^ k * P / (x k - 2 ^ K) = P * ((Qc n k * 2 ^ k) * ∑ K ∈ T, 1 / (x k - 2 ^ K)) := by rw [Finset.mul_sum, Finset.mul_sum]; refine Finset.sum_congr rfl (fun K _ => by ring) have e2 : ∑ j ∈ S, Qc n j * 2 ^ j * (P / (x k - x j)) = P * ∑ j ∈ S, (Qc n j * 2 ^ j) / (x k - x j) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring) have e3 : ∑ l ∈ S, P / (x k - x l) = P * ∑ i ∈ S, 1 / (x k - x i) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring) rw [e1, e2, e3] at hD apply mul_left_cancel₀ hPne linear_combination -hD -- split S into range k and Ioc k n have hsplit : S = Finset.range k ∪ Finset.Ioc k n := by rw [hS]; ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omega have hdisj : Disjoint (Finset.range k) (Finset.Ioc k n) := by rw [Finset.disjoint_left]; intro a ha ha' simp only [Finset.mem_range, Finset.mem_Ioc] at ha ha'; omega rw [hsplit, Finset.sum_union hdisj] at key have hlow : ∀ j ∈ Finset.range k, (Qc n j * 2 ^ j) / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - 1) := by intro j hj have hjk : j < k := Finset.mem_range.mp hj have hne : (2 : ℚ) ^ (k - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (k - j) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega) simp only [hxdef] rw [div_eq_div_iff hne2 hne, show k = j + (k - j) by omega, pow_add] simp only [show j + (k - j) - j = k - j by omega] ring have hhigh : ∀ j ∈ Finset.Ioc k n, (Qc n j * 2 ^ j) / (x k - x j) = Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by intro j hj have hkj : k < j := (Finset.mem_Ioc.mp hj).1 have hne : (1 : ℚ) - 2 ^ (j - k) ≠ 0 := by have : (1 : ℚ) < 2 ^ (j - k) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega) simp only [hxdef] rw [div_eq_div_iff hne2 hne, show j = k + (j - k) by omega, pow_add] simp only [show k + (j - k) - k = j - k by omega] ring rw [Finset.sum_congr rfl hlow, Finset.sum_congr rfl hhigh] at key rw [Finset.sum_range_succ, Nat.sub_self, pow_zero, sub_self, div_zero, add_zero] simp only [hxdef] at key rw [← hsplit] at key linear_combination keytargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 196–307 at
2987e49b6fb3↗formula3.hxinjhave∀ i ≤ n, ∀ j ≤ n, x i = x j → i = jLeaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j.Uses library
Nat.pow_right_injective,le_reflThe relation≤on a preorder is reflexive. .Lean, lines 205–208
have hxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j := by intro i _ j _ h have h' : (2 : ℚ) ^ i = 2 ^ j := h exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast h')targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 205–208 at
2987e49b6fb3↗formula3.hxinj.h'have(2 : ℚ) ^ i = (2 : ℚ) ^ jLeaves
i = j, withh' : (2 : ℚ) ^ i = (2 : ℚ) ^ j.Lean, line 207
have h' : (2 : ℚ) ^ i = 2 ^ j := h
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 207 at
2987e49b6fb3↗
formula3.hxnehave∀ (a b : ℕ), a ≠ b → (2 : ℚ) ^ a - (2 : ℚ) ^ b ≠ (0 : ℚ)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhxne : ∀ (a b : ℕ), a ≠ b → (2 : ℚ) ^ a - (2 : ℚ) ^ b ≠ (0 : ℚ).Uses library
Nat.pow_right_injective,le_reflThe relation≤on a preorder is reflexive. ,sub_eq_zero.Lean, lines 209–212
have hxne : ∀ a b : ℕ, a ≠ b → (2 : ℚ) ^ a - 2 ^ b ≠ 0 := by intro a b hab h apply hab exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast (sub_eq_zero.mp h))targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 209–212 at
2987e49b6fb3↗formula3.hNdeghaveN.degree ≤ (↑n : WithBot ℕ)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhNdeg : N.degree ≤ (↑n : WithBot ℕ).Uses library
Polynomial.degree_prodThe degree of a product of polynomials is equal to the sum of the degrees, where the degree of the zero polynomial is ⊥. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.degree_X_sub_C,Finset.sum_const,Nat.card_Ioc.Lean, lines 216–221
have hNdeg : N.degree ≤ n := by rw [hN, Polynomial.degree_prod] rw [Finset.sum_congr rfl (fun K _ => Polynomial.degree_X_sub_C ((2 : ℚ) ^ K)), Finset.sum_const, hT, Nat.card_Ioc] simp omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 216–221 at
2987e49b6fb3↗formula3.hkmemhavek ∈ Finset.range (n + (1 : ℕ))Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhkmem : k ∈ Finset.range (n + (1 : ℕ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.mem_range.Lean, line 222
have hkmem : k ∈ Finset.range (n + 1) := Finset.mem_range.mpr (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 222 at
2987e49b6fb3↗formula3.hrhave∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) NLeaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhr : ∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Polynomial.eval_C.Lean, lines 223–227
have hr : ∀ j ≤ n, (Qc n j * 2 ^ j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j) := by intro j hj rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, hxdef] exact hQc j hjtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 223–227 at
2987e49b6fb3↗formula3.hDhavePolynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) + Qc n k * (2 : ℚ) ^ k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhD : Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ j ∈ (Finset.range (n + (1 : ℕ))).erase k, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) + Qc n k * (2 : ℚ) ^ k * ∑ l ∈ (Finset.range (n + (1 : ℕ))).erase k, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase k).erase l, (x k - x i).Lean, line 228
have hD := lagr_deriv n x hxinj N hNdeg (fun j => Qc n j * 2 ^ j) hr k hk
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 228 at
2987e49b6fb3↗formula3.hD2havePolynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ K ∈ T, ∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhD2 : Polynomial.eval (x k) ((Polynomial.derivative : Polynomial ℚ → Polynomial ℚ) N) = ∑ K ∈ T, ∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a).Uses library
Polynomial.derivativederivative pis the formal derivative of the polynomialp.Lean, lines 229–230
have hD2 : (derivative N).eval (x k) = ∑ K ∈ T, ∏ a ∈ T.erase K, (x k - 2 ^ a) := by rw [hN, deriv_prod_eval]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 229–230 at
2987e49b6fb3↗formula3.hPnehaveP ≠ (0 : ℚ)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhPne : P ≠ (0 : ℚ).Uses library
Finset.prod_ne_zero_iff,Ne.symm,Finset.ne_of_mem_erase.Lean, lines 232–234
have hPne : P ≠ 0 := by rw [hP] refine Finset.prod_ne_zero_iff.mpr (fun i hi => hxne k i (Ne.symm (Finset.ne_of_mem_erase hi)))targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 232–234 at
2987e49b6fb3↗formula3.hNkhavePolynomial.eval (x k) N = Qc n k * (2 : ℚ) ^ k * PLeaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhNk : Polynomial.eval (x k) N = Qc n k * (2 : ℚ) ^ k * P.Lean, lines 235–236
have hNk : N.eval (x k) = (Qc n k * 2 ^ k) * P := by rw [← hr k hk]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 235–236 at
2987e49b6fb3↗formula3.hNk'havePolynomial.eval (x k) N = ∏ K ∈ T, (x k - (2 : ℚ) ^ K)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhNk' : Polynomial.eval (x k) N = ∏ K ∈ T, (x k - (2 : ℚ) ^ K).Uses library
Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Polynomial.eval_C.Lean, lines 237–239
have hNk' : N.eval (x k) = ∏ K ∈ T, (x k - 2 ^ K) := by rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 237–239 at
2987e49b6fb3↗formula3.hahave∀ j ∈ S, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) = P / (x k - x j)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withha : ∀ j ∈ S, ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) = P / (x k - x j).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.erase_right_comm,eq_div_iff,mul_comm,Finset.mul_prod_eraseTaking a product overs : Finset ιis the same as multiplying the value on a single elementf aby the product ofs.erase a. .Lean, lines 241–244
have ha : ∀ j ∈ S, ∏ i ∈ ((Finset.range (n + 1)).erase j).erase k, (x k - x i) = P / (x k - x j) := by intro j hj have hne : x k - x j ≠ 0 := hxne k j (Ne.symm (Finset.ne_of_mem_erase hj)) rw [Finset.erase_right_comm, eq_div_iff hne, mul_comm, hP, Finset.mul_prod_erase S (fun i => x k - x i) hj]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 241–244 at
2987e49b6fb3↗formula3.ha.hnehavex k - x j ≠ (0 : ℚ)Leaves
∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) = P / (x k - x j), withhne : x k - x j ≠ (0 : ℚ).Uses library
Ne.symm,Finset.ne_of_mem_erase.Lean, line 243
have hne : x k - x j ≠ 0 := hxne k j (Ne.symm (Finset.ne_of_mem_erase hj))
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 243 at
2987e49b6fb3↗
formula3.hbhave∀ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = P / (x k - x l)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhb : ∀ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = P / (x k - x l).Uses library
eq_div_iff,mul_comm,Finset.mul_prod_eraseTaking a product overs : Finset ιis the same as multiplying the value on a single elementf aby the product ofs.erase a. .Lean, lines 245–248
have hb : ∀ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = P / (x k - x l) := by intro l hl have hne : x k - x l ≠ 0 := hxne k l (Ne.symm (Finset.ne_of_mem_erase hl)) rw [eq_div_iff hne, mul_comm, hP, Finset.mul_prod_erase S (fun i => x k - x i) hl]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 245–248 at
2987e49b6fb3↗formula3.hb.hnehavex k - x l ≠ (0 : ℚ)Leaves
∏ i ∈ S.erase l, (x k - x i) = P / (x k - x l), withhne : x k - x l ≠ (0 : ℚ).Uses library
Ne.symm,Finset.ne_of_mem_erase.Lean, line 247
have hne : x k - x l ≠ 0 := hxne k l (Ne.symm (Finset.ne_of_mem_erase hl))
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 247 at
2987e49b6fb3↗
formula3.hchave∀ K ∈ T, ∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a) = Polynomial.eval (x k) N / (x k - (2 : ℚ) ^ K)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhc : ∀ K ∈ T, ∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a) = Polynomial.eval (x k) N / (x k - (2 : ℚ) ^ K).Uses library
eq_div_iff,mul_comm,Finset.mul_prod_eraseTaking a product overs : Finset ιis the same as multiplying the value on a single elementf aby the product ofs.erase a. .Lean, lines 249–253
have hc : ∀ K ∈ T, ∏ a ∈ T.erase K, (x k - 2 ^ a) = N.eval (x k) / (x k - 2 ^ K) := by intro K hK have hKn : n < K := (Finset.mem_Ioc.mp hK).1 have hne : x k - 2 ^ K ≠ 0 := hxne k K (by omega) rw [eq_div_iff hne, mul_comm, hNk', Finset.mul_prod_erase T (fun a => x k - 2 ^ a) hK]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 249–253 at
2987e49b6fb3↗formula3.hc.hKnhaven < KLeaves
∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a) = Polynomial.eval (x k) N / (x k - (2 : ℚ) ^ K), withhKn : n < K.Uses library
Finset.mem_Ioc.Lean, line 251
have hKn : n < K := (Finset.mem_Ioc.mp hK).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 251 at
2987e49b6fb3↗formula3.hc.hnehavex k - (2 : ℚ) ^ K ≠ (0 : ℚ)Leaves
∏ a ∈ T.erase K, (x k - (2 : ℚ) ^ a) = Polynomial.eval (x k) N / (x k - (2 : ℚ) ^ K), withhne : x k - (2 : ℚ) ^ K ≠ (0 : ℚ).Lean, line 252
have hne : x k - 2 ^ K ≠ 0 := hxne k K (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 252 at
2987e49b6fb3↗
formula3.hD3have∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) = ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * (P / (x k - x j))Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhD3 : ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ ((Finset.range (n + (1 : ℕ))).erase j).erase k, (x k - x i) = ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * (P / (x k - x j)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 256–258
have hD3 : ∑ j ∈ S, Qc n j * 2 ^ j * ∏ i ∈ ((Finset.range (n + 1)).erase j).erase k, (x k - x i) = ∑ j ∈ S, Qc n j * 2 ^ j * (P / (x k - x j)) := Finset.sum_congr rfl (fun j hj => by rw [ha j hj])targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 256–258 at
2987e49b6fb3↗formula3.hD4have∑ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = ∑ l ∈ S, P / (x k - x l)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhD4 : ∑ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = ∑ l ∈ S, P / (x k - x l).Uses library
Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 259–260
have hD4 : ∑ l ∈ S, ∏ i ∈ S.erase l, (x k - x i) = ∑ l ∈ S, P / (x k - x l) := Finset.sum_congr rfl hbtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 259–260 at
2987e49b6fb3↗formula3.keyhave∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / (x k - x i))Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withkey : ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / (x k - x i)).Uses library
mul_left_cancel₀.Lean, lines 263–273
have key : ∑ j ∈ S, (Qc n j * 2 ^ j) / (x k - x j) = (Qc n k * 2 ^ k) * (∑ K ∈ T, 1 / (x k - 2 ^ K) - ∑ i ∈ S, 1 / (x k - x i)) := by have e1 : ∑ K ∈ T, Qc n k * 2 ^ k * P / (x k - 2 ^ K) = P * ((Qc n k * 2 ^ k) * ∑ K ∈ T, 1 / (x k - 2 ^ K)) := by rw [Finset.mul_sum, Finset.mul_sum]; refine Finset.sum_congr rfl (fun K _ => by ring) have e2 : ∑ j ∈ S, Qc n j * 2 ^ j * (P / (x k - x j)) = P * ∑ j ∈ S, (Qc n j * 2 ^ j) / (x k - x j) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring) have e3 : ∑ l ∈ S, P / (x k - x l) = P * ∑ i ∈ S, 1 / (x k - x i) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring) rw [e1, e2, e3] at hD apply mul_left_cancel₀ hPne linear_combination -hDtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 263–273 at
2987e49b6fb3↗formula3.key.e1have∑ K ∈ T, Qc n k * (2 : ℚ) ^ k * P / (x k - (2 : ℚ) ^ K) = P * (Qc n k * (2 : ℚ) ^ k * ∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K))Leaves
∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / (x k - x i)), withe1 : ∑ K ∈ T, Qc n k * (2 : ℚ) ^ k * P / (x k - (2 : ℚ) ^ K) = P * (Qc n k * (2 : ℚ) ^ k * ∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K)).Uses library
Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 265–266
have e1 : ∑ K ∈ T, Qc n k * 2 ^ k * P / (x k - 2 ^ K) = P * ((Qc n k * 2 ^ k) * ∑ K ∈ T, 1 / (x k - 2 ^ K)) := by rw [Finset.mul_sum, Finset.mul_sum]; refine Finset.sum_congr rfl (fun K _ => by ring)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 265–266 at
2987e49b6fb3↗formula3.key.e2have∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * (P / (x k - x j)) = P * ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j)Leaves
∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / (x k - x i)), withe2 : ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j * (P / (x k - x j)) = P * ∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j).Uses library
Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 267–268
have e2 : ∑ j ∈ S, Qc n j * 2 ^ j * (P / (x k - x j)) = P * ∑ j ∈ S, (Qc n j * 2 ^ j) / (x k - x j) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 267–268 at
2987e49b6fb3↗formula3.key.e3have∑ l ∈ S, P / (x k - x l) = P * ∑ i ∈ S, (1 : ℚ) / (x k - x i)Leaves
∑ j ∈ S, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / (x k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / (x k - x i)), withe3 : ∑ l ∈ S, P / (x k - x l) = P * ∑ i ∈ S, (1 : ℚ) / (x k - x i).Uses library
Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 269–270
have e3 : ∑ l ∈ S, P / (x k - x l) = P * ∑ i ∈ S, 1 / (x k - x i) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl (fun j _ => by ring)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 269–270 at
2987e49b6fb3↗
formula3.hsplithaveS = Finset.range k ∪ Finset.Ioc k nLeaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhsplit : S = Finset.range k ∪ Finset.Ioc k n.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.mem_erase,Finset.mem_range,Finset.mem_union,Finset.mem_Ioc.Lean, lines 275–276
have hsplit : S = Finset.range k ∪ Finset.Ioc k n := by rw [hS]; ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 275–276 at
2987e49b6fb3↗formula3.hdisjhaveDisjoint (Finset.range k) (Finset.Ioc k n)Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhdisj : Disjoint (Finset.range k) (Finset.Ioc k n).Uses library
DisjointTwo elements of a lattice are disjoint if their inf is the bottom element. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.disjoint_left,Finset.mem_range,Finset.mem_Ioc.Lean, lines 277–279
have hdisj : Disjoint (Finset.range k) (Finset.Ioc k n) := by rw [Finset.disjoint_left]; intro a ha ha' simp only [Finset.mem_range, Finset.mem_Ioc] at ha ha'; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 277–279 at
2987e49b6fb3↗formula3.hlowhave∀ j ∈ Finset.range k, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhlow : ∀ j ∈ Finset.range k, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,div_eq_div_iff,pow_add.Lean, lines 281–291
have hlow : ∀ j ∈ Finset.range k, (Qc n j * 2 ^ j) / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - 1) := by intro j hj have hjk : j < k := Finset.mem_range.mp hj have hne : (2 : ℚ) ^ (k - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (k - j) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega) simp only [hxdef] rw [div_eq_div_iff hne2 hne, show k = j + (k - j) by omega, pow_add] simp only [show j + (k - j) - j = k - j by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 281–291 at
2987e49b6fb3↗formula3.hlow.hjkhavej < kLeaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhjk : j < k.Uses library
Finset.mem_range.Lean, line 283
have hjk : j < k := Finset.mem_range.mp hj
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 283 at
2987e49b6fb3↗formula3.hlow.hnehave(2 : ℚ) ^ (k - j) - (1 : ℚ) ≠ (0 : ℚ)Leaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhne : (2 : ℚ) ^ (k - j) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 284–286
have hne : (2 : ℚ) ^ (k - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (k - j) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 284–286 at
2987e49b6fb3↗formula3.hlow.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (k - j)Leaves
(2 : ℚ) ^ (k - j) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (k - j).Uses library
one_lt_pow₀.Lean, line 285
have : (1 : ℚ) < 2 ^ (k - j) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 285 at
2987e49b6fb3↗
formula3.hlow.hne2have(2 : ℚ) ^ k - (2 : ℚ) ^ j ≠ (0 : ℚ)Leaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhne2 : (2 : ℚ) ^ k - (2 : ℚ) ^ j ≠ (0 : ℚ).Lean, line 287
have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 287 at
2987e49b6fb3↗
formula3.hhighhave∀ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))Leaves
∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ T, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ S, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhhigh : ∀ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,div_eq_div_iff,pow_add.Lean, lines 292–302
have hhigh : ∀ j ∈ Finset.Ioc k n, (Qc n j * 2 ^ j) / (x k - x j) = Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by intro j hj have hkj : k < j := (Finset.mem_Ioc.mp hj).1 have hne : (1 : ℚ) - 2 ^ (j - k) ≠ 0 := by have : (1 : ℚ) < 2 ^ (j - k) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega) simp only [hxdef] rw [div_eq_div_iff hne2 hne, show j = k + (j - k) by omega, pow_add] simp only [show k + (j - k) - k = j - k by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 292–302 at
2987e49b6fb3↗formula3.hhigh.hkjhavek < jLeaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhkj : k < j.Uses library
Finset.mem_Ioc.Lean, line 294
have hkj : k < j := (Finset.mem_Ioc.mp hj).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 294 at
2987e49b6fb3↗formula3.hhigh.hnehave(1 : ℚ) - (2 : ℚ) ^ (j - k) ≠ (0 : ℚ)Leaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhne : (1 : ℚ) - (2 : ℚ) ^ (j - k) ≠ (0 : ℚ).Lean, lines 295–297
have hne : (1 : ℚ) - 2 ^ (j - k) ≠ 0 := by have : (1 : ℚ) < 2 ^ (j - k) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 295–297 at
2987e49b6fb3↗formula3.hhigh.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (j - k)Leaves
(1 : ℚ) - (2 : ℚ) ^ (j - k) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (j - k).Uses library
one_lt_pow₀.Lean, line 296
have : (1 : ℚ) < 2 ^ (j - k) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 296 at
2987e49b6fb3↗
formula3.hhigh.hne2have(2 : ℚ) ^ k - (2 : ℚ) ^ j ≠ (0 : ℚ)Leaves
Qc n j * (2 : ℚ) ^ j / (x k - x j) = Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)), withhne2 : (2 : ℚ) ^ k - (2 : ℚ) ^ j ≠ (0 : ℚ).Lean, line 298
have hne2 : (2 : ℚ) ^ k - 2 ^ j ≠ 0 := hxne k j (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 298 at
2987e49b6fb3↗
hformhave∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhform : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, lines 308–319
have hform : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∑ j ∈ Finset.range (k + 1), Qc n j / ((2 : ℚ) ^ (k - j) - 1) = Qc n k * 2 ^ k * (∑ K ∈ Finset.Ioc n (2 * n), 1 / ((2 : ℚ) ^ k - 2 ^ K) - ∑ i ∈ (Finset.range (n + 1)).erase k, 1 / ((2 : ℚ) ^ k - 2 ^ i)) - ∑ j ∈ Finset.Ioc k n, Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by intro Qc hQc n k hk exact formula3 n k hk Qc (fun j hj => by subst hQc; exact id1_full n j hj)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 308–319 at
2987e49b6fb3↗gausshave∀ (n k : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withgauss : ∀ (n k : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 321–380
have gauss : ∀ n k : ℕ, ∃ z : ℤ, (z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1) := by intro n k have hD : ∀ j : ℕ, ((2 : ℚ) ^ (j + 1) - 1) ≠ 0 := by intro j have h1 : (1 : ℚ) < 2 ^ (j + 1) := one_lt_pow₀ (by norm_num) (by omega) exact ne_of_gt (sub_pos.mpr h1) have hDk : ∀ k : ℕ, (∏ i ∈ Finset.range k, ((2 : ℚ) ^ (i + 1) - 1)) ≠ 0 := by intro k exact Finset.prod_ne_zero_iff.mpr (fun i _ => hD i) have key : ∀ m j : ℕ, (∏ i ∈ Finset.range (j + 1), ((2 : ℚ) ^ (m + 1 - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) = (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) + 2 ^ (j + 1) * ∏ i ∈ Finset.range (j + 1), ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1) := by intro m j simp only [Finset.prod_div_distrib] rw [Finset.prod_range_succ' (fun i => (2 : ℚ) ^ (m + 1 - i) - 1)] have hshift : ∀ i : ℕ, m + 1 - (i + 1) = m - i := fun i => by omega simp only [hshift, Nat.sub_zero] rw [Finset.prod_range_succ (fun i => (2 : ℚ) ^ (m - i) - 1), Finset.prod_range_succ (fun i => (2 : ℚ) ^ (i + 1) - 1)] have hDj := hDk j have hj := hD j by_cases hjm : j ≤ m · have e : (2 : ℚ) ^ (m + 1) = 2 ^ (m - j) * 2 ^ (j + 1) := by rw [← pow_add] congr 1 omega rw [e] field_simp ring · have hz : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1)) = 0 := Finset.prod_eq_zero (i := m) (Finset.mem_range.mpr (by omega)) (by simp) rw [hz] simp have main : ∀ m j : ℕ, ∃ z : ℤ, (z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1) := by intro m induction m with | zero => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => refine ⟨0, ?_⟩ rw [Finset.prod_eq_zero (i := 0) (by simp) (by simp)] simp | succ m ih => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => obtain ⟨a, ha⟩ := ih j obtain ⟨b, hb⟩ := ih (j + 1) refine ⟨a + 2 ^ (j + 1) * b, ?_⟩ rw [key, ← ha, ← hb] push_cast ring exact main n ktargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 321–380 at
2987e49b6fb3↗gauss.hDhave∀ (j : ℕ), (2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withhD : ∀ (j : ℕ), (2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Uses library
ne_of_gt,sub_pos.Lean, lines 324–327
have hD : ∀ j : ℕ, ((2 : ℚ) ^ (j + 1) - 1) ≠ 0 := by intro j have h1 : (1 : ℚ) < 2 ^ (j + 1) := one_lt_pow₀ (by norm_num) (by omega) exact ne_of_gt (sub_pos.mpr h1)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 324–327 at
2987e49b6fb3↗gauss.hD.h1have(1 : ℚ) < (2 : ℚ) ^ (j + (1 : ℕ))Leaves
(2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withh1 : (1 : ℚ) < (2 : ℚ) ^ (j + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 326
have h1 : (1 : ℚ) < 2 ^ (j + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 326 at
2987e49b6fb3↗
gauss.hDkhave∀ (k : ℕ), ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withhDk : ∀ (k : ℕ), ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_ne_zero_iff.Lean, lines 328–330
have hDk : ∀ k : ℕ, (∏ i ∈ Finset.range k, ((2 : ℚ) ^ (i + 1) - 1)) ≠ 0 := by intro k exact Finset.prod_ne_zero_iff.mpr (fun i _ => hD i)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 328–330 at
2987e49b6fb3↗gauss.keyhave∀ (m j : ℕ), ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withkey : ∀ (m j : ℕ), ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_div_distrib,Finset.prod_range_succ',Nat.sub_zero,Finset.prod_range_succ.Lean, lines 331–356
have key : ∀ m j : ℕ, (∏ i ∈ Finset.range (j + 1), ((2 : ℚ) ^ (m + 1 - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) = (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) + 2 ^ (j + 1) * ∏ i ∈ Finset.range (j + 1), ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1) := by intro m j simp only [Finset.prod_div_distrib] rw [Finset.prod_range_succ' (fun i => (2 : ℚ) ^ (m + 1 - i) - 1)] have hshift : ∀ i : ℕ, m + 1 - (i + 1) = m - i := fun i => by omega simp only [hshift, Nat.sub_zero] rw [Finset.prod_range_succ (fun i => (2 : ℚ) ^ (m - i) - 1), Finset.prod_range_succ (fun i => (2 : ℚ) ^ (i + 1) - 1)] have hDj := hDk j have hj := hD j by_cases hjm : j ≤ m · have e : (2 : ℚ) ^ (m + 1) = 2 ^ (m - j) * 2 ^ (j + 1) := by rw [← pow_add] congr 1 omega rw [e] field_simp ring · have hz : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1)) = 0 := Finset.prod_eq_zero (i := m) (Finset.mem_range.mpr (by omega)) (by simp) rw [hz] simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 331–356 at
2987e49b6fb3↗gauss.key.hshifthave∀ (i : ℕ), m + (1 : ℕ) - (i + (1 : ℕ)) = m - iLeaves
(∏ k ∈ Finset.range j, ((2 : ℚ) ^ (m + (1 : ℕ) - (k + (1 : ℕ))) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ) - (0 : ℕ)) - (1 : ℚ)) / ∏ x ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))), withhshift : ∀ (i : ℕ), m + (1 : ℕ) - (i + (1 : ℕ)) = m - i.Lean, line 339
have hshift : ∀ i : ℕ, m + 1 - (i + 1) = m - i := fun i => by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 339 at
2987e49b6fb3↗gauss.key.hDjhave∏ i ∈ Finset.range j, ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ)Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))), withhDj : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ).Lean, line 343
have hDj := hDk j
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 343 at
2987e49b6fb3↗gauss.key.hjhave(2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))), withhj : (2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Lean, line 344
have hj := hD j
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 344 at
2987e49b6fb3↗gauss.key.s4caseLeaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))).Lean, lines 346–352
· have e : (2 : ℚ) ^ (m + 1) = 2 ^ (m - j) * 2 ^ (j + 1) := by rw [← pow_add] congr 1 omega rw [e] field_simp ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 346–352 at
2987e49b6fb3↗gauss.key.s4.ehave(2 : ℚ) ^ (m + (1 : ℕ)) = (2 : ℚ) ^ (m - j) * (2 : ℚ) ^ (j + (1 : ℕ))Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))), withe : (2 : ℚ) ^ (m + (1 : ℕ)) = (2 : ℚ) ^ (m - j) * (2 : ℚ) ^ (j + (1 : ℕ)).Uses library
pow_add.Lean, lines 346–349
· have e : (2 : ℚ) ^ (m + 1) = 2 ^ (m - j) * 2 ^ (j + 1) := by rw [← pow_add] congr 1 omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 346–349 at
2987e49b6fb3↗
gauss.key.s5caseLeaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))).Lean, lines 353–356
· have hz : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1)) = 0 := Finset.prod_eq_zero (i := m) (Finset.mem_range.mpr (by omega)) (by simp) rw [hz] simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 353–356 at
2987e49b6fb3↗gauss.key.s5.hzhave∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) = (0 : ℚ)Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m + (1 : ℕ)) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ))) = (∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) / ∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ)) + (2 : ℚ) ^ (j + (1 : ℕ)) * ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (m - x) - (1 : ℚ))) * ((2 : ℚ) ^ (m - j) - (1 : ℚ)) / ((∏ x ∈ Finset.range j, ((2 : ℚ) ^ (x + (1 : ℕ)) - (1 : ℚ))) * ((2 : ℚ) ^ (j + (1 : ℕ)) - (1 : ℚ)))), withhz : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) = (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_eq_zero,Finset.mem_range.Lean, lines 353–354
· have hz : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1)) = 0 := Finset.prod_eq_zero (i := m) (Finset.mem_range.mpr (by omega)) (by simp)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 353–354 at
2987e49b6fb3↗
gauss.mainhave∀ (m j : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withmain : ∀ (m j : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 357–379
have main : ∀ m j : ℕ, ∃ z : ℤ, (z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1) := by intro m induction m with | zero => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => refine ⟨0, ?_⟩ rw [Finset.prod_eq_zero (i := 0) (by simp) (by simp)] simp | succ m ih => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => obtain ⟨a, ha⟩ := ih j obtain ⟨b, hb⟩ := ih (j + 1) refine ⟨a + 2 ^ (j + 1) * b, ?_⟩ rw [key, ← ha, ← hb] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 357–379 at
2987e49b6fb3↗gauss.main.s1caseLeaves
∀ (j : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ ((0 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.zeroZero, the smallest natural number. .Lean, lines 361–368
| zero => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => refine ⟨0, ?_⟩ rw [Finset.prod_eq_zero (i := 0) (by simp) (by simp)] simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 361–368 at
2987e49b6fb3↗gauss.main.s1.s1caseLeaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (0 : ℕ), ((2 : ℚ) ^ ((0 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.zeroZero, the smallest natural number. ,Exists.introExistential introduction. .Lean, line 364
| zero => exact ⟨1, by simp⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 364 at
2987e49b6fb3↗gauss.main.s1.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ ((0 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withj : ℕ.Uses library
Nat.succThe successor of a natural numbern. ,Exists.introExistential introduction. ,Finset.prod_eq_zero.Lean, lines 365–368
| succ j => refine ⟨0, ?_⟩ rw [Finset.prod_eq_zero (i := 0) (by simp) (by simp)] simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 365–368 at
2987e49b6fb3↗
gauss.main.s2caseLeaves
∀ (j : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withm : ℕ,ih : ∀ (j : ℕ), ∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.succThe successor of a natural numbern. .Lean, lines 369–379
| succ m ih => intro j cases j with | zero => exact ⟨1, by simp⟩ | succ j => obtain ⟨a, ha⟩ := ih j obtain ⟨b, hb⟩ := ih (j + 1) refine ⟨a + 2 ^ (j + 1) * b, ?_⟩ rw [key, ← ha, ← hb] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 369–379 at
2987e49b6fb3↗gauss.main.s2.s1caseLeaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (0 : ℕ), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.zeroZero, the smallest natural number. ,Exists.introExistential introduction. .Lean, line 372
| zero => exact ⟨1, by simp⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 372 at
2987e49b6fb3↗gauss.main.s2.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withj : ℕ.Uses library
Nat.succThe successor of a natural numbern. ,Exists.introExistential introduction. .Lean, lines 373–379
| succ j => obtain ⟨a, ha⟩ := ih j obtain ⟨b, hb⟩ := ih (j + 1) refine ⟨a + 2 ^ (j + 1) * b, ?_⟩ rw [key, ← ha, ← hb] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 373–379 at
2987e49b6fb3↗gauss.main.s2.s2.s1obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), witha : ℤ,ha : (↑a : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 374
obtain ⟨a, ha⟩ := ih j
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 374 at
2987e49b6fb3↗gauss.main.s2.s2.s2obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m + (1 : ℕ) - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)), withb : ℤ,hb : (↑b : ℚ) = ∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 375
obtain ⟨b, hb⟩ := ih (j + 1)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 375 at
2987e49b6fb3↗
hoddhave∀ (n k : ℕ), k ≤ n → ∀ (c : ℕ → ℤ), ∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), (↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhodd : ∀ (n k : ℕ), k ≤ n → ∀ (c : ℕ → ℤ), ∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), (↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 381–429
have hodd : ∀ (n k : ℕ), k ≤ n → ∀ (c : ℕ → ℤ), ∃ z : ℤ, (z : ℚ) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + 1), (c j : ℚ) / ((2 : ℚ) ^ (k - j) - 1) := by intro n k hk c have hint : ∀ j ∈ Finset.range (k + 1), ∃ z : ℤ, (z : ℚ) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ((c j : ℚ) / ((2 : ℚ) ^ (k - j) - 1)) := by intro j hj have hjk : j ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) by_cases hjeq : j = k · subst hjeq exact ⟨0, by simp⟩ · obtain ⟨d, hd⟩ : ∃ d, k - j = d + 1 := ⟨k - j - 1, by omega⟩ rw [hd] have hdn : d + 1 ≤ n := by omega have ht : 1 ≤ n / (d + 1) := (Nat.one_le_div_iff (by omega)).mpr hdn have hP1 : (d + 1) * (n / (d + 1)) ≤ n := Nat.mul_div_le n (d + 1) have hP2 : n < (d + 1) * (n / (d + 1)) + (d + 1) := by have := Nat.lt_mul_div_succ n (show 0 < d + 1 by omega) rw [Nat.mul_succ] at this exact this have hP3 : (d + 1) ≤ (d + 1) * (n / (d + 1)) := Nat.le_mul_of_pos_right _ ht have hmem : (d + 1) * (n / (d + 1)) ∈ Finset.Ioc (n / 2) n := by rw [Finset.mem_Ioc] generalize (d + 1) * (n / (d + 1)) = P at hP1 hP2 hP3 ⊢ omega have hdvd : ((2 : ℤ) ^ (d + 1) - 1) ∣ ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1) := by refine dvd_trans ?_ (Finset.dvd_prod_of_mem _ hmem) have := sub_dvd_pow_sub_pow ((2 : ℤ) ^ (d + 1)) 1 (n / (d + 1)) rw [one_pow, ← pow_mul] at this exact this obtain ⟨q, hq⟩ := hdvd have hne : ((2 : ℚ) ^ (d + 1) - 1) ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith refine ⟨c j * q, ?_⟩ have hcast : (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) = (((2 : ℤ) ^ (d + 1) - 1 : ℤ) : ℚ) * (q : ℚ) := by rw [← Int.cast_mul, ← hq] push_cast rfl rw [hcast] push_cast field_simp choose! g hg using hint refine ⟨∑ j ∈ Finset.range (k + 1), g j, ?_⟩ push_cast rw [Finset.mul_sum] exact Finset.sum_congr rfl hgtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 381–429 at
2987e49b6fb3↗hodd.hinthave∀ j ∈ Finset.range (k + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ)))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), (↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhint : ∀ j ∈ Finset.range (k + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, lines 385–424
have hint : ∀ j ∈ Finset.range (k + 1), ∃ z : ℤ, (z : ℚ) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ((c j : ℚ) / ((2 : ℚ) ^ (k - j) - 1)) := by intro j hj have hjk : j ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) by_cases hjeq : j = k · subst hjeq exact ⟨0, by simp⟩ · obtain ⟨d, hd⟩ : ∃ d, k - j = d + 1 := ⟨k - j - 1, by omega⟩ rw [hd] have hdn : d + 1 ≤ n := by omega have ht : 1 ≤ n / (d + 1) := (Nat.one_le_div_iff (by omega)).mpr hdn have hP1 : (d + 1) * (n / (d + 1)) ≤ n := Nat.mul_div_le n (d + 1) have hP2 : n < (d + 1) * (n / (d + 1)) + (d + 1) := by have := Nat.lt_mul_div_succ n (show 0 < d + 1 by omega) rw [Nat.mul_succ] at this exact this have hP3 : (d + 1) ≤ (d + 1) * (n / (d + 1)) := Nat.le_mul_of_pos_right _ ht have hmem : (d + 1) * (n / (d + 1)) ∈ Finset.Ioc (n / 2) n := by rw [Finset.mem_Ioc] generalize (d + 1) * (n / (d + 1)) = P at hP1 hP2 hP3 ⊢ omega have hdvd : ((2 : ℤ) ^ (d + 1) - 1) ∣ ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1) := by refine dvd_trans ?_ (Finset.dvd_prod_of_mem _ hmem) have := sub_dvd_pow_sub_pow ((2 : ℤ) ^ (d + 1)) 1 (n / (d + 1)) rw [one_pow, ← pow_mul] at this exact this obtain ⟨q, hq⟩ := hdvd have hne : ((2 : ℚ) ^ (d + 1) - 1) ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith refine ⟨c j * q, ?_⟩ have hcast : (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) = (((2 : ℤ) ^ (d + 1) - 1 : ℤ) : ℚ) * (q : ℚ) := by rw [← Int.cast_mul, ← hq] push_cast rfl rw [hcast] push_cast field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 385–424 at
2987e49b6fb3↗hodd.hint.hjkhavej ≤ kLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))), withhjk : j ≤ k.Uses library
Nat.lt_succ_iff,Finset.mem_range.Lean, line 389
have hjk : j ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 389 at
2987e49b6fb3↗hodd.hint.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))).Uses library
Exists.introExistential introduction. .Lean, lines 391–392
· subst hjeq exact ⟨0, by simp⟩targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 391–392 at
2987e49b6fb3↗hodd.hint.s3caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))).Uses library
Exists.introExistential introduction. .Lean, lines 393–424
· obtain ⟨d, hd⟩ : ∃ d, k - j = d + 1 := ⟨k - j - 1, by omega⟩ rw [hd] have hdn : d + 1 ≤ n := by omega have ht : 1 ≤ n / (d + 1) := (Nat.one_le_div_iff (by omega)).mpr hdn have hP1 : (d + 1) * (n / (d + 1)) ≤ n := Nat.mul_div_le n (d + 1) have hP2 : n < (d + 1) * (n / (d + 1)) + (d + 1) := by have := Nat.lt_mul_div_succ n (show 0 < d + 1 by omega) rw [Nat.mul_succ] at this exact this have hP3 : (d + 1) ≤ (d + 1) * (n / (d + 1)) := Nat.le_mul_of_pos_right _ ht have hmem : (d + 1) * (n / (d + 1)) ∈ Finset.Ioc (n / 2) n := by rw [Finset.mem_Ioc] generalize (d + 1) * (n / (d + 1)) = P at hP1 hP2 hP3 ⊢ omega have hdvd : ((2 : ℤ) ^ (d + 1) - 1) ∣ ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1) := by refine dvd_trans ?_ (Finset.dvd_prod_of_mem _ hmem) have := sub_dvd_pow_sub_pow ((2 : ℤ) ^ (d + 1)) 1 (n / (d + 1)) rw [one_pow, ← pow_mul] at this exact this obtain ⟨q, hq⟩ := hdvd have hne : ((2 : ℚ) ^ (d + 1) - 1) ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith refine ⟨c j * q, ?_⟩ have hcast : (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) = (((2 : ℤ) ^ (d + 1) - 1 : ℤ) : ℚ) * (q : ℚ) := by rw [← Int.cast_mul, ← hq] push_cast rfl rw [hcast] push_cast field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 393–424 at
2987e49b6fb3↗hodd.hint.s3.s1obtain∃ (d : ℕ), k - j = d + (1 : ℕ)Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))), withd : ℕ,hd : k - j = d + (1 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 393
· obtain ⟨d, hd⟩ : ∃ d, k - j = d + 1 := ⟨k - j - 1, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 393 at
2987e49b6fb3↗hodd.hint.s3.hdnhaved + (1 : ℕ) ≤ nroutine: omegaLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhdn : d + (1 : ℕ) ≤ n.Lean, line 395
have hdn : d + 1 ≤ n := by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 395 at
2987e49b6fb3↗hodd.hint.s3.hthave(1 : ℕ) ≤ n / (d + (1 : ℕ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withht : (1 : ℕ) ≤ n / (d + (1 : ℕ)).Uses library
Nat.one_le_div_iff.Lean, line 396
have ht : 1 ≤ n / (d + 1) := (Nat.one_le_div_iff (by omega)).mpr hdn
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 396 at
2987e49b6fb3↗hodd.hint.s3.hP1have(d + (1 : ℕ)) * (n / (d + (1 : ℕ))) ≤ nLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhP1 : (d + (1 : ℕ)) * (n / (d + (1 : ℕ))) ≤ n.Uses library
Nat.mul_div_le.Lean, line 397
have hP1 : (d + 1) * (n / (d + 1)) ≤ n := Nat.mul_div_le n (d + 1)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 397 at
2987e49b6fb3↗hodd.hint.s3.hP2haven < (d + (1 : ℕ)) * (n / (d + (1 : ℕ))) + (d + (1 : ℕ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhP2 : n < (d + (1 : ℕ)) * (n / (d + (1 : ℕ))) + (d + (1 : ℕ)).Uses library
Nat.mul_succ.Lean, lines 398–401
have hP2 : n < (d + 1) * (n / (d + 1)) + (d + 1) := by have := Nat.lt_mul_div_succ n (show 0 < d + 1 by omega) rw [Nat.mul_succ] at this exact thistargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 398–401 at
2987e49b6fb3↗hodd.hint.s3.hP2.thishaven < (d + (1 : ℕ)) * (n / (d + (1 : ℕ)) + (1 : ℕ))Leaves
n < (d + (1 : ℕ)) * (n / (d + (1 : ℕ))) + (d + (1 : ℕ)), withthis : n < (d + (1 : ℕ)) * (n / (d + (1 : ℕ)) + (1 : ℕ)).Uses library
Nat.lt_mul_div_succ.Lean, line 399
have := Nat.lt_mul_div_succ n (show 0 < d + 1 by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 399 at
2987e49b6fb3↗
hodd.hint.s3.hP3haved + (1 : ℕ) ≤ (d + (1 : ℕ)) * (n / (d + (1 : ℕ)))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhP3 : d + (1 : ℕ) ≤ (d + (1 : ℕ)) * (n / (d + (1 : ℕ))).Uses library
Nat.le_mul_of_pos_right.Lean, line 402
have hP3 : (d + 1) ≤ (d + 1) * (n / (d + 1)) := Nat.le_mul_of_pos_right _ ht
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 402 at
2987e49b6fb3↗hodd.hint.s3.hmemhave(d + (1 : ℕ)) * (n / (d + (1 : ℕ))) ∈ Finset.Ioc (n / (2 : ℕ)) nLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhmem : (d + (1 : ℕ)) * (n / (d + (1 : ℕ))) ∈ Finset.Ioc (n / (2 : ℕ)) n.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.mem_Ioc.Lean, lines 403–406
have hmem : (d + 1) * (n / (d + 1)) ∈ Finset.Ioc (n / 2) n := by rw [Finset.mem_Ioc] generalize (d + 1) * (n / (d + 1)) = P at hP1 hP2 hP3 ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 403–406 at
2987e49b6fb3↗hodd.hint.s3.hdvdhave(2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℤ) ^ m - (1 : ℤ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhdvd : (2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℤ) ^ m - (1 : ℤ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,dvd_trans,Finset.dvd_prod_of_mem,one_pow,pow_mul.Lean, lines 407–411
have hdvd : ((2 : ℤ) ^ (d + 1) - 1) ∣ ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1) := by refine dvd_trans ?_ (Finset.dvd_prod_of_mem _ hmem) have := sub_dvd_pow_sub_pow ((2 : ℤ) ^ (d + 1)) 1 (n / (d + 1)) rw [one_pow, ← pow_mul] at this exact thistargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 407–411 at
2987e49b6fb3↗hodd.hint.s3.hdvd.thishave(2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ ((2 : ℤ) ^ (d + (1 : ℕ))) ^ (n / (d + (1 : ℕ))) - (1 : ℤ) ^ (n / (d + (1 : ℕ)))Leaves
(2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ (2 : ℤ) ^ ((d + (1 : ℕ)) * (n / (d + (1 : ℕ)))) - (1 : ℤ), withthis : (2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ ((2 : ℤ) ^ (d + (1 : ℕ))) ^ (n / (d + (1 : ℕ))) - (1 : ℤ) ^ (n / (d + (1 : ℕ))).Uses library
sub_dvd_pow_sub_pow.Lean, line 409
have := sub_dvd_pow_sub_pow ((2 : ℤ) ^ (d + 1)) 1 (n / (d + 1))
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 409 at
2987e49b6fb3↗
hodd.hint.s3.s9obtain(2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ) ∣ ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℤ) ^ m - (1 : ℤ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withq : ℤ,hq : ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℤ) ^ m - (1 : ℤ)) = ((2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ)) * q.Lean, line 412
obtain ⟨q, hq⟩ := hdvd
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 412 at
2987e49b6fb3↗hodd.hint.s3.hnehave(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhne : (2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 413–415
have hne : ((2 : ℚ) ^ (d + 1) - 1) ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 413–415 at
2987e49b6fb3↗hodd.hint.s3.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ))Leaves
(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 414
have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 414 at
2987e49b6fb3↗
hodd.hint.s3.hcasthave∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ)) = (↑((2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ)) : ℚ) * (↑q : ℚ)Leaves
(↑(c j * q) : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ((↑(c j) : ℚ) / ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))), withhcast : ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ)) = (↑((2 : ℤ) ^ (d + (1 : ℕ)) - (1 : ℤ)) : ℚ) * (↑q : ℚ).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Int.cast_mul.Lean, lines 417–421
have hcast : (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) = (((2 : ℤ) ^ (d + 1) - 1 : ℤ) : ℚ) * (q : ℚ) := by rw [← Int.cast_mul, ← hq] push_cast rfltargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 417–421 at
2987e49b6fb3↗
combinehave∀ (p M : ℚ) (a : ℕ) (Ω A B m : ℤ), Odd Ω → (↑Ω : ℚ) * p = (2 : ℚ) ^ a * (↑A : ℚ) → (↑B : ℚ) = M * p → (↑m : ℚ) = M → ∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * pLeaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withcombine : ∀ (p M : ℚ) (a : ℕ) (Ω A B m : ℤ), Odd Ω → (↑Ω : ℚ) * p = (2 : ℚ) ^ a * (↑A : ℚ) → (↑B : ℚ) = M * p → (↑m : ℚ) = M → ∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p.Uses library
OddAn elementaof a semiring is odd if there existsksucha = 2*k + 1. ,Exists.introExistential introduction. .Lean, lines 430–449
have combine : ∀ (p M : ℚ) (a : ℕ) (Ω A B m : ℤ), Odd Ω → (Ω : ℚ) * p = 2 ^ a * A → (B : ℚ) = M * p → (m : ℚ) = M → ∃ z : ℤ, (z : ℚ) * 2 ^ a = M * p := by intro p M a Ω A B m hΩ h1 h2 hm have hint : Ω * B = 2 ^ a * (m * A) := by have : ((Ω * B : ℤ) : ℚ) = ((2 ^ a * (m * A) : ℤ) : ℚ) := by push_cast rw [h2, ← hm] linear_combination (m : ℚ) * h1 exact_mod_cast this obtain ⟨t, ht⟩ := hΩ have hcop : IsCoprime ((2 : ℤ) ^ a) Ω := by apply IsCoprime.pow_left exact ⟨-t, 1, by rw [ht]; ring⟩ have hdvd : (2 : ℤ) ^ a ∣ B * Ω := ⟨m * A, by rw [mul_comm, hint]⟩ obtain ⟨c, hc⟩ := hcop.dvd_of_dvd_mul_right hdvd refine ⟨c, ?_⟩ rw [← h2, hc] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 430–449 at
2987e49b6fb3↗combine.hinthaveΩ * B = (2 : ℤ) ^ a * (m * A)Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p, withhint : Ω * B = (2 : ℤ) ^ a * (m * A).Lean, lines 434–439
have hint : Ω * B = 2 ^ a * (m * A) := by have : ((Ω * B : ℤ) : ℚ) = ((2 ^ a * (m * A) : ℤ) : ℚ) := by push_cast rw [h2, ← hm] linear_combination (m : ℚ) * h1 exact_mod_cast thistargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 434–439 at
2987e49b6fb3↗combine.hint.thishave(↑(Ω * B) : ℚ) = (↑((2 : ℤ) ^ a * (m * A)) : ℚ)Leaves
Ω * B = (2 : ℤ) ^ a * (m * A), withthis : (↑(Ω * B) : ℚ) = (↑((2 : ℤ) ^ a * (m * A)) : ℚ).Lean, lines 435–438
have : ((Ω * B : ℤ) : ℚ) = ((2 ^ a * (m * A) : ℤ) : ℚ) := by push_cast rw [h2, ← hm] linear_combination (m : ℚ) * h1targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 435–438 at
2987e49b6fb3↗
combine.s2obtainOdd ΩLeaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p, witht : ℤ,ht : Ω = (2 : ℤ) * t + (1 : ℤ).Lean, line 440
obtain ⟨t, ht⟩ := hΩ
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 440 at
2987e49b6fb3↗combine.hcophaveIsCoprime ((2 : ℤ) ^ a) ΩLeaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p, withhcop : IsCoprime ((2 : ℤ) ^ a) Ω.Uses library
IsCoprimeThe proposition thatxandyare coprime, defined to be the existence ofaandbsuch thata * x + b * y = 1. ,IsCoprime.pow_left,Exists.introExistential introduction. .Lean, lines 441–443
have hcop : IsCoprime ((2 : ℤ) ^ a) Ω := by apply IsCoprime.pow_left exact ⟨-t, 1, by rw [ht]; ring⟩targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 441–443 at
2987e49b6fb3↗combine.hdvdhave(2 : ℤ) ^ a ∣ B * ΩLeaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p, withhdvd : (2 : ℤ) ^ a ∣ B * Ω.Uses library
Exists.introExistential introduction. ,mul_comm.Lean, line 444
have hdvd : (2 : ℤ) ^ a ∣ B * Ω := ⟨m * A, by rw [mul_comm, hint]⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 444 at
2987e49b6fb3↗combine.s5obtain(2 : ℤ) ^ a ∣ BLeaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ a = M * p, withc : ℤ,hc : B = (2 : ℤ) ^ a * c.Lean, line 445
obtain ⟨c, hc⟩ := hcop.dvd_of_dvd_mul_right hdvd
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 445 at
2987e49b6fb3↗
hcorehave∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhcore : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IccThe finset $[a, b]$ of elementsxsuch thata ≤ xandx ≤ b. .Lean, lines 450–582
have hcore : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (n k : ℕ), k ≤ n → ∃ z : ℤ, (z : ℚ) * (2 : ℚ) ^ (k * (k - 1) / 2) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) := by intro Qc hQc n k hk have hQcint : ∀ j : ℕ, ∃ g : ℤ, Qc n j = 2 ^ (j * (j - 1) / 2) * g := by intro j obtain ⟨a, ha⟩ := gauss n j obtain ⟨b, hb⟩ := gauss (2 * n - j) n refine ⟨(-1) ^ j * a * b, ?_⟩ rw [hQc] simp only [] rw [← ha, ← hb] push_cast ring choose g hg using hQcint -- the odd product have hΩdiv : ∀ s : ℕ, 1 ≤ s → s ≤ 2 * n → ∃ w : ℤ, (w : ℚ) * ((2 : ℚ) ^ s - 1) = ((∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1) : ℤ) : ℚ) := by intro s h1 h2 refine ⟨∏ t ∈ (Finset.Icc 1 (2 * n)).erase s, ((2 : ℤ) ^ t - 1), ?_⟩ rw [← Finset.prod_erase_mul _ _ (Finset.mem_Icc.mpr ⟨h1, h2⟩)] push_cast ring have hΩodd : Odd (∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1)) := by apply Finset.prod_induction _ (fun x : ℤ => Odd x) · intro x y hx hy exact hx.mul hy · exact odd_one · intro t ht have ht1 : t ≠ 0 := by have := (Finset.mem_Icc.mp ht).1 omega exact Even.sub_odd ((Int.even_pow).mpr ⟨even_two, ht1⟩) odd_one -- one term 2^a / (2^a - 2^b), times the odd product, is an integer have key1 : ∀ a b : ℕ, a ≠ b → a ≤ 2 * n → b ≤ 2 * n → ∃ w : ℤ, (w : ℚ) = ((∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1) : ℤ) : ℚ) * 2 ^ a * (1 / ((2 : ℚ) ^ a - 2 ^ b)) := by intro a b hab ha hb rcases Nat.lt_or_gt_of_ne hab with hlt | hgt · obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hlt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨-w, ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2a : (2 : ℚ) ^ a ≠ 0 := by positivity rw [← hw, show a + d + 1 = a + (d + 1) by ring, show (2 : ℚ) ^ (a + (d + 1)) = 2 ^ a * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ a - 2 ^ a * 2 ^ (d + 1) = -(2 ^ a * (2 ^ (d + 1) - 1)) := by ring rw [this] field_simp push_cast ring · obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hgt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨w * 2 ^ (d + 1), ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2b : (2 : ℚ) ^ b ≠ 0 := by positivity rw [← hw, show b + d + 1 = b + (d + 1) by ring, show (2 : ℚ) ^ (b + (d + 1)) = 2 ^ b * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ b * 2 ^ (d + 1) - 2 ^ b = 2 ^ b * (2 ^ (d + 1) - 1) := by ring rw [this] field_simp push_cast ring set Ω : ℤ := ∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1) with hΩ have hK : ∀ K ∈ Finset.Ioc n (2 * n), ∃ w : ℤ, (w : ℚ) = (Ω : ℚ) * 2 ^ k * (1 / ((2 : ℚ) ^ k - 2 ^ K)) := by intro K hK' have := Finset.mem_Ioc.mp hK' exact key1 k K (by omega) (by omega) (by omega) have hI : ∀ i ∈ (Finset.range (n + 1)).erase k, ∃ w : ℤ, (w : ℚ) = (Ω : ℚ) * 2 ^ k * (1 / ((2 : ℚ) ^ k - 2 ^ i)) := by intro i hi have h1 := Finset.ne_of_mem_erase hi have h2 := Finset.mem_range.mp (Finset.mem_of_mem_erase hi) exact key1 k i (Ne.symm h1) (by omega) (by omega) have hT : ∀ j ∈ Finset.Ioc k n, ∃ w : ℤ, (w : ℚ) * 2 ^ (k * (k - 1) / 2) = (Ω : ℚ) * (Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k))) := by intro j hj have hj' := Finset.mem_Ioc.mp hj obtain ⟨d, hd⟩ : ∃ d, j - k = d + 1 := ⟨j - k - 1, by omega⟩ obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) have hmono : k * (k - 1) / 2 ≤ j * (j - 1) / 2 := Nat.div_le_div_right (Nat.mul_le_mul (by omega) (by omega)) obtain ⟨e, he⟩ := Nat.exists_eq_add_of_le hmono refine ⟨-(w * g j * 2 ^ e * 2 ^ (d + 1)), ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne' : (1 : ℚ) - 2 ^ (d + 1) ≠ 0 := by intro h apply hne linarith rw [hd, hg j, he, ← hw, show (2 : ℚ) ^ (k * (k - 1) / 2 + e) = 2 ^ (k * (k - 1) / 2) * 2 ^ e from pow_add _ _ _] field_simp push_cast ring choose! fK hfK using hK choose! fI hfI using hI choose! fT hfT using hT have h2adic : (Ω : ℚ) * ∑ j ∈ Finset.range (k + 1), Qc n j / ((2 : ℚ) ^ (k - j) - 1) = 2 ^ (k * (k - 1) / 2) * ((g k * (∑ K ∈ Finset.Ioc n (2 * n), fK K - ∑ i ∈ (Finset.range (n + 1)).erase k, fI i) - ∑ j ∈ Finset.Ioc k n, fT j : ℤ) : ℚ) := by rw [hform Qc hQc n k hk] push_cast rw [Finset.sum_congr rfl hfK, Finset.sum_congr rfl hfI, ← Finset.mul_sum, ← Finset.mul_sum] have htail : (2 : ℚ) ^ (k * (k - 1) / 2) * ∑ j ∈ Finset.Ioc k n, (fT j : ℚ) = (Ω : ℚ) * ∑ j ∈ Finset.Ioc k n, Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by rw [Finset.mul_sum, Finset.mul_sum] refine Finset.sum_congr rfl (fun j hj => ?_) rw [mul_comm] exact hfT j hj rw [hg k] simp only [one_div] at htail ⊢ linear_combination htail -- the odd half obtain ⟨B, hB⟩ := hodd n k hk (fun j => 2 ^ (j * (j - 1) / 2) * g j) have hB' : (B : ℚ) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) := by rw [hB] congr 1 refine Finset.sum_congr rfl (fun j _ => ?_) rw [hg j] push_cast ring exact combine _ _ _ Ω _ B (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1)) hΩodd h2adic hB' (by push_cast; rfl)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 450–582 at
2987e49b6fb3↗hcore.hQcinthave∀ (j : ℕ), ∃ (g : ℤ), Qc n j = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * (↑g : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhQcint : ∀ (j : ℕ), ∃ (g : ℤ), Qc n j = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * (↑g : ℚ).Uses library
Exists.introExistential introduction. .Lean, lines 460–469
have hQcint : ∀ j : ℕ, ∃ g : ℤ, Qc n j = 2 ^ (j * (j - 1) / 2) * g := by intro j obtain ⟨a, ha⟩ := gauss n j obtain ⟨b, hb⟩ := gauss (2 * n - j) n refine ⟨(-1) ^ j * a * b, ?_⟩ rw [hQc] simp only [] rw [← ha, ← hb] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 460–469 at
2987e49b6fb3↗hcore.hQcint.s1obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (g : ℤ), Qc n j = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * (↑g : ℚ), witha : ℤ,ha : (↑a : ℚ) = ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 462
obtain ⟨a, ha⟩ := gauss n j
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 462 at
2987e49b6fb3↗hcore.hQcint.s2obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (g : ℤ), Qc n j = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * (↑g : ℚ), withb : ℤ,hb : (↑b : ℚ) = ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 463
obtain ⟨b, hb⟩ := gauss (2 * n - j) n
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 463 at
2987e49b6fb3↗
hcore.h_x3a9div(hΩdiv) have∀ (s : ℕ), (1 : ℕ) ≤ s → s ≤ (2 : ℕ) * n → ∃ (w : ℤ), (↑w : ℚ) * ((2 : ℚ) ^ s - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhΩdiv : ∀ (s : ℕ), (1 : ℕ) ≤ s → s ≤ (2 : ℕ) * n → ∃ (w : ℤ), (↑w : ℚ) * ((2 : ℚ) ^ s - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ).Uses library
Finset.IccThe finset $[a, b]$ of elementsxsuch thata ≤ xandx ≤ b. ,Exists.introExistential introduction. ,Finset.prod_erase_mulA variant ofFinset.mul_prod_erasewith the multiplication swapped. ,Finset.mem_Icc,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 472–478
have hΩdiv : ∀ s : ℕ, 1 ≤ s → s ≤ 2 * n → ∃ w : ℤ, (w : ℚ) * ((2 : ℚ) ^ s - 1) = ((∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1) : ℤ) : ℚ) := by intro s h1 h2 refine ⟨∏ t ∈ (Finset.Icc 1 (2 * n)).erase s, ((2 : ℤ) ^ t - 1), ?_⟩ rw [← Finset.prod_erase_mul _ _ (Finset.mem_Icc.mpr ⟨h1, h2⟩)] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 472–478 at
2987e49b6fb3↗hcore.h_x3a9odd(hΩodd) haveOdd (∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ)))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhΩodd : Odd (∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))).Uses library
OddAn elementaof a semiring is odd if there existsksucha = 2*k + 1. ,Finset.IccThe finset $[a, b]$ of elementsxsuch thata ≤ xandx ≤ b. ,Finset.prod_inductionTo prove a property of a product, it suffices to prove that the property is multiplicative and holds on factors. .Lean, lines 479–488
have hΩodd : Odd (∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1)) := by apply Finset.prod_induction _ (fun x : ℤ => Odd x) · intro x y hx hy exact hx.mul hy · exact odd_one · intro t ht have ht1 : t ≠ 0 := by have := (Finset.mem_Icc.mp ht).1 omega exact Even.sub_odd ((Int.even_pow).mpr ⟨even_two, ht1⟩) odd_onetargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 479–488 at
2987e49b6fb3↗hcore.h_x3a9odd.s1caseLeaves
∀ (a b : ℤ), Odd a → Odd b → Odd (a * b).Lean, lines 481–482
· intro x y hx hy exact hx.mul hytargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 481–482 at
2987e49b6fb3↗hcore.h_x3a9odd.s2caseLeaves
Odd (1 : ℤ).Uses library
odd_one.Lean, line 483
· exact odd_one
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 483 at
2987e49b6fb3↗hcore.h_x3a9odd.s3caseLeaves
∀ x ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), Odd ((2 : ℤ) ^ x - (1 : ℤ)).Uses library
Even.sub_odd,Int.even_pow,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,even_two,odd_one.Lean, lines 484–488
· intro t ht have ht1 : t ≠ 0 := by have := (Finset.mem_Icc.mp ht).1 omega exact Even.sub_odd ((Int.even_pow).mpr ⟨even_two, ht1⟩) odd_onetargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 484–488 at
2987e49b6fb3↗hcore.h_x3a9odd.s3.ht1havet ≠ (0 : ℕ)Leaves
Odd ((2 : ℤ) ^ t - (1 : ℤ)), withht1 : t ≠ (0 : ℕ).Lean, lines 485–487
have ht1 : t ≠ 0 := by have := (Finset.mem_Icc.mp ht).1 omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 485–487 at
2987e49b6fb3↗hcore.h_x3a9odd.s3.ht1.thishave(1 : ℕ) ≤ tLeaves
t ≠ (0 : ℕ), withthis : (1 : ℕ) ≤ t.Uses library
Finset.mem_Icc.Lean, line 486
have := (Finset.mem_Icc.mp ht).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 486 at
2987e49b6fb3↗
hcore.key1have∀ (a b : ℕ), a ≠ b → a ≤ (2 : ℕ) * n → b ≤ (2 : ℕ) * n → ∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ b))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withkey1 : ∀ (a b : ℕ), a ≠ b → a ≤ (2 : ℕ) * n → b ≤ (2 : ℕ) * n → ∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ b)).Uses library
Finset.IccThe finset $[a, b]$ of elementsxsuch thata ≤ xandx ≤ b. ,Nat.lt_or_gt_of_ne.Lean, lines 490–519
have key1 : ∀ a b : ℕ, a ≠ b → a ≤ 2 * n → b ≤ 2 * n → ∃ w : ℤ, (w : ℚ) = ((∏ t ∈ Finset.Icc 1 (2 * n), ((2 : ℤ) ^ t - 1) : ℤ) : ℚ) * 2 ^ a * (1 / ((2 : ℚ) ^ a - 2 ^ b)) := by intro a b hab ha hb rcases Nat.lt_or_gt_of_ne hab with hlt | hgt · obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hlt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨-w, ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2a : (2 : ℚ) ^ a ≠ 0 := by positivity rw [← hw, show a + d + 1 = a + (d + 1) by ring, show (2 : ℚ) ^ (a + (d + 1)) = 2 ^ a * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ a - 2 ^ a * 2 ^ (d + 1) = -(2 ^ a * (2 ^ (d + 1) - 1)) := by ring rw [this] field_simp push_cast ring · obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hgt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨w * 2 ^ (d + 1), ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2b : (2 : ℚ) ^ b ≠ 0 := by positivity rw [← hw, show b + d + 1 = b + (d + 1) by ring, show (2 : ℚ) ^ (b + (d + 1)) = 2 ^ b * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ b * 2 ^ (d + 1) - 2 ^ b = 2 ^ b * (2 ^ (d + 1) - 1) := by ring rw [this] field_simp push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 490–519 at
2987e49b6fb3↗hcore.key1.s1caseLeaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ b)).Uses library
Exists.introExistential introduction. ,pow_add.Lean, lines 494–506
· obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hlt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨-w, ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2a : (2 : ℚ) ^ a ≠ 0 := by positivity rw [← hw, show a + d + 1 = a + (d + 1) by ring, show (2 : ℚ) ^ (a + (d + 1)) = 2 ^ a * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ a - 2 ^ a * 2 ^ (d + 1) = -(2 ^ a * (2 ^ (d + 1) - 1)) := by ring rw [this] field_simp push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 494–506 at
2987e49b6fb3↗hcore.key1.s1.s1obtain∃ (k : ℕ), b = a + k + (1 : ℕ)Leaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ (a + d + (1 : ℕ)))), withd : ℕ,hab : a ≠ a + d + (1 : ℕ),hb : a + d + (1 : ℕ) ≤ (2 : ℕ) * n,hlt : a < a + d + (1 : ℕ).Uses library
Nat.exists_eq_add_of_lt.Lean, line 494
· obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hlt
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 494 at
2987e49b6fb3↗hcore.key1.s1.s2obtain∃ (w : ℤ), (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ)Leaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ (a + d + (1 : ℕ)))), withw : ℤ,hw : (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ).Lean, line 495
obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 495 at
2987e49b6fb3↗hcore.key1.s1.hnehave(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
(↑(-w) : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ (a + d + (1 : ℕ)))), withhne : (2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 497–499
have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 497–499 at
2987e49b6fb3↗hcore.key1.s1.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ))Leaves
(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 498
have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 498 at
2987e49b6fb3↗
hcore.key1.s1.h2ahave(2 : ℚ) ^ a ≠ (0 : ℚ)routine: positivityLeaves
(↑(-w) : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ (a + d + (1 : ℕ)))), withh2a : (2 : ℚ) ^ a ≠ (0 : ℚ).Lean, line 500
have h2a : (2 : ℚ) ^ a ≠ 0 := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 500 at
2987e49b6fb3↗hcore.key1.s1.thishave(2 : ℚ) ^ a - (2 : ℚ) ^ a * (2 : ℚ) ^ (d + (1 : ℕ)) = -((2 : ℚ) ^ a * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)))routine: ringLeaves
(↑(-w) : ℚ) = (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ a * (2 : ℚ) ^ (d + (1 : ℕ)))), withthis : (2 : ℚ) ^ a - (2 : ℚ) ^ a * (2 : ℚ) ^ (d + (1 : ℕ)) = -((2 : ℚ) ^ a * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))).Lean, line 502
have : (2 : ℚ) ^ a - 2 ^ a * 2 ^ (d + 1) = -(2 ^ a * (2 ^ (d + 1) - 1)) := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 502 at
2987e49b6fb3↗
hcore.key1.s2caseLeaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ a * ((1 : ℚ) / ((2 : ℚ) ^ a - (2 : ℚ) ^ b)).Uses library
Exists.introExistential introduction. ,pow_add.Lean, lines 507–519
· obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hgt obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) refine ⟨w * 2 ^ (d + 1), ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have h2b : (2 : ℚ) ^ b ≠ 0 := by positivity rw [← hw, show b + d + 1 = b + (d + 1) by ring, show (2 : ℚ) ^ (b + (d + 1)) = 2 ^ b * 2 ^ (d + 1) from pow_add _ _ _] have : (2 : ℚ) ^ b * 2 ^ (d + 1) - 2 ^ b = 2 ^ b * (2 ^ (d + 1) - 1) := by ring rw [this] field_simp push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 507–519 at
2987e49b6fb3↗hcore.key1.s2.s1obtain∃ (k : ℕ), a = b + k + (1 : ℕ)Leaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ (b + d + (1 : ℕ)) * ((1 : ℚ) / ((2 : ℚ) ^ (b + d + (1 : ℕ)) - (2 : ℚ) ^ b)), withd : ℕ,hab : b + d + (1 : ℕ) ≠ b,ha : b + d + (1 : ℕ) ≤ (2 : ℕ) * n,hgt : b + d + (1 : ℕ) > b.Uses library
Nat.exists_eq_add_of_lt.Lean, line 507
· obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_lt hgt
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 507 at
2987e49b6fb3↗hcore.key1.s2.s2obtain∃ (w : ℤ), (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ)Leaves
∃ (w : ℤ), (↑w : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ (b + d + (1 : ℕ)) * ((1 : ℚ) / ((2 : ℚ) ^ (b + d + (1 : ℕ)) - (2 : ℚ) ^ b)), withw : ℤ,hw : (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ).Lean, line 508
obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 508 at
2987e49b6fb3↗hcore.key1.s2.hnehave(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
(↑(w * (2 : ℤ) ^ (d + (1 : ℕ))) : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ (b + d + (1 : ℕ)) * ((1 : ℚ) / ((2 : ℚ) ^ (b + d + (1 : ℕ)) - (2 : ℚ) ^ b)), withhne : (2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 510–512
have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 510–512 at
2987e49b6fb3↗hcore.key1.s2.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ))Leaves
(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 511
have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 511 at
2987e49b6fb3↗
hcore.key1.s2.h2bhave(2 : ℚ) ^ b ≠ (0 : ℚ)routine: positivityLeaves
(↑(w * (2 : ℤ) ^ (d + (1 : ℕ))) : ℚ) = (↑(∏ t ∈ Finset.Icc (1 : ℕ) ((2 : ℕ) * n), ((2 : ℤ) ^ t - (1 : ℤ))) : ℚ) * (2 : ℚ) ^ (b + d + (1 : ℕ)) * ((1 : ℚ) / ((2 : ℚ) ^ (b + d + (1 : ℕ)) - (2 : ℚ) ^ b)), withh2b : (2 : ℚ) ^ b ≠ (0 : ℚ).Lean, line 513
have h2b : (2 : ℚ) ^ b ≠ 0 := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 513 at
2987e49b6fb3↗hcore.key1.s2.thishave(2 : ℚ) ^ b * (2 : ℚ) ^ (d + (1 : ℕ)) - (2 : ℚ) ^ b = (2 : ℚ) ^ b * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ))routine: ringLeaves
(↑(w * (2 : ℤ) ^ (d + (1 : ℕ))) : ℚ) = (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) * ((2 : ℚ) ^ b * (2 : ℚ) ^ (d + (1 : ℕ))) * ((1 : ℚ) / ((2 : ℚ) ^ b * (2 : ℚ) ^ (d + (1 : ℕ)) - (2 : ℚ) ^ b)), withthis : (2 : ℚ) ^ b * (2 : ℚ) ^ (d + (1 : ℕ)) - (2 : ℚ) ^ b = (2 : ℚ) ^ b * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)).Lean, line 515
have : (2 : ℚ) ^ b * 2 ^ (d + 1) - 2 ^ b = 2 ^ b * (2 ^ (d + 1) - 1) := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 515 at
2987e49b6fb3↗
hcore.hKhave∀ K ∈ Finset.Ioc n ((2 : ℕ) * n), ∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhK : ∀ K ∈ Finset.Ioc n ((2 : ℕ) * n), ∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, lines 521–525
have hK : ∀ K ∈ Finset.Ioc n (2 * n), ∃ w : ℤ, (w : ℚ) = (Ω : ℚ) * 2 ^ k * (1 / ((2 : ℚ) ^ k - 2 ^ K)) := by intro K hK' have := Finset.mem_Ioc.mp hK' exact key1 k K (by omega) (by omega) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 521–525 at
2987e49b6fb3↗hcore.hK.thishaven < K ∧ K ≤ (2 : ℕ) * nLeaves
∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K)), withthis : n < K ∧ K ≤ (2 : ℕ) * n.Uses library
Finset.mem_Ioc.Lean, line 524
have := Finset.mem_Ioc.mp hK'
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 524 at
2987e49b6fb3↗
hcore.hIhave∀ i ∈ (Finset.range (n + (1 : ℕ))).erase k, ∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhI : ∀ i ∈ (Finset.range (n + (1 : ℕ))).erase k, ∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Ne.symm.Lean, lines 526–531
have hI : ∀ i ∈ (Finset.range (n + 1)).erase k, ∃ w : ℤ, (w : ℚ) = (Ω : ℚ) * 2 ^ k * (1 / ((2 : ℚ) ^ k - 2 ^ i)) := by intro i hi have h1 := Finset.ne_of_mem_erase hi have h2 := Finset.mem_range.mp (Finset.mem_of_mem_erase hi) exact key1 k i (Ne.symm h1) (by omega) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 526–531 at
2987e49b6fb3↗hcore.hI.h1havei ≠ kLeaves
∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)), withh1 : i ≠ k.Uses library
Finset.ne_of_mem_erase.Lean, line 529
have h1 := Finset.ne_of_mem_erase hi
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 529 at
2987e49b6fb3↗hcore.hI.h2havei < n + (1 : ℕ)Leaves
∃ (w : ℤ), (↑w : ℚ) = (↑Ω : ℚ) * (2 : ℚ) ^ k * ((1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)), withh2 : i < n + (1 : ℕ).Uses library
Finset.mem_range,Finset.mem_of_mem_erase.Lean, line 530
have h2 := Finset.mem_range.mp (Finset.mem_of_mem_erase hi)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 530 at
2987e49b6fb3↗
hcore.hThave∀ j ∈ Finset.Ioc k n, ∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhT : ∀ j ∈ Finset.Ioc k n, ∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Exists.introExistential introduction. ,pow_add.Lean, lines 532–552
have hT : ∀ j ∈ Finset.Ioc k n, ∃ w : ℤ, (w : ℚ) * 2 ^ (k * (k - 1) / 2) = (Ω : ℚ) * (Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k))) := by intro j hj have hj' := Finset.mem_Ioc.mp hj obtain ⟨d, hd⟩ : ∃ d, j - k = d + 1 := ⟨j - k - 1, by omega⟩ obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega) have hmono : k * (k - 1) / 2 ≤ j * (j - 1) / 2 := Nat.div_le_div_right (Nat.mul_le_mul (by omega) (by omega)) obtain ⟨e, he⟩ := Nat.exists_eq_add_of_le hmono refine ⟨-(w * g j * 2 ^ e * 2 ^ (d + 1)), ?_⟩ have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hne' : (1 : ℚ) - 2 ^ (d + 1) ≠ 0 := by intro h apply hne linarith rw [hd, hg j, he, ← hw, show (2 : ℚ) ^ (k * (k - 1) / 2 + e) = 2 ^ (k * (k - 1) / 2) * 2 ^ e from pow_add _ _ _] field_simp push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 532–552 at
2987e49b6fb3↗hcore.hT.hj'havek < j ∧ j ≤ nLeaves
∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withhj' : k < j ∧ j ≤ n.Uses library
Finset.mem_Ioc.Lean, line 535
have hj' := Finset.mem_Ioc.mp hj
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 535 at
2987e49b6fb3↗hcore.hT.s2obtain∃ (d : ℕ), j - k = d + (1 : ℕ)Leaves
∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withd : ℕ,hd : j - k = d + (1 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 536
obtain ⟨d, hd⟩ : ∃ d, j - k = d + 1 := ⟨j - k - 1, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 536 at
2987e49b6fb3↗hcore.hT.s3obtain∃ (w : ℤ), (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑Ω : ℚ)Leaves
∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withw : ℤ,hw : (↑w : ℚ) * ((2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ)) = (↑Ω : ℚ).Lean, line 537
obtain ⟨w, hw⟩ := hΩdiv (d + 1) (by omega) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 537 at
2987e49b6fb3↗hcore.hT.hmonohavek * (k - (1 : ℕ)) / (2 : ℕ) ≤ j * (j - (1 : ℕ)) / (2 : ℕ)Leaves
∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withhmono : k * (k - (1 : ℕ)) / (2 : ℕ) ≤ j * (j - (1 : ℕ)) / (2 : ℕ).Uses library
Nat.div_le_div_right,Nat.mul_le_mul.Lean, lines 538–539
have hmono : k * (k - 1) / 2 ≤ j * (j - 1) / 2 := Nat.div_le_div_right (Nat.mul_le_mul (by omega) (by omega))targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 538–539 at
2987e49b6fb3↗hcore.hT.s5obtain∃ (k_1 : ℕ), j * (j - (1 : ℕ)) / (2 : ℕ) = k * (k - (1 : ℕ)) / (2 : ℕ) + k_1Leaves
∃ (w : ℤ), (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withe : ℕ,he : j * (j - (1 : ℕ)) / (2 : ℕ) = k * (k - (1 : ℕ)) / (2 : ℕ) + e.Uses library
Nat.exists_eq_add_of_le.Lean, line 540
obtain ⟨e, he⟩ := Nat.exists_eq_add_of_le hmono
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 540 at
2987e49b6fb3↗hcore.hT.hnehave(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ)Leaves
(↑(-(w * g j * (2 : ℤ) ^ e * (2 : ℤ) ^ (d + (1 : ℕ)))) : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withhne : (2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 542–544
have hne : (2 : ℚ) ^ (d + 1) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 542–544 at
2987e49b6fb3↗hcore.hT.hne.thishave(1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ))Leaves
(2 : ℚ) ^ (d + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (d + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 543
have : (1 : ℚ) < 2 ^ (d + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 543 at
2987e49b6fb3↗
hcore.hT.hne'have(1 : ℚ) - (2 : ℚ) ^ (d + (1 : ℕ)) ≠ (0 : ℚ)Leaves
(↑(-(w * g j * (2 : ℤ) ^ e * (2 : ℤ) ^ (d + (1 : ℕ)))) : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (↑Ω : ℚ) * (Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))), withhne' : (1 : ℚ) - (2 : ℚ) ^ (d + (1 : ℕ)) ≠ (0 : ℚ).Lean, lines 545–548
have hne' : (1 : ℚ) - 2 ^ (d + 1) ≠ 0 := by intro h apply hne linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 545–548 at
2987e49b6fb3↗
hcore.h2adichave(↑Ω : ℚ) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * (↑(g k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), fK K - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, fI i) - ∑ j ∈ Finset.Ioc k n, fT j) : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withh2adic : (↑Ω : ℚ) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) = (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * (↑(g k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), fK K - ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, fI i) - ∑ j ∈ Finset.Ioc k n, fT j) : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.mul_sum,one_div.Lean, lines 556–570
have h2adic : (Ω : ℚ) * ∑ j ∈ Finset.range (k + 1), Qc n j / ((2 : ℚ) ^ (k - j) - 1) = 2 ^ (k * (k - 1) / 2) * ((g k * (∑ K ∈ Finset.Ioc n (2 * n), fK K - ∑ i ∈ (Finset.range (n + 1)).erase k, fI i) - ∑ j ∈ Finset.Ioc k n, fT j : ℤ) : ℚ) := by rw [hform Qc hQc n k hk] push_cast rw [Finset.sum_congr rfl hfK, Finset.sum_congr rfl hfI, ← Finset.mul_sum, ← Finset.mul_sum] have htail : (2 : ℚ) ^ (k * (k - 1) / 2) * ∑ j ∈ Finset.Ioc k n, (fT j : ℚ) = (Ω : ℚ) * ∑ j ∈ Finset.Ioc k n, Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by rw [Finset.mul_sum, Finset.mul_sum] refine Finset.sum_congr rfl (fun j hj => ?_) rw [mul_comm] exact hfT j hj rw [hg k] simp only [one_div] at htail ⊢ linear_combination htailtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 556–570 at
2987e49b6fb3↗hcore.h2adic.htailhave(2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∑ j ∈ Finset.Ioc k n, (↑(fT j) : ℚ) = (↑Ω : ℚ) * ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))Leaves
(↑Ω : ℚ) * (Qc n k * (2 : ℚ) ^ k * (∑ K ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K) - ∑ K ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ K)) - ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k))) = (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ((↑(g k) : ℚ) * ((↑Ω : ℚ) * (2 : ℚ) ^ k * ∑ i ∈ Finset.Ioc n ((2 : ℕ) * n), (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i) - (↑Ω : ℚ) * (2 : ℚ) ^ k * ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (1 : ℚ) / ((2 : ℚ) ^ k - (2 : ℚ) ^ i)) - ∑ x ∈ Finset.Ioc k n, (↑(fT x) : ℚ)), withhtail : (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∑ j ∈ Finset.Ioc k n, (↑(fT j) : ℚ) = (↑Ω : ℚ) * ∑ j ∈ Finset.Ioc k n, Qc n j * (2 : ℚ) ^ (j - k) / ((1 : ℚ) - (2 : ℚ) ^ (j - k)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,mul_comm.Lean, lines 562–567
have htail : (2 : ℚ) ^ (k * (k - 1) / 2) * ∑ j ∈ Finset.Ioc k n, (fT j : ℚ) = (Ω : ℚ) * ∑ j ∈ Finset.Ioc k n, Qc n j * 2 ^ (j - k) / (1 - 2 ^ (j - k)) := by rw [Finset.mul_sum, Finset.mul_sum] refine Finset.sum_congr rfl (fun j hj => ?_) rw [mul_comm] exact hfT j hjtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 562–567 at
2987e49b6fb3↗
hcore.s9obtain∃ (z : ℤ), (↑z : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), (↑((2 : ℤ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * g j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withB : ℤ,hB : (↑B : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), (↑((2 : ℤ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * g j) : ℚ) / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Lean, line 572
obtain ⟨B, hB⟩ := hodd n k hk (fun j => 2 ^ (j * (j - 1) / 2) * g j)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 572 at
2987e49b6fb3↗hcore.hB'have(↑B : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)), withhB' : (↑B : ℚ) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 573–580
have hB' : (B : ℚ) = (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)) := by rw [hB] congr 1 refine Finset.sum_congr rfl (fun j _ => ?_) rw [hg j] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 573–580 at
2987e49b6fb3↗
hcnallhave∀ (n : ℕ), ∃ (z : ℤ), (↑z : ℚ) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhcnall : ∀ (n : ℕ), ∃ (z : ℤ), (↑z : ℚ) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)).Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 584–617
have hcnall : ∀ n : ℕ, ∃ z : ℤ, (z : ℚ) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + 1) - 3) := by intro n have hint : ∀ j ∈ Finset.range n, ∃ z : ℤ, (z : ℚ) = (∏ i ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (i + 1) - 3)) * ((3 : ℚ) / ((2 : ℚ) ^ (j + 1) - 3)) := by intro j hj by_cases h2 : j < 2 · have hj' : j = 0 ∨ j = 1 := by omega rcases hj' with rfl | rfl · refine ⟨-3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (0 + 1) - 3) = -3 := by norm_num rw [e] push_cast ring · refine ⟨3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (1 + 1) - 3) = 3 := by norm_num rw [e] push_cast ring · have hmem : j ∈ Finset.Ico 2 n := Finset.mem_Ico.mpr ⟨by omega, Finset.mem_range.mp hj⟩ have hne : ((2 : ℚ) ^ (j + 1) - 3) ≠ 0 := by have h8 : (8 : ℚ) ≤ 2 ^ (j + 1) := by calc (8 : ℚ) = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega) linarith refine ⟨3 * ∏ i ∈ (Finset.Ico 2 n).erase j, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ rw [← Finset.mul_prod_erase _ _ hmem] push_cast field_simp choose! g hg using hint refine ⟨∑ j ∈ Finset.range n, g j, ?_⟩ push_cast rw [Finset.mul_sum] exact Finset.sum_congr rfl hgtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 584–617 at
2987e49b6fb3↗hcnall.hinthave∀ j ∈ Finset.range n, ∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)), withhint : ∀ j ∈ Finset.range n, ∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 587–612
have hint : ∀ j ∈ Finset.range n, ∃ z : ℤ, (z : ℚ) = (∏ i ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (i + 1) - 3)) * ((3 : ℚ) / ((2 : ℚ) ^ (j + 1) - 3)) := by intro j hj by_cases h2 : j < 2 · have hj' : j = 0 ∨ j = 1 := by omega rcases hj' with rfl | rfl · refine ⟨-3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (0 + 1) - 3) = -3 := by norm_num rw [e] push_cast ring · refine ⟨3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (1 + 1) - 3) = 3 := by norm_num rw [e] push_cast ring · have hmem : j ∈ Finset.Ico 2 n := Finset.mem_Ico.mpr ⟨by omega, Finset.mem_range.mp hj⟩ have hne : ((2 : ℚ) ^ (j + 1) - 3) ≠ 0 := by have h8 : (8 : ℚ) ≤ 2 ^ (j + 1) := by calc (8 : ℚ) = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega) linarith refine ⟨3 * ∏ i ∈ (Finset.Ico 2 n).erase j, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ rw [← Finset.mul_prod_erase _ _ hmem] push_cast field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 587–612 at
2987e49b6fb3↗hcnall.hint.s1caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))).Lean, lines 591–602
· have hj' : j = 0 ∨ j = 1 := by omega rcases hj' with rfl | rfl · refine ⟨-3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (0 + 1) - 3) = -3 := by norm_num rw [e] push_cast ring · refine ⟨3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (1 + 1) - 3) = 3 := by norm_num rw [e] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 591–602 at
2987e49b6fb3↗hcnall.hint.s1.hj'havej = (0 : ℕ) ∨ j = (1 : ℕ)routine: omegaLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))), withhj' : j = (0 : ℕ) ∨ j = (1 : ℕ).Lean, line 591
· have hj' : j = 0 ∨ j = 1 := by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 591 at
2987e49b6fb3↗hcnall.hint.s1.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ ((0 : ℕ) + (1 : ℕ)) - (3 : ℚ))).Uses library
Exists.introExistential introduction. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 593–597
· refine ⟨-3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (0 + 1) - 3) = -3 := by norm_num rw [e] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 593–597 at
2987e49b6fb3↗hcnall.hint.s1.s2.ehave(3 : ℚ) / ((2 : ℚ) ^ ((0 : ℕ) + (1 : ℕ)) - (3 : ℚ)) = (-3 : ℚ)routine: norm_numLeaves
(↑((-3 : ℤ) * ∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℤ) ^ (i + (1 : ℕ)) - (3 : ℤ))) : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ ((0 : ℕ) + (1 : ℕ)) - (3 : ℚ))), withe : (3 : ℚ) / ((2 : ℚ) ^ ((0 : ℕ) + (1 : ℕ)) - (3 : ℚ)) = (-3 : ℚ).Lean, line 594
have e : (3 : ℚ) / ((2 : ℚ) ^ (0 + 1) - 3) = -3 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 594 at
2987e49b6fb3↗
hcnall.hint.s1.s3caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ ((1 : ℕ) + (1 : ℕ)) - (3 : ℚ))).Uses library
Exists.introExistential introduction. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 598–602
· refine ⟨3 * ∏ i ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ have e : (3 : ℚ) / ((2 : ℚ) ^ (1 + 1) - 3) = 3 := by norm_num rw [e] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 598–602 at
2987e49b6fb3↗hcnall.hint.s1.s3.ehave(3 : ℚ) / ((2 : ℚ) ^ ((1 : ℕ) + (1 : ℕ)) - (3 : ℚ)) = (3 : ℚ)routine: norm_numLeaves
(↑((3 : ℤ) * ∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℤ) ^ (i + (1 : ℕ)) - (3 : ℤ))) : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ ((1 : ℕ) + (1 : ℕ)) - (3 : ℚ))), withe : (3 : ℚ) / ((2 : ℚ) ^ ((1 : ℕ) + (1 : ℕ)) - (3 : ℚ)) = (3 : ℚ).Lean, line 599
have e : (3 : ℚ) / ((2 : ℚ) ^ (1 + 1) - 3) = 3 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 599 at
2987e49b6fb3↗
hcnall.hint.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))).Uses library
Exists.introExistential introduction. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mul_prod_eraseTaking a product overs : Finset ιis the same as multiplying the value on a single elementf aby the product ofs.erase a. .Lean, lines 603–612
· have hmem : j ∈ Finset.Ico 2 n := Finset.mem_Ico.mpr ⟨by omega, Finset.mem_range.mp hj⟩ have hne : ((2 : ℚ) ^ (j + 1) - 3) ≠ 0 := by have h8 : (8 : ℚ) ≤ 2 ^ (j + 1) := by calc (8 : ℚ) = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega) linarith refine ⟨3 * ∏ i ∈ (Finset.Ico 2 n).erase j, ((2 : ℤ) ^ (i + 1) - 3), ?_⟩ rw [← Finset.mul_prod_erase _ _ hmem] push_cast field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 603–612 at
2987e49b6fb3↗hcnall.hint.s2.hmemhavej ∈ Finset.Ico (2 : ℕ) nLeaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))), withhmem : j ∈ Finset.Ico (2 : ℕ) n.Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ico,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,Finset.mem_range.Lean, line 603
· have hmem : j ∈ Finset.Ico 2 n := Finset.mem_Ico.mpr ⟨by omega, Finset.mem_range.mp hj⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 603 at
2987e49b6fb3↗hcnall.hint.s2.hnehave(2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ) ≠ (0 : ℚ)Leaves
∃ (z : ℤ), (↑z : ℚ) = (∏ i ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (i + (1 : ℕ)) - (3 : ℚ))) * ((3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))), withhne : (2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ) ≠ (0 : ℚ).Lean, lines 604–608
have hne : ((2 : ℚ) ^ (j + 1) - 3) ≠ 0 := by have h8 : (8 : ℚ) ≤ 2 ^ (j + 1) := by calc (8 : ℚ) = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 604–608 at
2987e49b6fb3↗hcnall.hint.s2.hne.h8have(8 : ℚ) ≤ (2 : ℚ) ^ (j + (1 : ℕ))Leaves
(2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ) ≠ (0 : ℚ), withh8 : (8 : ℚ) ≤ (2 : ℚ) ^ (j + (1 : ℕ)).Lean, lines 605–607
have h8 : (8 : ℚ) ≤ 2 ^ (j + 1) := by calc (8 : ℚ) = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 605–607 at
2987e49b6fb3↗hcnall.hint.s2.hne.h8.s1calc(8 : ℚ) = (2 : ℚ) ^ (3 : ℕ)routine: norm_numCloses the goal.
Lean, line 606
calc (8 : ℚ) = 2 ^ 3 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 606 at
2987e49b6fb3↗hcnall.hint.s2.hne.h8.s2calc(2 : ℚ) ^ (3 : ℕ) ≤ (2 : ℚ) ^ (j + (1 : ℕ))Closes the goal.
Uses library
pow_le_pow_right₀.Lean, line 607
_ ≤ 2 ^ (j + 1) := pow_le_pow_right₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 607 at
2987e49b6fb3↗
hbhave(↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n)Leaves
∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhb : (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 619–688
have hb : ((2 ^ (n * (n + 1) / 2) * (if n = 5 then 409045 else if n = 7 then 1298717875 else (∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℕ) : ℝ) ^ 2 ≤ (2 : ℝ) ^ (3 * n * n) := by have key : (2 ^ (n * (n + 1) / 2) * (if n = 5 then 409045 else if n = 7 then 1298717875 else (∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ)) ^ 2 ≤ 2 ^ (3 * n * n) := by rcases (show n ≤ 9 ∨ 10 ≤ n by omega) with hn | hn · revert n decide +kernel · rw [if_neg (by omega), if_neg (by omega)] have hP1 : ∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) ≤ 2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) have hP2 : ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) ≤ 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) obtain ⟨c, hc⟩ : ∃ c, n = n / 2 + c + 1 := ⟨n - n / 2 - 1, by omega⟩ obtain ⟨d, hd⟩ : ∃ d, n = d + 3 := ⟨n - 3, by omega⟩ have hS1 : (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 = 2 * (c + 1) * (n / 2 + 1) + (c + 1) * c := by have e : Finset.Ioc (n / 2) n = Finset.Ico (n / 2 + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.sum_Ico_eq_sum_range, show n + 1 - (n / 2 + 1) = c + 1 by omega, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hS2 : (∑ j ∈ Finset.Ico 2 n, (j + 1)) * 2 = 6 * (d + 1) + (d + 1) * d := by rw [Finset.sum_Ico_eq_sum_range, show n - 2 = d + 1 by omega] have : ∀ k ∈ Finset.range (d + 1), 2 + k + 1 = 3 + k := fun k _ => by omega rw [Finset.sum_congr rfl this, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hT : n * (n + 1) / 2 * 2 = n * (n + 1) := Nat.div_mul_cancel (Nat.even_mul_succ_self n).two_dvd have hexp : 2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1)) ≤ 3 * n * n := by have arith : ∀ e r A B T : ℕ, r ≤ 1 → 3 ≤ e → A * 2 = 2 * (e + 1 + r + 1) * (e + 2 + 1) + (e + 1 + r + 1) * (e + 1 + r) → B * 2 = 6 * (2 * e + 1 + r + 1) + (2 * e + 1 + r + 1) * (2 * e + 1 + r) → T * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) → 2 * T + 2 * A + 2 * B ≤ 3 * (2 * e + 4 + r) * (2 * e + 4 + r) := by intro e r A B T hr he hA hB hT have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he rcases (show r = 0 ∨ r = 1 by omega) with rfl | rfl · ring_nf at hA hB hT hsq ⊢ omega · ring_nf at hA hB hT hsq ⊢ omega obtain ⟨e, he⟩ : ∃ e, n / 2 = e + 2 := ⟨n / 2 - 2, by omega⟩ obtain ⟨r, hr1, hr⟩ : ∃ r, r ≤ 1 ∧ n = 2 * e + 4 + r := ⟨n - (2 * e + 4), by omega, by omega⟩ have hc' : c = e + 1 + r := by omega have hd' : d = 2 * e + 1 + r := by omega rw [he, hc'] at hS1 rw [hd'] at hS2 have hT' : n * (n + 1) / 2 * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) := by rw [hT, hr] have := arith e r _ _ _ hr1 (by omega) hS1 hS2 hT' rw [he] rw [hr] at this ⊢ exact this calc (2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3))) ^ 2 ≤ (2 ^ (n * (n + 1) / 2) * (2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)))) ^ 2 := by gcongr _ = 2 ^ (2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1))) := by rw [← pow_add, ← pow_add, ← pow_mul]; congr 1; ring _ ≤ 2 ^ (3 * n * n) := Nat.pow_le_pow_right (by norm_num) hexp exact_mod_cast keytargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 619–688 at
2987e49b6fb3↗hb.keyhave((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n)Leaves
(↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n), withkey : ((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 623–687
have key : (2 ^ (n * (n + 1) / 2) * (if n = 5 then 409045 else if n = 7 then 1298717875 else (∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ)) ^ 2 ≤ 2 ^ (3 * n * n) := by rcases (show n ≤ 9 ∨ 10 ≤ n by omega) with hn | hn · revert n decide +kernel · rw [if_neg (by omega), if_neg (by omega)] have hP1 : ∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) ≤ 2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) have hP2 : ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) ≤ 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) obtain ⟨c, hc⟩ : ∃ c, n = n / 2 + c + 1 := ⟨n - n / 2 - 1, by omega⟩ obtain ⟨d, hd⟩ : ∃ d, n = d + 3 := ⟨n - 3, by omega⟩ have hS1 : (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 = 2 * (c + 1) * (n / 2 + 1) + (c + 1) * c := by have e : Finset.Ioc (n / 2) n = Finset.Ico (n / 2 + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.sum_Ico_eq_sum_range, show n + 1 - (n / 2 + 1) = c + 1 by omega, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hS2 : (∑ j ∈ Finset.Ico 2 n, (j + 1)) * 2 = 6 * (d + 1) + (d + 1) * d := by rw [Finset.sum_Ico_eq_sum_range, show n - 2 = d + 1 by omega] have : ∀ k ∈ Finset.range (d + 1), 2 + k + 1 = 3 + k := fun k _ => by omega rw [Finset.sum_congr rfl this, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hT : n * (n + 1) / 2 * 2 = n * (n + 1) := Nat.div_mul_cancel (Nat.even_mul_succ_self n).two_dvd have hexp : 2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1)) ≤ 3 * n * n := by have arith : ∀ e r A B T : ℕ, r ≤ 1 → 3 ≤ e → A * 2 = 2 * (e + 1 + r + 1) * (e + 2 + 1) + (e + 1 + r + 1) * (e + 1 + r) → B * 2 = 6 * (2 * e + 1 + r + 1) + (2 * e + 1 + r + 1) * (2 * e + 1 + r) → T * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) → 2 * T + 2 * A + 2 * B ≤ 3 * (2 * e + 4 + r) * (2 * e + 4 + r) := by intro e r A B T hr he hA hB hT have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he rcases (show r = 0 ∨ r = 1 by omega) with rfl | rfl · ring_nf at hA hB hT hsq ⊢ omega · ring_nf at hA hB hT hsq ⊢ omega obtain ⟨e, he⟩ : ∃ e, n / 2 = e + 2 := ⟨n / 2 - 2, by omega⟩ obtain ⟨r, hr1, hr⟩ : ∃ r, r ≤ 1 ∧ n = 2 * e + 4 + r := ⟨n - (2 * e + 4), by omega, by omega⟩ have hc' : c = e + 1 + r := by omega have hd' : d = 2 * e + 1 + r := by omega rw [he, hc'] at hS1 rw [hd'] at hS2 have hT' : n * (n + 1) / 2 * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) := by rw [hT, hr] have := arith e r _ _ _ hr1 (by omega) hS1 hS2 hT' rw [he] rw [hr] at this ⊢ exact this calc (2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3))) ^ 2 ≤ (2 ^ (n * (n + 1) / 2) * (2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)))) ^ 2 := by gcongr _ = 2 ^ (2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1))) := by rw [← pow_add, ← pow_add, ← pow_mul]; congr 1; ring _ ≤ 2 ^ (3 * n * n) := Nat.pow_le_pow_right (by norm_num) hexptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 623–687 at
2987e49b6fb3↗hb.key.s1caseLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n).Uses library
Lean.Parser.Tactic.DecideConfig.kernelIf true (default: false), then use only kernel reduction when reducing theDecidableinstance. .Lean, lines 627–628
· revert n decide +kerneltargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 627–628 at
2987e49b6fb3↗hb.key.s2caseLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n).Uses library
if_neg.Lean, lines 629–687
· rw [if_neg (by omega), if_neg (by omega)] have hP1 : ∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) ≤ 2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) have hP2 : ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) ≤ 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _) obtain ⟨c, hc⟩ : ∃ c, n = n / 2 + c + 1 := ⟨n - n / 2 - 1, by omega⟩ obtain ⟨d, hd⟩ : ∃ d, n = d + 3 := ⟨n - 3, by omega⟩ have hS1 : (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 = 2 * (c + 1) * (n / 2 + 1) + (c + 1) * c := by have e : Finset.Ioc (n / 2) n = Finset.Ico (n / 2 + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.sum_Ico_eq_sum_range, show n + 1 - (n / 2 + 1) = c + 1 by omega, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hS2 : (∑ j ∈ Finset.Ico 2 n, (j + 1)) * 2 = 6 * (d + 1) + (d + 1) * d := by rw [Finset.sum_Ico_eq_sum_range, show n - 2 = d + 1 by omega] have : ∀ k ∈ Finset.range (d + 1), 2 + k + 1 = 3 + k := fun k _ => by omega rw [Finset.sum_congr rfl this, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ring have hT : n * (n + 1) / 2 * 2 = n * (n + 1) := Nat.div_mul_cancel (Nat.even_mul_succ_self n).two_dvd have hexp : 2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1)) ≤ 3 * n * n := by have arith : ∀ e r A B T : ℕ, r ≤ 1 → 3 ≤ e → A * 2 = 2 * (e + 1 + r + 1) * (e + 2 + 1) + (e + 1 + r + 1) * (e + 1 + r) → B * 2 = 6 * (2 * e + 1 + r + 1) + (2 * e + 1 + r + 1) * (2 * e + 1 + r) → T * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) → 2 * T + 2 * A + 2 * B ≤ 3 * (2 * e + 4 + r) * (2 * e + 4 + r) := by intro e r A B T hr he hA hB hT have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he rcases (show r = 0 ∨ r = 1 by omega) with rfl | rfl · ring_nf at hA hB hT hsq ⊢ omega · ring_nf at hA hB hT hsq ⊢ omega obtain ⟨e, he⟩ : ∃ e, n / 2 = e + 2 := ⟨n / 2 - 2, by omega⟩ obtain ⟨r, hr1, hr⟩ : ∃ r, r ≤ 1 ∧ n = 2 * e + 4 + r := ⟨n - (2 * e + 4), by omega, by omega⟩ have hc' : c = e + 1 + r := by omega have hd' : d = 2 * e + 1 + r := by omega rw [he, hc'] at hS1 rw [hd'] at hS2 have hT' : n * (n + 1) / 2 * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) := by rw [hT, hr] have := arith e r _ _ _ hr1 (by omega) hS1 hS2 hT' rw [he] rw [hr] at this ⊢ exact this calc (2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3))) ^ 2 ≤ (2 ^ (n * (n + 1) / 2) * (2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)))) ^ 2 := by gcongr _ = 2 ^ (2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1))) := by rw [← pow_add, ← pow_add, ← pow_mul]; congr 1; ring _ ≤ 2 ^ (3 * n * n) := Nat.pow_le_pow_right (by norm_num) hexptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 629–687 at
2987e49b6fb3↗hb.key.s2.hP1have∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ)) ≤ (2 : ℕ) ^ ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, mLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhP1 : ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ)) ≤ (2 : ℕ) ^ ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.prod_pow_eq_pow_sum,Finset.prod_le_prod'In an ordered commutative monoid, if each factorf iof one finite product is less than or equal to the corresponding factorg iof another finite product, then∏ i ∈ s, f i ≤ ∏ i ∈ s, g i. ,Nat.sub_le.Lean, lines 630–632
have hP1 : ∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) ≤ 2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 630–632 at
2987e49b6fb3↗hb.key.s2.hP2have∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)) ≤ (2 : ℕ) ^ ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ))Leaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhP2 : ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)) ≤ (2 : ℕ) ^ ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)).Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.prod_pow_eq_pow_sum,Finset.prod_le_prod'In an ordered commutative monoid, if each factorf iof one finite product is less than or equal to the corresponding factorg iof another finite product, then∏ i ∈ s, f i ≤ ∏ i ∈ s, g i. ,Nat.sub_le.Lean, lines 633–635
have hP2 : ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) ≤ 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)) := by rw [← Finset.prod_pow_eq_pow_sum] exact Finset.prod_le_prod' (fun m _ => Nat.sub_le _ _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 633–635 at
2987e49b6fb3↗hb.key.s2.s3obtain∃ (c : ℕ), n = n / (2 : ℕ) + c + (1 : ℕ)Leaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withc : ℕ,hc : n = n / (2 : ℕ) + c + (1 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 636
obtain ⟨c, hc⟩ : ∃ c, n = n / 2 + c + 1 := ⟨n - n / 2 - 1, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 636 at
2987e49b6fb3↗hb.key.s2.s4obtain∃ (d : ℕ), n = d + (3 : ℕ)Leaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withd : ℕ,hd : n = d + (3 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 637
obtain ⟨d, hd⟩ : ∃ d, n = d + 3 := ⟨n - 3, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 637 at
2987e49b6fb3↗hb.key.s2.hS1have(∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m) * (2 : ℕ) = (2 : ℕ) * (c + (1 : ℕ)) * (n / (2 : ℕ) + (1 : ℕ)) + (c + (1 : ℕ)) * cLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhS1 : (∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m) * (2 : ℕ) = (2 : ℕ) * (c + (1 : ℕ)) * (n / (2 : ℕ) + (1 : ℕ)) + (c + (1 : ℕ)) * c.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.sum_Ico_eq_sum_range,Finset.sum_add_distrib,Finset.sum_const,Finset.card_range,smul_eq_mul,add_mulAlias ofright_distrib. ,Finset.sum_range_id_mul_twoGauss' summation formula ,Nat.add_sub_cancel.Lean, lines 638–645
have hS1 : (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 = 2 * (c + 1) * (n / 2 + 1) + (c + 1) * c := by have e : Finset.Ioc (n / 2) n = Finset.Ico (n / 2 + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.sum_Ico_eq_sum_range, show n + 1 - (n / 2 + 1) = c + 1 by omega, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 638–645 at
2987e49b6fb3↗hb.key.s2.hS1.ehaveFinset.Ioc (n / (2 : ℕ)) n = Finset.Ico (n / (2 : ℕ) + (1 : ℕ)) (n + (1 : ℕ))Leaves
(∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m) * (2 : ℕ) = (2 : ℕ) * (c + (1 : ℕ)) * (n / (2 : ℕ) + (1 : ℕ)) + (c + (1 : ℕ)) * c, withe : Finset.Ioc (n / (2 : ℕ)) n = Finset.Ico (n / (2 : ℕ) + (1 : ℕ)) (n + (1 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ioc,Finset.mem_Ico.Lean, lines 639–640
have e : Finset.Ioc (n / 2) n = Finset.Ico (n / 2 + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 639–640 at
2987e49b6fb3↗
hb.key.s2.hS2have(∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ))) * (2 : ℕ) = (6 : ℕ) * (d + (1 : ℕ)) + (d + (1 : ℕ)) * dLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhS2 : (∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ))) * (2 : ℕ) = (6 : ℕ) * (d + (1 : ℕ)) + (d + (1 : ℕ)) * d.Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.sum_Ico_eq_sum_range,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.sum_add_distrib,Finset.sum_const,Finset.card_range,smul_eq_mul,add_mulAlias ofright_distrib. ,Finset.sum_range_id_mul_twoGauss' summation formula ,Nat.add_sub_cancel.Lean, lines 646–652
have hS2 : (∑ j ∈ Finset.Ico 2 n, (j + 1)) * 2 = 6 * (d + 1) + (d + 1) * d := by rw [Finset.sum_Ico_eq_sum_range, show n - 2 = d + 1 by omega] have : ∀ k ∈ Finset.range (d + 1), 2 + k + 1 = 3 + k := fun k _ => by omega rw [Finset.sum_congr rfl this, Finset.sum_add_distrib, Finset.sum_const, Finset.card_range, smul_eq_mul, add_mul, Finset.sum_range_id_mul_two] simp only [Nat.add_sub_cancel] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 646–652 at
2987e49b6fb3↗hb.key.s2.hS2.thishave∀ k ∈ Finset.range (d + (1 : ℕ)), (2 : ℕ) + k + (1 : ℕ) = (3 : ℕ) + kLeaves
(∑ k ∈ Finset.range (d + (1 : ℕ)), ((2 : ℕ) + k + (1 : ℕ))) * (2 : ℕ) = (6 : ℕ) * (d + (1 : ℕ)) + (d + (1 : ℕ)) * d, withthis : ∀ k ∈ Finset.range (d + (1 : ℕ)), (2 : ℕ) + k + (1 : ℕ) = (3 : ℕ) + k.Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, line 648
have : ∀ k ∈ Finset.range (d + 1), 2 + k + 1 = 3 + k := fun k _ => by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 648 at
2987e49b6fb3↗
hb.key.s2.hThaven * (n + (1 : ℕ)) / (2 : ℕ) * (2 : ℕ) = n * (n + (1 : ℕ))Leaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhT : n * (n + (1 : ℕ)) / (2 : ℕ) * (2 : ℕ) = n * (n + (1 : ℕ)).Uses library
Nat.div_mul_cancel,Nat.even_mul_succ_self.Lean, lines 653–654
have hT : n * (n + 1) / 2 * 2 = n * (n + 1) := Nat.div_mul_cancel (Nat.even_mul_succ_self n).two_dvdtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 653–654 at
2987e49b6fb3↗hb.key.s2.hexphave(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * nLeaves
((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n), withhexp : (2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 655–679
have hexp : 2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1)) ≤ 3 * n * n := by have arith : ∀ e r A B T : ℕ, r ≤ 1 → 3 ≤ e → A * 2 = 2 * (e + 1 + r + 1) * (e + 2 + 1) + (e + 1 + r + 1) * (e + 1 + r) → B * 2 = 6 * (2 * e + 1 + r + 1) + (2 * e + 1 + r + 1) * (2 * e + 1 + r) → T * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) → 2 * T + 2 * A + 2 * B ≤ 3 * (2 * e + 4 + r) * (2 * e + 4 + r) := by intro e r A B T hr he hA hB hT have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he rcases (show r = 0 ∨ r = 1 by omega) with rfl | rfl · ring_nf at hA hB hT hsq ⊢ omega · ring_nf at hA hB hT hsq ⊢ omega obtain ⟨e, he⟩ : ∃ e, n / 2 = e + 2 := ⟨n / 2 - 2, by omega⟩ obtain ⟨r, hr1, hr⟩ : ∃ r, r ≤ 1 ∧ n = 2 * e + 4 + r := ⟨n - (2 * e + 4), by omega, by omega⟩ have hc' : c = e + 1 + r := by omega have hd' : d = 2 * e + 1 + r := by omega rw [he, hc'] at hS1 rw [hd'] at hS2 have hT' : n * (n + 1) / 2 * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) := by rw [hT, hr] have := arith e r _ _ _ hr1 (by omega) hS1 hS2 hT' rw [he] rw [hr] at this ⊢ exact thistargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 655–679 at
2987e49b6fb3↗hb.key.s2.hexp.arithhave∀ (e r A B T : ℕ), r ≤ (1 : ℕ) → (3 : ℕ) ≤ e → A * (2 : ℕ) = (2 : ℕ) * (e + (1 : ℕ) + r + (1 : ℕ)) * (e + (2 : ℕ) + (1 : ℕ)) + (e + (1 : ℕ) + r + (1 : ℕ)) * (e + (1 : ℕ) + r) → B * (2 : ℕ) = (6 : ℕ) * ((2 : ℕ) * e + (1 : ℕ) + r + (1 : ℕ)) + ((2 : ℕ) * e + (1 : ℕ) + r + (1 : ℕ)) * ((2 : ℕ) * e + (1 : ℕ) + r) → T * (2 : ℕ) = ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r + (1 : ℕ)) → (2 : ℕ) * T + (2 : ℕ) * A + (2 : ℕ) * B ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r)Leaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, witharith : ∀ (e r A B T : ℕ), r ≤ (1 : ℕ) → (3 : ℕ) ≤ e → A * (2 : ℕ) = (2 : ℕ) * (e + (1 : ℕ) + r + (1 : ℕ)) * (e + (2 : ℕ) + (1 : ℕ)) + (e + (1 : ℕ) + r + (1 : ℕ)) * (e + (1 : ℕ) + r) → B * (2 : ℕ) = (6 : ℕ) * ((2 : ℕ) * e + (1 : ℕ) + r + (1 : ℕ)) + ((2 : ℕ) * e + (1 : ℕ) + r + (1 : ℕ)) * ((2 : ℕ) * e + (1 : ℕ) + r) → T * (2 : ℕ) = ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r + (1 : ℕ)) → (2 : ℕ) * T + (2 : ℕ) * A + (2 : ℕ) * B ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r).Lean, lines 657–668
have arith : ∀ e r A B T : ℕ, r ≤ 1 → 3 ≤ e → A * 2 = 2 * (e + 1 + r + 1) * (e + 2 + 1) + (e + 1 + r + 1) * (e + 1 + r) → B * 2 = 6 * (2 * e + 1 + r + 1) + (2 * e + 1 + r + 1) * (2 * e + 1 + r) → T * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) → 2 * T + 2 * A + 2 * B ≤ 3 * (2 * e + 4 + r) * (2 * e + 4 + r) := by intro e r A B T hr he hA hB hT have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he rcases (show r = 0 ∨ r = 1 by omega) with rfl | rfl · ring_nf at hA hB hT hsq ⊢ omega · ring_nf at hA hB hT hsq ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 657–668 at
2987e49b6fb3↗hb.key.s2.hexp.arith.hsqhave(3 : ℕ) * e ≤ e * eLeaves
(2 : ℕ) * T + (2 : ℕ) * A + (2 : ℕ) * B ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r), withhsq : (3 : ℕ) * e ≤ e * e.Uses library
Nat.mul_le_mul_right.Lean, line 663
have hsq : 3 * e ≤ e * e := Nat.mul_le_mul_right e he
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 663 at
2987e49b6fb3↗hb.key.s2.hexp.arith.s2caseLeaves
(2 : ℕ) * T + (2 : ℕ) * A + (2 : ℕ) * B ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + (0 : ℕ)) * ((2 : ℕ) * e + (4 : ℕ) + (0 : ℕ)).Lean, lines 665–666
· ring_nf at hA hB hT hsq ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 665–666 at
2987e49b6fb3↗hb.key.s2.hexp.arith.s3caseLeaves
(2 : ℕ) * T + (2 : ℕ) * A + (2 : ℕ) * B ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + (1 : ℕ)) * ((2 : ℕ) * e + (4 : ℕ) + (1 : ℕ)).Lean, lines 667–668
· ring_nf at hA hB hT hsq ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 667–668 at
2987e49b6fb3↗
hb.key.s2.hexp.s2obtain∃ (e : ℕ), n / (2 : ℕ) = e + (2 : ℕ)Leaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withe : ℕ,he : n / (2 : ℕ) = e + (2 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 669
obtain ⟨e, he⟩ : ∃ e, n / 2 = e + 2 := ⟨n / 2 - 2, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 669 at
2987e49b6fb3↗hb.key.s2.hexp.s3obtain∃ r ≤ (1 : ℕ), n = (2 : ℕ) * e + (4 : ℕ) + rLeaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withr : ℕ,hr1 : r ≤ (1 : ℕ),hr : n = (2 : ℕ) * e + (4 : ℕ) + r.Uses library
Exists.introExistential introduction. .Lean, line 670
obtain ⟨r, hr1, hr⟩ : ∃ r, r ≤ 1 ∧ n = 2 * e + 4 + r := ⟨n - (2 * e + 4), by omega, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 670 at
2987e49b6fb3↗hb.key.s2.hexp.hc'havec = e + (1 : ℕ) + rroutine: omegaLeaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withhc' : c = e + (1 : ℕ) + r.Lean, line 671
have hc' : c = e + 1 + r := by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 671 at
2987e49b6fb3↗hb.key.s2.hexp.hd'haved = (2 : ℕ) * e + (1 : ℕ) + rroutine: omegaLeaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withhd' : d = (2 : ℕ) * e + (1 : ℕ) + r.Lean, line 672
have hd' : d = 2 * e + 1 + r := by omega
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 672 at
2987e49b6fb3↗hb.key.s2.hexp.hT'haven * (n + (1 : ℕ)) / (2 : ℕ) * (2 : ℕ) = ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r + (1 : ℕ))Leaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withhT' : n * (n + (1 : ℕ)) / (2 : ℕ) * (2 : ℕ) = ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r + (1 : ℕ)).Lean, line 675
have hT' : n * (n + 1) / 2 * 2 = (2 * e + 4 + r) * (2 * e + 4 + r + 1) := by rw [hT, hr]
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 675 at
2987e49b6fb3↗hb.key.s2.hexp.thishave(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (e + (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r)Leaves
(2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * n * n, withthis : (2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (e + (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)) ≤ (3 : ℕ) * ((2 : ℕ) * e + (4 : ℕ) + r) * ((2 : ℕ) * e + (4 : ℕ) + r).Lean, line 676
have := arith e r _ _ _ hr1 (by omega) hS1 hS2 hT'
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 676 at
2987e49b6fb3↗
hb.key.s2.s9calc((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) ^ (2 : ℕ) ≤ ((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (((2 : ℕ) ^ ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m) * (2 : ℕ) ^ ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ)))) ^ (2 : ℕ)Closes the goal.
Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 680–683
calc (2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3))) ^ 2 ≤ (2 ^ (n * (n + 1) / 2) * (2 ^ (∑ m ∈ Finset.Ioc (n / 2) n, m) * 2 ^ (∑ j ∈ Finset.Ico 2 n, (j + 1)))) ^ 2 := by gcongrtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 680–683 at
2987e49b6fb3↗hb.key.s2.s10calcCloses the goal.
Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,pow_add,pow_mul.Lean, lines 684–686
_ = 2 ^ (2 * (n * (n + 1) / 2) + 2 * (∑ m ∈ Finset.Ioc (n / 2) n, m) + 2 * (∑ j ∈ Finset.Ico 2 n, (j + 1))) := by rw [← pow_add, ← pow_add, ← pow_mul]; congr 1; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 684–686 at
2987e49b6fb3↗hb.key.s2.s11calc(2 : ℕ) ^ ((2 : ℕ) * (n * (n + (1 : ℕ)) / (2 : ℕ)) + (2 : ℕ) * ∑ m ∈ Finset.Ioc (n / (2 : ℕ)) n, m + (2 : ℕ) * ∑ j ∈ Finset.Ico (2 : ℕ) n, (j + (1 : ℕ))) ≤ (2 : ℕ) ^ ((3 : ℕ) * n * n)Closes the goal.
Uses library
Nat.pow_le_pow_right.Lean, line 687
_ ≤ 2 ^ (3 * n * n) := Nat.pow_le_pow_right (by norm_num) hexp
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 687 at
2987e49b6fb3↗
hqxhave∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ kLeaves
∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhqx : ∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 689–726
have hqx : ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := by have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨a, ha⟩ := gauss n k obtain ⟨b, hb⟩ := gauss (2 * n - k) n obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hkn have hexp : (k + m) * (k + m + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + (k + m) * k := by have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega refine ⟨(-1) ^ k * 3 ^ k * 2 ^ (m * (m + 1) / 2) * a * b, ?_⟩ have hpow : (2 : ℚ) ^ ((k + m) * (k + m + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ (k + m)) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2 : ((2 : ℚ) ^ (k + m)) ≠ 0 := by positivity rw [hQc] simp only [] rw [← ha, ← hb] push_cast rw [div_pow, mul_div_assoc'] field_simp linear_combination -(a : ℚ) * b * hpow choose! g hg using hterm refine ⟨∑ k ∈ Finset.range (n + 1), g k, ?_⟩ push_cast rw [Finset.mul_sum] exact Finset.sum_congr rfl (fun k hk => hg k hk)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 689–726 at
2987e49b6fb3↗hqx.htermhave∀ k ∈ Finset.range (n + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k, withhterm : ∀ k ∈ Finset.range (n + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,div_pow,mul_div_assoc'.Lean, lines 691–721
have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨a, ha⟩ := gauss n k obtain ⟨b, hb⟩ := gauss (2 * n - k) n obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hkn have hexp : (k + m) * (k + m + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + (k + m) * k := by have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega refine ⟨(-1) ^ k * 3 ^ k * 2 ^ (m * (m + 1) / 2) * a * b, ?_⟩ have hpow : (2 : ℚ) ^ ((k + m) * (k + m + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ (k + m)) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2 : ((2 : ℚ) ^ (k + m)) ≠ 0 := by positivity rw [hQc] simp only [] rw [← ha, ← hb] push_cast rw [div_pow, mul_div_assoc'] field_simp linear_combination -(a : ℚ) * b * hpowtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 691–721 at
2987e49b6fb3↗hqx.hterm.hknhavek ≤ nLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withhkn : k ≤ n.Uses library
Nat.lt_succ_iff,Finset.mem_range.Lean, line 694
have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 694 at
2987e49b6fb3↗hqx.hterm.s2obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), witha : ℤ,ha : (↑a : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 695
obtain ⟨a, ha⟩ := gauss n k
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 695 at
2987e49b6fb3↗hqx.hterm.s3obtain∃ (z : ℤ), (↑z : ℚ) = ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withb : ℤ,hb : (↑b : ℚ) = ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Lean, line 696
obtain ⟨b, hb⟩ := gauss (2 * n - k) n
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 696 at
2987e49b6fb3↗hqx.hterm.s4obtain∃ (k_1 : ℕ), n = k + k_1Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (Qc (k + m) k * ((3 : ℚ) / (2 : ℚ) ^ (k + m)) ^ k), withm : ℕ,hb : (↑((2 : ℕ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * if k + m = (5 : ℕ) then (409045 : ℕ) else if k + m = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc ((k + m) / (2 : ℕ)) (k + m), ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) (k + m), ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * (k + m) * (k + m)),hk : k ∈ Finset.range (k + m + (1 : ℕ)),hkn : k ≤ k + m,ha : (↑a : ℚ) = ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (k + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)),hb : (↑b : ℚ) = ∏ i ∈ Finset.range (k + m), ((2 : ℚ) ^ ((2 : ℕ) * (k + m) - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.exists_eq_add_of_le.Lean, line 697
obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hkn
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 697 at
2987e49b6fb3↗hqx.hterm.hexphave(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * kLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (Qc (k + m) k * ((3 : ℚ) / (2 : ℚ) ^ (k + m)) ^ k), withhexp : (k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k.Lean, lines 698–709
have hexp : (k + m) * (k + m + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + (k + m) * k := by have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 698–709 at
2987e49b6fb3↗hqx.hterm.hexp.e1have(2 : ℕ) * ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) = (k + m) * (k + m + (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe1 : (2 : ℕ) * ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) = (k + m) * (k + m + (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_succ_self.Lean, lines 699–700
have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 699–700 at
2987e49b6fb3↗hqx.hterm.hexp.e2have(2 : ℕ) * (k * (k - (1 : ℕ)) / (2 : ℕ)) = k * (k - (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe2 : (2 : ℕ) * (k * (k - (1 : ℕ)) / (2 : ℕ)) = k * (k - (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_pred_self.Lean, lines 701–702
have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 701–702 at
2987e49b6fb3↗hqx.hterm.hexp.e3have(2 : ℕ) * (m * (m + (1 : ℕ)) / (2 : ℕ)) = m * (m + (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe3 : (2 : ℕ) * (m * (m + (1 : ℕ)) / (2 : ℕ)) = m * (m + (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_succ_self.Lean, lines 703–704
have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 703–704 at
2987e49b6fb3↗hqx.hterm.hexp.s4case routine: simpLeaves
((0 : ℕ) + m) * ((0 : ℕ) + m + (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + ((0 : ℕ) + m) * (0 : ℕ).hqx.hterm.hexp.s5caseLeaves
(j + (1 : ℕ) + m) * (j + (1 : ℕ) + m + (1 : ℕ)) / (2 : ℕ) + (j + (1 : ℕ)) * (j + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (j + (1 : ℕ) + m) * (j + (1 : ℕ)).Uses library
Nat.add_sub_cancel.Lean, lines 707–709
· simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 707–709 at
2987e49b6fb3↗
hqx.hterm.hpowhave(2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (2 : ℚ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * ((2 : ℚ) ^ (k + m)) ^ kLeaves
(↑((-1 : ℤ) ^ k * (3 : ℤ) ^ k * (2 : ℤ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * a * b) : ℚ) = (2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (Qc (k + m) k * ((3 : ℚ) / (2 : ℚ) ^ (k + m)) ^ k), withhpow : (2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (2 : ℚ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * ((2 : ℚ) ^ (k + m)) ^ k.Uses library
pow_add,pow_mul.Lean, lines 711–713
have hpow : (2 : ℚ) ^ ((k + m) * (k + m + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ (k + m)) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 711–713 at
2987e49b6fb3↗hqx.hterm.h2have(2 : ℚ) ^ (k + m) ≠ (0 : ℚ)routine: positivityLeaves
(↑((-1 : ℤ) ^ k * (3 : ℤ) ^ k * (2 : ℤ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * a * b) : ℚ) = (2 : ℚ) ^ ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) * (Qc (k + m) k * ((3 : ℚ) / (2 : ℚ) ^ (k + m)) ^ k), withh2 : (2 : ℚ) ^ (k + m) ≠ (0 : ℚ).Lean, line 714
have h2 : ((2 : ℚ) ^ (k + m)) ≠ 0 := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 714 at
2987e49b6fb3↗
hEhave(0 : ℕ) < if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))Leaves
∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhE : (0 : ℕ) < if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 727–744
have hE : 0 < (if n = 5 then 409045 else if n = 7 then 1298717875 else (∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) := by split_ifs · norm_num · norm_num · refine Nat.mul_pos (Finset.prod_pos fun m hm => ?_) (Finset.prod_pos fun j hj => ?_) · have hm1 : 1 ≤ m := by have := (Finset.mem_Ioc.mp hm).1 omega have : 2 ≤ 2 ^ m := by calc 2 = 2 ^ 1 := by norm_num _ ≤ 2 ^ m := Nat.pow_le_pow_right (by norm_num) hm1 omega · have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have : 8 ≤ 2 ^ (j + 1) := by calc 8 = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 727–744 at
2987e49b6fb3↗hE.s1case routine: norm_numLeaves
(0 : ℕ) < (409045 : ℕ).Lean, line 730
· norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 730 at
2987e49b6fb3↗hE.s2case routine: norm_numLeaves
(0 : ℕ) < (1298717875 : ℕ).Lean, line 731
· norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 731 at
2987e49b6fb3↗hE.s3caseLeaves
(0 : ℕ) < (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)).Uses library
Nat.mul_pos,Finset.prod_pos.Lean, lines 732–744
· refine Nat.mul_pos (Finset.prod_pos fun m hm => ?_) (Finset.prod_pos fun j hj => ?_) · have hm1 : 1 ≤ m := by have := (Finset.mem_Ioc.mp hm).1 omega have : 2 ≤ 2 ^ m := by calc 2 = 2 ^ 1 := by norm_num _ ≤ 2 ^ m := Nat.pow_le_pow_right (by norm_num) hm1 omega · have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have : 8 ≤ 2 ^ (j + 1) := by calc 8 = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 732–744 at
2987e49b6fb3↗hE.s3.s1caseLeaves
(0 : ℕ) < (2 : ℕ) ^ m - (1 : ℕ).Lean, lines 733–739
· have hm1 : 1 ≤ m := by have := (Finset.mem_Ioc.mp hm).1 omega have : 2 ≤ 2 ^ m := by calc 2 = 2 ^ 1 := by norm_num _ ≤ 2 ^ m := Nat.pow_le_pow_right (by norm_num) hm1 omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 733–739 at
2987e49b6fb3↗hE.s3.s1.hm1have(1 : ℕ) ≤ mLeaves
(0 : ℕ) < (2 : ℕ) ^ m - (1 : ℕ), withhm1 : (1 : ℕ) ≤ m.Lean, lines 733–735
· have hm1 : 1 ≤ m := by have := (Finset.mem_Ioc.mp hm).1 omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 733–735 at
2987e49b6fb3↗hE.s3.s1.hm1.thishaven / (2 : ℕ) < mLeaves
(1 : ℕ) ≤ m, withthis : n / (2 : ℕ) < m.Uses library
Finset.mem_Ioc.Lean, line 734
have := (Finset.mem_Ioc.mp hm).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 734 at
2987e49b6fb3↗
hE.s3.s1.thishave(2 : ℕ) ≤ (2 : ℕ) ^ mLeaves
(0 : ℕ) < (2 : ℕ) ^ m - (1 : ℕ), withthis : (2 : ℕ) ≤ (2 : ℕ) ^ m.Lean, lines 736–738
have : 2 ≤ 2 ^ m := by calc 2 = 2 ^ 1 := by norm_num _ ≤ 2 ^ m := Nat.pow_le_pow_right (by norm_num) hm1targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 736–738 at
2987e49b6fb3↗hE.s3.s1.this.s1calc(2 : ℕ) = (2 : ℕ) ^ (1 : ℕ)routine: norm_numCloses the goal.
Lean, line 737
calc 2 = 2 ^ 1 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 737 at
2987e49b6fb3↗hE.s3.s1.this.s2calc(2 : ℕ) ^ (1 : ℕ) ≤ (2 : ℕ) ^ mCloses the goal.
Uses library
Nat.pow_le_pow_right.Lean, line 738
_ ≤ 2 ^ m := Nat.pow_le_pow_right (by norm_num) hm1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 738 at
2987e49b6fb3↗
hE.s3.s2caseLeaves
(0 : ℕ) < (2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ).Lean, lines 740–744
· have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have : 8 ≤ 2 ^ (j + 1) := by calc 8 = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 740–744 at
2987e49b6fb3↗hE.s3.s2.hj2have(2 : ℕ) ≤ jLeaves
(0 : ℕ) < (2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ), withhj2 : (2 : ℕ) ≤ j.Uses library
Finset.mem_Ico.Lean, line 740
· have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 740 at
2987e49b6fb3↗hE.s3.s2.thishave(8 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ))Leaves
(0 : ℕ) < (2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ), withthis : (8 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ)).Lean, lines 741–743
have : 8 ≤ 2 ^ (j + 1) := by calc 8 = 2 ^ 3 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 741–743 at
2987e49b6fb3↗hE.s3.s2.this.s1calc(8 : ℕ) = (2 : ℕ) ^ (3 : ℕ)routine: norm_numCloses the goal.
Lean, line 742
calc 8 = 2 ^ 3 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 742 at
2987e49b6fb3↗hE.s3.s2.this.s2calc(2 : ℕ) ^ (3 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ))Closes the goal.
Uses library
Nat.pow_le_pow_right.Lean, line 743
_ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 743 at
2987e49b6fb3↗
hAqinthave∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq nLeaves
∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withhAqint : ∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq n.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. .Lean, lines 745–837
have hAqint : ∃ z : ℤ, (z : ℚ) = ((2 ^ (n * (n + 1) / 2) * (if n = 5 then 409045 else if n = 7 then 1298717875 else (∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℕ) : ℚ) * Aq n := by by_cases h5 : n = 5 · subst h5 refine ⟨1380067124193819576, ?_⟩ rw [if_pos rfl] subst hQc hQx hAq decide +kernel · by_cases h7 : n = 7 · subst h7 refine ⟨674036225808261890798679141926088, ?_⟩ rw [if_neg (by norm_num), if_pos rfl] subst hQc hQx hAq decide +kernel · rw [if_neg h5, if_neg h7] have hM : ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) : ℕ) : ℚ) = ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun m _ => ?_) rw [Nat.cast_sub Nat.one_le_two_pow] push_cast ring have hC : ((∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℚ) = ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun j hj => ?_) have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have h3 : 3 ≤ 2 ^ (j + 1) := by calc 3 ≤ 2 ^ 2 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) rw [Nat.cast_sub h3] push_cast ring have hd : ((2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3)) : ℕ) : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) := by rw [Nat.cast_mul, Nat.cast_mul, hM, hC] push_cast ring obtain ⟨zcn, hzcn⟩ := hcnall n obtain ⟨zq', hzq'⟩ := hqx have hQxn : Qx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := by rw [hQx] have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨w, hw⟩ := hcore Qc hQc n k hkn obtain ⟨m, hm⟩ := Nat.exists_eq_add_of_le hkn have hexp : n * (n + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + n * k := by rw [hm] have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega have hpow : (2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ n) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2n : ((2 : ℚ) ^ n) ^ k ≠ 0 := by positivity refine ⟨(∏ j ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (j + 1) - 3)) * w * 3 ^ k * 2 ^ (m * (m + 1) / 2), ?_⟩ have e1 : (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * 3 ^ k * (((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + 1) / 2)) / ((2 : ℚ) ^ n) ^ k := by rw [div_pow] ring rw [e1, ← hw, show (w : ℚ) * (2 : ℚ) ^ (k * (k - 1) / 2) * (2 : ℚ) ^ (n * (n + 1) / 2) = (w : ℚ) * ((2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2)) by ring, hpow] push_cast field_simp choose! g hg using hterm refine ⟨∑ k ∈ Finset.range (n + 1), g k + (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1)) * zq' * zcn, ?_⟩ rw [hd, hAq] beta_reduce push_cast rw [mul_add, Finset.mul_sum, Finset.sum_congr rfl hg, hzcn, hzq', ← hQxn] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 745–837 at
2987e49b6fb3↗hAqint.s1caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq n.Uses library
Exists.introExistential introduction. ,if_pos,rflrfl : a = ais the unique constructor of the equality type. ,Lean.Parser.Tactic.DecideConfig.kernelIf true (default: false), then use only kernel reduction when reducing theDecidableinstance. .Lean, lines 748–752
· subst h5 refine ⟨1380067124193819576, ?_⟩ rw [if_pos rfl] subst hQc hQx hAq decide +kerneltargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 748–752 at
2987e49b6fb3↗hAqint.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq n.Lean, lines 753–837
· by_cases h7 : n = 7 · subst h7 refine ⟨674036225808261890798679141926088, ?_⟩ rw [if_neg (by norm_num), if_pos rfl] subst hQc hQx hAq decide +kernel · rw [if_neg h5, if_neg h7] have hM : ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) : ℕ) : ℚ) = ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun m _ => ?_) rw [Nat.cast_sub Nat.one_le_two_pow] push_cast ring have hC : ((∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℚ) = ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun j hj => ?_) have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have h3 : 3 ≤ 2 ^ (j + 1) := by calc 3 ≤ 2 ^ 2 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) rw [Nat.cast_sub h3] push_cast ring have hd : ((2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3)) : ℕ) : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) := by rw [Nat.cast_mul, Nat.cast_mul, hM, hC] push_cast ring obtain ⟨zcn, hzcn⟩ := hcnall n obtain ⟨zq', hzq'⟩ := hqx have hQxn : Qx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := by rw [hQx] have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨w, hw⟩ := hcore Qc hQc n k hkn obtain ⟨m, hm⟩ := Nat.exists_eq_add_of_le hkn have hexp : n * (n + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + n * k := by rw [hm] have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega have hpow : (2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ n) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2n : ((2 : ℚ) ^ n) ^ k ≠ 0 := by positivity refine ⟨(∏ j ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (j + 1) - 3)) * w * 3 ^ k * 2 ^ (m * (m + 1) / 2), ?_⟩ have e1 : (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * 3 ^ k * (((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + 1) / 2)) / ((2 : ℚ) ^ n) ^ k := by rw [div_pow] ring rw [e1, ← hw, show (w : ℚ) * (2 : ℚ) ^ (k * (k - 1) / 2) * (2 : ℚ) ^ (n * (n + 1) / 2) = (w : ℚ) * ((2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2)) by ring, hpow] push_cast field_simp choose! g hg using hterm refine ⟨∑ k ∈ Finset.range (n + 1), g k + (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1)) * zq' * zcn, ?_⟩ rw [hd, hAq] beta_reduce push_cast rw [mul_add, Finset.mul_sum, Finset.sum_congr rfl hg, hzcn, hzq', ← hQxn] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 753–837 at
2987e49b6fb3↗hAqint.s2.s1caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq n.Uses library
Exists.introExistential introduction. ,if_neg,if_pos,rflrfl : a = ais the unique constructor of the equality type. ,Lean.Parser.Tactic.DecideConfig.kernelIf true (default: false), then use only kernel reduction when reducing theDecidableinstance. .Lean, lines 754–758
· subst h7 refine ⟨674036225808261890798679141926088, ?_⟩ rw [if_neg (by norm_num), if_pos rfl] subst hQc hQx hAq decide +kerneltargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 754–758 at
2987e49b6fb3↗hAqint.s2.s2caseLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * if n = (5 : ℕ) then (409045 : ℕ) else if n = (7 : ℕ) then (1298717875 : ℕ) else (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) * Aq n.Uses library
if_neg,Exists.introExistential introduction. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,mul_addAlias ofleft_distrib. ,Finset.mul_sum,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 759–837
· rw [if_neg h5, if_neg h7] have hM : ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) : ℕ) : ℚ) = ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun m _ => ?_) rw [Nat.cast_sub Nat.one_le_two_pow] push_cast ring have hC : ((∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℚ) = ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun j hj => ?_) have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have h3 : 3 ≤ 2 ^ (j + 1) := by calc 3 ≤ 2 ^ 2 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) rw [Nat.cast_sub h3] push_cast ring have hd : ((2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3)) : ℕ) : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) := by rw [Nat.cast_mul, Nat.cast_mul, hM, hC] push_cast ring obtain ⟨zcn, hzcn⟩ := hcnall n obtain ⟨zq', hzq'⟩ := hqx have hQxn : Qx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := by rw [hQx] have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨w, hw⟩ := hcore Qc hQc n k hkn obtain ⟨m, hm⟩ := Nat.exists_eq_add_of_le hkn have hexp : n * (n + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + n * k := by rw [hm] have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega have hpow : (2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ n) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2n : ((2 : ℚ) ^ n) ^ k ≠ 0 := by positivity refine ⟨(∏ j ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (j + 1) - 3)) * w * 3 ^ k * 2 ^ (m * (m + 1) / 2), ?_⟩ have e1 : (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * 3 ^ k * (((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + 1) / 2)) / ((2 : ℚ) ^ n) ^ k := by rw [div_pow] ring rw [e1, ← hw, show (w : ℚ) * (2 : ℚ) ^ (k * (k - 1) / 2) * (2 : ℚ) ^ (n * (n + 1) / 2) = (w : ℚ) * ((2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2)) by ring, hpow] push_cast field_simp choose! g hg using hterm refine ⟨∑ k ∈ Finset.range (n + 1), g k + (∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℤ) ^ m - 1)) * zq' * zcn, ?_⟩ rw [hd, hAq] beta_reduce push_cast rw [mul_add, Finset.mul_sum, Finset.sum_congr rfl hg, hzcn, hzq', ← hQxn] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 759–837 at
2987e49b6fb3↗hAqint.s2.s2.hMhave(↑(∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) : ℚ) = ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withhM : (↑(∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) : ℚ) = ∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Nat.cast_prod,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Nat.cast_sub,Nat.one_le_two_pow.Lean, lines 760–766
have hM : ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1) : ℕ) : ℚ) = ∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun m _ => ?_) rw [Nat.cast_sub Nat.one_le_two_pow] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 760–766 at
2987e49b6fb3↗hAqint.s2.s2.hChave(↑(∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) = ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withhC : (↑(∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ))) : ℚ) = ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)).Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Nat.cast_prod,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Nat.cast_sub.Lean, lines 767–777
have hC : ((∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3) : ℕ) : ℚ) = ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3) := by rw [Nat.cast_prod] refine Finset.prod_congr rfl (fun j hj => ?_) have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1 have h3 : 3 ≤ 2 ^ (j + 1) := by calc 3 ≤ 2 ^ 2 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega) rw [Nat.cast_sub h3] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 767–777 at
2987e49b6fb3↗hAqint.s2.s2.hC.hj2have(2 : ℕ) ≤ jLeaves
(↑((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)) : ℚ) = (2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ), withhj2 : (2 : ℕ) ≤ j.Uses library
Finset.mem_Ico.Lean, line 771
have hj2 : 2 ≤ j := (Finset.mem_Ico.mp hj).1
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 771 at
2987e49b6fb3↗hAqint.s2.s2.hC.h3have(3 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ))Leaves
(↑((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)) : ℚ) = (2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ), withh3 : (3 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ)).Lean, lines 772–774
have h3 : 3 ≤ 2 ^ (j + 1) := by calc 3 ≤ 2 ^ 2 := by norm_num _ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 772–774 at
2987e49b6fb3↗hAqint.s2.s2.hC.h3.s1calc(3 : ℕ) ≤ (2 : ℕ) ^ (2 : ℕ)routine: norm_numCloses the goal.
Lean, line 773
calc 3 ≤ 2 ^ 2 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 773 at
2987e49b6fb3↗hAqint.s2.s2.hC.h3.s2calc(2 : ℕ) ^ (2 : ℕ) ≤ (2 : ℕ) ^ (j + (1 : ℕ))Closes the goal.
Uses library
Nat.pow_le_pow_right.Lean, line 774
_ ≤ 2 ^ (j + 1) := Nat.pow_le_pow_right (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 774 at
2987e49b6fb3↗
hAqint.s2.s2.hdhave(↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))Leaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withhd : (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Nat.cast_mul.Lean, lines 778–784
have hd : ((2 ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, (2 ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, (2 ^ (j + 1) - 3)) : ℕ) : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) := by rw [Nat.cast_mul, Nat.cast_mul, hM, hC] push_cast ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 778–784 at
2987e49b6fb3↗hAqint.s2.s2.s4obtain∃ (z : ℤ), (↑z : ℚ) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withzcn : ℤ,hzcn : (↑zcn : ℚ) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)).Lean, line 785
obtain ⟨zcn, hzcn⟩ := hcnall n
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 785 at
2987e49b6fb3↗hAqint.s2.s2.s5obtain∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ kLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withzq' : ℤ,hzq' : (↑zq' : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k.Lean, line 786
obtain ⟨zq', hzq'⟩ := hqx
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 786 at
2987e49b6fb3↗hAqint.s2.s2.hQxnhaveQx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ kLeaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withhQxn : Qx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k.Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 787–788
have hQxn : Qx n = ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := by rw [hQx]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 787–788 at
2987e49b6fb3↗hAqint.s2.s2.htermhave∀ k ∈ Finset.range (n + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)Leaves
∃ (z : ℤ), (↑z : ℚ) = (↑((2 : ℕ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℕ) ^ m - (1 : ℕ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℕ) ^ (j + (1 : ℕ)) - (3 : ℕ)))) : ℚ) * Aq n, withhterm : ∀ k ∈ Finset.range (n + (1 : ℕ)), ∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Exists.introExistential introduction. .Lean, lines 789–829
have hterm : ∀ k ∈ Finset.range (n + 1), ∃ z : ℤ, (z : ℚ) = (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) := by intro k hk have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk) obtain ⟨w, hw⟩ := hcore Qc hQc n k hkn obtain ⟨m, hm⟩ := Nat.exists_eq_add_of_le hkn have hexp : n * (n + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + n * k := by rw [hm] have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omega have hpow : (2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ n) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp] have h2n : ((2 : ℚ) ^ n) ^ k ≠ 0 := by positivity refine ⟨(∏ j ∈ Finset.Ico 2 n, ((2 : ℤ) ^ (j + 1) - 3)) * w * 3 ^ k * 2 ^ (m * (m + 1) / 2), ?_⟩ have e1 : (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * 3 ^ k * (((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + 1) / 2)) / ((2 : ℚ) ^ n) ^ k := by rw [div_pow] ring rw [e1, ← hw, show (w : ℚ) * (2 : ℚ) ^ (k * (k - 1) / 2) * (2 : ℚ) ^ (n * (n + 1) / 2) = (w : ℚ) * ((2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2)) by ring, hpow] push_cast field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 789–829 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hknhavek ≤ nLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withhkn : k ≤ n.Uses library
Nat.lt_succ_iff,Finset.mem_range.Lean, line 795
have hkn : k ≤ n := Nat.lt_succ_iff.mp (Finset.mem_range.mp hk)
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 795 at
2987e49b6fb3↗hAqint.s2.s2.hterm.s2obtain∃ (z : ℤ), (↑z : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withw : ℤ,hw : (↑w : ℚ) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ)).Lean, line 796
obtain ⟨w, hw⟩ := hcore Qc hQc n k hkn
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 796 at
2987e49b6fb3↗hAqint.s2.s2.hterm.s3obtain∃ (k_1 : ℕ), n = k + k_1Leaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withm : ℕ,hm : n = k + m.Uses library
Nat.exists_eq_add_of_le.Lean, line 797
obtain ⟨m, hm⟩ := Nat.exists_eq_add_of_le hkn
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 797 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hexphaven * (n + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + n * kLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withhexp : n * (n + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + n * k.Lean, lines 798–810
have hexp : n * (n + 1) / 2 + k * (k - 1) / 2 = m * (m + 1) / 2 + n * k := by rw [hm] have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _) rcases k with _ | j · simp · simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 798–810 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hexp.e1have(2 : ℕ) * ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) = (k + m) * (k + m + (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe1 : (2 : ℕ) * ((k + m) * (k + m + (1 : ℕ)) / (2 : ℕ)) = (k + m) * (k + m + (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_succ_self.Lean, lines 800–801
have e1 : 2 * ((k + m) * (k + m + 1) / 2) = (k + m) * (k + m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 800–801 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hexp.e2have(2 : ℕ) * (k * (k - (1 : ℕ)) / (2 : ℕ)) = k * (k - (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe2 : (2 : ℕ) * (k * (k - (1 : ℕ)) / (2 : ℕ)) = k * (k - (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_pred_self.Lean, lines 802–803
have e2 : 2 * (k * (k - 1) / 2) = k * (k - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 802–803 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hexp.e3have(2 : ℕ) * (m * (m + (1 : ℕ)) / (2 : ℕ)) = m * (m + (1 : ℕ))Leaves
(k + m) * (k + m + (1 : ℕ)) / (2 : ℕ) + k * (k - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (k + m) * k, withe3 : (2 : ℕ) * (m * (m + (1 : ℕ)) / (2 : ℕ)) = m * (m + (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_succ_self.Lean, lines 804–805
have e3 : 2 * (m * (m + 1) / 2) = m * (m + 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_succ_self _)targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 804–805 at
2987e49b6fb3↗hAqint.s2.s2.hterm.hexp.s4case routine: simpLeaves
((0 : ℕ) + m) * ((0 : ℕ) + m + (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + ((0 : ℕ) + m) * (0 : ℕ).hAqint.s2.s2.hterm.hexp.s5caseLeaves
(j + (1 : ℕ) + m) * (j + (1 : ℕ) + m + (1 : ℕ)) / (2 : ℕ) + (j + (1 : ℕ)) * (j + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) = m * (m + (1 : ℕ)) / (2 : ℕ) + (j + (1 : ℕ) + m) * (j + (1 : ℕ)).Uses library
Nat.add_sub_cancel.Lean, lines 808–810
· simp only [Nat.add_sub_cancel] at e2 ⊢ ring_nf at e1 e2 e3 ⊢ omegatargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 808–810 at
2987e49b6fb3↗
hAqint.s2.s2.hterm.hpowhave(2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (2 : ℚ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * ((2 : ℚ) ^ n) ^ kLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withhpow : (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) = (2 : ℚ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ)) * ((2 : ℚ) ^ n) ^ k.Uses library
pow_add,pow_mul.Lean, lines 811–813
have hpow : (2 : ℚ) ^ (n * (n + 1) / 2) * (2 : ℚ) ^ (k * (k - 1) / 2) = (2 : ℚ) ^ (m * (m + 1) / 2) * ((2 : ℚ) ^ n) ^ k := by rw [← pow_add, ← pow_mul, ← pow_add, hexp]targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 811–813 at
2987e49b6fb3↗hAqint.s2.s2.hterm.h2nhave((2 : ℚ) ^ n) ^ k ≠ (0 : ℚ)routine: positivityLeaves
∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withh2n : ((2 : ℚ) ^ n) ^ k ≠ (0 : ℚ).Lean, line 814
have h2n : ((2 : ℚ) ^ n) ^ k ≠ 0 := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 814 at
2987e49b6fb3↗hAqint.s2.s2.hterm.e1have(2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * (3 : ℚ) ^ k * (((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ))) / ((2 : ℚ) ^ n) ^ kLeaves
(↑((∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℤ) ^ (j + (1 : ℕ)) - (3 : ℤ))) * w * (3 : ℤ) ^ k * (2 : ℤ) ^ (m * (m + (1 : ℕ)) / (2 : ℕ))) : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k), withe1 : (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico (2 : ℕ) n, ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) * (3 : ℚ) ^ k * (((∏ m ∈ Finset.Ioc (n / (2 : ℕ)) n, ((2 : ℚ) ^ m - (1 : ℚ))) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ))) / ((2 : ℚ) ^ n) ^ k.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.rangerange nis the set of natural numbers less thann. ,div_pow.Lean, lines 816–825
have e1 : (2 : ℚ) ^ (n * (n + 1) / 2) * ((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * ((∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) = (∏ j ∈ Finset.Ico 2 n, ((2 : ℚ) ^ (j + 1) - 3)) * 3 ^ k * (((∏ m ∈ Finset.Ioc (n / 2) n, ((2 : ℚ) ^ m - 1)) * ∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * (2 : ℚ) ^ (n * (n + 1) / 2)) / ((2 : ℚ) ^ n) ^ k := by rw [div_pow] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 816–825 at
2987e49b6fb3↗
s21obtain∃ (z : ℤ), (↑z : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ kLeaves
∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n, withzq : ℤ,hzq : (↑zq : ℚ) = (2 : ℚ) ^ (n * (n + (1 : ℕ)) / (2 : ℕ)) * ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k.Lean, line 838
obtain ⟨zq, hzq⟩ := hqx
targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, line 838 at
2987e49b6fb3↗
Proof: targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 1–845 at
2987e49b6fb3.Informal account, unverified — unverified prose about a kernel-checked proof; shown section by section, each labelled with who drafted, wrote or verified it (D-3 v3.31).
Unverified: explainer, its words from explainer/567cd0ce4560….md, machine-drafted by anthropic/claude-opus-5.5 (opn-drafter), 2026-10-05; explainer/d39a90505cc9….md, written by t1006-w3, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06.
Idea and method
Draft · drafted, by the model named above
The target statement fixes three explicit rational families. The first is $$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}.$$ The second is $Q_x(n)=\sum_{k\le n}Q_c(n,k)\,(3/2^n)^k$. The third is $$A_q(n)=\sum_{k\le n}\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j<n}\frac{3}{2^{j+1}-3}.$$ The claim is that for every $n$ there is a positive integer $d$ with $d^2\le 2^{3n^2}$ such that both $d\,Q_x(n)$ and $d\,A_q(n)$ are integers. Exponents are natural numbers, so subtraction in them is truncated. Division by $0$ is $0$, as in Lean; in particular the $j=k$ term of the inner sum is $Q_c(n,k)/0=0$.
The proof has four parts.
- Integrality of the coefficients. Each $Q_c(n,j)$ is a power of $2$ times a product of two Gaussian binomials at $q=2$, and these products are integers.
- Rewriting the inner sums. This uses polynomial interpolation. The polynomial $N=\prod_{n<K\le 2n}(X-2^K)$ is written in Lagrange form at the nodes $2^0,\dots,2^n$, and its derivative is evaluated at a node in two ways. This rewrites $\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$ through sums of $1/(2^k-2^K)$ and a tail over $j>k$.
- Clearing denominators. The odd denominators are cleared by the odd number $\Omega=\prod_{t=1}^{2n}(2^t-1)$. Separately, $\prod_{n/2<m\le n}(2^m-1)$ clears every $2^{k-j}-1$, because each $s\le n$ divides some $m\in(\lfloor n/2\rfloor,n]$. A coprimality argument then merges the two pieces of information. The extra sum $\sum_j 3/(2^{j+1}-3)$ is cleared by $\prod_{2\le j<n}(2^{j+1}-3)$.
- The witness and its size. The witness $d$ is a power of $2$ times these products. Two exceptional values replace the products by explicit numerals. Its size is controlled by bounding each factor by a power of $2$ and doing exponent arithmetic.
Throughout, write $P_m=\prod_{s<m}(2^{s+1}-1)$ and $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.
Telescoping products of $2^a-1$
Draft · drafted, by the model named above
id1_teststates that for $j\le n$ $$\prod_{i<j}(2^{n-i}-1)\cdot P_{n-j}=P_n .$$ It is proved by induction on $j$.- Base case $j=0$. The goal is the statement with the empty first product. This is routine (closed by simp).
- Successor case. The goal is the identity for $j+1$, given the induction hypothesis under $j\le n$ and the assumption $j+1\le n$.
ih'discharges the hypothesis $j\le n$, giving the identity at $j$.- Then $n-j=m+1$ is obtained.
- The goal becomes the identity with the last factor $2^{n-j}-1$ split off the first product (peeling off the top index of a range product). Comparing with
ih'closes it.
lower_teststates that $$\prod_{i<j}(2^j-2^i)=2^{j(j-1)/2}P_j .$$ Its children establish two facts:h1: for $i<j$ (the facthi'), $2^j-2^i=2^i\,(2^{\,j-1-i+1}-1)$.this: $2\sum_{i<j}i=j(j-1)$, by Gauss' summation formula. Hence $\sum_{i<j}i=j(j-1)/2$.
The step then splits the product into $\prod 2^i=2^{\sum i}$ and $\prod_{i<j}(2^{j-i}-1)$. It reflects the index of the latter to obtain $P_j$.
Products over the upper intervals
Draft · drafted, by the model named above
upper_teststates that for $j\le n$ $$\prod_{j<i\le n}(2^j-2^i)=(-1)^{n-j}\,2^{j(n-j)}\,P_{n-j}.$$ The proof has three moves:erewrites $(j,n]$ as $[j+1,n+1)$.- After re-indexing to $i=j+1+t$ with $t<n-j$,
h1gives $2^j-2^{j+1+t}=-2^j(2^{t+1}-1)$ for each factor. - The constant factors are collected as powers, using the cardinality $n-j$.
rhs_teststates that for $j\le n$ $$\prod_{n<K\le 2n}(2^j-2^K)\cdot P_{n-j}=(-1)^n\,2^{jn}\,P_{2n-j}.$$ It follows the same pattern:econverts the interval.h1gives $2^j-2^{n+1+t}=-2^j(2^{n-j+t+1}-1)$ for $t<n$.- The resulting product $\prod_{t<n}(2^{n-j+t+1}-1)$ is concatenated with $P_{n-j}$ to give $P_{2n-j}$.
The interpolation weights of $Q_c$
Draft · drafted, by the model named above
id1_fullstates that for $j\le n$, with $Q_c(n,j)$ written out, $$Q_c(n,j)\,2^j\prod_{i\le n,\ i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K).$$The ingredients are as follows.
- Nonvanishing.
hPneshows $P_m\ne0$ for all $m$, since every factor satisfies $1<2^{s+1}$ (the factthis). - Quotient forms.
hG1writes $\binom{n}{j}_2=P_n/(P_{n-j}P_j)$.hG2writes $\prod_{i<n}\frac{2^{2n-j-i}-1}{2^{i+1}-1}=P_{2n-j}/(P_{n-j}P_n)$. - Splitting the index set.
hsplitwrites $\{0,\dots,n\}\setminus\{j\}=\{0,\dots,j-1\}\cup(j,n]$.hdisjrecords that this union is disjoint. - The right-hand side.
hRis the instance of the upper-interval identity for $\prod_{n<K\le 2n}$. - Substitution.
s7writes $n=j+m$, and every hypothesis is restated with $j+m$ in place of $n$. - Signs.
hsigngives $(-1)^{j+m}=(-1)^j(-1)^{j+m-j}$. - Halving.
hagives $2\cdot\big(j(j-1)/2\big)=j(j-1)$, using that $j(j-1)$ is even. - Exponent bookkeeping.
hexpgives $j(j+m)=j(j-1)/2+j+j(j-1)/2+j\,m$ by induction on $j$. Both of its cases are routine: the zero case by simp, and the successor case by simp and nlinarith.
The recorded closing tools are three: splitting a product over a disjoint union, cancelling a nonzero right factor, and the law of exponents. With them, the left side becomes $P_n/(P_{n-j}P_j)\cdot P_{2n-j}/(P_{n-j}P_n)$ times the two lower and upper products. These were evaluated in the preceding sections, and the result is matched against
hR.Lagrange interpolation by values at the nodes
Draft · drafted, by the model named above
lagr_evalhas three hypotheses:- $x_0,\dots,x_n$ are pairwise distinct;
- $N\in\mathbb{Q}[X]$ has $\deg N\le n$;
- the weights satisfy $r_j\prod_{i\ne j}(x_j-x_i)=N(x_j)$ for all $j\le n$.
Its conclusion is $$N=\sum_{j\le n} r_j\prod_{i\le n,\ i\ne j}(X-x_i).$$
The method is that two polynomials which agree on a finite set of points, and whose difference has degree below the number of points, are equal.
Distinct points.
hinjturns distinctness into injectivity of $x$ on $\{0,\dots,n\}$. Hence the image has $n+1$ points.Degree bound (
s2). The goal is that the difference has degree $<n+1$. It is bounded by the larger of the two degrees.s2.s1gives $\deg N<n+1$.s2.s2gives that the Lagrange sum has degree $<n+1$. It bounds the degree of each summand by $0$ plus the sum of the degrees of the linear factors. That sum equals $n$ by the factthis.
Agreement at the nodes (
s3). The goal is that $N$ and the sum agree at every point of the image.s3.s1writes the point as $x_k$ with $k\le n$; this bound is the content ofhk'and its child.- The sum is evaluated term by term and reduced to the single term $j=k$.
s3.s3is routine (simp): it evaluates the $k$-th term to $r_k\prod_{i\ne k}(x_k-x_i)$.s3.s4shows that every other term vanishes, because its product contains the factor $x_k-x_k$.s3.s5dismisses the case $k\notin\{0,\dots,n\}$ by contradiction.
Derivative of the interpolant at a node
Draft · drafted, by the model named above
deriv_prod_evalstates that for a finite set $S$ and any $z$, $$\Big(\prod_{i\in S}(X-x_i)\Big)'(z)=\sum_{l\in S}\prod_{i\in S\setminus\{l\}}(z-x_i).$$ It uses the product rule for finite products and the fact that polynomial evaluation commutes withFinset.prodand with finite sums.deriv_prod_eval_nodespecialises this to $z=x_k$ with $k\in S$. The value is $\prod_{i\in S\setminus\{k\}}(x_k-x_i)$.- By
s1, every summand with $l\ne k$ contains the factor $x_k-x_k$, so it vanishes. - By
s2, the case $k\notin S$ is contradictory.
lagr_derivassumes the hypotheses of the interpolation step and fixes $k\le n$. It concludes $$N'(x_k)=\sum_{j\ne k} r_j\prod_{i\ne j,k}(x_k-x_i)\;+\;r_k\sum_{l\ne k}\ \prod_{i\ne k,l}(x_k-x_i).$$ The proof differentiates the Lagrange form term by term and separates the term $j=k$ from the sum over the others (theFinset.add_sum_eraselemma).hkmemrecords that $k$ lies in the index set.- By
s2, for $j\ne k$ (the facthjk), the derivative of $r_j\prod_{i\ne j}(X-x_i)$ evaluated at $x_k$ is $r_j\prod_{i\ne j,k}(x_k-x_i)$. - By
s3, the term $j=k$ gives $r_k$ times the derivative formula above.
The partial-fraction identity: setting up
Draft · drafted, by the model named above
formula3fixes $k\le n$ and any $Q_c$ satisfying, for all $j\le n$, the weight identity $Q_c(n,j)2^j\prod_{i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K)$. It concludes $$\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=Q_c(n,k)\,2^k\Big(\sum_{n<K\le 2n}\frac{1}{2^k-2^K}-\sum_{i\le n,\,i\ne k}\frac{1}{2^k-2^i}\Big)-\sum_{k<j\le n}\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$The steps work with the following abbreviations:
- nodes $x_j$, behaving as $2^j$;
- $T=(n,2n]$ and $S=\{0,\dots,n\}\setminus\{k\}$;
- a polynomial $N$, whose value at $x_k$ is $\prod_{K\in T}(x_k-2^K)$;
- a number $P$, which by
hrandhNkplays the role of $\prod_{i\in S}(x_k-x_i)$.
The setup steps are these.
- Distinct nodes.
hxinjreduces $x_i=x_j$ to $2^i=2^j$ (the facth'), and then to $i=j$ by injectivity of powers of $2$.hxnegives $2^a-2^b\ne0$ for $a\ne b$. - Degree and weights.
hNdeggives $\deg N\le n$: the degree of a product is the sum of the degrees, each factor $X-C$ has degree $1$, and $T$ has $n$ elements.hrturns the hypothesis into the weight condition $r_j=Q_c(n,j)2^j$ for $N$.hkmemrecords $k\in\{0,\dots,n\}$. - First evaluation of $N'(x_k)$.
hDis the derivative formula of the previous section with these weights. - Second evaluation of $N'(x_k)$.
hD2gives $N'(x_k)=\sum_{K\in T}\prod_{a\in T\setminus\{K\}}(x_k-2^a)$, from the product form of $N$. - Values of $N$ and $P$.
hPnegives $P\ne0$.hNkgives $N(x_k)=Q_c(n,k)2^kP$.hNk'gives $N(x_k)=\prod_{K\in T}(x_k-2^K)$.
The partial-fraction identity: dividing out $P$
Draft · drafted, by the model named above
Each product in the two evaluations of $N'(x_k)$ is rewritten as a quotient. This is done by multiplying back the missing factor, which is nonzero in each case.
| Step | Statement | Nonvanishing used | |---|---|---| |
ha| for $j\in S$: $\prod_{i\ne j,k}(x_k-x_i)=P/(x_k-x_j)$ |hne: $x_k-x_j\ne0$ | |hb| for $l\in S$: $\prod_{i\in S\setminus\{l\}}(x_k-x_i)=P/(x_k-x_l)$ |hne| |hc| for $K\in T$: $\prod_{a\in T\setminus\{K\}}(x_k-2^a)=N(x_k)/(x_k-2^K)$ |hKn($n<K$) andhne|hD3andhD4substitute these quotients into the two sums.keythen states $$\sum_{j\in S}\frac{Q_c(n,j)2^j}{x_k-x_j}=Q_c(n,k)2^k\Big(\sum_{K\in T}\frac{1}{x_k-2^K}-\sum_{i\in S}\frac{1}{x_k-x_i}\Big).$$ It is proved by cancelling the nonzero factor $P$ on the left. The stepse1,e2ande3pull $P$ out of the three sums involved by distributing it across them.The partial-fraction identity: splitting at $k$
Draft · drafted, by the model named above
hsplitwrites $S=\{0,\dots,k-1\}\cup(k,n]$, andhdisjrecords that the union is disjoint.- Indices below $k$. For $j<k$ (the fact
hjk),hlowgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)}{2^{k-j}-1}.$$ It uses $2^{k-j}-1\ne0$, from $1<2^{k-j}$ (the steps
hneandthis), and $2^k-2^j\ne0$ (the stephne2).- Indices above $k$. For $k<j$ (the fact
hkj),hhighgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}},$$ with the analogous nonvanishing facts.
The recorded uses of
formula3also include splitting a sum over a disjoint union and peeling the top term off a range sum. The latter turns $\sum_{j<k}$ into $\sum_{j\le k}$, since the added term $Q_c(n,k)/(2^0-1)=Q_c(n,k)/0$ is $0$.hformis the same identity stated for the concrete $Q_c$ of the target. The outline records no sub-steps for it.Gaussian binomials at $q=2$ are integers
Draft · drafted, by the model named above
gaussstates that for all $n,k$ there is an integer equal to $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.Nonvanishing denominators.
hDgives $2^{j+1}-1\ne0$, since $1<2^{j+1}$ (the steph1).hDkgives $P_k\ne0$.The $q$-Pascal recursion (
key). $$\binom{m+1}{j+1}_2=\binom{m}{j}_2+2^{j+1}\binom{m}{j+1}_2 .$$ Both sides are written as a single product quotient.hshiftgives $m+1-(i+1)=m-i$.hDjandhjgive $P_j\ne0$ and $2^{j+1}-1\ne0$.- The resulting rational identity is settled in two cases:
- in
s4, with $2^{m+1}=2^{m-j}2^{j+1}$ (the stepe); - in
s5, where the numerator product $\prod_{i<j}(2^{m-i}-1)$ is $0$ (the stephz).
- in
Integrality (
main). This is the statement for all $m,j$, by induction on $m$ and then on $j$.- $m=0$ (
s1).- For $j=0$ the product is empty, and an integer witness is given (
s1.s1). - For $j+1$ the product is $0$, since it contains the factor $2^0-1$ (
s1.s2).
- For $j=0$ the product is empty, and an integer witness is given (
- $m+1$ (
s2), with the induction hypothesis for all $j$.- For $j=0$ the product is empty (
s2.s1). - For $j+1$, let $a$ and $b$ be the integers given by the hypothesis for $\binom{m}{j}_2$ and $\binom{m}{j+1}_2$. The recursion then shows that $a+2^{j+1}b$ works.
- For $j=0$ the product is empty (
Clearing the denominators $2^{k-j}-1$
Draft · drafted, by the model named above
hoddstates that for $k\le n$ and any integers $c_j$, $$\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{c_j}{2^{k-j}-1}$$ is an integer. Distributing the product over the sum reduces this to the termwise claimhint: each term, multiplied by the product, is an integer.Fix $j$ in the sum, so $j\le k$ (the fact
hjk). There are two cases.- Case
s2. An integer witness is supplied directly. - Case
s3. Write $k-j=d+1$ (steps1).hdnis routine (omega): it gives $d+1\le n$.- Let $t=(d+1)\lfloor n/(d+1)\rfloor$. Then $\lfloor n/(d+1)\rfloor\ge1$ (
ht), $t\le n$ (hP1), $n<t+(d+1)$ (hP2with its child) and $d+1\le t$ (hP3). - Together these give $t\in(\lfloor n/2\rfloor,n]$ (
hmem). hdvdgives that $2^{d+1}-1$ divides the product. It divides $(2^{d+1})^{t/(d+1)}-1^{t/(d+1)}=2^t-1$ (this), and $2^t-1$ is one of the factors.s9writes the product as $(2^{d+1}-1)q$ with $q$ an integer.- With $2^{d+1}-1\ne0$ (
hneand its child) and the cast identityhcast, the term equals $c_jq$, which is the integer witness.
Merging odd and $2$-adic information
Draft · drafted, by the model named above
combinestates: let $\Omega$ be odd with $\Omega p=2^aA$, and suppose $B=Mp$ and $m=M$ for integers $A,B,m$. Then there is an integer $z$ with $z\,2^a=Mp$.hintgives $\Omega B=2^a(mA)$ in $\mathbb{Z}$. It is proved by checking the identity after casting to $\mathbb{Q}$ (the stepthis).s2writes $\Omega=2t+1$.hcopgives that $2^a$ and $\Omega$ are coprime.hdvdgives $2^a\mid B\Omega$.- By coprimality, $2^a\mid B$. Step
s5obtains $c$ with $B=2^ac$.
The core estimate: the odd number $\Omega$
Draft · drafted, by the model named above
hcorestates that for $k\le n$ there is an integer $z$ with $$z\,2^{k(k-1)/2}=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}.$$The first ingredients are these.
- Coefficients (
hQcint). For every $j$ there is an integer $g_j$ with $Q_c(n,j)=2^{j(j-1)/2}g_j$. It is obtained from integer witnesses for the two Gaussian-binomial products (s1ands2). - Divisibility (
hΩdivin the Lean; the outline's step id ishcore.h_x3a9div). With $\Omega=\prod_{t=1}^{2n}(2^t-1)$: for $1\le s\le 2n$ there is an integer $w$ with $w(2^s-1)=\Omega$. It is obtained by taking the factor $t=s$ out of the product. - Oddness (
hΩoddin the Lean; step idhcore.h_x3a9odd). $\Omega$ is odd. The proof establishes a property of the product by showing that it is multiplicative and holds on factors:- products of odd integers are odd (
s1); - $1$ is odd (
s2); - each $2^t-1$ with $t\ge1$ is odd, as an even number minus an odd one (
s3, with $t\ne0$ from $1\le t$).
- products of odd integers are odd (
The core estimate: integral reciprocal terms
Draft · drafted, by the model named above
key1states that for $a\ne b$, both $\le 2n$, the number $\Omega\,2^a\cdot\frac{1}{2^a-2^b}$ is an integer. The proof splits according to the order of $a$ and $b$.- Case $a<b$ (
s1).- Write $b=a+d+1$ (
s1.s1). - Obtain an integer $w$ with $w(2^{d+1}-1)=\Omega$ (
s1.s2). - Record $2^{d+1}-1\ne0$ (
hne, withthis). h2ais routine (positivity): $2^a\ne0$.- The second
thisis routine (ring): $2^a-2^a2^{d+1}=-(2^a(2^{d+1}-1))$. - The witness is $-w$.
- Write $b=a+d+1$ (
- Case $a>b$ (
s2).- Write $a=b+d+1$ and obtain $w$ in the same way.
h2bis routine (positivity), and the factorisationthisis routine (ring).- The witness is $w\,2^{d+1}$.
Two instances follow.
hK: for $K\in(n,2n]$ (so $n<K\le 2n$, bythis), $\Omega 2^k/(2^k-2^K)$ is an integer.hI: for $i\le n$ with $i\ne k$ (the factsh1andh2), $\Omega 2^k/(2^k-2^i)$ is an integer.
The core estimate: the tail and the assembly
Draft · drafted, by the model named above
Tail terms (
hT). For $j\in(k,n]$ there is an integer $w$ with $$w\,2^{k(k-1)/2}=\Omega\cdot\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$hj'gives $k<j\le n$.s2writes $j-k=d+1$.s3obtains an integer $w$ with $w(2^{d+1}-1)=\Omega$.hmonogives $k(k-1)/2\le j(j-1)/2$, ands5writes $j(j-1)/2=k(k-1)/2+e$.- With $2^{d+1}-1\ne0$ and $1-2^{d+1}\ne0$ (the steps
hne, its child, andhne'), the witness is $-(w\,g_j\,2^e\,2^{d+1})$.
The $2$-adic form (
h2adic). Let $f_K$, $f_I$ and $f_T$ be the integers supplied byhK,hIandhT. Then $$\Omega\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=2^{k(k-1)/2}\Big(g_k\big(\textstyle\sum_K f_K-\sum_i f_I\big)-\sum_j f_T\Big).$$ Its childhtailgives $2^{k(k-1)/2}\sum_{j\in(k,n]}f_T=\Omega\sum_{j\in(k,n]}\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}}$. The goal left afterhtailis the partial-fraction formula multiplied through by $\Omega$, with the reciprocal sums written through the integers $f_K$ and $f_I$.The odd form.
s9uses the odd-denominator statement with $c_j=2^{j(j-1)/2}g_j$ to obtain an integer $B$. It equals the product $\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)$ times $\sum_{j\le k} c_j/(2^{k-j}-1)$.hB'rewrites $c_j$ back as $Q_c(n,j)$, so that $B$ equals the right-hand side ofhcore.
These facts have the shape of the hypotheses of the merging lemma:
- the odd number $\Omega$;
- the exponent $k(k-1)/2$;
- the relation from
h2adic; - the integer $B$;
- the integral product.
Clearing the extra sum
Draft · drafted, by the model named above
hcnallstates that $$\prod_{2\le j<n}(2^{j+1}-3)\cdot\sum_{j<n}\frac{3}{2^{j+1}-3}$$ is an integer. Distributing the product reduces this to the termwise claimhint. There are two cases on $j$.- Case
s1: $j<2$.hj'is routine (omega): it gives $j=0$ or $j=1$.- In
s2, the routine stepe(norm_num) gives $3/(2-3)=-3$, and the witness is $-3\prod(2^{i+1}-3)$. - In
s3, the routine stepe(norm_num) gives $3/(4-3)=3$, and the witness is $3\prod(2^{i+1}-3)$.
- In
- Case
s2: $j\ge2$.hmemgives $j\in[2,n)$.hnegives $2^{j+1}-3\ne0$, from $8\le 2^{j+1}$. That bound is proved by the calculation inh8: $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity of powers.- The factor for $j$ is pulled out of the product, which cancels the denominator.
The size bound: setting up the exponents
Draft · drafted, by the model named above
The remaining steps concern the natural number $$d=2^{n(n+1)/2}\cdot E(n).$$ Here $E(5)=409045$ and $E(7)=1298717875$. Otherwise $$E(n)=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\prod_{2\le j<n}(2^{j+1}-3).$$
hbstates that $d^2\le 2^{3n^2}$ in $\mathbb{R}$. It follows from the same inequality in $\mathbb{N}$, which iskey. That inequality is split into two cases.- Case
s1: $n\le 9$. The proof splits on $n\le 9$ or $10\le n$ (Lean line 626; the split itself is not an outline step, and the outline prints no hypothesis for this case). For $n\le 9$ the inequality in $\mathbb{N}$ is checked by evaluation in the kernel (decide +kernel, after generalising over $n$), for each of the ten values; this is the only place where the numerals $E(5)$ and $E(7)$ enter the size bound. - Case
s2: $n\ge 10$. Since $n\ne 5$ and $n\ne 7$, the conditional is resolved to the product branch, so the goal is the inequality for $2^{n(n+1)/2}\prod(2^m-1)\prod(2^{j+1}-3)$. The ingredients are:hP1: $\prod_{(n/2,n]}(2^m-1)\le 2^{\sum m}$, comparing factor by factor;hP2: $\prod_{[2,n)}(2^{j+1}-3)\le 2^{\sum(j+1)}$;s3: $n=\lfloor n/2\rfloor+c+1$;s4: $n=d'+3$, where $d'$ is the name the outline gives (it is distinct from the witness $d$);hS1: $2\sum_{(n/2,n]}m=2(c+1)(\lfloor n/2\rfloor+1)+(c+1)c$, by Gauss' summation formula after rewriting the interval as $[\lfloor n/2\rfloor+1,n+1)$ (e);hS2: $2\sum_{[2,n)}(j+1)=6(d'+1)+(d'+1)d'$, after re-indexing (this) and again Gauss' summation formula;hT: $\big(n(n+1)/2\big)\cdot2=n(n+1)$, since $n(n+1)$ is even.
The size bound: exponent arithmetic
Draft · drafted, by the model named above
hexpstates that $$2\cdot\tfrac{n(n+1)}{2}+2\sum_{(n/2,n]}m+2\sum_{[2,n)}(j+1)\le 3n\cdot n .$$The polynomial inequality (
arith). Assume $r\le1$, $3\le e$, and that $A,B,T$ satisfy $$2A=2(e+r+2)(e+3)+(e+r+2)(e+r+1),$$ $$2B=6(2e+r+2)+(2e+r+2)(2e+r+1),$$ $$2T=(2e+4+r)(2e+5+r).$$ Then $2T+2A+2B\le 3(2e+4+r)^2$. It uses $3e\le e^2$ (hsq) and is checked separately for $r=0$ (s2) and $r=1$ (s3).Applying it.
s2writes $\lfloor n/2\rfloor=e+2$.s3writes $n=2e+4+r$ with $r\le1$.hc'andhd'are routine (omega): they give $c=e+1+r$ and $d'=2e+1+r$.hT'restates $2\cdot\frac{n(n+1)}2$ in these variables.thisis the resulting instance, which giveshexp.
The chain of inequalities.
s9bounds the squared product by the squared power-of-$2$ bounds fromhP1andhP2.s10rewrites this by the laws of exponents; its claim is not printed in the outline.s11concludes $2^{(\cdots)}\le 2^{3n^2}$ by monotonicity of powers of $2$, usinghexp.
Integrality of $2^{n(n+1)/2}Q_x(n)$
Draft · drafted, by the model named above
hqxstates that $2^{n(n+1)/2}\sum_{k\le n}Q_c(n,k)(3/2^n)^k$ is an integer. Distributing the power over the sum reduces this to the termwise claimhterm.Fix $k\le n$ (the fact
hkn).- Witnesses. Let $a$ and $b$ be integers equal to $\binom{n}{k}_2$ and to $\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (steps
s2ands3). - Substitution.
s4writes $n=k+m$. - Exponent identity (
hexp).
$$\tfrac{(k+m)(k+m+1)}2+\tfrac{k(k-1)}2=\tfrac{m(m+1)}2+(k+m)k .$$
e1,e2ande3remove the three halvings, using that consecutive products are even.- The identity is then proved by induction on $k$: the case $k=0$ (
s4) is routine (simp), ands5is the successor case.
- Powers.
hpowgives $2^{(k+m)(k+m+1)/2}\,2^{k(k-1)/2}=2^{m(m+1)/2}(2^{k+m})^k$. - Nonvanishing.
h2is routine (positivity): $2^{k+m}\ne0$. - Conclusion. The term equals $(-1)^k3^k2^{m(m+1)/2}ab$.
Positivity of the odd part
Draft · drafted, by the model named above
hEstates $0<E(n)$, splitting into the three branches of the conditional.- The two numeral branches are routine (norm_num): $0<409045$ and $0<1298717875$ (
s1ands2). - In the product branch (
s3), each factor is positive.- Factors $2^m-1$ (
s3.s1). Here $m\in(\lfloor n/2\rfloor,n]$ gives $1\le m$ (hm1, via $\lfloor n/2\rfloor<m$). Then $2\le 2^m$ (this): the equation $2=2^1$ is routine (norm_num), and $2^1\le 2^m$ follows by monotonicity. - Factors $2^{j+1}-3$ (
s3.s2). Here $j\in[2,n)$ gives $2\le j$ (hj2). Then $8\le 2^{j+1}$: the equation $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity.
- Factors $2^m-1$ (
Integrality of $d\,A_q(n)$: the cases and the casts
Draft · drafted, by the model named above
hAqintstates that $d\cdot A_q(n)$ is an integer, for the $d$ above. The cases follow the branches of the conditional.- Numeral branches (
s1ands2.s1). The recorded uses select the branch, give a witness, and evaluate by kernel reduction. - Product branch (
s2.s2). The setup is as follows.hMcasts $\prod(2^m-1)$ from $\mathbb{N}$ to $\mathbb{Q}$, valid since $1\le 2^m$.hCcasts $\prod(2^{j+1}-3)$, valid since $3\le 2^{j+1}$ for $j\ge2$. This useshj2; the boundh3is the calculation in which $3\le 2^2$ is routine (norm_num) and $2^2\le 2^{j+1}$ follows by monotonicity.hdcasts $d$ itself as $2^{n(n+1)/2}\cdot\big(\prod(2^m-1)\prod(2^{j+1}-3)\big)$.s4obtains an integer $z_{cn}$ equal to $\prod(2^{j+1}-3)\sum_{j<n}3/(2^{j+1}-3)$.s5obtains an integer $z_q'$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$.hQxnunfolds $Q_x(n)$ as that sum.- The recorded closing uses distribute $d$ over the two parts of $A_q(n)$ and over the outer sum.
Integrality of $d\,A_q(n)$: the main terms
Draft · drafted, by the model named above
htermstates that for each $k\le n$, $$2^{n(n+1)/2}\Big(\prod(2^m-1)\prod(2^{j+1}-3)\Big)\cdot\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k$$ is an integer.hkngives $k\le n$.s2obtains $w$ with $w\,2^{k(k-1)/2}=\prod(2^m-1)\cdot\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$. This is an instance of the core statement.s3writes $n=k+m$.hexpis the exponent identity $\frac{n(n+1)}2+\frac{k(k-1)}2=\frac{m(m+1)}2+nk$. As before, it removes the halvings (e1,e2,e3) and proceeds by induction on $k$; the base cases4is routine (simp), ands5is the successor case.hpowgives $2^{n(n+1)/2}2^{k(k-1)/2}=2^{m(m+1)/2}(2^n)^k$.h2nis routine (positivity): $(2^n)^k\ne0$.e1regroups the term as $\prod(2^{j+1}-3)\cdot3^k\cdot\big(\prod(2^m-1)\sum_{j\le k}\tfrac{Q_c(n,j)}{2^{k-j}-1}\big)\,2^{n(n+1)/2}/(2^n)^k$.- Combining these, the term equals $\prod(2^{j+1}-3)\cdot w\cdot3^k\cdot2^{m(m+1)/2}$, which is the integer witness.
Finally,
s21obtains an integer $z_q$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$, which is the content of the integrality of $2^{n(n+1)/2}Q_x(n)$. The steps recorded at the top level have therefore established three things:- for the number $d=2^{n(n+1)/2}E(n)$: positivity of $E(n)$, the bound $d^2\le 2^{3n^2}$, and integrality of $d\,A_q(n)$;
- integrality of $2^{n(n+1)/2}Q_x(n)$.
These are the ingredients of the existential goal. No step in the outline is open.
An earlier explainer (1 version, by opn-drafter) was withdrawn; it is in the history below (D-3 v3.30).
History: 3 versions on record, 1 withdrawn
Chain 1 of 2
2026-10-05 · machine-drafted by anthropic/claude-opus-5.5 (opn-drafter) · not signed · withdrawn · explainer/529518acf8b3….md · the first version of its chain
Read this version
Idea and method
The statement fixes three rational quantities. Write $G(m,j)=\prod_{i<j}\frac{2^{m-i}-1}{2^{i+1}-1}$, where $m-i$ is truncated natural subtraction. Then $$\mathrm{Qc}(n,k)=(-1)^k\,2^{k(k-1)/2}\,G(n,k)\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1},\qquad \mathrm{Qx}(n)=\sum_{k\le n}\mathrm{Qc}(n,k)\Big(\frac{3}{2^n}\Big)^k,$$ $$\mathrm{Aq}(n)=\sum_{k\le n}\Big(\sum_{j\le k}\frac{\mathrm{Qc}(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+\mathrm{Qx}(n)\sum_{j<n}\frac{3}{2^{j+1}-3}.$$ The claim is that for every $n$ there is an integer $d\ge 1$ with $d^2\le 2^{3n^2}$ such that $d\,\mathrm{Qx}(n)$ and $d\,\mathrm{Aq}(n)$ are both integers.
The proof starts from one observation. Take the nodes $x_i=2^i$ for $0\le i\le n$ and the polynomial $N(X)=\prod_{n<K\le 2n}(X-2^K)$. Then the numbers $2^k\,\mathrm{Qc}(n,k)$ are exactly the Lagrange interpolation coefficients of $N$ at these nodes.
The proof computes the value of $N'$ at a node in two ways, once from the interpolation formula and once from the product rule. Comparing the two expresses the awkward inner sums $\sum_{j\le k}\mathrm{Qc}(n,j)/(2^{k-j}-1)$ through reciprocals $1/(2^a-2^b)$.
Denominators are then cleared in three ways:
- an odd integer $\Omega=\prod_{1\le t\le 2n}(2^t-1)$, whose oddness lets 2-adic divisibility pass through;
- the integrality of the Gaussian binomials $G(m,j)$;
- the divisibility of $\prod_{n/2<m\le n}(2^m-1)$ by every $2^{s}-1$ with $1\le s\le n$.
The factor $\prod_{2\le j<n}(2^{j+1}-3)$ clears the last sum. Finally the size of the resulting $d$ is bounded by comparing exponents of $2$. The values $n=5$ and $n=7$ are given special constants, which are checked by computation.
A telescoping product identity (id1_test id1_test.s1 id1_test.s2 id1_test.s2.ih' id1_test.s2.s2)
Write $P_m=\prod_{s<m}(2^{s+1}-1)$. The step
id1_testshows that for $j\le n$ $$\Big(\prod_{i<j}(2^{n-i}-1)\Big)\,P_{n-j}=P_n .$$The proof is by induction on $j$.
- Base case ($j=0$): routine (closed by simplification).
- Inductive step. Assume $j+1\le n$. Then the hypothesis $j\le n$ needed by the induction hypothesis holds, which gives
id1_test.s2.ih'. Next,id1_test.s2.s2writes $n-j=m+1$. The goal becomes the statement that the new factor $2^{n-j}-1$, multiplied into $P_{n-(j+1)}$, reproduces $P_{n-j}$. This is the last factor of $P_{m+1}$ peeled off.
Products of differences of powers of two (lower_test lower_test.h1 lower_test.h1.hi' lower_test.this upper_test upper_test.e upper_test.h1 rhs_test rhs_test.e rhs_test.h1)
Three closed forms for products of the shape $\prod(2^j-2^i)$ follow.
lower_test. It states $\prod_{i<j}(2^j-2^i)=2^{j(j-1)/2}P_j$.lower_test.h1factors each term, using $i<j$ fromlower_test.h1.hi':
$$2^j-2^i=2^i\,(2^{\,j-1-i+1}-1).$$
- The reflected product of the second factors is $P_j$.
- The powers of two collect to $2^{\sum_{i<j}i}$. The step
lower_test.thisuses Gauss' summation formula to show $2\sum_{i<j}i=j(j-1)$, which leaves the goal $\sum_{i<j}i=j(j-1)/2$.
upper_test. For $j\le n$ it states $$\prod_{j<i\le n}(2^j-2^i)=(-1)^{n-j}\,2^{j(n-j)}\,P_{n-j}.$$upper_test.erewrites $(j,n]$ as $[j+1,n+1)$, and the product is reindexed over $t<n-j$.upper_test.h1writes each factor as $2^j-2^{j+1+t}=-2^j(2^{t+1}-1)$.
rhs_test. For $j\le n$ it states $$\Big(\prod_{n<K\le 2n}(2^j-2^K)\Big)P_{n-j}=(-1)^n\,2^{jn}\,P_{2n-j}.$$rhs_test.erewrites $(n,2n]=[n+1,2n+1)$.rhs_test.h1writes $2^j-2^{n+1+t}=-2^j(2^{n-j+t+1}-1)$ for $t<n$.- The resulting $n$ factors $2^{n-j+t+1}-1$ concatenate with $P_{n-j}$ into $P_{2n-j}$.
$2^j\,\mathrm{Qc}(n,j)$ is a Lagrange coefficient (id1_full id1_full.hPne id1_full.hPne.this id1_full.hG1 id1_full.hG2 id1_full.hsplit id1_full.hdisj id1_full.hR id1_full.s7 id1_full.hsign id1_full.ha id1_full.hexp id1_full.hexp.s1 id1_full.hexp.s2)
The step
id1_fullproves, for $j\le n$, with $\mathrm{Qc}(n,j)$ written out: $$\mathrm{Qc}(n,j)\cdot 2^j\prod_{\substack{i\le n\\ i\ne j}}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K).$$The proof assembles the following pieces.
- Nonvanishing.
id1_full.hPneshows $P_m\neq 0$, because each factor exceeds $0$ byid1_full.hPne.this($1<2^{s+1}$). - The two products in $\mathrm{Qc}$ as ratios.
id1_full.hG1: $G(n,j)=P_n/(P_{n-j}P_j)$.id1_full.hG2: $\prod_{i<n}\frac{2^{2n-j-i}-1}{2^{i+1}-1}=P_{2n-j}/(P_{n-j}P_n)$.
- Splitting the index set.
id1_full.hsplitandid1_full.hdisjsplit $\{0,\dots,n\}\setminus\{j\}$ into the disjoint pieces $[0,j)$ and $(j,n]$. The two resulting products are covered by the closed forms of the previous section. - Right-hand side.
id1_full.hRis the instance of the identity fromrhs_testneeded here. - Exponent bookkeeping.
id1_full.s7writes $n=j+m$.id1_full.hsigngives $(-1)^{j+m}=(-1)^j(-1)^m$.id1_full.hagives $2\cdot\frac{j(j-1)}{2}=j(j-1)$, using that $j(j-1)$ is even.id1_full.hexpgives the exponent identity $j(j+m)=\frac{j(j-1)}2+j+\frac{j(j-1)}2+jm$. It is proved by induction on $j$, and both its base case and its inductive step are routine (closed by simplification, with nonlinear arithmetic for the step).
Splitting the product over the union and cancelling a nonzero common factor then yields the identity.
Lagrange interpolation (lagr_eval lagr_eval.hinj lagr_eval.s2 lagr_eval.s2.s1 lagr_eval.s2.s2 lagr_eval.s2.s2.this lagr_eval.s3 lagr_eval.s3.s1 lagr_eval.s3.hk' lagr_eval.s3.hk'.this lagr_eval.s3.s3 lagr_eval.s3.s4 lagr_eval.s3.s5)
The step
lagr_evalis the uniqueness half of Lagrange interpolation over $\mathbb Q$. The hypotheses are:- the nodes $x_0,\dots,x_n$ are distinct;
- $\deg N\le n$;
- the numbers $r_j$ satisfy $r_j\prod_{i\ne j}(x_j-x_i)=N(x_j)$ for all $j\le n$.
The conclusion is $$N=\sum_{j\le n} r_j\prod_{i\ne j}(X-x_i).$$
The proof uses the fact that two polynomials agreeing on more points than the degree of their difference are equal.
lagr_eval.hinjturns distinctness into injectivity of $x$ on $\{0,\dots,n\}$, so the image has $n+1$ points.lagr_eval.s2reduces the degree requirement to showing that the degree of the difference is $<n+1$. It handles the two terms separately:lagr_eval.s2.s1: $\deg N<n+1$.lagr_eval.s2.s2: the interpolating sum has degree $<n+1$. Each summand is a constant times $n$ linear factors, andlagr_eval.s2.s2.thisshows their degrees add up to $n$.
lagr_eval.s3asks for agreement at every image point.lagr_eval.s3.s1picks $k$ with $y=x_k$.lagr_eval.s3.hk'derives $k\le n$, usinglagr_eval.s3.hk'.this.lagr_eval.s3.s3is routine (simplification). It evaluates the $k$-th summand as $r_k\prod_{i\ne k}(x_k-x_i)$, which is $N(x_k)$ by hypothesis.lagr_eval.s3.s4shows every other summand vanishes at $x_k$, since its product contains the factor $x_k-x_k=0$.lagr_eval.s3.s5disposes of the impossible case $k\notin\{0,\dots,n\}$.
Derivatives at the nodes (deriv_prod_eval deriv_prod_eval_node deriv_prod_eval_node.s1 deriv_prod_eval_node.s2 lagr_deriv lagr_deriv.hkmem lagr_deriv.s2 lagr_deriv.s2.hjk lagr_deriv.s3)
Product rule. The step
deriv_prod_evalis the product rule evaluated at a point: $$\Big(\prod_{i\in S}(X-x_i)\Big)'(z)=\sum_
Chain 2 of 2
2026-10-05 · machine-drafted by anthropic/claude-opus-5.5 (opn-drafter) · not signed · explainer/567cd0ce4560….md · the first version of its chain
Read this version
Idea and method
The target statement fixes three explicit rational families. The first is $$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}.$$ The second is $Q_x(n)=\sum_{k\le n}Q_c(n,k)\,(3/2^n)^k$. The third is $$A_q(n)=\sum_{k\le n}\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j<n}\frac{3}{2^{j+1}-3}.$$ The claim is that for every $n$ there is a positive integer $d$ with $d^2\le 2^{3n^2}$ such that both $d\,Q_x(n)$ and $d\,A_q(n)$ are integers. Exponents are natural numbers, so subtraction in them is truncated. Division by $0$ is $0$, as in Lean; in particular the $j=k$ term of the inner sum is $Q_c(n,k)/0=0$.
The proof has four parts.
- Integrality of the coefficients. Each $Q_c(n,j)$ is a power of $2$ times a product of two Gaussian binomials at $q=2$, and these products are integers.
- Rewriting the inner sums. This uses polynomial interpolation. The polynomial $N=\prod_{n<K\le 2n}(X-2^K)$ is written in Lagrange form at the nodes $2^0,\dots,2^n$, and its derivative is evaluated at a node in two ways. This rewrites $\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$ through sums of $1/(2^k-2^K)$ and a tail over $j>k$.
- Clearing denominators. The odd denominators are cleared by the odd number $\Omega=\prod_{t=1}^{2n}(2^t-1)$. Separately, $\prod_{n/2<m\le n}(2^m-1)$ clears every $2^{k-j}-1$, because each $s\le n$ divides some $m\in(\lfloor n/2\rfloor,n]$. A coprimality argument then merges the two pieces of information. The extra sum $\sum_j 3/(2^{j+1}-3)$ is cleared by $\prod_{2\le j<n}(2^{j+1}-3)$.
- The witness and its size. The witness $d$ is a power of $2$ times these products. Two exceptional values replace the products by explicit numerals. Its size is controlled by bounding each factor by a power of $2$ and doing exponent arithmetic.
Throughout, write $P_m=\prod_{s<m}(2^{s+1}-1)$ and $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.
Telescoping products of $2^a-1$ (id1_test id1_test.s1 id1_test.s2 id1_test.s2.ih' id1_test.s2.s2 lower_test lower_test.h1 lower_test.h1.hi' lower_test.this)
id1_teststates that for $j\le n$ $$\prod_{i<j}(2^{n-i}-1)\cdot P_{n-j}=P_n .$$ It is proved by induction on $j$.- Base case $j=0$. The goal is the statement with the empty first product. This is routine (closed by simp).
- Successor case. The goal is the identity for $j+1$, given the induction hypothesis under $j\le n$ and the assumption $j+1\le n$.
ih'discharges the hypothesis $j\le n$, giving the identity at $j$.- Then $n-j=m+1$ is obtained.
- The goal becomes the identity with the last factor $2^{n-j}-1$ split off the first product (peeling off the top index of a range product). Comparing with
ih'closes it.
lower_teststates that $$\prod_{i<j}(2^j-2^i)=2^{j(j-1)/2}P_j .$$ Its children establish two facts:h1: for $i<j$ (the facthi'), $2^j-2^i=2^i\,(2^{\,j-1-i+1}-1)$.this: $2\sum_{i<j}i=j(j-1)$, by Gauss' summation formula. Hence $\sum_{i<j}i=j(j-1)/2$.
The step then splits the product into $\prod 2^i=2^{\sum i}$ and $\prod_{i<j}(2^{j-i}-1)$. It reflects the index of the latter to obtain $P_j$.
Products over the upper intervals (upper_test upper_test.e upper_test.h1 rhs_test rhs_test.e rhs_test.h1)
upper_teststates that for $j\le n$ $$\prod_{j<i\le n}(2^j-2^i)=(-1)^{n-j}\,2^{j(n-j)}\,P_{n-j}.$$ The proof has three moves:erewrites $(j,n]$ as $[j+1,n+1)$.- After re-indexing to $i=j+1+t$ with $t<n-j$,
h1gives $2^j-2^{j+1+t}=-2^j(2^{t+1}-1)$ for each factor. - The constant factors are collected as powers, using the cardinality $n-j$.
rhs_teststates that for $j\le n$ $$\prod_{n<K\le 2n}(2^j-2^K)\cdot P_{n-j}=(-1)^n\,2^{jn}\,P_{2n-j}.$$ It follows the same pattern:econverts the interval.h1gives $2^j-2^{n+1+t}=-2^j(2^{n-j+t+1}-1)$ for $t<n$.- The resulting product $\prod_{t<n}(2^{n-j+t+1}-1)$ is concatenated with $P_{n-j}$ to give $P_{2n-j}$.
The interpolation weights of $Q_c$ (id1_full id1_full.hPne id1_full.hPne.this id1_full.hG1 id1_full.hG2 id1_full.hsplit id1_full.hdisj id1_full.hR id1_full.s7 id1_full.hsign id1_full.ha id1_full.hexp id1_full.hexp.s1 id1_full.hexp.s2)
id1_fullstates that for $j\le n$, with $Q_c(n,j)$ written out, $$Q_c(n,j)\,2^j\prod_{i\le n,\ i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K).$$The ingredients are as follows.
- Nonvanishing.
hPneshows $P_m\ne0$ for all $m$, since every factor satisfies $1<2^{s+1}$ (the factthis). - Quotient forms.
hG1writes $\binom{n}{j}_2=P_n/(P_{n-j}P_j)$.hG2writes $\prod_{i<n}\frac{2^{2n-j-i}-1}{2^{i+1}-1}=P_{2n-j}/(P_{n-j}P_n)$. - Splitting the index set.
hsplitwrites $\{0,\dots,n\}\setminus\{j\}=\{0,\dots,j-1\}\cup(j,n]$.hdisjrecords that this union is disjoint. - The right-hand side.
hRis the instance of the upper-interval identity for $\prod_{n<K\le 2n}$. - Substitution.
s7writes $n=j+m$, and every hypothesis is restated with $j+m$ in place of $n$. - Signs.
hsigngives $(-1)^{j+m}=(-1)^j(-1)^{j+m-j}$. - Halving.
hagives $2\cdot\big(j(j-1)/2\big)=j(j-1)$, using that $j(j-1)$ is even. - Exponent bookkeeping.
hexpgives $j(j+m)=j(j-1)/2+j+j(j-1)/2+j\,m$ by induction on $j$. Both of its cases are routine: the zero case by simp, and the successor case by simp and nlinarith.
The recorded closing tools are three: splitting a product over a disjoint union, cancelling a nonzero right factor, and the law of exponents. With them, the left side becomes $P_n/(P_{n-j}P_j)\cdot P_{2n-j}/(P_{n-j}P_n)$ times the two lower and upper products. These were evaluated in the preceding sections, and the result is matched against
hR.Lagrange interpolation by values at the nodes (lagr_eval lagr_eval.hinj lagr_eval.s2 lagr_eval.s2.s1 lagr_eval.s2.s2 lagr_eval.s2.s2.this lagr_eval.s3 lagr_eval.s3.s1 lagr_eval.s3.hk' lagr_eval.s3.hk'.this lagr_eval.s3.s3 lagr_eval.s3.s4 lagr_eval.s3.s5)
lagr_evalhas three hypotheses:- $x_0,\dots,x_n$ are pairwise distinct;
- $N\in\mathbb{Q}[X]$ has $\deg N\le n$;
- the weights satisfy $r_j\prod_{i\ne j}(x_j-x_i)=N(x_j)$ for all $j\le n$.
Its conclusion is $$N=\sum_{j\le n} r_j\prod_{i\le n,\ i\ne j}(X-x_i).$$
The method is that two polynomials which agree on a finite set of points, and whose difference has degree below the number of points, are equal.
Distinct points.
hinjturns distinctness into injectivity of $x$ on $\{0,\dots,n\}$. Hence the image has $n+1$ points.Degree bound (
s2). The goal is that the difference has degree $<n+1$. It is bounded by the larger of the two degrees.s2.s1gives $\deg N<n+1$.s2.s2gives that the Lagrange sum has degree $<n+1$. It bounds the degree of each summand by $0$ plus the sum of the degrees of the linear factors. That sum equals $n$ by the factthis.
Agreement at the nodes (
s3). The goal is that $N$ and the sum agree at every point of the image.s3.s1writes the point as $x_k$ with $k\le n$; this bound is the content ofhk'and its child.- The sum is evaluated term by term and reduced to the single term $j=k$.
s3.s3is routine (simp): it evaluates the $k$-th term to $r_k\prod_{i\ne k}(x_k-x_i)$.s3.s4shows that every other term vanishes, because its product contains the factor $x_k-x_k$.s3.s5dismisses the case $k\notin\{0,\dots,n\}$ by contradiction.
Derivative of the interpolant at a node (deriv_prod_eval deriv_prod_eval_node deriv_prod_eval_node.s1 deriv_prod_eval_node.s2 lagr_deriv lagr_deriv.hkmem lagr_deriv.s2 lagr_deriv.s2.hjk lagr_deriv.s3)
deriv_prod_evalstates that for a finite set $S$ and any $z$, $$\Big(\prod_{i\in S}(X-x_i)\Big)'(z)=\sum_{l\in S}\prod_{i\in S\setminus\{l\}}(z-x_i).$$ It uses the product rule for finite products and the fact that polynomial evaluation commutes withFinset.prodand with finite sums.deriv_prod_eval_nodespecialises this to $z=x_k$ with $k\in S$. The value is $\prod_{i\in S\setminus\{k\}}(x_k-x_i)$.- By
s1, every summand with $l\ne k$ contains the factor $x_k-x_k$, so it vanishes. - By
s2, the case $k\notin S$ is contradictory.
lagr_derivassumes the hypotheses of the interpolation step and fixes $k\le n$. It concludes $$N'(x_k)=\sum_{j\ne k} r_j\prod_{i\ne j,k}(x_k-x_i)\;+\;r_k\sum_{l\ne k}\ \prod_{i\ne k,l}(x_k-x_i).$$ The proof differentiates the Lagrange form term by term and separates the term $j=k$ from the sum over the others (theFinset.add_sum_eraselemma).hkmemrecords that $k$ lies in the index set.- By
s2, for $j\ne k$ (the facthjk), the derivative of $r_j\prod_{i\ne j}(X-x_i)$ evaluated at $x_k$ is $r_j\prod_{i\ne j,k}(x_k-x_i)$. - By
s3, the term $j=k$ gives $r_k$ times the derivative formula above.
The partial-fraction identity: setting up (formula3 formula3.hxinj formula3.hxinj.h' formula3.hxne formula3.hNdeg formula3.hkmem formula3.hr formula3.hD formula3.hD2 formula3.hPne formula3.hNk formula3.hNk')
formula3fixes $k\le n$ and any $Q_c$ satisfying, for all $j\le n$, the weight identity $Q_c(n,j)2^j\prod_{i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K)$. It concludes $$\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=Q_c(n,k)\,2^k\Big(\sum_{n<K\le 2n}\frac{1}{2^k-2^K}-\sum_{i\le n,\,i\ne k}\frac{1}{2^k-2^i}\Big)-\sum_{k<j\le n}\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$The steps work with the following abbreviations:
- nodes $x_j$, behaving as $2^j$;
- $T=(n,2n]$ and $S=\{0,\dots,n\}\setminus\{k\}$;
- a polynomial $N$, whose value at $x_k$ is $\prod_{K\in T}(x_k-2^K)$;
- a number $P$, which by
hrandhNkplays the role of $\prod_{i\in S}(x_k-x_i)$.
The setup steps are these.
- Distinct nodes.
hxinjreduces $x_i=x_j$ to $2^i=2^j$ (the facth'), and then to $i=j$ by injectivity of powers of $2$.hxnegives $2^a-2^b\ne0$ for $a\ne b$. - Degree and weights.
hNdeggives $\deg N\le n$: the degree of a product is the sum of the degrees, each factor $X-C$ has degree $1$, and $T$ has $n$ elements.hrturns the hypothesis into the weight condition $r_j=Q_c(n,j)2^j$ for $N$.hkmemrecords $k\in\{0,\dots,n\}$. - First evaluation of $N'(x_k)$.
hDis the derivative formula of the previous section with these weights. - Second evaluation of $N'(x_k)$.
hD2gives $N'(x_k)=\sum_{K\in T}\prod_{a\in T\setminus\{K\}}(x_k-2^a)$, from the product form of $N$. - Values of $N$ and $P$.
hPnegives $P\ne0$.hNkgives $N(x_k)=Q_c(n,k)2^kP$.hNk'gives $N(x_k)=\prod_{K\in T}(x_k-2^K)$.
The partial-fraction identity: dividing out $P$ (formula3.ha formula3.ha.hne formula3.hb formula3.hb.hne formula3.hc formula3.hc.hKn formula3.hc.hne formula3.hD3 formula3.hD4 formula3.key formula3.key.e1 formula3.key.e2 formula3.key.e3)
Each product in the two evaluations of $N'(x_k)$ is rewritten as a quotient. This is done by multiplying back the missing factor, which is nonzero in each case.
| Step | Statement | Nonvanishing used | |---|---|---| |
ha| for $j\in S$: $\prod_{i\ne j,k}(x_k-x_i)=P/(x_k-x_j)$ |hne: $x_k-x_j\ne0$ | |hb| for $l\in S$: $\prod_{i\in S\setminus\{l\}}(x_k-x_i)=P/(x_k-x_l)$ |hne| |hc| for $K\in T$: $\prod_{a\in T\setminus\{K\}}(x_k-2^a)=N(x_k)/(x_k-2^K)$ |hKn($n<K$) andhne|hD3andhD4substitute these quotients into the two sums.keythen states $$\sum_{j\in S}\frac{Q_c(n,j)2^j}{x_k-x_j}=Q_c(n,k)2^k\Big(\sum_{K\in T}\frac{1}{x_k-2^K}-\sum_{i\in S}\frac{1}{x_k-x_i}\Big).$$ It is proved by cancelling the nonzero factor $P$ on the left. The stepse1,e2ande3pull $P$ out of the three sums involved by distributing it across them.The partial-fraction identity: splitting at $k$ (formula3.hsplit formula3.hdisj formula3.hlow formula3.hlow.hjk formula3.hlow.hne formula3.hlow.hne.this formula3.hlow.hne2 formula3.hhigh formula3.hhigh.hkj formula3.hhigh.hne formula3.hhigh.hne.this formula3.hhigh.hne2 hform)
hsplitwrites $S=\{0,\dots,k-1\}\cup(k,n]$, andhdisjrecords that the union is disjoint.- Indices below $k$. For $j<k$ (the fact
hjk),hlowgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)}{2^{k-j}-1}.$$ It uses $2^{k-j}-1\ne0$, from $1<2^{k-j}$ (the steps
hneandthis), and $2^k-2^j\ne0$ (the stephne2).- Indices above $k$. For $k<j$ (the fact
hkj),hhighgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}},$$ with the analogous nonvanishing facts.
The recorded uses of
formula3also include splitting a sum over a disjoint union and peeling the top term off a range sum. The latter turns $\sum_{j<k}$ into $\sum_{j\le k}$, since the added term $Q_c(n,k)/(2^0-1)=Q_c(n,k)/0$ is $0$.hformis the same identity stated for the concrete $Q_c$ of the target. The outline records no sub-steps for it.Gaussian binomials at $q=2$ are integers (gauss gauss.hD gauss.hD.h1 gauss.hDk gauss.key gauss.key.hshift gauss.key.hDj gauss.key.hj gauss.key.s4 gauss.key.s4.e gauss.key.s5 gauss.key.s5.hz gauss.main gauss.main.s1 gauss.main.s1.s1 gauss.main.s1.s2 gauss.main.s2 gauss.main.s2.s1 gauss.main.s2.s2 gauss.main.s2.s2.s1 gauss.main.s2.s2.s2)
gaussstates that for all $n,k$ there is an integer equal to $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.Nonvanishing denominators.
hDgives $2^{j+1}-1\ne0$, since $1<2^{j+1}$ (the steph1).hDkgives $P_k\ne0$.The $q$-Pascal recursion (
key). $$\binom{m+1}{j+1}_2=\binom{m}{j}_2+2^{j+1}\binom{m}{j+1}_2 .$$ Both sides are written as a single product quotient.hshiftgives $m+1-(i+1)=m-i$.hDjandhjgive $P_j\ne0$ and $2^{j+1}-1\ne0$.- The resulting rational identity is settled in two cases:
- in
s4, with $2^{m+1}=2^{m-j}2^{j+1}$ (the stepe); - in
s5, where the numerator product $\prod_{i<j}(2^{m-i}-1)$ is $0$ (the stephz).
- in
Integrality (
main). This is the statement for all $m,j$, by induction on $m$ and then on $j$.- $m=0$ (
s1).- For $j=0$ the product is empty, and an integer witness is given (
s1.s1). - For $j+1$ the product is $0$, since it contains the factor $2^0-1$ (
s1.s2).
- For $j=0$ the product is empty, and an integer witness is given (
- $m+1$ (
s2), with the induction hypothesis for all $j$.- For $j=0$ the product is empty (
s2.s1). - For $j+1$, let $a$ and $b$ be the integers given by the hypothesis for $\binom{m}{j}_2$ and $\binom{m}{j+1}_2$. The recursion then shows that $a+2^{j+1}b$ works.
- For $j=0$ the product is empty (
Clearing the denominators $2^{k-j}-1$ (hodd hodd.hint hodd.hint.hjk hodd.hint.s2 hodd.hint.s3 hodd.hint.s3.s1 hodd.hint.s3.hdn hodd.hint.s3.ht hodd.hint.s3.hP1 hodd.hint.s3.hP2 hodd.hint.s3.hP2.this hodd.hint.s3.hP3 hodd.hint.s3.hmem hodd.hint.s3.hdvd hodd.hint.s3.hdvd.this hodd.hint.s3.s9 hodd.hint.s3.hne hodd.hint.s3.hne.this hodd.hint.s3.hcast)
hoddstates that for $k\le n$ and any integers $c_j$, $$\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{c_j}{2^{k-j}-1}$$ is an integer. Distributing the product over the sum reduces this to the termwise claimhint: each term, multiplied by the product, is an integer.Fix $j$ in the sum, so $j\le k$ (the fact
hjk). There are two cases.- Case
s2. An integer witness is supplied directly. - Case
s3. Write $k-j=d+1$ (steps1).hdnis routine (omega): it gives $d+1\le n$.- Let $t=(d+1)\lfloor n/(d+1)\rfloor$. Then $\lfloor n/(d+1)\rfloor\ge1$ (
ht), $t\le n$ (hP1), $n<t+(d+1)$ (hP2with its child) and $d+1\le t$ (hP3). - Together these give $t\in(\lfloor n/2\rfloor,n]$ (
hmem). hdvdgives that $2^{d+1}-1$ divides the product. It divides $(2^{d+1})^{t/(d+1)}-1^{t/(d+1)}=2^t-1$ (this), and $2^t-1$ is one of the factors.s9writes the product as $(2^{d+1}-1)q$ with $q$ an integer.- With $2^{d+1}-1\ne0$ (
hneand its child) and the cast identityhcast, the term equals $c_jq$, which is the integer witness.
Merging odd and $2$-adic information (combine combine.hint combine.hint.this combine.s2 combine.hcop combine.hdvd combine.s5)
combinestates: let $\Omega$ be odd with $\Omega p=2^aA$, and suppose $B=Mp$ and $m=M$ for integers $A,B,m$. Then there is an integer $z$ with $z\,2^a=Mp$.hintgives $\Omega B=2^a(mA)$ in $\mathbb{Z}$. It is proved by checking the identity after casting to $\mathbb{Q}$ (the stepthis).s2writes $\Omega=2t+1$.hcopgives that $2^a$ and $\Omega$ are coprime.hdvdgives $2^a\mid B\Omega$.- By coprimality, $2^a\mid B$. Step
s5obtains $c$ with $B=2^ac$.
The core estimate: the odd number $\Omega$ (hcore hcore.hQcint hcore.hQcint.s1 hcore.hQcint.s2 hcore.h_x3a9div hcore.h_x3a9odd hcore.h_x3a9odd.s1 hcore.h_x3a9odd.s2 hcore.h_x3a9odd.s3 hcore.h_x3a9odd.s3.ht1 hcore.h_x3a9odd.s3.ht1.this)
hcorestates that for $k\le n$ there is an integer $z$ with $$z\,2^{k(k-1)/2}=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}.$$The first ingredients are these.
- Coefficients (
hQcint). For every $j$ there is an integer $g_j$ with $Q_c(n,j)=2^{j(j-1)/2}g_j$. It is obtained from integer witnesses for the two Gaussian-binomial products (s1ands2). - Divisibility (
hΩdiv). With $\Omega=\prod_{t=1}^{2n}(2^t-1)$: for $1\le s\le 2n$ there is an integer $w$ with $w(2^s-1)=\Omega$. It is obtained by taking the factor $t=s$ out of the product. - Oddness (
hΩodd). $\Omega$ is odd. The proof establishes a property of the product by showing that it is multiplicative and holds on factors:- products of odd integers are odd (
s1); - $1$ is odd (
s2); - each $2^t-1$ with $t\ge1$ is odd, as an even number minus an odd one (
s3, with $t\ne0$ from $1\le t$).
- products of odd integers are odd (
The core estimate: integral reciprocal terms (hcore.key1 hcore.key1.s1 hcore.key1.s1.s1 hcore.key1.s1.s2 hcore.key1.s1.hne hcore.key1.s1.hne.this hcore.key1.s1.h2a hcore.key1.s1.this hcore.key1.s2 hcore.key1.s2.s1 hcore.key1.s2.s2 hcore.key1.s2.hne hcore.key1.s2.hne.this hcore.key1.s2.h2b hcore.key1.s2.this hcore.hK hcore.hK.this hcore.hI hcore.hI.h1 hcore.hI.h2)
key1states that for $a\ne b$, both $\le 2n$, the number $\Omega\,2^a\cdot\frac{1}{2^a-2^b}$ is an integer. The proof splits according to the order of $a$ and $b$.- Case $a<b$ (
s1).- Write $b=a+d+1$ (
s1.s1). - Obtain an integer $w$ with $w(2^{d+1}-1)=\Omega$ (
s1.s2). - Record $2^{d+1}-1\ne0$ (
hne, withthis). h2ais routine (positivity): $2^a\ne0$.- The second
thisis routine (ring): $2^a-2^a2^{d+1}=-(2^a(2^{d+1}-1))$. - The witness is $-w$.
- Write $b=a+d+1$ (
- Case $a>b$ (
s2).- Write $a=b+d+1$ and obtain $w$ in the same way.
h2bis routine (positivity), and the factorisationthisis routine (ring).- The witness is $w\,2^{d+1}$.
Two instances follow.
hK: for $K\in(n,2n]$ (so $n<K\le 2n$, bythis), $\Omega 2^k/(2^k-2^K)$ is an integer.hI: for $i\le n$ with $i\ne k$ (the factsh1andh2), $\Omega 2^k/(2^k-2^i)$ is an integer.
The core estimate: the tail and the assembly (hcore.hT hcore.hT.hj' hcore.hT.s2 hcore.hT.s3 hcore.hT.hmono hcore.hT.s5 hcore.hT.hne hcore.hT.hne.this hcore.hT.hne' hcore.h2adic hcore.h2adic.htail hcore.s9 hcore.hB')
Tail terms (
hT). For $j\in(k,n]$ there is an integer $w$ with $$w\,2^{k(k-1)/2}=\Omega\cdot\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$hj'gives $k<j\le n$.s2writes $j-k=d+1$.s3obtains an integer $w$ with $w(2^{d+1}-1)=\Omega$.hmonogives $k(k-1)/2\le j(j-1)/2$, ands5writes $j(j-1)/2=k(k-1)/2+e$.- With $2^{d+1}-1\ne0$ and $1-2^{d+1}\ne0$ (the steps
hne, its child, andhne'), the witness is $-(w\,g_j\,2^e\,2^{d+1})$.
The $2$-adic form (
h2adic). Let $f_K$, $f_I$ and $f_T$ be the integers supplied byhK,hIandhT. Then $$\Omega\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=2^{k(k-1)/2}\Big(g_k\big(\textstyle\sum_K f_K-\sum_i f_I\big)-\sum_j f_T\Big).$$ Its childhtailgives $2^{k(k-1)/2}\sum_{j\in(k,n]}f_T=\Omega\sum_{j\in(k,n]}\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}}$. The goal left afterhtailis the partial-fraction formula multiplied through by $\Omega$, with the reciprocal sums written through the integers $f_K$ and $f_I$.The odd form.
s9uses the odd-denominator statement with $c_j=2^{j(j-1)/2}g_j$ to obtain an integer $B$. It equals the product $\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)$ times $\sum_{j\le k} c_j/(2^{k-j}-1)$.hB'rewrites $c_j$ back as $Q_c(n,j)$, so that $B$ equals the right-hand side ofhcore.
These facts have the shape of the hypotheses of the merging lemma:
- the odd number $\Omega$;
- the exponent $k(k-1)/2$;
- the relation from
h2adic; - the integer $B$;
- the integral product.
Clearing the extra sum (hcnall hcnall.hint hcnall.hint.s1 hcnall.hint.s1.hj' hcnall.hint.s1.s2 hcnall.hint.s1.s2.e hcnall.hint.s1.s3 hcnall.hint.s1.s3.e hcnall.hint.s2 hcnall.hint.s2.hmem hcnall.hint.s2.hne hcnall.hint.s2.hne.h8 hcnall.hint.s2.hne.h8.s1 hcnall.hint.s2.hne.h8.s2)
hcnallstates that $$\prod_{2\le j<n}(2^{j+1}-3)\cdot\sum_{j<n}\frac{3}{2^{j+1}-3}$$ is an integer. Distributing the product reduces this to the termwise claimhint. There are two cases on $j$.- Case
s1: $j<2$.hj'is routine (omega): it gives $j=0$ or $j=1$.- In
s2, the routine stepe(norm_num) gives $3/(2-3)=-3$, and the witness is $-3\prod(2^{i+1}-3)$. - In
s3, the routine stepe(norm_num) gives $3/(4-3)=3$, and the witness is $3\prod(2^{i+1}-3)$.
- In
- Case
s2: $j\ge2$.hmemgives $j\in[2,n)$.hnegives $2^{j+1}-3\ne0$, from $8\le 2^{j+1}$. That bound is proved by the calculation inh8: $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity of powers.- The factor for $j$ is pulled out of the product, which cancels the denominator.
The size bound: setting up the exponents (hb hb.key hb.key.s1 hb.key.s2 hb.key.s2.hP1 hb.key.s2.hP2 hb.key.s2.s3 hb.key.s2.s4 hb.key.s2.hS1 hb.key.s2.hS1.e hb.key.s2.hS2 hb.key.s2.hS2.this hb.key.s2.hT)
The remaining steps concern the natural number $$d=2^{n(n+1)/2}\cdot E(n).$$ Here $E(5)=409045$ and $E(7)=1298717875$. Otherwise $$E(n)=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\prod_{2\le j<n}(2^{j+1}-3).$$
hbstates that $d^2\le 2^{3n^2}$ in $\mathbb{R}$. It follows from the same inequality in $\mathbb{N}$, which iskey. That inequality is split into two cases.- Case
s1. The goal is closed by kernel evaluation of the decidable statement (the recorded use is the kernel-reduction option). The outline does not print which values of $n$ this case covers. - Case
s2. The conditional is resolved to the product branch, so the goal is the inequality for $2^{n(n+1)/2}\prod(2^m-1)\prod(2^{j+1}-3)$. The ingredients are:hP1: $\prod_{(n/2,n]}(2^m-1)\le 2^{\sum m}$, comparing factor by factor;hP2: $\prod_{[2,n)}(2^{j+1}-3)\le 2^{\sum(j+1)}$;s3: $n=\lfloor n/2\rfloor+c+1$;s4: $n=d'+3$, where $d'$ is the name the outline gives (it is distinct from the witness $d$);hS1: $2\sum_{(n/2,n]}m=2(c+1)(\lfloor n/2\rfloor+1)+(c+1)c$, by Gauss' summation formula after rewriting the interval as $[\lfloor n/2\rfloor+1,n+1)$ (e);hS2: $2\sum_{[2,n)}(j+1)=6(d'+1)+(d'+1)d'$, after re-indexing (this) and again Gauss' summation formula;hT: $\big(n(n+1)/2\big)\cdot2=n(n+1)$, since $n(n+1)$ is even.
The size bound: exponent arithmetic (hb.key.s2.hexp hb.key.s2.hexp.arith hb.key.s2.hexp.arith.hsq hb.key.s2.hexp.arith.s2 hb.key.s2.hexp.arith.s3 hb.key.s2.hexp.s2 hb.key.s2.hexp.s3 hb.key.s2.hexp.hc' hb.key.s2.hexp.hd' hb.key.s2.hexp.hT' hb.key.s2.hexp.this hb.key.s2.s9 hb.key.s2.s10 hb.key.s2.s11)
hexpstates that $$2\cdot\tfrac{n(n+1)}{2}+2\sum_{(n/2,n]}m+2\sum_{[2,n)}(j+1)\le 3n\cdot n .$$The polynomial inequality (
arith). Assume $r\le1$, $3\le e$, and that $A,B,T$ satisfy $$2A=2(e+r+2)(e+3)+(e+r+2)(e+r+1),$$ $$2B=6(2e+r+2)+(2e+r+2)(2e+r+1),$$ $$2T=(2e+4+r)(2e+5+r).$$ Then $2T+2A+2B\le 3(2e+4+r)^2$. It uses $3e\le e^2$ (hsq) and is checked separately for $r=0$ (s2) and $r=1$ (s3).Applying it.
s2writes $\lfloor n/2\rfloor=e+2$.s3writes $n=2e+4+r$ with $r\le1$.hc'andhd'are routine (omega): they give $c=e+1+r$ and $d'=2e+1+r$.hT'restates $2\cdot\frac{n(n+1)}2$ in these variables.thisis the resulting instance, which giveshexp.
The chain of inequalities.
s9bounds the squared product by the squared power-of-$2$ bounds fromhP1andhP2.s10rewrites this by the laws of exponents; its claim is not printed in the outline.s11concludes $2^{(\cdots)}\le 2^{3n^2}$ by monotonicity of powers of $2$, usinghexp.
Integrality of $2^{n(n+1)/2}Q_x(n)$ (hqx hqx.hterm hqx.hterm.hkn hqx.hterm.s2 hqx.hterm.s3 hqx.hterm.s4 hqx.hterm.hexp hqx.hterm.hexp.e1 hqx.hterm.hexp.e2 hqx.hterm.hexp.e3 hqx.hterm.hexp.s4 hqx.hterm.hexp.s5 hqx.hterm.hpow hqx.hterm.h2)
hqxstates that $2^{n(n+1)/2}\sum_{k\le n}Q_c(n,k)(3/2^n)^k$ is an integer. Distributing the power over the sum reduces this to the termwise claimhterm.Fix $k\le n$ (the fact
hkn).- Witnesses. Let $a$ and $b$ be integers equal to $\binom{n}{k}_2$ and to $\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (steps
s2ands3). - Substitution.
s4writes $n=k+m$. - Exponent identity (
hexp).
$$\tfrac{(k+m)(k+m+1)}2+\tfrac{k(k-1)}2=\tfrac{m(m+1)}2+(k+m)k .$$
e1,e2ande3remove the three halvings, using that consecutive products are even.- The identity is then proved by induction on $k$: the case $k=0$ (
s4) is routine (simp), ands5is the successor case.
- Powers.
hpowgives $2^{(k+m)(k+m+1)/2}\,2^{k(k-1)/2}=2^{m(m+1)/2}(2^{k+m})^k$. - Nonvanishing.
h2is routine (positivity): $2^{k+m}\ne0$. - Conclusion. The term equals $(-1)^k3^k2^{m(m+1)/2}ab$.
Positivity of the odd part (hE hE.s1 hE.s2 hE.s3 hE.s3.s1 hE.s3.s1.hm1 hE.s3.s1.hm1.this hE.s3.s1.this hE.s3.s1.this.s1 hE.s3.s1.this.s2 hE.s3.s2 hE.s3.s2.hj2 hE.s3.s2.this hE.s3.s2.this.s1 hE.s3.s2.this.s2)
hEstates $0<E(n)$, splitting into the three branches of the conditional.- The two numeral branches are routine (norm_num): $0<409045$ and $0<1298717875$ (
s1ands2). - In the product branch (
s3), each factor is positive.- Factors $2^m-1$ (
s3.s1). Here $m\in(\lfloor n/2\rfloor,n]$ gives $1\le m$ (hm1, via $\lfloor n/2\rfloor<m$). Then $2\le 2^m$ (this): the equation $2=2^1$ is routine (norm_num), and $2^1\le 2^m$ follows by monotonicity. - Factors $2^{j+1}-3$ (
s3.s2). Here $j\in[2,n)$ gives $2\le j$ (hj2). Then $8\le 2^{j+1}$: the equation $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity.
- Factors $2^m-1$ (
Integrality of $d\,A_q(n)$: the cases and the casts (hAqint hAqint.s1 hAqint.s2 hAqint.s2.s1 hAqint.s2.s2 hAqint.s2.s2.hM hAqint.s2.s2.hC hAqint.s2.s2.hC.hj2 hAqint.s2.s2.hC.h3 hAqint.s2.s2.hC.h3.s1 hAqint.s2.s2.hC.h3.s2 hAqint.s2.s2.hd hAqint.s2.s2.s4 hAqint.s2.s2.s5 hAqint.s2.s2.hQxn)
hAqintstates that $d\cdot A_q(n)$ is an integer, for the $d$ above. The cases follow the branches of the conditional.- Numeral branches (
s1ands2.s1). The recorded uses select the branch, give a witness, and evaluate by kernel reduction. - Product branch (
s2.s2). The setup is as follows.hMcasts $\prod(2^m-1)$ from $\mathbb{N}$ to $\mathbb{Q}$, valid since $1\le 2^m$.hCcasts $\prod(2^{j+1}-3)$, valid since $3\le 2^{j+1}$ for $j\ge2$. This useshj2; the boundh3is the calculation in which $3\le 2^2$ is routine (norm_num) and $2^2\le 2^{j+1}$ follows by monotonicity.hdcasts $d$ itself as $2^{n(n+1)/2}\cdot\big(\prod(2^m-1)\prod(2^{j+1}-3)\big)$.s4obtains an integer $z_{cn}$ equal to $\prod(2^{j+1}-3)\sum_{j<n}3/(2^{j+1}-3)$.s5obtains an integer $z_q'$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$.hQxnunfolds $Q_x(n)$ as that sum.- The recorded closing uses distribute $d$ over the two parts of $A_q(n)$ and over the outer sum.
Integrality of $d\,A_q(n)$: the main terms (hAqint.s2.s2.hterm hAqint.s2.s2.hterm.hkn hAqint.s2.s2.hterm.s2 hAqint.s2.s2.hterm.s3 hAqint.s2.s2.hterm.hexp hAqint.s2.s2.hterm.hexp.e1 hAqint.s2.s2.hterm.hexp.e2 hAqint.s2.s2.hterm.hexp.e3 hAqint.s2.s2.hterm.hexp.s4 hAqint.s2.s2.hterm.hexp.s5 hAqint.s2.s2.hterm.hpow hAqint.s2.s2.hterm.h2n hAqint.s2.s2.hterm.e1 s21)
htermstates that for each $k\le n$, $$2^{n(n+1)/2}\Big(\prod(2^m-1)\prod(2^{j+1}-3)\Big)\cdot\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k$$ is an integer.hkngives $k\le n$.s2obtains $w$ with $w\,2^{k(k-1)/2}=\prod(2^m-1)\cdot\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$. This is an instance of the core statement.s3writes $n=k+m$.hexpis the exponent identity $\frac{n(n+1)}2+\frac{k(k-1)}2=\frac{m(m+1)}2+nk$. As before, it removes the halvings (e1,e2,e3) and proceeds by induction on $k$; the base cases4is routine (simp), ands5is the successor case.hpowgives $2^{n(n+1)/2}2^{k(k-1)/2}=2^{m(m+1)/2}(2^n)^k$.h2nis routine (positivity): $(2^n)^k\ne0$.e1regroups the term as $\prod(2^{j+1}-3)\cdot3^k\cdot\big(\prod(2^m-1)\sum_{j\le k}\tfrac{Q_c(n,j)}{2^{k-j}-1}\big)\,2^{n(n+1)/2}/(2^n)^k$.- Combining these, the term equals $\prod(2^{j+1}-3)\cdot w\cdot3^k\cdot2^{m(m+1)/2}$, which is the integer witness.
Finally,
s21obtains an integer $z_q$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$, which is the content of the integrality of $2^{n(n+1)/2}Q_x(n)$. The steps recorded at the top level have therefore established three things:- for the number $d=2^{n(n+1)/2}E(n)$: positivity of $E(n)$, the bound $d^2\le 2^{3n^2}$, and integrality of $d\,A_q(n)$;
- integrality of $2^{n(n+1)/2}Q_x(n)$.
These are the ingredients of the existential goal. No step in the outline is open.
2026-10-06 · written by t1006-w3, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · current · explainer/d39a90505cc9….md · diff to its predecessor
Read this version
Idea and method
The target statement fixes three explicit rational families. The first is $$Q_c(n,k)=(-1)^k\,2^{k(k-1)/2}\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}\;\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}.$$ The second is $Q_x(n)=\sum_{k\le n}Q_c(n,k)\,(3/2^n)^k$. The third is $$A_q(n)=\sum_{k\le n}\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k+Q_x(n)\sum_{j<n}\frac{3}{2^{j+1}-3}.$$ The claim is that for every $n$ there is a positive integer $d$ with $d^2\le 2^{3n^2}$ such that both $d\,Q_x(n)$ and $d\,A_q(n)$ are integers. Exponents are natural numbers, so subtraction in them is truncated. Division by $0$ is $0$, as in Lean; in particular the $j=k$ term of the inner sum is $Q_c(n,k)/0=0$.
The proof has four parts.
- Integrality of the coefficients. Each $Q_c(n,j)$ is a power of $2$ times a product of two Gaussian binomials at $q=2$, and these products are integers.
- Rewriting the inner sums. This uses polynomial interpolation. The polynomial $N=\prod_{n<K\le 2n}(X-2^K)$ is written in Lagrange form at the nodes $2^0,\dots,2^n$, and its derivative is evaluated at a node in two ways. This rewrites $\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$ through sums of $1/(2^k-2^K)$ and a tail over $j>k$.
- Clearing denominators. The odd denominators are cleared by the odd number $\Omega=\prod_{t=1}^{2n}(2^t-1)$. Separately, $\prod_{n/2<m\le n}(2^m-1)$ clears every $2^{k-j}-1$, because each $s\le n$ divides some $m\in(\lfloor n/2\rfloor,n]$. A coprimality argument then merges the two pieces of information. The extra sum $\sum_j 3/(2^{j+1}-3)$ is cleared by $\prod_{2\le j<n}(2^{j+1}-3)$.
- The witness and its size. The witness $d$ is a power of $2$ times these products. Two exceptional values replace the products by explicit numerals. Its size is controlled by bounding each factor by a power of $2$ and doing exponent arithmetic.
Throughout, write $P_m=\prod_{s<m}(2^{s+1}-1)$ and $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.
Telescoping products of $2^a-1$ (id1_test id1_test.s1 id1_test.s2 id1_test.s2.ih' id1_test.s2.s2 lower_test lower_test.h1 lower_test.h1.hi' lower_test.this)
id1_teststates that for $j\le n$ $$\prod_{i<j}(2^{n-i}-1)\cdot P_{n-j}=P_n .$$ It is proved by induction on $j$.- Base case $j=0$. The goal is the statement with the empty first product. This is routine (closed by simp).
- Successor case. The goal is the identity for $j+1$, given the induction hypothesis under $j\le n$ and the assumption $j+1\le n$.
ih'discharges the hypothesis $j\le n$, giving the identity at $j$.- Then $n-j=m+1$ is obtained.
- The goal becomes the identity with the last factor $2^{n-j}-1$ split off the first product (peeling off the top index of a range product). Comparing with
ih'closes it.
lower_teststates that $$\prod_{i<j}(2^j-2^i)=2^{j(j-1)/2}P_j .$$ Its children establish two facts:h1: for $i<j$ (the facthi'), $2^j-2^i=2^i\,(2^{\,j-1-i+1}-1)$.this: $2\sum_{i<j}i=j(j-1)$, by Gauss' summation formula. Hence $\sum_{i<j}i=j(j-1)/2$.
The step then splits the product into $\prod 2^i=2^{\sum i}$ and $\prod_{i<j}(2^{j-i}-1)$. It reflects the index of the latter to obtain $P_j$.
Products over the upper intervals (upper_test upper_test.e upper_test.h1 rhs_test rhs_test.e rhs_test.h1)
upper_teststates that for $j\le n$ $$\prod_{j<i\le n}(2^j-2^i)=(-1)^{n-j}\,2^{j(n-j)}\,P_{n-j}.$$ The proof has three moves:erewrites $(j,n]$ as $[j+1,n+1)$.- After re-indexing to $i=j+1+t$ with $t<n-j$,
h1gives $2^j-2^{j+1+t}=-2^j(2^{t+1}-1)$ for each factor. - The constant factors are collected as powers, using the cardinality $n-j$.
rhs_teststates that for $j\le n$ $$\prod_{n<K\le 2n}(2^j-2^K)\cdot P_{n-j}=(-1)^n\,2^{jn}\,P_{2n-j}.$$ It follows the same pattern:econverts the interval.h1gives $2^j-2^{n+1+t}=-2^j(2^{n-j+t+1}-1)$ for $t<n$.- The resulting product $\prod_{t<n}(2^{n-j+t+1}-1)$ is concatenated with $P_{n-j}$ to give $P_{2n-j}$.
The interpolation weights of $Q_c$ (id1_full id1_full.hPne id1_full.hPne.this id1_full.hG1 id1_full.hG2 id1_full.hsplit id1_full.hdisj id1_full.hR id1_full.s7 id1_full.hsign id1_full.ha id1_full.hexp id1_full.hexp.s1 id1_full.hexp.s2)
id1_fullstates that for $j\le n$, with $Q_c(n,j)$ written out, $$Q_c(n,j)\,2^j\prod_{i\le n,\ i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K).$$The ingredients are as follows.
- Nonvanishing.
hPneshows $P_m\ne0$ for all $m$, since every factor satisfies $1<2^{s+1}$ (the factthis). - Quotient forms.
hG1writes $\binom{n}{j}_2=P_n/(P_{n-j}P_j)$.hG2writes $\prod_{i<n}\frac{2^{2n-j-i}-1}{2^{i+1}-1}=P_{2n-j}/(P_{n-j}P_n)$. - Splitting the index set.
hsplitwrites $\{0,\dots,n\}\setminus\{j\}=\{0,\dots,j-1\}\cup(j,n]$.hdisjrecords that this union is disjoint. - The right-hand side.
hRis the instance of the upper-interval identity for $\prod_{n<K\le 2n}$. - Substitution.
s7writes $n=j+m$, and every hypothesis is restated with $j+m$ in place of $n$. - Signs.
hsigngives $(-1)^{j+m}=(-1)^j(-1)^{j+m-j}$. - Halving.
hagives $2\cdot\big(j(j-1)/2\big)=j(j-1)$, using that $j(j-1)$ is even. - Exponent bookkeeping.
hexpgives $j(j+m)=j(j-1)/2+j+j(j-1)/2+j\,m$ by induction on $j$. Both of its cases are routine: the zero case by simp, and the successor case by simp and nlinarith.
The recorded closing tools are three: splitting a product over a disjoint union, cancelling a nonzero right factor, and the law of exponents. With them, the left side becomes $P_n/(P_{n-j}P_j)\cdot P_{2n-j}/(P_{n-j}P_n)$ times the two lower and upper products. These were evaluated in the preceding sections, and the result is matched against
hR.Lagrange interpolation by values at the nodes (lagr_eval lagr_eval.hinj lagr_eval.s2 lagr_eval.s2.s1 lagr_eval.s2.s2 lagr_eval.s2.s2.this lagr_eval.s3 lagr_eval.s3.s1 lagr_eval.s3.hk' lagr_eval.s3.hk'.this lagr_eval.s3.s3 lagr_eval.s3.s4 lagr_eval.s3.s5)
lagr_evalhas three hypotheses:- $x_0,\dots,x_n$ are pairwise distinct;
- $N\in\mathbb{Q}[X]$ has $\deg N\le n$;
- the weights satisfy $r_j\prod_{i\ne j}(x_j-x_i)=N(x_j)$ for all $j\le n$.
Its conclusion is $$N=\sum_{j\le n} r_j\prod_{i\le n,\ i\ne j}(X-x_i).$$
The method is that two polynomials which agree on a finite set of points, and whose difference has degree below the number of points, are equal.
Distinct points.
hinjturns distinctness into injectivity of $x$ on $\{0,\dots,n\}$. Hence the image has $n+1$ points.Degree bound (
s2). The goal is that the difference has degree $<n+1$. It is bounded by the larger of the two degrees.s2.s1gives $\deg N<n+1$.s2.s2gives that the Lagrange sum has degree $<n+1$. It bounds the degree of each summand by $0$ plus the sum of the degrees of the linear factors. That sum equals $n$ by the factthis.
Agreement at the nodes (
s3). The goal is that $N$ and the sum agree at every point of the image.s3.s1writes the point as $x_k$ with $k\le n$; this bound is the content ofhk'and its child.- The sum is evaluated term by term and reduced to the single term $j=k$.
s3.s3is routine (simp): it evaluates the $k$-th term to $r_k\prod_{i\ne k}(x_k-x_i)$.s3.s4shows that every other term vanishes, because its product contains the factor $x_k-x_k$.s3.s5dismisses the case $k\notin\{0,\dots,n\}$ by contradiction.
Derivative of the interpolant at a node (deriv_prod_eval deriv_prod_eval_node deriv_prod_eval_node.s1 deriv_prod_eval_node.s2 lagr_deriv lagr_deriv.hkmem lagr_deriv.s2 lagr_deriv.s2.hjk lagr_deriv.s3)
deriv_prod_evalstates that for a finite set $S$ and any $z$, $$\Big(\prod_{i\in S}(X-x_i)\Big)'(z)=\sum_{l\in S}\prod_{i\in S\setminus\{l\}}(z-x_i).$$ It uses the product rule for finite products and the fact that polynomial evaluation commutes withFinset.prodand with finite sums.deriv_prod_eval_nodespecialises this to $z=x_k$ with $k\in S$. The value is $\prod_{i\in S\setminus\{k\}}(x_k-x_i)$.- By
s1, every summand with $l\ne k$ contains the factor $x_k-x_k$, so it vanishes. - By
s2, the case $k\notin S$ is contradictory.
lagr_derivassumes the hypotheses of the interpolation step and fixes $k\le n$. It concludes $$N'(x_k)=\sum_{j\ne k} r_j\prod_{i\ne j,k}(x_k-x_i)\;+\;r_k\sum_{l\ne k}\ \prod_{i\ne k,l}(x_k-x_i).$$ The proof differentiates the Lagrange form term by term and separates the term $j=k$ from the sum over the others (theFinset.add_sum_eraselemma).hkmemrecords that $k$ lies in the index set.- By
s2, for $j\ne k$ (the facthjk), the derivative of $r_j\prod_{i\ne j}(X-x_i)$ evaluated at $x_k$ is $r_j\prod_{i\ne j,k}(x_k-x_i)$. - By
s3, the term $j=k$ gives $r_k$ times the derivative formula above.
The partial-fraction identity: setting up (formula3 formula3.hxinj formula3.hxinj.h' formula3.hxne formula3.hNdeg formula3.hkmem formula3.hr formula3.hD formula3.hD2 formula3.hPne formula3.hNk formula3.hNk')
formula3fixes $k\le n$ and any $Q_c$ satisfying, for all $j\le n$, the weight identity $Q_c(n,j)2^j\prod_{i\ne j}(2^j-2^i)=\prod_{n<K\le 2n}(2^j-2^K)$. It concludes $$\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=Q_c(n,k)\,2^k\Big(\sum_{n<K\le 2n}\frac{1}{2^k-2^K}-\sum_{i\le n,\,i\ne k}\frac{1}{2^k-2^i}\Big)-\sum_{k<j\le n}\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$The steps work with the following abbreviations:
- nodes $x_j$, behaving as $2^j$;
- $T=(n,2n]$ and $S=\{0,\dots,n\}\setminus\{k\}$;
- a polynomial $N$, whose value at $x_k$ is $\prod_{K\in T}(x_k-2^K)$;
- a number $P$, which by
hrandhNkplays the role of $\prod_{i\in S}(x_k-x_i)$.
The setup steps are these.
- Distinct nodes.
hxinjreduces $x_i=x_j$ to $2^i=2^j$ (the facth'), and then to $i=j$ by injectivity of powers of $2$.hxnegives $2^a-2^b\ne0$ for $a\ne b$. - Degree and weights.
hNdeggives $\deg N\le n$: the degree of a product is the sum of the degrees, each factor $X-C$ has degree $1$, and $T$ has $n$ elements.hrturns the hypothesis into the weight condition $r_j=Q_c(n,j)2^j$ for $N$.hkmemrecords $k\in\{0,\dots,n\}$. - First evaluation of $N'(x_k)$.
hDis the derivative formula of the previous section with these weights. - Second evaluation of $N'(x_k)$.
hD2gives $N'(x_k)=\sum_{K\in T}\prod_{a\in T\setminus\{K\}}(x_k-2^a)$, from the product form of $N$. - Values of $N$ and $P$.
hPnegives $P\ne0$.hNkgives $N(x_k)=Q_c(n,k)2^kP$.hNk'gives $N(x_k)=\prod_{K\in T}(x_k-2^K)$.
The partial-fraction identity: dividing out $P$ (formula3.ha formula3.ha.hne formula3.hb formula3.hb.hne formula3.hc formula3.hc.hKn formula3.hc.hne formula3.hD3 formula3.hD4 formula3.key formula3.key.e1 formula3.key.e2 formula3.key.e3)
Each product in the two evaluations of $N'(x_k)$ is rewritten as a quotient. This is done by multiplying back the missing factor, which is nonzero in each case.
| Step | Statement | Nonvanishing used | |---|---|---| |
ha| for $j\in S$: $\prod_{i\ne j,k}(x_k-x_i)=P/(x_k-x_j)$ |hne: $x_k-x_j\ne0$ | |hb| for $l\in S$: $\prod_{i\in S\setminus\{l\}}(x_k-x_i)=P/(x_k-x_l)$ |hne| |hc| for $K\in T$: $\prod_{a\in T\setminus\{K\}}(x_k-2^a)=N(x_k)/(x_k-2^K)$ |hKn($n<K$) andhne|hD3andhD4substitute these quotients into the two sums.keythen states $$\sum_{j\in S}\frac{Q_c(n,j)2^j}{x_k-x_j}=Q_c(n,k)2^k\Big(\sum_{K\in T}\frac{1}{x_k-2^K}-\sum_{i\in S}\frac{1}{x_k-x_i}\Big).$$ It is proved by cancelling the nonzero factor $P$ on the left. The stepse1,e2ande3pull $P$ out of the three sums involved by distributing it across them.The partial-fraction identity: splitting at $k$ (formula3.hsplit formula3.hdisj formula3.hlow formula3.hlow.hjk formula3.hlow.hne formula3.hlow.hne.this formula3.hlow.hne2 formula3.hhigh formula3.hhigh.hkj formula3.hhigh.hne formula3.hhigh.hne.this formula3.hhigh.hne2 hform)
hsplitwrites $S=\{0,\dots,k-1\}\cup(k,n]$, andhdisjrecords that the union is disjoint.- Indices below $k$. For $j<k$ (the fact
hjk),hlowgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)}{2^{k-j}-1}.$$ It uses $2^{k-j}-1\ne0$, from $1<2^{k-j}$ (the steps
hneandthis), and $2^k-2^j\ne0$ (the stephne2).- Indices above $k$. For $k<j$ (the fact
hkj),hhighgives
$$\frac{Q_c(n,j)2^j}{2^k-2^j}=\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}},$$ with the analogous nonvanishing facts.
The recorded uses of
formula3also include splitting a sum over a disjoint union and peeling the top term off a range sum. The latter turns $\sum_{j<k}$ into $\sum_{j\le k}$, since the added term $Q_c(n,k)/(2^0-1)=Q_c(n,k)/0$ is $0$.hformis the same identity stated for the concrete $Q_c$ of the target. The outline records no sub-steps for it.Gaussian binomials at $q=2$ are integers (gauss gauss.hD gauss.hD.h1 gauss.hDk gauss.key gauss.key.hshift gauss.key.hDj gauss.key.hj gauss.key.s4 gauss.key.s4.e gauss.key.s5 gauss.key.s5.hz gauss.main gauss.main.s1 gauss.main.s1.s1 gauss.main.s1.s2 gauss.main.s2 gauss.main.s2.s1 gauss.main.s2.s2 gauss.main.s2.s2.s1 gauss.main.s2.s2.s2)
gaussstates that for all $n,k$ there is an integer equal to $\binom{n}{k}_2=\prod_{i<k}\frac{2^{n-i}-1}{2^{i+1}-1}$.Nonvanishing denominators.
hDgives $2^{j+1}-1\ne0$, since $1<2^{j+1}$ (the steph1).hDkgives $P_k\ne0$.The $q$-Pascal recursion (
key). $$\binom{m+1}{j+1}_2=\binom{m}{j}_2+2^{j+1}\binom{m}{j+1}_2 .$$ Both sides are written as a single product quotient.hshiftgives $m+1-(i+1)=m-i$.hDjandhjgive $P_j\ne0$ and $2^{j+1}-1\ne0$.- The resulting rational identity is settled in two cases:
- in
s4, with $2^{m+1}=2^{m-j}2^{j+1}$ (the stepe); - in
s5, where the numerator product $\prod_{i<j}(2^{m-i}-1)$ is $0$ (the stephz).
- in
Integrality (
main). This is the statement for all $m,j$, by induction on $m$ and then on $j$.- $m=0$ (
s1).- For $j=0$ the product is empty, and an integer witness is given (
s1.s1). - For $j+1$ the product is $0$, since it contains the factor $2^0-1$ (
s1.s2).
- For $j=0$ the product is empty, and an integer witness is given (
- $m+1$ (
s2), with the induction hypothesis for all $j$.- For $j=0$ the product is empty (
s2.s1). - For $j+1$, let $a$ and $b$ be the integers given by the hypothesis for $\binom{m}{j}_2$ and $\binom{m}{j+1}_2$. The recursion then shows that $a+2^{j+1}b$ works.
- For $j=0$ the product is empty (
Clearing the denominators $2^{k-j}-1$ (hodd hodd.hint hodd.hint.hjk hodd.hint.s2 hodd.hint.s3 hodd.hint.s3.s1 hodd.hint.s3.hdn hodd.hint.s3.ht hodd.hint.s3.hP1 hodd.hint.s3.hP2 hodd.hint.s3.hP2.this hodd.hint.s3.hP3 hodd.hint.s3.hmem hodd.hint.s3.hdvd hodd.hint.s3.hdvd.this hodd.hint.s3.s9 hodd.hint.s3.hne hodd.hint.s3.hne.this hodd.hint.s3.hcast)
hoddstates that for $k\le n$ and any integers $c_j$, $$\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{c_j}{2^{k-j}-1}$$ is an integer. Distributing the product over the sum reduces this to the termwise claimhint: each term, multiplied by the product, is an integer.Fix $j$ in the sum, so $j\le k$ (the fact
hjk). There are two cases.- Case
s2. An integer witness is supplied directly. - Case
s3. Write $k-j=d+1$ (steps1).hdnis routine (omega): it gives $d+1\le n$.- Let $t=(d+1)\lfloor n/(d+1)\rfloor$. Then $\lfloor n/(d+1)\rfloor\ge1$ (
ht), $t\le n$ (hP1), $n<t+(d+1)$ (hP2with its child) and $d+1\le t$ (hP3). - Together these give $t\in(\lfloor n/2\rfloor,n]$ (
hmem). hdvdgives that $2^{d+1}-1$ divides the product. It divides $(2^{d+1})^{t/(d+1)}-1^{t/(d+1)}=2^t-1$ (this), and $2^t-1$ is one of the factors.s9writes the product as $(2^{d+1}-1)q$ with $q$ an integer.- With $2^{d+1}-1\ne0$ (
hneand its child) and the cast identityhcast, the term equals $c_jq$, which is the integer witness.
Merging odd and $2$-adic information (combine combine.hint combine.hint.this combine.s2 combine.hcop combine.hdvd combine.s5)
combinestates: let $\Omega$ be odd with $\Omega p=2^aA$, and suppose $B=Mp$ and $m=M$ for integers $A,B,m$. Then there is an integer $z$ with $z\,2^a=Mp$.hintgives $\Omega B=2^a(mA)$ in $\mathbb{Z}$. It is proved by checking the identity after casting to $\mathbb{Q}$ (the stepthis).s2writes $\Omega=2t+1$.hcopgives that $2^a$ and $\Omega$ are coprime.hdvdgives $2^a\mid B\Omega$.- By coprimality, $2^a\mid B$. Step
s5obtains $c$ with $B=2^ac$.
The core estimate: the odd number $\Omega$ (hcore hcore.hQcint hcore.hQcint.s1 hcore.hQcint.s2 hcore.h_x3a9div hcore.h_x3a9odd hcore.h_x3a9odd.s1 hcore.h_x3a9odd.s2 hcore.h_x3a9odd.s3 hcore.h_x3a9odd.s3.ht1 hcore.h_x3a9odd.s3.ht1.this)
hcorestates that for $k\le n$ there is an integer $z$ with $$z\,2^{k(k-1)/2}=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}.$$The first ingredients are these.
- Coefficients (
hQcint). For every $j$ there is an integer $g_j$ with $Q_c(n,j)=2^{j(j-1)/2}g_j$. It is obtained from integer witnesses for the two Gaussian-binomial products (s1ands2). - Divisibility (
hΩdivin the Lean; the outline's step id ishcore.h_x3a9div). With $\Omega=\prod_{t=1}^{2n}(2^t-1)$: for $1\le s\le 2n$ there is an integer $w$ with $w(2^s-1)=\Omega$. It is obtained by taking the factor $t=s$ out of the product. - Oddness (
hΩoddin the Lean; step idhcore.h_x3a9odd). $\Omega$ is odd. The proof establishes a property of the product by showing that it is multiplicative and holds on factors:- products of odd integers are odd (
s1); - $1$ is odd (
s2); - each $2^t-1$ with $t\ge1$ is odd, as an even number minus an odd one (
s3, with $t\ne0$ from $1\le t$).
- products of odd integers are odd (
The core estimate: integral reciprocal terms (hcore.key1 hcore.key1.s1 hcore.key1.s1.s1 hcore.key1.s1.s2 hcore.key1.s1.hne hcore.key1.s1.hne.this hcore.key1.s1.h2a hcore.key1.s1.this hcore.key1.s2 hcore.key1.s2.s1 hcore.key1.s2.s2 hcore.key1.s2.hne hcore.key1.s2.hne.this hcore.key1.s2.h2b hcore.key1.s2.this hcore.hK hcore.hK.this hcore.hI hcore.hI.h1 hcore.hI.h2)
key1states that for $a\ne b$, both $\le 2n$, the number $\Omega\,2^a\cdot\frac{1}{2^a-2^b}$ is an integer. The proof splits according to the order of $a$ and $b$.- Case $a<b$ (
s1).- Write $b=a+d+1$ (
s1.s1). - Obtain an integer $w$ with $w(2^{d+1}-1)=\Omega$ (
s1.s2). - Record $2^{d+1}-1\ne0$ (
hne, withthis). h2ais routine (positivity): $2^a\ne0$.- The second
thisis routine (ring): $2^a-2^a2^{d+1}=-(2^a(2^{d+1}-1))$. - The witness is $-w$.
- Write $b=a+d+1$ (
- Case $a>b$ (
s2).- Write $a=b+d+1$ and obtain $w$ in the same way.
h2bis routine (positivity), and the factorisationthisis routine (ring).- The witness is $w\,2^{d+1}$.
Two instances follow.
hK: for $K\in(n,2n]$ (so $n<K\le 2n$, bythis), $\Omega 2^k/(2^k-2^K)$ is an integer.hI: for $i\le n$ with $i\ne k$ (the factsh1andh2), $\Omega 2^k/(2^k-2^i)$ is an integer.
The core estimate: the tail and the assembly (hcore.hT hcore.hT.hj' hcore.hT.s2 hcore.hT.s3 hcore.hT.hmono hcore.hT.s5 hcore.hT.hne hcore.hT.hne.this hcore.hT.hne' hcore.h2adic hcore.h2adic.htail hcore.s9 hcore.hB')
Tail terms (
hT). For $j\in(k,n]$ there is an integer $w$ with $$w\,2^{k(k-1)/2}=\Omega\cdot\frac{Q_c(n,j)\,2^{j-k}}{1-2^{j-k}}.$$hj'gives $k<j\le n$.s2writes $j-k=d+1$.s3obtains an integer $w$ with $w(2^{d+1}-1)=\Omega$.hmonogives $k(k-1)/2\le j(j-1)/2$, ands5writes $j(j-1)/2=k(k-1)/2+e$.- With $2^{d+1}-1\ne0$ and $1-2^{d+1}\ne0$ (the steps
hne, its child, andhne'), the witness is $-(w\,g_j\,2^e\,2^{d+1})$.
The $2$-adic form (
h2adic). Let $f_K$, $f_I$ and $f_T$ be the integers supplied byhK,hIandhT. Then $$\Omega\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}=2^{k(k-1)/2}\Big(g_k\big(\textstyle\sum_K f_K-\sum_i f_I\big)-\sum_j f_T\Big).$$ Its childhtailgives $2^{k(k-1)/2}\sum_{j\in(k,n]}f_T=\Omega\sum_{j\in(k,n]}\frac{Q_c(n,j)2^{j-k}}{1-2^{j-k}}$. The goal left afterhtailis the partial-fraction formula multiplied through by $\Omega$, with the reciprocal sums written through the integers $f_K$ and $f_I$.The odd form.
s9uses the odd-denominator statement with $c_j=2^{j(j-1)/2}g_j$ to obtain an integer $B$. It equals the product $\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)$ times $\sum_{j\le k} c_j/(2^{k-j}-1)$.hB'rewrites $c_j$ back as $Q_c(n,j)$, so that $B$ equals the right-hand side ofhcore.
These facts have the shape of the hypotheses of the merging lemma:
- the odd number $\Omega$;
- the exponent $k(k-1)/2$;
- the relation from
h2adic; - the integer $B$;
- the integral product.
Clearing the extra sum (hcnall hcnall.hint hcnall.hint.s1 hcnall.hint.s1.hj' hcnall.hint.s1.s2 hcnall.hint.s1.s2.e hcnall.hint.s1.s3 hcnall.hint.s1.s3.e hcnall.hint.s2 hcnall.hint.s2.hmem hcnall.hint.s2.hne hcnall.hint.s2.hne.h8 hcnall.hint.s2.hne.h8.s1 hcnall.hint.s2.hne.h8.s2)
hcnallstates that $$\prod_{2\le j<n}(2^{j+1}-3)\cdot\sum_{j<n}\frac{3}{2^{j+1}-3}$$ is an integer. Distributing the product reduces this to the termwise claimhint. There are two cases on $j$.- Case
s1: $j<2$.hj'is routine (omega): it gives $j=0$ or $j=1$.- In
s2, the routine stepe(norm_num) gives $3/(2-3)=-3$, and the witness is $-3\prod(2^{i+1}-3)$. - In
s3, the routine stepe(norm_num) gives $3/(4-3)=3$, and the witness is $3\prod(2^{i+1}-3)$.
- In
- Case
s2: $j\ge2$.hmemgives $j\in[2,n)$.hnegives $2^{j+1}-3\ne0$, from $8\le 2^{j+1}$. That bound is proved by the calculation inh8: $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity of powers.- The factor for $j$ is pulled out of the product, which cancels the denominator.
The size bound: setting up the exponents (hb hb.key hb.key.s1 hb.key.s2 hb.key.s2.hP1 hb.key.s2.hP2 hb.key.s2.s3 hb.key.s2.s4 hb.key.s2.hS1 hb.key.s2.hS1.e hb.key.s2.hS2 hb.key.s2.hS2.this hb.key.s2.hT)
The remaining steps concern the natural number $$d=2^{n(n+1)/2}\cdot E(n).$$ Here $E(5)=409045$ and $E(7)=1298717875$. Otherwise $$E(n)=\prod_{\lfloor n/2\rfloor<m\le n}(2^m-1)\cdot\prod_{2\le j<n}(2^{j+1}-3).$$
hbstates that $d^2\le 2^{3n^2}$ in $\mathbb{R}$. It follows from the same inequality in $\mathbb{N}$, which iskey. That inequality is split into two cases.- Case
s1: $n\le 9$. The proof splits on $n\le 9$ or $10\le n$ (Lean line 626; the split itself is not an outline step, and the outline prints no hypothesis for this case). For $n\le 9$ the inequality in $\mathbb{N}$ is checked by evaluation in the kernel (decide +kernel, after generalising over $n$), for each of the ten values; this is the only place where the numerals $E(5)$ and $E(7)$ enter the size bound. - Case
s2: $n\ge 10$. Since $n\ne 5$ and $n\ne 7$, the conditional is resolved to the product branch, so the goal is the inequality for $2^{n(n+1)/2}\prod(2^m-1)\prod(2^{j+1}-3)$. The ingredients are:hP1: $\prod_{(n/2,n]}(2^m-1)\le 2^{\sum m}$, comparing factor by factor;hP2: $\prod_{[2,n)}(2^{j+1}-3)\le 2^{\sum(j+1)}$;s3: $n=\lfloor n/2\rfloor+c+1$;s4: $n=d'+3$, where $d'$ is the name the outline gives (it is distinct from the witness $d$);hS1: $2\sum_{(n/2,n]}m=2(c+1)(\lfloor n/2\rfloor+1)+(c+1)c$, by Gauss' summation formula after rewriting the interval as $[\lfloor n/2\rfloor+1,n+1)$ (e);hS2: $2\sum_{[2,n)}(j+1)=6(d'+1)+(d'+1)d'$, after re-indexing (this) and again Gauss' summation formula;hT: $\big(n(n+1)/2\big)\cdot2=n(n+1)$, since $n(n+1)$ is even.
The size bound: exponent arithmetic (hb.key.s2.hexp hb.key.s2.hexp.arith hb.key.s2.hexp.arith.hsq hb.key.s2.hexp.arith.s2 hb.key.s2.hexp.arith.s3 hb.key.s2.hexp.s2 hb.key.s2.hexp.s3 hb.key.s2.hexp.hc' hb.key.s2.hexp.hd' hb.key.s2.hexp.hT' hb.key.s2.hexp.this hb.key.s2.s9 hb.key.s2.s10 hb.key.s2.s11)
hexpstates that $$2\cdot\tfrac{n(n+1)}{2}+2\sum_{(n/2,n]}m+2\sum_{[2,n)}(j+1)\le 3n\cdot n .$$The polynomial inequality (
arith). Assume $r\le1$, $3\le e$, and that $A,B,T$ satisfy $$2A=2(e+r+2)(e+3)+(e+r+2)(e+r+1),$$ $$2B=6(2e+r+2)+(2e+r+2)(2e+r+1),$$ $$2T=(2e+4+r)(2e+5+r).$$ Then $2T+2A+2B\le 3(2e+4+r)^2$. It uses $3e\le e^2$ (hsq) and is checked separately for $r=0$ (s2) and $r=1$ (s3).Applying it.
s2writes $\lfloor n/2\rfloor=e+2$.s3writes $n=2e+4+r$ with $r\le1$.hc'andhd'are routine (omega): they give $c=e+1+r$ and $d'=2e+1+r$.hT'restates $2\cdot\frac{n(n+1)}2$ in these variables.thisis the resulting instance, which giveshexp.
The chain of inequalities.
s9bounds the squared product by the squared power-of-$2$ bounds fromhP1andhP2.s10rewrites this by the laws of exponents; its claim is not printed in the outline.s11concludes $2^{(\cdots)}\le 2^{3n^2}$ by monotonicity of powers of $2$, usinghexp.
Integrality of $2^{n(n+1)/2}Q_x(n)$ (hqx hqx.hterm hqx.hterm.hkn hqx.hterm.s2 hqx.hterm.s3 hqx.hterm.s4 hqx.hterm.hexp hqx.hterm.hexp.e1 hqx.hterm.hexp.e2 hqx.hterm.hexp.e3 hqx.hterm.hexp.s4 hqx.hterm.hexp.s5 hqx.hterm.hpow hqx.hterm.h2)
hqxstates that $2^{n(n+1)/2}\sum_{k\le n}Q_c(n,k)(3/2^n)^k$ is an integer. Distributing the power over the sum reduces this to the termwise claimhterm.Fix $k\le n$ (the fact
hkn).- Witnesses. Let $a$ and $b$ be integers equal to $\binom{n}{k}_2$ and to $\prod_{i<n}\frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (steps
s2ands3). - Substitution.
s4writes $n=k+m$. - Exponent identity (
hexp).
$$\tfrac{(k+m)(k+m+1)}2+\tfrac{k(k-1)}2=\tfrac{m(m+1)}2+(k+m)k .$$
e1,e2ande3remove the three halvings, using that consecutive products are even.- The identity is then proved by induction on $k$: the case $k=0$ (
s4) is routine (simp), ands5is the successor case.
- Powers.
hpowgives $2^{(k+m)(k+m+1)/2}\,2^{k(k-1)/2}=2^{m(m+1)/2}(2^{k+m})^k$. - Nonvanishing.
h2is routine (positivity): $2^{k+m}\ne0$. - Conclusion. The term equals $(-1)^k3^k2^{m(m+1)/2}ab$.
Positivity of the odd part (hE hE.s1 hE.s2 hE.s3 hE.s3.s1 hE.s3.s1.hm1 hE.s3.s1.hm1.this hE.s3.s1.this hE.s3.s1.this.s1 hE.s3.s1.this.s2 hE.s3.s2 hE.s3.s2.hj2 hE.s3.s2.this hE.s3.s2.this.s1 hE.s3.s2.this.s2)
hEstates $0<E(n)$, splitting into the three branches of the conditional.- The two numeral branches are routine (norm_num): $0<409045$ and $0<1298717875$ (
s1ands2). - In the product branch (
s3), each factor is positive.- Factors $2^m-1$ (
s3.s1). Here $m\in(\lfloor n/2\rfloor,n]$ gives $1\le m$ (hm1, via $\lfloor n/2\rfloor<m$). Then $2\le 2^m$ (this): the equation $2=2^1$ is routine (norm_num), and $2^1\le 2^m$ follows by monotonicity. - Factors $2^{j+1}-3$ (
s3.s2). Here $j\in[2,n)$ gives $2\le j$ (hj2). Then $8\le 2^{j+1}$: the equation $8=2^3$ is routine (norm_num), and $2^3\le 2^{j+1}$ follows by monotonicity.
- Factors $2^m-1$ (
Integrality of $d\,A_q(n)$: the cases and the casts (hAqint hAqint.s1 hAqint.s2 hAqint.s2.s1 hAqint.s2.s2 hAqint.s2.s2.hM hAqint.s2.s2.hC hAqint.s2.s2.hC.hj2 hAqint.s2.s2.hC.h3 hAqint.s2.s2.hC.h3.s1 hAqint.s2.s2.hC.h3.s2 hAqint.s2.s2.hd hAqint.s2.s2.s4 hAqint.s2.s2.s5 hAqint.s2.s2.hQxn)
hAqintstates that $d\cdot A_q(n)$ is an integer, for the $d$ above. The cases follow the branches of the conditional.- Numeral branches (
s1ands2.s1). The recorded uses select the branch, give a witness, and evaluate by kernel reduction. - Product branch (
s2.s2). The setup is as follows.hMcasts $\prod(2^m-1)$ from $\mathbb{N}$ to $\mathbb{Q}$, valid since $1\le 2^m$.hCcasts $\prod(2^{j+1}-3)$, valid since $3\le 2^{j+1}$ for $j\ge2$. This useshj2; the boundh3is the calculation in which $3\le 2^2$ is routine (norm_num) and $2^2\le 2^{j+1}$ follows by monotonicity.hdcasts $d$ itself as $2^{n(n+1)/2}\cdot\big(\prod(2^m-1)\prod(2^{j+1}-3)\big)$.s4obtains an integer $z_{cn}$ equal to $\prod(2^{j+1}-3)\sum_{j<n}3/(2^{j+1}-3)$.s5obtains an integer $z_q'$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$.hQxnunfolds $Q_x(n)$ as that sum.- The recorded closing uses distribute $d$ over the two parts of $A_q(n)$ and over the outer sum.
Integrality of $d\,A_q(n)$: the main terms (hAqint.s2.s2.hterm hAqint.s2.s2.hterm.hkn hAqint.s2.s2.hterm.s2 hAqint.s2.s2.hterm.s3 hAqint.s2.s2.hterm.hexp hAqint.s2.s2.hterm.hexp.e1 hAqint.s2.s2.hterm.hexp.e2 hAqint.s2.s2.hterm.hexp.e3 hAqint.s2.s2.hterm.hexp.s4 hAqint.s2.s2.hterm.hexp.s5 hAqint.s2.s2.hterm.hpow hAqint.s2.s2.hterm.h2n hAqint.s2.s2.hterm.e1 s21)
htermstates that for each $k\le n$, $$2^{n(n+1)/2}\Big(\prod(2^m-1)\prod(2^{j+1}-3)\Big)\cdot\Big(\sum_{j\le k}\frac{Q_c(n,j)}{2^{k-j}-1}\Big)\Big(\frac{3}{2^n}\Big)^k$$ is an integer.hkngives $k\le n$.s2obtains $w$ with $w\,2^{k(k-1)/2}=\prod(2^m-1)\cdot\sum_{j\le k}Q_c(n,j)/(2^{k-j}-1)$. This is an instance of the core statement.s3writes $n=k+m$.hexpis the exponent identity $\frac{n(n+1)}2+\frac{k(k-1)}2=\frac{m(m+1)}2+nk$. As before, it removes the halvings (e1,e2,e3) and proceeds by induction on $k$; the base cases4is routine (simp), ands5is the successor case.hpowgives $2^{n(n+1)/2}2^{k(k-1)/2}=2^{m(m+1)/2}(2^n)^k$.h2nis routine (positivity): $(2^n)^k\ne0$.e1regroups the term as $\prod(2^{j+1}-3)\cdot3^k\cdot\big(\prod(2^m-1)\sum_{j\le k}\tfrac{Q_c(n,j)}{2^{k-j}-1}\big)\,2^{n(n+1)/2}/(2^n)^k$.- Combining these, the term equals $\prod(2^{j+1}-3)\cdot w\cdot3^k\cdot2^{m(m+1)/2}$, which is the integer witness.
Finally,
s21obtains an integer $z_q$ equal to $2^{n(n+1)/2}\sum_kQ_c(n,k)(3/2^n)^k$, which is the content of the integrality of $2^{n(n+1)/2}Q_x(n)$. The steps recorded at the top level have therefore established three things:- for the number $d=2^{n(n+1)/2}E(n)$: positivity of $E(n)$, the bound $d^2\le 2^{3n^2}$, and integrality of $d\,A_q(n)$;
- integrality of $2^{n(n+1)/2}Q_x(n)$.
These are the ingredients of the existential goal. No step in the outline is open.
Diff of
d39a90505cc9against567cd0ce4560@@ -231,6 +231,6 @@ - **Coefficients (`hQcint`).** For every $j$ there is an integer $g_j$ with $Q_c(n,j)=2^{j(j-1)/2}g_j$. It is obtained from integer witnesses for the two Gaussian-binomial products (`s1` and `s2`). -- **Divisibility (`hΩdiv`).** With $\Omega=\prod_{t=1}^{2n}(2^t-1)$: for $1\le s\le 2n$ there is an integer $w$ with $w(2^s-1)=\Omega$. It is obtained by taking the factor $t=s$ out of the product. -- **Oddness (`hΩodd`).** $\Omega$ is odd. The proof establishes a property of the product by showing that it is multiplicative and holds on factors: +- **Divisibility (`hΩdiv` in the Lean; the outline's step id is `hcore.h_x3a9div`).** With $\Omega=\prod_{t=1}^{2n}(2^t-1)$: for $1\le s\le 2n$ there is an integer $w$ with $w(2^s-1)=\Omega$. It is obtained by taking the factor $t=s$ out of the product. +- **Oddness (`hΩodd` in the Lean; step id `hcore.h_x3a9odd`).** $\Omega$ is odd. The proof establishes a property of the product by showing that it is multiplicative and holds on factors: - products of odd integers are odd (`s1`); - $1$ is odd (`s2`); @@ -309,6 +309,6 @@ `hb` states that $d^2\le 2^{3n^2}$ in $\mathbb{R}$. It follows from the same inequality in $\mathbb{N}$, which is `key`. That inequality is split into two cases. -- **Case `s1`.** The goal is closed by kernel evaluation of the decidable statement (the recorded use is the kernel-reduction option). The outline does not print which values of $n$ this case covers. -- **Case `s2`.** The conditional is resolved to the product branch, so the goal is the inequality for $2^{n(n+1)/2}\prod(2^m-1)\prod(2^{j+1}-3)$. The ingredients are: +- **Case `s1`: $n\le 9$.** The proof splits on $n\le 9$ or $10\le n$ (Lean line 626; the split itself is not an outline step, and the outline prints no hypothesis for this case). For $n\le 9$ the inequality in $\mathbb{N}$ is checked by evaluation in the kernel (`decide +kernel`, after generalising over $n$), for each of the ten values; this is the only place where the numerals $E(5)$ and $E(7)$ enter the size bound. +- **Case `s2`: $n\ge 10$.** Since $n\ne 5$ and $n\ne 7$, the conditional is resolved to the product branch, so the goal is the inequality for $2^{n(n+1)/2}\prod(2^m-1)\prod(2^{j+1}-3)$. The ingredients are: - `hP1`: $\prod_{(n/2,n]}(2^m-1)\le 2^{\sum m}$, comparing factor by factor; - `hP2`: $\prod_{[2,n)}(2^{j+1}-3)\le 2^{\sum(j+1)}$;
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
erdos-1050--h1-v2 proved
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.
theorem erdos_1050__h1 : ∃ a b : ℕ → ℤ, (∀ n : ℕ, (b n : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n ≠ 0) ∧ Filter.Tendsto (fun n : ℕ => (b n : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n) Filter.atTop (nhds 0) := by sorryA statement is written
:= by sorry: thesorryholds 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 f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1), 2026-10-18; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\displaystyle \exists\, a,b:\mathbb{N}\to\mathbb{Z}\ \ \bigl(\forall n\in\mathbb{N},\ b_n\,T-a_n\neq 0\bigr)\ \wedge\ \lim_{n\to\infty}\bigl(b_n\,T-a_n\bigr)=0,\qquad T=\sum_{m=0}^{\infty}\frac{1}{2^{m+3}-3}$
There are two sequences of integers $a_n$, $b_n$ such that $b_n T - a_n$ is never zero and converges to $0$ in $\mathbb{R}$ (
Filter.Tendsto … Filter.atTop (nhds 0)), where $T$ is the real number $\sum_{m\ge 0} 1/(2^{m+3}-3) = \tfrac15+\tfrac1{13}+\tfrac1{29}+\cdots$. The sum is Lean's∑'over all natural numbers (the file also calls the summation variablen; it is a separate bound variable), which is $0$ for a non-summable family, and $a_n$, $b_n$ are read as real numbers; no hypothesis is assumed and irrationality is not mentioned.Rendered from gloss/9946779b2a48….md · Improve these words →
History: 2 versions on record
2026-10-06 · written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · gloss/181e0dc24de2….md · the first version of its chain
Read this version
This file states the theorem
erdos_1050__h1. Write $\displaystyle T = \sum_{m=0}^{\infty} \frac{1}{2^{m+3}-3} = \frac15 + \frac1{13} + \frac1{29} + \cdots,$ a real number (Lean's∑'over all natural numbers $m$, with real division). The statement says:there are two sequences of integers $a, b : \mathbb{N} \to \mathbb{Z}$ such that
- for every natural number $n$, $b_n T - a_n \neq 0$ (the integers $a_n, b_n$ are read as real numbers here), and
- $b_n T - a_n \to 0$ as $n \to \infty$ (Mathlib's
Filter.Tendsto … Filter.atTop (nhds 0): the sequence converges to $0$ in $\mathbb{R}$).
Nothing else is assumed: the statement has no hypotheses.
Reading notes:
- In the Lean text the summation variable inside
∑'is also calledn. It is a separate bound variable, so $T$ does not depend on the outer $n$; above it is renamed $m$. - No denominator $2^{m+3}-3$ is zero (the smallest is $5$), so Lean's convention that division by zero gives $0$ never applies. The statement does not itself assert that the series converges, and Lean defines the
tsumof a non-summable family to be $0$; this series converges (its terms are at most $\tfrac15 \cdot 2^{-m}$), so $T$ is its ordinary sum. - The file does not mention irrationality. A pair of sequences as above is the classical criterion for $T$ to be irrational, which is how the root node
erdos-1050uses this statement. - Per its comment, this node is a hole named
borweinof a merged partial proof of the root, revised (D-8) to restore the binder types and real-number ascriptions that an earlier gate-written version had dropped; it supersedes nodeerdos-1050--h1. The file imports Mathlib and its body issorry, the placeholder a statement file carries in place of a proof.
2026-10-18 · written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1) · not signed · current · gloss/9946779b2a48….md · diff to its predecessor
Read this version
$\displaystyle \exists\, a,b:\mathbb{N}\to\mathbb{Z}\ \ \bigl(\forall n\in\mathbb{N},\ b_n\,T-a_n\neq 0\bigr)\ \wedge\ \lim_{n\to\infty}\bigl(b_n\,T-a_n\bigr)=0,\qquad T=\sum_{m=0}^{\infty}\frac{1}{2^{m+3}-3}$
There are two sequences of integers $a_n$, $b_n$ such that $b_n T - a_n$ is never zero and converges to $0$ in $\mathbb{R}$ (
Filter.Tendsto … Filter.atTop (nhds 0)), where $T$ is the real number $\sum_{m\ge 0} 1/(2^{m+3}-3) = \tfrac15+\tfrac1{13}+\tfrac1{29}+\cdots$. The sum is Lean's∑'over all natural numbers (the file also calls the summation variablen; it is a separate bound variable), which is $0$ for a non-summable family, and $a_n$, $b_n$ are read as real numbers; no hypothesis is assumed and irrationality is not mentioned.
Diff of
9946779b2a48against181e0dc24de2@@ -1,17 +1,3 @@ -This file states the theorem `erdos_1050__h1`. Write -$\displaystyle T = \sum_{m=0}^{\infty} \frac{1}{2^{m+3}-3} = \frac15 + \frac1{13} + \frac1{29} + \cdots,$ -a real number (Lean's `∑'` over all natural numbers $m$, with real division). The statement says: +$$\exists\, a,b:\mathbb{N}\to\mathbb{Z}\ \ \bigl(\forall n\in\mathbb{N},\ b_n\,T-a_n\neq 0\bigr)\ \wedge\ \lim_{n\to\infty}\bigl(b_n\,T-a_n\bigr)=0,\qquad T=\sum_{m=0}^{\infty}\frac{1}{2^{m+3}-3}$$ -there are two sequences of integers $a, b : \mathbb{N} \to \mathbb{Z}$ such that - -1. for every natural number $n$, $b_n T - a_n \neq 0$ (the integers $a_n, b_n$ are read as real numbers here), and -2. $b_n T - a_n \to 0$ as $n \to \infty$ (Mathlib's `Filter.Tendsto … Filter.atTop (nhds 0)`: the sequence converges to $0$ in $\mathbb{R}$). - -Nothing else is assumed: the statement has no hypotheses. - -Reading notes: - -- In the Lean text the summation variable inside `∑'` is also called `n`. It is a separate bound variable, so $T$ does not depend on the outer $n$; above it is renamed $m$. -- No denominator $2^{m+3}-3$ is zero (the smallest is $5$), so Lean's convention that division by zero gives $0$ never applies. The statement does not itself assert that the series converges, and Lean defines the `tsum` of a non-summable family to be $0$; this series converges (its terms are at most $\tfrac15 \cdot 2^{-m}$), so $T$ is its ordinary sum. -- The file does not mention irrationality. A pair of sequences as above is the classical criterion for $T$ to be irrational, which is how the root node `erdos-1050` uses this statement. -- Per its comment, this node is a hole named `borwein` of a merged partial proof of the root, revised (D-8) to restore the binder types and real-number ascriptions that an earlier gate-written version had dropped; it supersedes node `erdos-1050--h1`. The file imports Mathlib and its body is `sorry`, the placeholder a statement file carries in place of a proof. +There are two sequences of integers $a_n$, $b_n$ such that $b_n T - a_n$ is never zero and converges to $0$ in $\mathbb{R}$ (`Filter.Tendsto … Filter.atTop (nhds 0)`), where $T$ is the real number $\sum_{m\ge 0} 1/(2^{m+3}-3) = \tfrac15+\tfrac1{13}+\tfrac1{29}+\cdots$. The sum is Lean's `∑'` over all natural numbers (the file also calls the summation variable `n`; it is a separate bound variable), which is $0$ for a non-summable family, and $a_n$, $b_n$ are read as real numbers; no hypothesis is assumed and irrationality is not mentioned.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
Checked by the kernel — an outline of the proof attested in attestations/000319.json, merge commit
879b5c03f7df.Outline of
Proof.lean, extracted by the gate at82834c4684b8from 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.hrem_allhave∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withhrem_all : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 15–724
have hrem_all : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) := by open Polynomial in have id1_test : ∀ (n j : ℕ) (hj : j ≤ n), (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - 1)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1) := by intro n j hj induction j with | zero => simp | succ j ih => have ih' := ih (by omega) rw [Finset.prod_range_succ, ← ih'] obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩ rw [hm, Finset.prod_range_succ, show n - (j + 1) = m by omega] ring open Polynomial in have lower_test : ∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ (j * (j - 1) / 2) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1) := by intro j have h1 : ∀ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ i * (2 ^ (j - 1 - i + 1) - 1) := by intro i hi have hi' := Finset.mem_range.mp hi rw [mul_sub, ← pow_add, show i + (j - 1 - i + 1) = j by omega] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, Finset.prod_range_reflect (fun s => ((2 : ℚ) ^ (s + 1) - 1)) j] congr 1 congr 1 have := Finset.sum_range_id_mul_two j omega open Polynomial in have upper_test : ∀ (j n : ℕ) (hj : j ≤ n), ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - 2 ^ i) = (-1) ^ (n - j) * 2 ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc j n = Finset.Ico (j + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show n + 1 - (j + 1) = n - j by omega] have h1 : ∀ t ∈ Finset.range (n - j), ((2 : ℚ) ^ j - 2 ^ (j + 1 + t)) = (-1) * 2 ^ j * (2 ^ (t + 1) - 1) := by intro t _ rw [show j + 1 + t = j + (t + 1) by ring, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul] open Polynomial in have rhs_test : ∀ (j n : ℕ) (hj : j ≤ n), (∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = (-1) ^ n * 2 ^ (j * n) * ∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc n (2 * n) = Finset.Ico (n + 1) (2 * n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show 2 * n + 1 - (n + 1) = n by omega] have h1 : ∀ t ∈ Finset.range n, ((2 : ℚ) ^ j - 2 ^ (n + 1 + t)) = (-1) * 2 ^ j * (2 ^ ((n - j) + t + 1) - 1) := by intro t _ rw [show n + 1 + t = j + ((n - j) + t + 1) by omega, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul, show 2 * n - j = (n - j) + n by omega, Finset.prod_range_add] ring open Polynomial in have id1_full : ∀ (n j : ℕ) (hj : j ≤ n), (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K) := by intro n j hj have hPne : ∀ m : ℕ, ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + 1) - 1) ≠ 0 := by intro m refine Finset.prod_ne_zero_iff.mpr (fun s _ => ?_) have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test n j hj] field_simp [hPne] have hG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test (2 * n - j) n (by omega), show 2 * n - j - n = n - j by omega] field_simp [hPne] have hsplit : (Finset.range (n + 1)).erase j = Finset.range j ∪ Finset.Ioc j n := by ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omega have hdisj : Disjoint (Finset.range j) (Finset.Ioc j n) := by rw [Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_range, Finset.mem_Ioc] at hx hx' omega have hR := rhs_test j n hj obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hj have hsign : (-1 : ℚ) ^ (j + m) = (-1) ^ j * (-1) ^ (j + m - j) := by rw [← pow_add]; congr 1; omega have ha : 2 * (j * (j - 1) / 2) = j * (j - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have hexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j) := by rw [show j + m - j = m by omega] rcases j with _ | i · simp · simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha] rw [hG1, hG2, hsplit, Finset.prod_union hdisj, lower_test, upper_test j (j + m) hj] apply mul_right_cancel₀ (hPne (j + m - j)) rw [hR, hsign, hexp, pow_add, pow_add, pow_add] field_simp [hPne] clear id1_test lower_test upper_test rhs_test open Polynomial in have lagr_eval : ∀ (n : ℕ) (x : ℕ → ℚ) (hx : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) (N : ℚ[X]) (hNdeg : N.degree ≤ n) (r : ℕ → ℚ) (hr : ∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j)), N = ∑ j ∈ Finset.range (n + 1), C (r j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)) := by intro n x hx N hNdeg r hr have hinj : Set.InjOn x (Finset.range (n + 1) : Set ℕ) := by intro i hi j hj h simp only [Finset.coe_range, Set.mem_Iio] at hi hj exact hx i (by omega) j (by omega) h apply Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq ((Finset.range (n + 1)).image x) · rw [Finset.card_image_of_injOn hinj, Finset.card_range] refine lt_of_le_of_lt (Polynomial.degree_sub_le _ _) (max_lt ?_ ?_) · exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n) · refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self n · intro y hy obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega rw [← hr k hk', Polynomial.eval_finset_sum, Finset.sum_eq_single k] · simp [Polynomial.eval_prod] · intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero] · intro h; exact absurd hk h open Polynomial in have tail_coeff : ∀ (n K : ℕ) (hK : n < K) (Qc : ℕ → ℕ → ℚ) (hQc : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ L)), ∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) = (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℚ) ^ K - 2 ^ i) := by intro n K hK Qc hQc set x : ℕ → ℚ := fun i => (2 : ℚ) ^ i with hxdef have hxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j := by intro i _ j _ h have h' : (2 : ℚ) ^ i = 2 ^ j := h exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast h') have hxne : ∀ a b : ℕ, a ≠ b → (2 : ℚ) ^ a - 2 ^ b ≠ 0 := by intro a b hab h apply hab exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast (sub_eq_zero.mp h)) set N : ℚ[X] := ∏ L ∈ Finset.Ioc n (2 * n), (X - C ((2 : ℚ) ^ L)) with hN have hNdeg : N.degree ≤ n := by rw [hN, Polynomial.degree_prod] rw [Finset.sum_congr rfl (fun L _ => Polynomial.degree_X_sub_C ((2 : ℚ) ^ L)), Finset.sum_const, Nat.card_Ioc] simp omega have hr : ∀ j ≤ n, (Qc n j * 2 ^ j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j) := by intro j hj rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, hxdef] exact hQc j hj have hL := lagr_eval n x hxinj N hNdeg (fun j => Qc n j * 2 ^ j) hr have hev := congrArg (Polynomial.eval ((2 : ℚ) ^ K)) hL rw [Polynomial.eval_finset_sum] at hev have hNK : N.eval ((2 : ℚ) ^ K) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ K - 2 ^ L) := by rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C] have hD : ∏ i ∈ Finset.range (n + 1), ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp hi; omega)) rw [hNK] at hev rw [hev, Finset.sum_div] refine Finset.sum_congr rfl (fun j hj => ?_) have hjn : j < n + 1 := Finset.mem_range.mp hj have hne1 : (2 : ℚ) ^ K - 2 ^ j ≠ 0 := hxne K j (by omega) have hne2 : (2 : ℚ) ^ (K - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (K - j) := one_lt_pow₀ (by norm_num) (by omega) linarith simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X, hxdef] rw [← Finset.mul_prod_erase (Finset.range (n + 1)) (fun i => (2 : ℚ) ^ K - 2 ^ i) hj] have hE : ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp (Finset.mem_of_mem_erase hi); omega)) have hpow : (2 : ℚ) ^ K = 2 ^ j * 2 ^ (K - j) := by rw [← pow_add]; congr 1; omega field_simp rw [hpow] ring clear lagr_eval open Polynomial in have tail3 : ∀ (n : ℕ) (hn : 1 ≤ n), ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) = ∑' s : ℕ, ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) := by intro n hn set f : ℕ → ℕ → ℝ := fun m s => ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * ((1 : ℝ) / 2 ^ (s + 1)) ^ m with hf have key : ∀ m s, f m s = ((3 : ℝ) / 2 ^ (m + n + 1)) ^ (s + 1) := by intro m s simp only [hf] rw [div_pow, div_pow, div_pow, one_pow, ← pow_mul, ← pow_mul, ← pow_mul, show (m + n + 1) * (s + 1) = (n + 1) * (s + 1) + (s + 1) * m by ring, pow_add] field_simp exact pow_add _ _ _ have hpos : ∀ m s, 0 ≤ f m s := fun m s => by rw [key]; positivity have h4 : ∀ m : ℕ, (4 : ℝ) ≤ 2 ^ (m + n + 1) := by intro m calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have inner1 : ∀ m, HasSum (f m) ((3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by intro m have hr0 : 0 ≤ (3 : ℝ) / 2 ^ (m + n + 1) := by positivity have hr1 : (3 : ℝ) / 2 ^ (m + n + 1) < 1 := by rw [div_lt_one (by positivity)]; linarith [h4 m] have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left ((3 : ℝ) / 2 ^ (m + n + 1)) have hfun : f m = fun s => (3 : ℝ) / 2 ^ (m + n + 1) * ((3 : ℝ) / 2 ^ (m + n + 1)) ^ s := by funext s; rw [key]; ring have hne : (2 : ℝ) ^ (m + n + 1) - 3 ≠ 0 := by linarith [h4 m] have hne2 : (2 : ℝ) ^ (m + n + 1) ≠ 0 := by positivity have hval : (3 : ℝ) / (2 ^ (m + n + 1) - 3) = 3 / 2 ^ (m + n + 1) * (1 - 3 / 2 ^ (m + n + 1))⁻¹ := by field_simp rw [hfun, hval] exact hg have inner2 : ∀ s, HasSum (fun m => f m s) (((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1)) := by intro s have hr0 : 0 ≤ (1 : ℝ) / 2 ^ (s + 1) := by positivity have hr1 : (1 : ℝ) / 2 ^ (s + 1) < 1 := by rw [div_lt_one (by positivity)] exact one_lt_pow₀ (by norm_num) (by omega) have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left (((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1)) have hne : (2 : ℝ) ^ (s + 1) - 1 ≠ 0 := by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hval : ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) = ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * (1 - 1 / 2 ^ (s + 1))⁻¹ := by rw [div_pow, div_pow, ← pow_mul, ← pow_mul, show (n + 1) * (s + 1) = n * (s + 1) + (s + 1) by ring, pow_add] field_simp exact pow_add _ _ _ rw [hval] exact hg have hsum1 : Summable (fun m : ℕ => (3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have := h4 m; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring calc (3 : ℝ) / (2 ^ (m + n + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring have hU : Summable (Function.uncurry f) := by refine (summable_prod_of_nonneg (fun p => hpos p.1 p.2)).mpr ⟨fun m => (inner1 m).summable, ?_⟩ exact hsum1.congr (fun m => ((inner1 m).tsum_eq).symm) have hcomm := hU.tsum_comm' (fun m => (inner1 m).summable) (fun s => (inner2 s).summable) rw [show (∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3)) = ∑' m, ∑' s, f m s from tsum_congr (fun m => ((inner1 m).tsum_eq).symm)] rw [← hcomm] exact tsum_congr (fun s => (inner2 s).tsum_eq) open Polynomial in have split3T : ∀ (n : ℕ), 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) + ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) := by intro n set g : ℕ → ℝ := fun m => (3 : ℝ) / (2 ^ (m + 1) - 3) with hg have hsum : Summable (fun m => g (m + 1)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have : (4 : ℝ) ≤ 2 ^ (m + 1 + 1) := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega) simp only [hg]; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + 1 + 1) := le_of_eq (by ring_nf) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring simp only [hg] calc (3 : ℝ) / (2 ^ (m + 1 + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring have hs : Summable g := (summable_nat_add_iff 1).mp hsum have e1 := hs.sum_add_tsum_nat_add n have e2 := hs.sum_add_tsum_nat_add 2 have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑' m, g (m + 2) := by rw [← tsum_mul_left] refine tsum_congr (fun m => ?_) simp only [hg] rw [show m + 2 + 1 = m + 3 by ring] ring have hfirst : ∑ i ∈ Finset.range 2, g i = 0 := by simp only [hg, Finset.sum_range_succ, Finset.sum_range_zero] norm_num rw [h3T] have htail : ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) = ∑' m, g (m + n) := by refine tsum_congr (fun m => ?_) simp only [hg] rw [htail] have hrange : ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) = ∑ i ∈ Finset.range n, g i := by simp only [hg] rw [hrange, e1] rw [← e2, hfirst, zero_add] open Polynomial in have cauchy_fin : ∀ (n : ℕ) (q a : ℕ → ℝ) (x A : ℝ) (hA : HasSum (fun s => a s * x ^ (s + 1)) A), HasSum (fun K => ∑ j ∈ Finset.range (n + 1), if j < K then q j * a (K - j - 1) * x ^ K else 0) ((∑ j ∈ Finset.range (n + 1), q j * x ^ j) * A) := by intro n q a x A hA rw [Finset.sum_mul] apply hasSum_sum intro j _ have h := hA.mul_left (q j * x ^ j) rw [← hasSum_nat_add_iff' (j + 1)] have hz : ∑ i ∈ Finset.range (j + 1), (if j < i then q j * a (i - j - 1) * x ^ i else 0) = 0 := Finset.sum_eq_zero (fun i hi => by have := Finset.mem_range.mp hi rw [if_neg (by omega)]) rw [hz, sub_zero] have hfun : (fun s => if j < s + (j + 1) then q j * a (s + (j + 1) - j - 1) * x ^ (s + (j + 1)) else 0) = fun s => q j * x ^ j * (a s * x ^ (s + 1)) := by funext s rw [if_pos (by omega), show s + (j + 1) - j - 1 = s by omega, show s + (j + 1) = j + (s + 1) by ring, pow_add] ring rw [hfun] exact h open Polynomial in have h4_series : ∀ (Qc : ℕ → ℕ → ℚ) (hQc : (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)))) (Qx : ℕ → ℚ) (hQx : (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)) (Aq : ℕ → ℚ) (hAq : (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))) (n : ℕ) (hn : 1 ≤ n), HasSum (fun K : ℕ => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * ((3 : ℝ) / 2 ^ n) ^ K else 0) ((Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ)) := by intro Qc hQc Qx hQx Aq hAq n hn set x : ℝ := (3 : ℝ) / 2 ^ n with hxdef have hx0 : 0 ≤ x := by positivity have hx2 : x / 2 < 1 := by have : (2 : ℝ) ≤ 2 ^ n := by calc (2 : ℝ) = 2 ^ 1 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_lt_one (by positivity)]; linarith set a : ℕ → ℝ := fun s => (1 : ℝ) / (2 ^ (s + 1) - 1) with hadef have hapos : ∀ s, 0 < (2 : ℝ) ^ (s + 1) - 1 := fun s => by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hAsum : Summable (fun s => a s * x ^ (s + 1)) := by refine Summable.of_nonneg_of_le (fun s => ?_) (fun s => ?_) ((summable_geometric_of_lt_one (by positivity) hx2).mul_left x) · simp only [hadef]; exact mul_nonneg (div_nonneg (by norm_num) (le_of_lt (hapos s))) (by positivity) · simp only [hadef] have h1 : (2 : ℝ) ^ s ≤ 2 ^ (s + 1) - 1 := by have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num) rw [pow_succ]; linarith have hxs : 0 ≤ x ^ (s + 1) := by positivity calc 1 / (2 ^ (s + 1) - 1) * x ^ (s + 1) ≤ 1 / 2 ^ s * x ^ (s + 1) := by gcongr _ = x * (x / 2) ^ s := by have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simp exact e x set A := ∑' s, a s * x ^ (s + 1) with hAdef have hA : HasSum (fun s => a s * x ^ (s + 1)) A := hAsum.hasSum -- 3T = c + A have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) + A := by rw [split3T n, tail3 n hn, hAdef] congr 1 refine tsum_congr (fun s => ?_) simp only [hadef, hxdef] ring have hQxR : (Qx n : ℝ) = ∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j := by rw [hQx]; push_cast; rfl have hAqR : (Aq n : ℝ) = ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (k - j) - 1)) * x ^ k + (Qx n : ℝ) * ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) := by rw [hAq]; push_cast; rfl have hC := cauchy_fin n (fun j => (Qc n j : ℝ)) a x A hA set P : ℝ := ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (k - j) - 1)) * x ^ k with hPdef have hP : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) P := by have h0 : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := hasSum_sum_of_ne_finset_zero (fun b hb => by rw [if_neg (by simpa using hb)]) have h1 : (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) = P := by rw [hPdef] exact Finset.sum_congr rfl (fun K hK => by rw [if_pos (Finset.mem_range.mp hK)]) rw [h1] at h0 exact h0 have hD := hC.sub hP have hval : (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) = (∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j) * A - P := by rw [h3T, hAqR, hQxR]; ring rw [hval] have hid1 : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ L) := fun j hj => by subst hQc; exact id1_full n j hj have hfun : (fun K : ℕ => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * ((3 : ℝ) / 2 ^ n) ^ K else 0) = fun K => (∑ j ∈ Finset.range (n + 1), if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) - (if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := by funext K symm by_cases hK : K < n + 1 · rw [if_pos hK, if_neg (by omega)] rw [Finset.sum_range_succ (fun j => (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) K, Nat.sub_self, pow_zero, sub_self, div_zero, add_zero] have hsplit : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ∑ j ∈ Finset.range K, (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1) * x ^ K := by rw [← Finset.sum_range_add_sum_Ico _ (show K ≤ n + 1 by omega)] rw [Finset.sum_eq_zero (s := Finset.Ico K (n + 1)) (fun j hj => by rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK := Finset.mem_range.mp hj rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hsplit, Finset.sum_mul, sub_self] · rw [if_neg hK, sub_zero] have hS : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ((∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) : ℚ) : ℝ) * x ^ K := by push_cast rw [Finset.sum_mul] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK : j < K := by have := Finset.mem_range.mp hj; omega rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hS, tail_coeff n K (by omega) Qc hid1] push_cast by_cases h2 : 2 * n < K · rw [if_pos h2] · rw [if_neg h2] rw [Finset.prod_eq_zero (i := K) (Finset.mem_Ioc.mpr ⟨by omega, by omega⟩) (sub_self _)] simp rw [hfun] exact hD clear split3T tail3 cauchy_fin tail_coeff id1_full open Polynomial in have prod_one_sub_ge : ∀ (s : Finset ℕ) (a : ℕ → ℝ) (h0 : ∀ i ∈ s, 0 ≤ a i) (h1 : ∀ i ∈ s, a i ≤ 1), 1 - ∑ i ∈ s, a i ≤ ∏ i ∈ s, (1 - a i) := by intro s a h0 h1 induction s using Finset.induction_on with | empty => simp | insert j s hj ih => rw [Finset.sum_insert hj, Finset.prod_insert hj] have ih' := ih (fun i hi => h0 i (Finset.mem_insert_of_mem hi)) (fun i hi => h1 i (Finset.mem_insert_of_mem hi)) have haj0 := h0 j (Finset.mem_insert_self j s) have haj1 := h1 j (Finset.mem_insert_self j s) have hP : 0 ≤ ∏ i ∈ s, (1 - a i) := Finset.prod_nonneg (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) have hP1 : ∏ i ∈ s, (1 - a i) ≤ 1 := Finset.prod_le_one (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) (fun i hi => by linarith [h0 i (Finset.mem_insert_of_mem hi)]) nlinarith open Polynomial in have nd_bound : ∀ (n K : ℕ) (hn : 1 ≤ n) (hK : 2 * n + 1 ≤ K), 0 < (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) ∧ (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) ≤ 2 * (1 / 2) ^ K := by intro n K hn hK have hlt : ∀ i, i < K → (0 : ℝ) < 2 ^ K - 2 ^ i := fun i hi => by have : (2 : ℝ) ^ i < 2 ^ K := pow_lt_pow_right₀ (by norm_num) hi linarith have hNpos : 0 < ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) := Finset.prod_pos (fun L hL => hlt L (by have := Finset.mem_Ioc.mp hL; omega)) have hDpos : 0 < ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := Finset.prod_pos (fun i hi => hlt i (by have := Finset.mem_range.mp hi; omega)) refine ⟨div_pos hNpos hDpos, ?_⟩ have hN : ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := by have := Finset.prod_le_prod (s := Finset.Ioc n (2 * n)) (f := fun L => (2 : ℝ) ^ K - 2 ^ L) (g := fun _ => (2 : ℝ) ^ K) (fun L hL => le_of_lt (hlt L (by have := Finset.mem_Ioc.mp hL; omega))) (fun L _ => by have : (0 : ℝ) < 2 ^ L := by positivity linarith) rw [Finset.prod_const, Nat.card_Ioc, show 2 * n - n = n by omega] at this exact this have hD : (2 ^ K) ^ (n + 1) / 2 ≤ ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by have hfac : ∀ i ∈ Finset.range (n + 1), (2 : ℝ) ^ K - 2 ^ i = 2 ^ K * (1 - (1 / 2) ^ (K - i)) := by intro i hi have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega have e : (2 : ℝ) ^ K = 2 ^ i * 2 ^ (K - i) := by rw [← pow_add]; congr 1; omega rw [mul_sub, mul_one, one_div_pow, mul_one_div, e] field_simp rw [Finset.prod_congr rfl hfac, Finset.prod_mul_distrib, Finset.prod_const, Finset.card_range] have hsum : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) ≤ 1 / 2 := by have e : ∀ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) = (1 / 2) ^ (K - n) * (1 / 2) ^ (n - i) := by intro i hi have := Finset.mem_range.mp hi rw [← pow_add]; congr 1; omega rw [Finset.sum_congr rfl e, ← Finset.mul_sum] have hg : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (n - i) ≤ 2 := by have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1) simp only [Nat.add_sub_cancel] at hr rw [hr] exact sum_geometric_two_le (n + 1) have hk : ((1 : ℝ) / 2) ^ (K - n) ≤ (1 / 2) ^ 2 := pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega) have hpos : 0 ≤ ((1 : ℝ) / 2) ^ (K - n) := by positivity nlinarith have hprod := prod_one_sub_ge (Finset.range (n + 1)) (fun i => ((1 : ℝ) / 2) ^ (K - i)) (fun i _ => by positivity) (fun i _ => pow_le_one₀ (by norm_num) (by norm_num)) have h2K : (0 : ℝ) < (2 ^ K) ^ (n + 1) := by positivity nlinarith rw [div_le_iff₀ hDpos] have h2K : (2 : ℝ) ^ K * (1 / 2) ^ K = 1 := by rw [← mul_pow]; norm_num have e2 : 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ (n + 1) / 2) = (2 ^ K) ^ n := by rw [pow_succ] calc 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ n * 2 ^ K / 2) = (2 ^ K * (1 / 2) ^ K) * (2 ^ K) ^ n := by ring _ = (2 ^ K) ^ n := by rw [h2K, one_mul] calc ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := hN _ = 2 * (1 / 2) ^ K * ((2 ^ K) ^ (n + 1) / 2) := e2.symm _ ≤ 2 * (1 / 2) ^ K * ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by gcongr clear prod_one_sub_ge open Polynomial in have ineq_pow : ∀ (n : ℕ) (hn : 2 ≤ n), 9 * 81 ^ n ≤ 256 ^ n := by intro n hn induction n with | zero => omega | succ m ih => rcases (show m = 1 ∨ 2 ≤ m by omega) with rfl | hm · norm_num · have := ih hm rw [pow_succ, pow_succ] omega open Polynomial in have h4_big : ∀ (Qc : ℕ → ℕ → ℚ) (hQc : (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)))) (Qx : ℕ → ℚ) (hQx : (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)) (Aq : ℕ → ℚ) (hAq : (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))) (n : ℕ) (hn : 2 ≤ n), (0 : ℝ) < (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) ∧ ((Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ)) ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ (2 : ℝ) ^ (2 * n + 4) := by intro Qc hQc Qx hQx Aq hAq n hn have hS := h4_series Qc hQc Qx hQx Aq hAq n (by omega) set r := (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) with hr set x : ℝ := (3 : ℝ) / 2 ^ n with hxdef have hx0 : 0 < x := by positivity have hx2 : x / 2 ≤ 3 / 8 := by have : (4 : ℝ) ≤ 2 ^ n := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_le_div_iff₀ (by positivity) (by norm_num)]; linarith set G : ℕ → ℝ := fun K => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K else 0 with hG have hGnn : ∀ K, 0 ≤ G K := by intro K; simp only [hG] split_ifs with h · exact mul_nonneg (le_of_lt (nd_bound n K (by omega) (by omega)).1) (by positivity) · exact le_refl 0 have hGpos : 0 < G (2 * n + 1) := by simp only [hG]; rw [if_pos (by omega)] exact mul_pos (nd_bound n (2 * n + 1) (by omega) (by omega)).1 (by positivity) refine ⟨?_, ?_⟩ · exact hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS · set H : ℕ → ℝ := fun K => if 2 * n < K then 2 * (x / 2) ^ K else 0 with hH have hGH : ∀ K, G K ≤ H K := by intro K; simp only [hG, hH] split_ifs with h · have hb := (nd_bound n K (by omega) (by omega)).2 calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongr _ = 2 * (x / 2) ^ K := by ring · exact le_refl 0 have hq : x / 2 < 1 := by linarith have hHsum : HasSum H (2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹) := by rw [← hasSum_nat_add_iff' (2 * n + 1)] have hz : ∑ i ∈ Finset.range (2 * n + 1), H i = 0 := Finset.sum_eq_zero (fun i hi => by simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)]) rw [hz, sub_zero] have hgeo := (hasSum_geometric_of_lt_one (by positivity) hq).mul_left (2 * (x / 2) ^ (2 * n + 1)) have hfun : (fun s => H (s + (2 * n + 1))) = fun s => 2 * (x / 2) ^ (2 * n + 1) * (x / 2) ^ s := by funext s; simp only [hH]; rw [if_pos (by omega), pow_add]; ring rw [hfun] exact hgeo have hrle : r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hasSum_le hGH hS hHsum have hr0 : 0 ≤ r := le_of_lt (hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS) have hr8 : r ≤ 8 * (x / 2) ^ (2 * n + 1) := by have hinv : (1 - x / 2)⁻¹ ≤ 4 := by rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith have hp : 0 ≤ 2 * (x / 2) ^ (2 * n + 1) := by positivity calc r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hrle _ ≤ 2 * (x / 2) ^ (2 * n + 1) * 4 := by gcongr _ = 8 * (x / 2) ^ (2 * n + 1) := by ring have hsq : r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := pow_le_pow_left₀ hr0 hr8 2 have hnat : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by have e1 : (2 : ℕ) ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) = 2 ^ (4 * n * n) * (64 * 256 ^ n) := by rw [← pow_mul, ← pow_add, show (256 : ℕ) = 2 ^ 8 by norm_num, ← pow_mul, show (64 : ℕ) = 2 ^ 6 by norm_num, ← pow_add, ← pow_add] congr 1; ring have e2 : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) = 2 ^ (4 * n * n) * (64 * (9 * 81 ^ n)) := by rw [show (81 : ℕ) = 3 ^ 4 by norm_num, ← pow_mul, pow_add]; ring rw [e1, e2] have := ineq_pow n hn gcongr have hreal : (64 : ℝ) * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by exact_mod_cast hnat have hx2' : x / 2 = 3 / 2 ^ (n + 1) := by rw [hxdef, pow_succ]; field_simp have hsq' : r ^ 2 ≤ 64 * (x / 2) ^ (4 * n + 2) := by calc r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := hsq _ = 64 * (x / 2) ^ (4 * n + 2) := by ring have hkey : (x / 2) ^ (4 * n + 2) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 3 ^ (4 * n + 2) := by rw [← mul_pow, hx2', div_mul_cancel₀ _ (by positivity)] have hP : (0 : ℝ) < ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := by positivity have hmain : 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) := by refine le_of_mul_le_mul_right ?_ hP calc 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) := by rw [← hkey]; ring _ ≤ 2 ^ (2 * n + 4) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := hreal calc r ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ 64 * (x / 2) ^ (4 * n + 2) * 2 ^ (4 * n * n) := by gcongr _ ≤ 2 ^ (2 * n + 4) := hmain open Polynomial in clear h4_series nd_bound ineq_pow have T_facts : Summable (fun m : ℕ => (1 : ℝ) / (2 ^ (m + 3) - 3)) ∧ 0 < ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ∧ ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ 2 / 5 := by have h5 : ∀ m : ℕ, 5 * (2 : ℝ) ^ m ≤ 2 ^ (m + 3) - 3 := by intro m have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have e : (2 : ℝ) ^ (m + 3) = 8 * 2 ^ m := by rw [pow_add]; norm_num; ring rw [e]; linarith have hpos : ∀ m : ℕ, 0 < (2 : ℝ) ^ (m + 3) - 3 := fun m => by have := h5 m; have : (0 : ℝ) < 2 ^ m := by positivity linarith have hle : ∀ m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ (1 / 5) * (1 / 2) ^ m := by intro m have e : (1 / 5 : ℝ) * (1 / 2) ^ m = 1 / (5 * 2 ^ m) := by rw [one_div_pow]; field_simp rw [e] exact one_div_le_one_div_of_le (by positivity) (h5 m) have hs : Summable (fun m : ℕ => (1 : ℝ) / (2 ^ (m + 3) - 3)) := Summable.of_nonneg_of_le (fun m => le_of_lt (one_div_pos.mpr (hpos m))) hle (summable_geometric_two.mul_left (1 / 5)) refine ⟨hs, ?_, ?_⟩ · exact hs.tsum_pos (fun m => le_of_lt (one_div_pos.mpr (hpos m))) 0 (one_div_pos.mpr (hpos 0)) · calc ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ ∑' m : ℕ, (1 / 5 : ℝ) * (1 / 2) ^ m := hs.tsum_le_tsum hle (summable_geometric_two.mul_left (1 / 5)) _ = 2 / 5 := by rw [tsum_mul_left, tsum_geometric_two]; norm_num obtain ⟨_, hTpos, hTle⟩ := T_facts intro Qc hQc Qx hQx Aq hAq _ n match n with | 0 => have hQx0 : Qx 0 = 1 := by rw [hQx, hQc]; simp have hAq0 : Aq 0 = 0 := by rw [hAq]; simp rw [hQx0, hAq0] push_cast set T := ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) with hT refine ⟨by linarith, ?_⟩ have e : ((1 : ℝ) * (3 * T) - 0) ^ 2 * (2 : ℝ) ^ (4 * 0 * 0) = 9 * (T * T) := by ring rw [e] norm_num nlinarith | 1 => -- Qx 1 = 3 - 3/2 = 3/2 and Aq 1 = 3 * (3/2) + (3/2) * (3/(2-3)) = 0, so the remainder is (9/2) T. have hQx1 : Qx 1 = 3 / 2 := by rw [hQx, hQc]; norm_num [Finset.sum_range_succ, Finset.prod_range_succ] have hAq1 : Aq 1 = 0 := by rw [hAq]; simp only [hQx1]; rw [hQc] norm_num [Finset.sum_range_succ, Finset.prod_range_succ] rw [hQx1, hAq1] push_cast set T := ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) with hT refine ⟨by nlinarith, ?_⟩ norm_num nlinarith | n + 2 => exact h4_big Qc hQc Qx hQx Aq hAq (n + 2) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 15–724 at
879b5c03f7df↗hrem_all.id1_testhave∀ (n j : ℕ), j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withid1_test : ∀ (n j : ℕ), j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 43–54
have id1_test : ∀ (n j : ℕ) (hj : j ≤ n), (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - 1)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1) := by intro n j hj induction j with | zero => simp | succ j ih => have ih' := ih (by omega) rw [Finset.prod_range_succ, ← ih'] obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩ rw [hm, Finset.prod_range_succ, show n - (j + 1) = m by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 43–54 at
879b5c03f7df↗hrem_all.id1_test.s1case routine: simpLeaves
(∏ i ∈ Finset.range (0 : ℕ), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (0 : ℕ)), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withhj : (0 : ℕ) ≤ n.Uses library
Nat.zeroZero, the smallest natural number. .Lean, line 48
| zero => simp
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 48 at
879b5c03f7df↗hrem_all.id1_test.s2caseLeaves
(∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withj : ℕ,ih : j ≤ n → (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)),hj : j + (1 : ℕ) ≤ n.Uses library
Nat.succThe successor of a natural numbern. ,Finset.prod_range_succ.Lean, lines 49–54
| succ j ih => have ih' := ih (by omega) rw [Finset.prod_range_succ, ← ih'] obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩ rw [hm, Finset.prod_range_succ, show n - (j + 1) = m by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 49–54 at
879b5c03f7df↗hrem_all.id1_test.s2.ih'have(∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
(∏ i ∈ Finset.range (j + (1 : ℕ)), ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withih' : (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Lean, line 50
have ih' := ih (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 50 at
879b5c03f7df↗hrem_all.id1_test.s2.s2obtain∃ (m : ℕ), n - j = m + (1 : ℕ)Leaves
(∏ x ∈ Finset.range j, ((2 : ℚ) ^ (n - x) - (1 : ℚ))) * ((2 : ℚ) ^ (n - j) - (1 : ℚ)) * ∏ s ∈ Finset.range (n - (j + (1 : ℕ))), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withm : ℕ,hm : n - j = m + (1 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 52
obtain ⟨m, hm⟩ : ∃ m, n - j = m + 1 := ⟨n - j - 1, by omega⟩
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 52 at
879b5c03f7df↗
hrem_all.lower_testhave∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withlower_test : ∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_pow_eq_pow_sum,Finset.prod_range_reflect.Lean, lines 56–70
have lower_test : ∀ (j : ℕ), ∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ (j * (j - 1) / 2) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1) := by intro j have h1 : ∀ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ i * (2 ^ (j - 1 - i + 1) - 1) := by intro i hi have hi' := Finset.mem_range.mp hi rw [mul_sub, ← pow_add, show i + (j - 1 - i + 1) = j by omega] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, Finset.prod_range_reflect (fun s => ((2 : ℚ) ^ (s + 1) - 1)) j] congr 1 congr 1 have := Finset.sum_range_id_mul_two j omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 56–70 at
879b5c03f7df↗hrem_all.lower_test.h1have∀ i ∈ Finset.range j, (2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ))Leaves
∏ i ∈ Finset.range j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ i ∈ Finset.range j, (2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,mul_subAlias ofmul_sub_left_distrib. ,pow_add.Lean, lines 60–64
have h1 : ∀ i ∈ Finset.range j, ((2 : ℚ) ^ j - 2 ^ i) = 2 ^ i * (2 ^ (j - 1 - i + 1) - 1) := by intro i hi have hi' := Finset.mem_range.mp hi rw [mul_sub, ← pow_add, show i + (j - 1 - i + 1) = j by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 60–64 at
879b5c03f7df↗hrem_all.lower_test.h1.hi'havei < jLeaves
(2 : ℚ) ^ j - (2 : ℚ) ^ i = (2 : ℚ) ^ i * ((2 : ℚ) ^ (j - (1 : ℕ) - i + (1 : ℕ)) - (1 : ℚ)), withhi' : i < j.Uses library
Finset.mem_range.Lean, line 62
have hi' := Finset.mem_range.mp hi
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 62 at
879b5c03f7df↗
hrem_all.lower_test.thishave(∑ i ∈ Finset.range j, i) * (2 : ℕ) = j * (j - (1 : ℕ))Leaves
∑ i ∈ Finset.range j, i = j * (j - (1 : ℕ)) / (2 : ℕ), withthis : (∑ i ∈ Finset.range j, i) * (2 : ℕ) = j * (j - (1 : ℕ)).Uses library
Finset.sum_range_id_mul_twoGauss' summation formula .Lean, line 69
have := Finset.sum_range_id_mul_two j
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 69 at
879b5c03f7df↗
hrem_all.upper_testhave∀ (j n : ℕ), j ≤ n → ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withupper_test : ∀ (j n : ℕ), j ≤ n → ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_Ico_eq_prod_range,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_range,pow_mul.Lean, lines 72–84
have upper_test : ∀ (j n : ℕ) (hj : j ≤ n), ∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - 2 ^ i) = (-1) ^ (n - j) * 2 ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc j n = Finset.Ico (j + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show n + 1 - (j + 1) = n - j by omega] have h1 : ∀ t ∈ Finset.range (n - j), ((2 : ℚ) ^ j - 2 ^ (j + 1 + t)) = (-1) * 2 ^ j * (2 ^ (t + 1) - 1) := by intro t _ rw [show j + 1 + t = j + (t + 1) by ring, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 72–84 at
879b5c03f7df↗hrem_all.upper_test.ehaveFinset.Ioc j n = Finset.Ico (j + (1 : ℕ)) (n + (1 : ℕ))Leaves
∏ i ∈ Finset.Ioc j n, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withe : Finset.Ioc j n = Finset.Ico (j + (1 : ℕ)) (n + (1 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ioc,Finset.mem_Ico.Lean, lines 76–77
have e : Finset.Ioc j n = Finset.Ico (j + 1) (n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 76–77 at
879b5c03f7df↗hrem_all.upper_test.h1have∀ t ∈ Finset.range (n - j), (2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (t + (1 : ℕ)) - (1 : ℚ))Leaves
∏ k ∈ Finset.range (n - j), ((2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + k)) = (-1 : ℚ) ^ (n - j) * (2 : ℚ) ^ (j * (n - j)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ t ∈ Finset.range (n - j), (2 : ℚ) ^ j - (2 : ℚ) ^ (j + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (t + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_add.Lean, lines 79–82
have h1 : ∀ t ∈ Finset.range (n - j), ((2 : ℚ) ^ j - 2 ^ (j + 1 + t)) = (-1) * 2 ^ j * (2 ^ (t + 1) - 1) := by intro t _ rw [show j + 1 + t = j + (t + 1) by ring, pow_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 79–82 at
879b5c03f7df↗
hrem_all.rhs_testhave∀ (j n : ℕ), j ≤ n → (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withrhs_test : ∀ (j n : ℕ), j ≤ n → (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_Ico_eq_prod_range,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_range,pow_mul,Finset.prod_range_add.Lean, lines 86–102
have rhs_test : ∀ (j n : ℕ) (hj : j ≤ n), (∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1) = (-1) ^ n * 2 ^ (j * n) * ∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1) := by intro j n hj have e : Finset.Ioc n (2 * n) = Finset.Ico (n + 1) (2 * n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omega rw [e, Finset.prod_Ico_eq_prod_range, show 2 * n + 1 - (n + 1) = n by omega] have h1 : ∀ t ∈ Finset.range n, ((2 : ℚ) ^ j - 2 ^ (n + 1 + t)) = (-1) * 2 ^ j * (2 ^ ((n - j) + t + 1) - 1) := by intro t _ rw [show n + 1 + t = j + ((n - j) + t + 1) by omega, pow_add] ring rw [Finset.prod_congr rfl h1, Finset.prod_mul_distrib, Finset.prod_mul_distrib, Finset.prod_const, Finset.prod_const, Finset.card_range, ← pow_mul, show 2 * n - j = (n - j) + n by omega, Finset.prod_range_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 86–102 at
879b5c03f7df↗hrem_all.rhs_test.ehaveFinset.Ioc n ((2 : ℕ) * n) = Finset.Ico (n + (1 : ℕ)) ((2 : ℕ) * n + (1 : ℕ))Leaves
(∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withe : Finset.Ioc n ((2 : ℕ) * n) = Finset.Ico (n + (1 : ℕ)) ((2 : ℕ) * n + (1 : ℕ)).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Finset.mem_Ioc,Finset.mem_Ico.Lean, lines 91–92
have e : Finset.Ioc n (2 * n) = Finset.Ico (n + 1) (2 * n + 1) := by ext x; simp only [Finset.mem_Ioc, Finset.mem_Ico]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 91–92 at
879b5c03f7df↗hrem_all.rhs_test.h1have∀ t ∈ Finset.range n, (2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (n - j + t + (1 : ℕ)) - (1 : ℚ))Leaves
(∏ k ∈ Finset.range n, ((2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + k))) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)), withh1 : ∀ t ∈ Finset.range n, (2 : ℚ) ^ j - (2 : ℚ) ^ (n + (1 : ℕ) + t) = (-1 : ℚ) * (2 : ℚ) ^ j * ((2 : ℚ) ^ (n - j + t + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_add.Lean, lines 94–98
have h1 : ∀ t ∈ Finset.range n, ((2 : ℚ) ^ j - 2 ^ (n + 1 + t)) = (-1) * 2 ^ j * (2 ^ ((n - j) + t + 1) - 1) := by intro t _ rw [show n + 1 + t = j + ((n - j) + t + 1) by omega, pow_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 94–98 at
879b5c03f7df↗
hrem_all.id1_fullhave∀ (n j : ℕ), j ≤ n → (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withid1_full : ∀ (n j : ℕ), j ≤ n → (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.prod_union,mul_right_cancel₀,pow_add.Lean, lines 104–147
have id1_full : ∀ (n j : ℕ) (hj : j ≤ n), (((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ K ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ K) := by intro n j hj have hPne : ∀ m : ℕ, ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + 1) - 1) ≠ 0 := by intro m refine Finset.prod_ne_zero_iff.mpr (fun s _ => ?_) have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test n j hj] field_simp [hPne] have hG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test (2 * n - j) n (by omega), show 2 * n - j - n = n - j by omega] field_simp [hPne] have hsplit : (Finset.range (n + 1)).erase j = Finset.range j ∪ Finset.Ioc j n := by ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omega have hdisj : Disjoint (Finset.range j) (Finset.Ioc j n) := by rw [Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_range, Finset.mem_Ioc] at hx hx' omega have hR := rhs_test j n hj obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hj have hsign : (-1 : ℚ) ^ (j + m) = (-1) ^ j * (-1) ^ (j + m - j) := by rw [← pow_add]; congr 1; omega have ha : 2 * (j * (j - 1) / 2) = j * (j - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _) have hexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j) := by rw [show j + m - j = m by omega] rcases j with _ | i · simp · simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha] rw [hG1, hG2, hsplit, Finset.prod_union hdisj, lower_test, upper_test j (j + m) hj] apply mul_right_cancel₀ (hPne (j + m - j)) rw [hR, hsign, hexp, pow_add, pow_add, pow_add] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 104–147 at
879b5c03f7df↗hrem_all.id1_full.hPnehave∀ (m : ℕ), ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhPne : ∀ (m : ℕ), ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) ≠ (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_ne_zero_iff.Lean, lines 111–115
have hPne : ∀ m : ℕ, ∏ s ∈ Finset.range m, ((2 : ℚ) ^ (s + 1) - 1) ≠ 0 := by intro m refine Finset.prod_ne_zero_iff.mpr (fun s _ => ?_) have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 111–115 at
879b5c03f7df↗hrem_all.id1_full.hPne.thishave(1 : ℚ) < (2 : ℚ) ^ (s + (1 : ℕ))Leaves
(2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (s + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 114
have : (1 : ℚ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 114 at
879b5c03f7df↗
hrem_all.id1_full.hG1have∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_div_distrib.Lean, lines 116–120
have hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test n j hj] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 116–120 at
879b5c03f7df↗hrem_all.id1_full.hG2have∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_div_distrib.Lean, lines 121–125
have hG2 : ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (2 * n - j), ((2 : ℚ) ^ (s + 1) - 1)) / ((∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + 1) - 1)) * ∏ s ∈ Finset.range n, ((2 : ℚ) ^ (s + 1) - 1)) := by rw [Finset.prod_div_distrib, ← id1_test (2 * n - j) n (by omega), show 2 * n - j - n = n - j by omega] field_simp [hPne]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 121–125 at
879b5c03f7df↗hrem_all.id1_full.hsplithave(Finset.range (n + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j nLeaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhsplit : (Finset.range (n + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j n.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.mem_erase,Finset.mem_range,Finset.mem_union,Finset.mem_Ioc.Lean, lines 126–127
have hsplit : (Finset.range (n + 1)).erase j = Finset.range j ∪ Finset.Ioc j n := by ext x; simp only [Finset.mem_erase, Finset.mem_range, Finset.mem_union, Finset.mem_Ioc]; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 126–127 at
879b5c03f7df↗hrem_all.id1_full.hdisjhaveDisjoint (Finset.range j) (Finset.Ioc j n)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhdisj : Disjoint (Finset.range j) (Finset.Ioc j n).Uses library
DisjointTwo elements of a lattice are disjoint if their inf is the bottom element. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.disjoint_left,Finset.mem_range,Finset.mem_Ioc.Lean, lines 128–132
have hdisj : Disjoint (Finset.range j) (Finset.Ioc j n) := by rw [Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_range, Finset.mem_Ioc] at hx hx' omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 128–132 at
879b5c03f7df↗hrem_all.id1_full.hRhave(∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhR : (∏ K ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ n * (2 : ℚ) ^ (j * n) * ∏ s ∈ Finset.range ((2 : ℕ) * n - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Lean, line 133
have hR := rhs_test j n hj
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 133 at
879b5c03f7df↗hrem_all.id1_full.s7obtain∃ (k : ℕ), n = j + kLeaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withm : ℕ,hj : j ≤ j + m,hG1 : ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range (j + m), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range j, ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))),hG2 : ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)) = (∏ s ∈ Finset.range ((2 : ℕ) * (j + m) - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) / ((∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))) * ∏ s ∈ Finset.range (j + m), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ))),hsplit : (Finset.range (j + m + (1 : ℕ))).erase j = Finset.range j ∪ Finset.Ioc j (j + m),hdisj : Disjoint (Finset.range j) (Finset.Ioc j (j + m)),hR : (∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K)) * ∏ s ∈ Finset.range (j + m - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)) = (-1 : ℚ) ^ (j + m) * (2 : ℚ) ^ (j * (j + m)) * ∏ s ∈ Finset.range ((2 : ℕ) * (j + m) - j), ((2 : ℚ) ^ (s + (1 : ℕ)) - (1 : ℚ)).Uses library
Nat.exists_eq_add_of_le.Lean, line 134
obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hj
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 134 at
879b5c03f7df↗hrem_all.id1_full.hsignhave(-1 : ℚ) ^ (j + m) = (-1 : ℚ) ^ j * (-1 : ℚ) ^ (j + m - j)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhsign : (-1 : ℚ) ^ (j + m) = (-1 : ℚ) ^ j * (-1 : ℚ) ^ (j + m - j).Uses library
pow_add.Lean, lines 135–136
have hsign : (-1 : ℚ) ^ (j + m) = (-1) ^ j * (-1) ^ (j + m - j) := by rw [← pow_add]; congr 1; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 135–136 at
879b5c03f7df↗hrem_all.id1_full.hahave(2 : ℕ) * (j * (j - (1 : ℕ)) / (2 : ℕ)) = j * (j - (1 : ℕ))Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withha : (2 : ℕ) * (j * (j - (1 : ℕ)) / (2 : ℕ)) = j * (j - (1 : ℕ)).Uses library
Nat.two_mul_div_two_of_even,Nat.even_mul_pred_self.Lean, line 137
have ha : 2 * (j * (j - 1) / 2) = j * (j - 1) := Nat.two_mul_div_two_of_even (Nat.even_mul_pred_self _)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 137 at
879b5c03f7df↗hrem_all.id1_full.hexphavej * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j)Leaves
(((-1 : ℚ) ^ j * (2 : ℚ) ^ (j * (j - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range j, ((2 : ℚ) ^ (j + m - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range (j + m), ((2 : ℚ) ^ ((2 : ℕ) * (j + m) - j - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (j + m + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ K ∈ Finset.Ioc (j + m) ((2 : ℕ) * (j + m)), ((2 : ℚ) ^ j - (2 : ℚ) ^ K), withhexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j).Lean, lines 138–143
have hexp : j * (j + m) = j * (j - (1 : ℕ)) / (2 : ℕ) + j + j * (j - (1 : ℕ)) / (2 : ℕ) + j * (j + m - j) := by rw [show j + m - j = m by omega] rcases j with _ | i · simp · simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 138–143 at
879b5c03f7df↗hrem_all.id1_full.hexp.s1case routine: simpLeaves
(0 : ℕ) * ((0 : ℕ) + m) = (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) + (0 : ℕ) * ((0 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (0 : ℕ) * m.Lean, line 141
· simp
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 141 at
879b5c03f7df↗hrem_all.id1_full.hexp.s2case routine: simp, nlinarithLeaves
(i + (1 : ℕ)) * (i + (1 : ℕ) + m) = (i + (1 : ℕ)) * (i + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (i + (1 : ℕ)) + (i + (1 : ℕ)) * (i + (1 : ℕ) - (1 : ℕ)) / (2 : ℕ) + (i + (1 : ℕ)) * m.Uses library
Nat.add_sub_cancel.Lean, lines 142–143
· simp only [Nat.add_sub_cancel] at ha ⊢ nlinarith [ha]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 142–143 at
879b5c03f7df↗
hrem_all.lagr_evalhave∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withlagr_eval : ∀ (n : ℕ) (x : ℕ → ℚ), (∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) → ∀ (N : Polynomial ℚ), N.degree ≤ (↑n : WithBot ℕ) → ∀ (r : ℕ → ℚ), (∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N) → N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.CC ais the constant polynomiala. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq.Lean, lines 150–183
have lagr_eval : ∀ (n : ℕ) (x : ℕ → ℚ) (hx : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j) (N : ℚ[X]) (hNdeg : N.degree ≤ n) (r : ℕ → ℚ) (hr : ∀ j ≤ n, r j * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j)), N = ∑ j ∈ Finset.range (n + 1), C (r j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)) := by intro n x hx N hNdeg r hr have hinj : Set.InjOn x (Finset.range (n + 1) : Set ℕ) := by intro i hi j hj h simp only [Finset.coe_range, Set.mem_Iio] at hi hj exact hx i (by omega) j (by omega) h apply Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq ((Finset.range (n + 1)).image x) · rw [Finset.card_image_of_injOn hinj, Finset.card_range] refine lt_of_le_of_lt (Polynomial.degree_sub_le _ _) (max_lt ?_ ?_) · exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n) · refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self n · intro y hy obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega rw [← hr k hk', Polynomial.eval_finset_sum, Finset.sum_eq_single k] · simp [Polynomial.eval_prod] · intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero] · intro h; exact absurd hk htargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 150–183 at
879b5c03f7df↗hrem_all.lagr_eval.hinjhaveSet.InjOn x (↑(Finset.range (n + (1 : ℕ))) : Set ℕ)Leaves
N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)), withhinj : Set.InjOn x (↑(Finset.range (n + (1 : ℕ))) : Set ℕ).Uses library
Set.InjOnfis injective onsif the restriction offtosis injective. ,Finset.rangerange nis the set of natural numbers less thann. ,SetA set is a collection of elements of some typeα. ,Finset.coe_range,Set.mem_Iio.Lean, lines 155–158
have hinj : Set.InjOn x (Finset.range (n + 1) : Set ℕ) := by intro i hi j hj h simp only [Finset.coe_range, Set.mem_Iio] at hi hj exact hx i (by omega) j (by omega) htargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 155–158 at
879b5c03f7df↗hrem_all.lagr_eval.s2caseLeaves
(N - ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).degree < (↑(Finset.image x (Finset.range (n + (1 : ℕ)))).card : WithBot ℕ).Uses library
Finset.card_image_of_injOn,Finset.card_range,lt_of_le_of_lt,Polynomial.degree_sub_le,max_lt.Lean, lines 160–173
· rw [Finset.card_image_of_injOn hinj, Finset.card_range] refine lt_of_le_of_lt (Polynomial.degree_sub_le _ _) (max_lt ?_ ?_) · exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n) · refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self ntargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 160–173 at
879b5c03f7df↗hrem_all.lagr_eval.s2.s1caseLeaves
N.degree < (↑(n + (1 : ℕ)) : WithBot ℕ).Uses library
lt_of_le_of_lt,Nat.lt_succ_self.Lean, line 162
· exact lt_of_le_of_lt hNdeg (by exact_mod_cast Nat.lt_succ_self n)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 162 at
879b5c03f7df↗hrem_all.lagr_eval.s2.s2caseLeaves
(∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).degree < (↑(n + (1 : ℕ)) : WithBot ℕ).Uses library
lt_of_le_of_lt,Polynomial.degree_sum_le,Finset.sup_lt_iff,WithBot.bot_lt_coe,Polynomial.degree_mul_le,add_le_add,Polynomial.degree_C_le,Polynomial.degree_prod_le,zero_add,Nat.lt_succ_self.Lean, lines 163–173
· refine lt_of_le_of_lt (Polynomial.degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff (by exact WithBot.bot_lt_coe _)] intro j hj refine lt_of_le_of_lt (Polynomial.degree_mul_le _ _) ?_ refine lt_of_le_of_lt (add_le_add (Polynomial.degree_C_le) (Polynomial.degree_prod_le _ _)) ?_ have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simp rw [this, zero_add] exact_mod_cast Nat.lt_succ_self ntargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 163–173 at
879b5c03f7df↗hrem_all.lagr_eval.s2.s2.thishave∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree = (↑n : WithBot ℕ)Leaves
(0 : WithBot ℕ) + ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree < (↑(n + (1 : ℕ)) : WithBot ℕ), withthis : ∑ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).degree = (↑n : WithBot ℕ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,WithBotAttach⊥to a type. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.degree_X_sub_C,Finset.sum_const,Finset.card_erase_of_mem$\#(s \setminus \{a\}) = \#s - 1$ if $a \in s$. ,Finset.card_range,Nat.add_sub_cancel.Lean, lines 168–171
have : ∑ i ∈ (Finset.range (n + 1)).erase j, (X - C (x i)).degree = ((n : ℕ) : WithBot ℕ) := by rw [Finset.sum_congr rfl (fun i _ => Polynomial.degree_X_sub_C (x i)), Finset.sum_const, Finset.card_erase_of_mem hj, Finset.card_range, Nat.add_sub_cancel] simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 168–171 at
879b5c03f7df↗
hrem_all.lagr_eval.s3caseLeaves
∀ x_1 ∈ Finset.image x (Finset.range (n + (1 : ℕ))), Polynomial.eval x_1 N = Polynomial.eval x_1 (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).Uses library
Polynomial.eval_finset_sumAlias ofPolynomial.eval_finsetSum. ,Finset.sum_eq_single.Lean, lines 174–183
· intro y hy obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega rw [← hr k hk', Polynomial.eval_finset_sum, Finset.sum_eq_single k] · simp [Polynomial.eval_prod] · intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero] · intro h; exact absurd hk htargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 174–183 at
879b5c03f7df↗hrem_all.lagr_eval.s3.s1obtain∃ a ∈ Finset.range (n + (1 : ℕ)), x a = yLeaves
Polynomial.eval (x k) N = Polynomial.eval (x k) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))), withk : ℕ,hk : k ∈ Finset.range (n + (1 : ℕ)),hy : x k ∈ Finset.image x (Finset.range (n + (1 : ℕ))).Uses library
Finset.mem_image.Lean, line 175
obtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hy
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 175 at
879b5c03f7df↗hrem_all.lagr_eval.s3.hk'havek ≤ nLeaves
Polynomial.eval (x k) N = Polynomial.eval (x k) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (r j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))), withhk' : k ≤ n.Lean, line 176
have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 176 at
879b5c03f7df↗hrem_all.lagr_eval.s3.hk'.thishavek < n + (1 : ℕ)Leaves
k ≤ n, withthis : k < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 176
have hk' : k ≤ n := by have := Finset.mem_range.mp hk; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 176 at
879b5c03f7df↗
hrem_all.lagr_eval.s3.s3case routine: simpLeaves
r k * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (x k - x i) = Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r k) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).Uses library
Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod.Lean, line 178
· simp [Polynomial.eval_prod]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 178 at
879b5c03f7df↗hrem_all.lagr_eval.s3.s4caseLeaves
∀ b ∈ Finset.range (n + (1 : ℕ)), b ≠ k → Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r b) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase b, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) = (0 : ℚ).Uses library
Polynomial.eval_mul,Polynomial.eval_C,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Finset.prod_eq_zero,Finset.mem_erase,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,Ne.symm,MulZeroClass.mul_zeroZero is a right absorbing element for multiplication .Lean, lines 179–182
· intro j hj hjk simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X] rw [Finset.prod_eq_zero (i := k) (Finset.mem_erase.mpr ⟨Ne.symm hjk, hk⟩) (by ring), mul_zero]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 179–182 at
879b5c03f7df↗hrem_all.lagr_eval.s3.s5caseLeaves
k ∉ Finset.range (n + (1 : ℕ)) → Polynomial.eval (x k) ((Polynomial.C : ℚ → Polynomial ℚ) (r k) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase k, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) = (0 : ℚ).Uses library
absurdAnything follows from two contradictory hypotheses. .Lean, line 183
· intro h; exact absurd hk h
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 183 at
879b5c03f7df↗
hrem_all.tail_coeffhave∀ (n K : ℕ), n < K → ∀ (Qc : ℕ → ℕ → ℚ), (∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ L)) → ∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withtail_coeff : ∀ (n K : ℕ), n < K → ∀ (Qc : ℕ → ℕ → ℚ), (∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ L)) → ∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Polynomial.XXis the polynomial variable (aka indeterminate). ,Polynomial.CC ais the constant polynomiala. ,Polynomial.eval_finset_sumAlias ofPolynomial.eval_finsetSum. ,Finset.sum_div,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.eval_mul,Polynomial.eval_C,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Finset.mul_prod_eraseTaking a product overs : Finset ιis the same as multiplying the value on a single elementf aby the product ofs.erase a. .Lean, lines 185–237
have tail_coeff : ∀ (n K : ℕ) (hK : n < K) (Qc : ℕ → ℕ → ℚ) (hQc : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ L)), ∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) = (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℚ) ^ K - 2 ^ i) := by intro n K hK Qc hQc set x : ℕ → ℚ := fun i => (2 : ℚ) ^ i with hxdef have hxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j := by intro i _ j _ h have h' : (2 : ℚ) ^ i = 2 ^ j := h exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast h') have hxne : ∀ a b : ℕ, a ≠ b → (2 : ℚ) ^ a - 2 ^ b ≠ 0 := by intro a b hab h apply hab exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast (sub_eq_zero.mp h)) set N : ℚ[X] := ∏ L ∈ Finset.Ioc n (2 * n), (X - C ((2 : ℚ) ^ L)) with hN have hNdeg : N.degree ≤ n := by rw [hN, Polynomial.degree_prod] rw [Finset.sum_congr rfl (fun L _ => Polynomial.degree_X_sub_C ((2 : ℚ) ^ L)), Finset.sum_const, Nat.card_Ioc] simp omega have hr : ∀ j ≤ n, (Qc n j * 2 ^ j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j) := by intro j hj rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, hxdef] exact hQc j hj have hL := lagr_eval n x hxinj N hNdeg (fun j => Qc n j * 2 ^ j) hr have hev := congrArg (Polynomial.eval ((2 : ℚ) ^ K)) hL rw [Polynomial.eval_finset_sum] at hev have hNK : N.eval ((2 : ℚ) ^ K) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ K - 2 ^ L) := by rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C] have hD : ∏ i ∈ Finset.range (n + 1), ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp hi; omega)) rw [hNK] at hev rw [hev, Finset.sum_div] refine Finset.sum_congr rfl (fun j hj => ?_) have hjn : j < n + 1 := Finset.mem_range.mp hj have hne1 : (2 : ℚ) ^ K - 2 ^ j ≠ 0 := hxne K j (by omega) have hne2 : (2 : ℚ) ^ (K - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (K - j) := one_lt_pow₀ (by norm_num) (by omega) linarith simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, Polynomial.eval_sub, Polynomial.eval_X, hxdef] rw [← Finset.mul_prod_erase (Finset.range (n + 1)) (fun i => (2 : ℚ) ^ K - 2 ^ i) hj] have hE : ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp (Finset.mem_of_mem_erase hi); omega)) have hpow : (2 : ℚ) ^ K = 2 ^ j * 2 ^ (K - j) := by rw [← pow_add]; congr 1; omega field_simp rw [hpow] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 185–237 at
879b5c03f7df↗hrem_all.tail_coeff.hxinjhave∀ i ≤ n, ∀ j ≤ n, x i = x j → i = jLeaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j.Uses library
Nat.pow_right_injective,le_reflThe relation≤on a preorder is reflexive. .Lean, lines 192–195
have hxinj : ∀ i ≤ n, ∀ j ≤ n, x i = x j → i = j := by intro i _ j _ h have h' : (2 : ℚ) ^ i = 2 ^ j := h exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast h')targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 192–195 at
879b5c03f7df↗hrem_all.tail_coeff.hxinj.h'have(2 : ℚ) ^ i = (2 : ℚ) ^ jLeaves
i = j, withh' : (2 : ℚ) ^ i = (2 : ℚ) ^ j.Lean, line 194
have h' : (2 : ℚ) ^ i = 2 ^ j := h
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 194 at
879b5c03f7df↗
hrem_all.tail_coeff.hxnehave∀ (a b : ℕ), a ≠ b → (2 : ℚ) ^ a - (2 : ℚ) ^ b ≠ (0 : ℚ)Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhxne : ∀ (a b : ℕ), a ≠ b → (2 : ℚ) ^ a - (2 : ℚ) ^ b ≠ (0 : ℚ).Uses library
Nat.pow_right_injective,le_reflThe relation≤on a preorder is reflexive. ,sub_eq_zero.Lean, lines 196–199
have hxne : ∀ a b : ℕ, a ≠ b → (2 : ℚ) ^ a - 2 ^ b ≠ 0 := by intro a b hab h apply hab exact Nat.pow_right_injective (le_refl 2) (by exact_mod_cast (sub_eq_zero.mp h))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 196–199 at
879b5c03f7df↗hrem_all.tail_coeff.hNdeghaveN.degree ≤ (↑n : WithBot ℕ)Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhNdeg : N.degree ≤ (↑n : WithBot ℕ).Uses library
Polynomial.degree_prodThe degree of a product of polynomials is equal to the sum of the degrees, where the degree of the zero polynomial is ⊥. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Polynomial.degree_X_sub_C,Finset.sum_const,Nat.card_Ioc.Lean, lines 201–206
have hNdeg : N.degree ≤ n := by rw [hN, Polynomial.degree_prod] rw [Finset.sum_congr rfl (fun L _ => Polynomial.degree_X_sub_C ((2 : ℚ) ^ L)), Finset.sum_const, Nat.card_Ioc] simp omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 201–206 at
879b5c03f7df↗hrem_all.tail_coeff.hrhave∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) NLeaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhr : ∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (x j - x i) = Polynomial.eval (x j) N.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Polynomial.eval_C.Lean, lines 207–211
have hr : ∀ j ≤ n, (Qc n j * 2 ^ j) * ∏ i ∈ (Finset.range (n + 1)).erase j, (x j - x i) = N.eval (x j) := by intro j hj rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C, hxdef] exact hQc j hjtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 207–211 at
879b5c03f7df↗hrem_all.tail_coeff.hLhaveN = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhL : N = ∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)).Lean, line 212
have hL := lagr_eval n x hxinj N hNdeg (fun j => Qc n j * 2 ^ j) hr
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 212 at
879b5c03f7df↗hrem_all.tail_coeff.hevhavePolynomial.eval ((2 : ℚ) ^ K) N = Polynomial.eval ((2 : ℚ) ^ K) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i)))Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhev : Polynomial.eval ((2 : ℚ) ^ K) N = Polynomial.eval ((2 : ℚ) ^ K) (∑ j ∈ Finset.range (n + (1 : ℕ)), (Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))).Uses library
congrArgCongruence in the function argument: ifa₁ = a₂thenf a₁ = f a₂for any (nondependent) functionf. ,Polynomial.evaleval x pis the evaluation of the polynomialpatx.Lean, line 213
have hev := congrArg (Polynomial.eval ((2 : ℚ) ^ K)) hL
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 213 at
879b5c03f7df↗hrem_all.tail_coeff.hNKhavePolynomial.eval ((2 : ℚ) ^ K) N = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhNK : Polynomial.eval ((2 : ℚ) ^ K) N = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Polynomial.eval_prodPolynomial evaluation commutes withFinset.prod,Polynomial.eval_sub,Polynomial.eval_X,Polynomial.eval_C.Lean, lines 215–217
have hNK : N.eval ((2 : ℚ) ^ K) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ K - 2 ^ L) := by rw [hN, Polynomial.eval_prod] simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 215–217 at
879b5c03f7df↗hrem_all.tail_coeff.hDhave∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i) ≠ (0 : ℚ)Leaves
∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ K - (2 : ℚ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhD : ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i) ≠ (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_ne_zero_iff.Lean, lines 218–219
have hD : ∏ i ∈ Finset.range (n + 1), ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp hi; omega))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 218–219 at
879b5c03f7df↗hrem_all.tail_coeff.hD.thishavei < n + (1 : ℕ)Leaves
K ≠ i, withthis : i < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 219
Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp hi; omega))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 219 at
879b5c03f7df↗
hrem_all.tail_coeff.hjnhavej < n + (1 : ℕ)Leaves
Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = Polynomial.eval ((2 : ℚ) ^ K) ((Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhjn : j < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 223
have hjn : j < n + 1 := Finset.mem_range.mp hj
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 223 at
879b5c03f7df↗hrem_all.tail_coeff.hne1have(2 : ℚ) ^ K - (2 : ℚ) ^ j ≠ (0 : ℚ)Leaves
Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = Polynomial.eval ((2 : ℚ) ^ K) ((Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhne1 : (2 : ℚ) ^ K - (2 : ℚ) ^ j ≠ (0 : ℚ).Lean, line 224
have hne1 : (2 : ℚ) ^ K - 2 ^ j ≠ 0 := hxne K j (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 224 at
879b5c03f7df↗hrem_all.tail_coeff.hne2have(2 : ℚ) ^ (K - j) - (1 : ℚ) ≠ (0 : ℚ)Leaves
Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = Polynomial.eval ((2 : ℚ) ^ K) ((Polynomial.C : ℚ → Polynomial ℚ) (Qc n j * (2 : ℚ) ^ j) * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, (Polynomial.X - (Polynomial.C : ℚ → Polynomial ℚ) (x i))) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℚ) ^ K - (2 : ℚ) ^ i), withhne2 : (2 : ℚ) ^ (K - j) - (1 : ℚ) ≠ (0 : ℚ).Lean, lines 225–227
have hne2 : (2 : ℚ) ^ (K - j) - 1 ≠ 0 := by have : (1 : ℚ) < 2 ^ (K - j) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 225–227 at
879b5c03f7df↗hrem_all.tail_coeff.hne2.thishave(1 : ℚ) < (2 : ℚ) ^ (K - j)Leaves
(2 : ℚ) ^ (K - j) - (1 : ℚ) ≠ (0 : ℚ), withthis : (1 : ℚ) < (2 : ℚ) ^ (K - j).Uses library
one_lt_pow₀.Lean, line 226
have : (1 : ℚ) < 2 ^ (K - j) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 226 at
879b5c03f7df↗
hrem_all.tail_coeff.hEhave∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ i) ≠ (0 : ℚ)Leaves
Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (Qc n j * (2 : ℚ) ^ j * ∏ x ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ x)) / (((2 : ℚ) ^ K - (2 : ℚ) ^ j) * ∏ x ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ x)), withhE : ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ i) ≠ (0 : ℚ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_ne_zero_iff.Lean, lines 231–233
have hE : ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ K - 2 ^ i) ≠ 0 := Finset.prod_ne_zero_iff.mpr (fun i hi => hxne K i (by have := Finset.mem_range.mp (Finset.mem_of_mem_erase hi); omega))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 231–233 at
879b5c03f7df↗hrem_all.tail_coeff.hE.thishavei < n + (1 : ℕ)Leaves
K ≠ i, withthis : i < n + (1 : ℕ).Uses library
Finset.mem_range,Finset.mem_of_mem_erase.Lean, line 233
have := Finset.mem_range.mp (Finset.mem_of_mem_erase hi); omega))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 233 at
879b5c03f7df↗
hrem_all.tail_coeff.hpowhave(2 : ℚ) ^ K = (2 : ℚ) ^ j * (2 : ℚ) ^ (K - j)Leaves
Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ)) = (Qc n j * (2 : ℚ) ^ j * ∏ x ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ x)) / (((2 : ℚ) ^ K - (2 : ℚ) ^ j) * ∏ x ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ K - (2 : ℚ) ^ x)), withhpow : (2 : ℚ) ^ K = (2 : ℚ) ^ j * (2 : ℚ) ^ (K - j).Uses library
pow_add.Lean, line 234
have hpow : (2 : ℚ) ^ K = 2 ^ j * 2 ^ (K - j) := by rw [← pow_add]; congr 1; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 234 at
879b5c03f7df↗
hrem_all.tail3have∀ (n : ℕ), (1 : ℕ) ≤ n → ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withtail3 : ∀ (n : ℕ), (1 : ℕ) ≤ n → ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)).Uses library
tsum_congr.Lean, lines 240–304
have tail3 : ∀ (n : ℕ) (hn : 1 ≤ n), ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) = ∑' s : ℕ, ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) := by intro n hn set f : ℕ → ℕ → ℝ := fun m s => ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * ((1 : ℝ) / 2 ^ (s + 1)) ^ m with hf have key : ∀ m s, f m s = ((3 : ℝ) / 2 ^ (m + n + 1)) ^ (s + 1) := by intro m s simp only [hf] rw [div_pow, div_pow, div_pow, one_pow, ← pow_mul, ← pow_mul, ← pow_mul, show (m + n + 1) * (s + 1) = (n + 1) * (s + 1) + (s + 1) * m by ring, pow_add] field_simp exact pow_add _ _ _ have hpos : ∀ m s, 0 ≤ f m s := fun m s => by rw [key]; positivity have h4 : ∀ m : ℕ, (4 : ℝ) ≤ 2 ^ (m + n + 1) := by intro m calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have inner1 : ∀ m, HasSum (f m) ((3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by intro m have hr0 : 0 ≤ (3 : ℝ) / 2 ^ (m + n + 1) := by positivity have hr1 : (3 : ℝ) / 2 ^ (m + n + 1) < 1 := by rw [div_lt_one (by positivity)]; linarith [h4 m] have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left ((3 : ℝ) / 2 ^ (m + n + 1)) have hfun : f m = fun s => (3 : ℝ) / 2 ^ (m + n + 1) * ((3 : ℝ) / 2 ^ (m + n + 1)) ^ s := by funext s; rw [key]; ring have hne : (2 : ℝ) ^ (m + n + 1) - 3 ≠ 0 := by linarith [h4 m] have hne2 : (2 : ℝ) ^ (m + n + 1) ≠ 0 := by positivity have hval : (3 : ℝ) / (2 ^ (m + n + 1) - 3) = 3 / 2 ^ (m + n + 1) * (1 - 3 / 2 ^ (m + n + 1))⁻¹ := by field_simp rw [hfun, hval] exact hg have inner2 : ∀ s, HasSum (fun m => f m s) (((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1)) := by intro s have hr0 : 0 ≤ (1 : ℝ) / 2 ^ (s + 1) := by positivity have hr1 : (1 : ℝ) / 2 ^ (s + 1) < 1 := by rw [div_lt_one (by positivity)] exact one_lt_pow₀ (by norm_num) (by omega) have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left (((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1)) have hne : (2 : ℝ) ^ (s + 1) - 1 ≠ 0 := by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hval : ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) = ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * (1 - 1 / 2 ^ (s + 1))⁻¹ := by rw [div_pow, div_pow, ← pow_mul, ← pow_mul, show (n + 1) * (s + 1) = n * (s + 1) + (s + 1) by ring, pow_add] field_simp exact pow_add _ _ _ rw [hval] exact hg have hsum1 : Summable (fun m : ℕ => (3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have := h4 m; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring calc (3 : ℝ) / (2 ^ (m + n + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring have hU : Summable (Function.uncurry f) := by refine (summable_prod_of_nonneg (fun p => hpos p.1 p.2)).mpr ⟨fun m => (inner1 m).summable, ?_⟩ exact hsum1.congr (fun m => ((inner1 m).tsum_eq).symm) have hcomm := hU.tsum_comm' (fun m => (inner1 m).summable) (fun s => (inner2 s).summable) rw [show (∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3)) = ∑' m, ∑' s, f m s from tsum_congr (fun m => ((inner1 m).tsum_eq).symm)] rw [← hcomm] exact tsum_congr (fun s => (inner2 s).tsum_eq)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 240–304 at
879b5c03f7df↗hrem_all.tail3.keyhave∀ (m s : ℕ), f m s = ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ (s + (1 : ℕ))Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withkey : ∀ (m s : ℕ), f m s = ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ (s + (1 : ℕ)).Uses library
div_pow,one_pow,pow_mul,pow_add.Lean, lines 244–250
have key : ∀ m s, f m s = ((3 : ℝ) / 2 ^ (m + n + 1)) ^ (s + 1) := by intro m s simp only [hf] rw [div_pow, div_pow, div_pow, one_pow, ← pow_mul, ← pow_mul, ← pow_mul, show (m + n + 1) * (s + 1) = (n + 1) * (s + 1) + (s + 1) * m by ring, pow_add] field_simp exact pow_add _ _ _targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 244–250 at
879b5c03f7df↗hrem_all.tail3.hposhave∀ (m s : ℕ), (0 : ℝ) ≤ f m sLeaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withhpos : ∀ (m s : ℕ), (0 : ℝ) ≤ f m s.Lean, line 251
have hpos : ∀ m s, 0 ≤ f m s := fun m s => by rw [key]; positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 251 at
879b5c03f7df↗hrem_all.tail3.h4have∀ (m : ℕ), (4 : ℝ) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ))Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withh4 : ∀ (m : ℕ), (4 : ℝ) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ)).Lean, lines 252–255
have h4 : ∀ m : ℕ, (4 : ℝ) ≤ 2 ^ (m + n + 1) := by intro m calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 252–255 at
879b5c03f7df↗hrem_all.tail3.h4.s1calc(4 : ℝ) = (2 : ℝ) ^ (2 : ℕ)routine: norm_numCloses the goal.
Lean, line 254
calc (4 : ℝ) = 2 ^ 2 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 254 at
879b5c03f7df↗hrem_all.tail3.h4.s2calc(2 : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ))Closes the goal.
Uses library
pow_le_pow_right₀.Lean, line 255
_ ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 255 at
879b5c03f7df↗
hrem_all.tail3.inner1have∀ (m : ℕ), HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)))Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withinner1 : ∀ (m : ℕ), HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))).Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. .Lean, lines 256–270
have inner1 : ∀ m, HasSum (f m) ((3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by intro m have hr0 : 0 ≤ (3 : ℝ) / 2 ^ (m + n + 1) := by positivity have hr1 : (3 : ℝ) / 2 ^ (m + n + 1) < 1 := by rw [div_lt_one (by positivity)]; linarith [h4 m] have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left ((3 : ℝ) / 2 ^ (m + n + 1)) have hfun : f m = fun s => (3 : ℝ) / 2 ^ (m + n + 1) * ((3 : ℝ) / 2 ^ (m + n + 1)) ^ s := by funext s; rw [key]; ring have hne : (2 : ℝ) ^ (m + n + 1) - 3 ≠ 0 := by linarith [h4 m] have hne2 : (2 : ℝ) ^ (m + n + 1) ≠ 0 := by positivity have hval : (3 : ℝ) / (2 ^ (m + n + 1) - 3) = 3 / 2 ^ (m + n + 1) * (1 - 3 / 2 ^ (m + n + 1))⁻¹ := by field_simp rw [hfun, hval] exact hgtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 256–270 at
879b5c03f7df↗hrem_all.tail3.inner1.hr0have(0 : ℝ) ≤ (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))routine: positivityLeaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhr0 : (0 : ℝ) ≤ (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)).Lean, line 258
have hr0 : 0 ≤ (3 : ℝ) / 2 ^ (m + n + 1) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 258 at
879b5c03f7df↗hrem_all.tail3.inner1.hr1have(3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) < (1 : ℝ)Leaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhr1 : (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) < (1 : ℝ).Uses library
div_lt_one.Lean, lines 259–260
have hr1 : (3 : ℝ) / 2 ^ (m + n + 1) < 1 := by rw [div_lt_one (by positivity)]; linarith [h4 m]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 259–260 at
879b5c03f7df↗hrem_all.tail3.inner1.hghaveHasSum (fun (i : ℕ) => (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ i) ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((1 : ℝ) - (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)))⁻¹)Leaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhg : HasSum (fun (i : ℕ) => (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ i) ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((1 : ℝ) - (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)))⁻¹).Uses library
hasSum_geometric_of_lt_one.Lean, line 261
have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left ((3 : ℝ) / 2 ^ (m + n + 1))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 261 at
879b5c03f7df↗hrem_all.tail3.inner1.hfunhavef m = fun (s : ℕ) => (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ sLeaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhfun : f m = fun (s : ℕ) => (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ))) ^ s.Lean, lines 262–263
have hfun : f m = fun s => (3 : ℝ) / 2 ^ (m + n + 1) * ((3 : ℝ) / 2 ^ (m + n + 1)) ^ s := by funext s; rw [key]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 262–263 at
879b5c03f7df↗hrem_all.tail3.inner1.hnehave(2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ) ≠ (0 : ℝ)routine: linarithLeaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhne : (2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ) ≠ (0 : ℝ).Lean, line 264
have hne : (2 : ℝ) ^ (m + n + 1) - 3 ≠ 0 := by linarith [h4 m]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 264 at
879b5c03f7df↗hrem_all.tail3.inner1.hne2have(2 : ℝ) ^ (m + n + (1 : ℕ)) ≠ (0 : ℝ)routine: positivityLeaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhne2 : (2 : ℝ) ^ (m + n + (1 : ℕ)) ≠ (0 : ℝ).Lean, line 265
have hne2 : (2 : ℝ) ^ (m + n + 1) ≠ 0 := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 265 at
879b5c03f7df↗hrem_all.tail3.inner1.hvalhave(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((1 : ℝ) - (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)))⁻¹routine: field_simpLeaves
HasSum (f m) ((3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))), withhval : (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)) * ((1 : ℝ) - (3 : ℝ) / (2 : ℝ) ^ (m + n + (1 : ℕ)))⁻¹.Lean, lines 266–268
have hval : (3 : ℝ) / (2 ^ (m + n + 1) - 3) = 3 / 2 ^ (m + n + 1) * (1 - 3 / 2 ^ (m + n + 1))⁻¹ := by field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 266–268 at
879b5c03f7df↗
hrem_all.tail3.inner2have∀ (s : ℕ), HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)))Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withinner2 : ∀ (s : ℕ), HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))).Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. .Lean, lines 271–287
have inner2 : ∀ s, HasSum (fun m => f m s) (((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1)) := by intro s have hr0 : 0 ≤ (1 : ℝ) / 2 ^ (s + 1) := by positivity have hr1 : (1 : ℝ) / 2 ^ (s + 1) < 1 := by rw [div_lt_one (by positivity)] exact one_lt_pow₀ (by norm_num) (by omega) have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left (((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1)) have hne : (2 : ℝ) ^ (s + 1) - 1 ≠ 0 := by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hval : ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) = ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * (1 - 1 / 2 ^ (s + 1))⁻¹ := by rw [div_pow, div_pow, ← pow_mul, ← pow_mul, show (n + 1) * (s + 1) = n * (s + 1) + (s + 1) by ring, pow_add] field_simp exact pow_add _ _ _ rw [hval] exact hgtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 271–287 at
879b5c03f7df↗hrem_all.tail3.inner2.hr0have(0 : ℝ) ≤ (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ))routine: positivityLeaves
HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))), withhr0 : (0 : ℝ) ≤ (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)).Lean, line 273
have hr0 : 0 ≤ (1 : ℝ) / 2 ^ (s + 1) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 273 at
879b5c03f7df↗hrem_all.tail3.inner2.hr1have(1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)) < (1 : ℝ)Leaves
HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))), withhr1 : (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)) < (1 : ℝ).Uses library
div_lt_one,one_lt_pow₀.Lean, lines 274–276
have hr1 : (1 : ℝ) / 2 ^ (s + 1) < 1 := by rw [div_lt_one (by positivity)] exact one_lt_pow₀ (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 274–276 at
879b5c03f7df↗hrem_all.tail3.inner2.hghaveHasSum (fun (i : ℕ) => ((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ))) ^ i) (((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) - (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)))⁻¹)Leaves
HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))), withhg : HasSum (fun (i : ℕ) => ((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ))) ^ i) (((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) - (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)))⁻¹).Uses library
hasSum_geometric_of_lt_one.Lean, line 277
have hg := (hasSum_geometric_of_lt_one hr0 hr1).mul_left (((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 277 at
879b5c03f7df↗hrem_all.tail3.inner2.hnehave(2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ) ≠ (0 : ℝ)Leaves
HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))), withhne : (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ) ≠ (0 : ℝ).Lean, lines 278–280
have hne : (2 : ℝ) ^ (s + 1) - 1 ≠ 0 := by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 278–280 at
879b5c03f7df↗hrem_all.tail3.inner2.hne.thishave(1 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ))Leaves
(2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ) ≠ (0 : ℝ), withthis : (1 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 279
have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 279 at
879b5c03f7df↗
hrem_all.tail3.inner2.hvalhave((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)) = ((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) - (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)))⁻¹Leaves
HasSum (fun (m : ℕ) => f m s) (((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ))), withhval : ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)) = ((3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))) ^ (s + (1 : ℕ)) * ((1 : ℝ) - (1 : ℝ) / (2 : ℝ) ^ (s + (1 : ℕ)))⁻¹.Uses library
div_pow,pow_mul,pow_add.Lean, lines 281–285
have hval : ((3 : ℝ) / 2 ^ n) ^ (s + 1) / (2 ^ (s + 1) - 1) = ((3 : ℝ) / 2 ^ (n + 1)) ^ (s + 1) * (1 - 1 / 2 ^ (s + 1))⁻¹ := by rw [div_pow, div_pow, ← pow_mul, ← pow_mul, show (n + 1) * (s + 1) = n * (s + 1) + (s + 1) by ring, pow_add] field_simp exact pow_add _ _ _targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 281–285 at
879b5c03f7df↗
hrem_all.tail3.hsum1haveSummable fun (m : ℕ) => (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withhsum1 : Summable fun (m : ℕ) => (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Summable.of_nonneg_of_leComparison test of convergence of series of non-negative real numbers. ,summable_geometric_two.Lean, lines 288–296
have hsum1 : Summable (fun m : ℕ => (3 : ℝ) / (2 ^ (m + n + 1) - 3)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have := h4 m; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring calc (3 : ℝ) / (2 ^ (m + n + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 288–296 at
879b5c03f7df↗hrem_all.tail3.hsum1.s1caseLeaves
(0 : ℝ) ≤ (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)).Uses library
div_nonneg.Lean, line 290
· have := h4 m; exact div_nonneg (by norm_num) (by linarith)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 290 at
879b5c03f7df↗hrem_all.tail3.hsum1.s1.thishave(4 : ℝ) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ))Leaves
(0 : ℝ) ≤ (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withthis : (4 : ℝ) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ)).Lean, line 290
· have := h4 m; exact div_nonneg (by norm_num) (by linarith)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 290 at
879b5c03f7df↗
hrem_all.tail3.hsum1.s2caseLeaves
(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m.Lean, lines 291–296
· have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring calc (3 : ℝ) / (2 ^ (m + n + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 291–296 at
879b5c03f7df↗hrem_all.tail3.hsum1.s2.hpowhave(2 : ℝ) ^ (m + (2 : ℕ)) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ))Leaves
(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withhpow : (2 : ℝ) ^ (m + (2 : ℕ)) ≤ (2 : ℝ) ^ (m + n + (1 : ℕ)).Uses library
pow_le_pow_right₀.Lean, line 291
· have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + n + 1) := pow_le_pow_right₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 291 at
879b5c03f7df↗hrem_all.tail3.hsum1.s2.h1have(1 : ℝ) ≤ (2 : ℝ) ^ mLeaves
(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withh1 : (1 : ℝ) ≤ (2 : ℝ) ^ m.Uses library
one_le_pow₀.Lean, line 292
have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 292 at
879b5c03f7df↗hrem_all.tail3.hsum1.s2.h2have(2 : ℝ) ^ (m + (2 : ℕ)) = (4 : ℝ) * (2 : ℝ) ^ mLeaves
(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withh2 : (2 : ℝ) ^ (m + (2 : ℕ)) = (4 : ℝ) * (2 : ℝ) ^ m.Uses library
pow_add.Lean, line 293
have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 293 at
879b5c03f7df↗hrem_all.tail3.hsum1.s2.s4calc(3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) / (2 : ℝ) ^ mCloses the goal.
Uses library
div_le_div_of_nonneg_left.Lean, lines 294–295
calc (3 : ℝ) / (2 ^ (m + n + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 294–295 at
879b5c03f7df↗hrem_all.tail3.hsum1.s2.s5calcCloses the goal.
Uses library
one_div_pow.Lean, line 296
_ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 296 at
879b5c03f7df↗
hrem_all.tail3.hUhaveSummable (Function.uncurry f)Leaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withhU : Summable (Function.uncurry f).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Function.uncurryTransforms a two-parameter function into an equivalent function from pairs. ,summable_prod_of_nonneg,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 297–299
have hU : Summable (Function.uncurry f) := by refine (summable_prod_of_nonneg (fun p => hpos p.1 p.2)).mpr ⟨fun m => (inner1 m).summable, ?_⟩ exact hsum1.congr (fun m => ((inner1 m).tsum_eq).symm)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 297–299 at
879b5c03f7df↗hrem_all.tail3.hcommhave∑' (c : ℕ) (b : ℕ), f b c = ∑' (b : ℕ) (c : ℕ), f b cLeaves
∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (s : ℕ), ((3 : ℝ) / (2 : ℝ) ^ n) ^ (s + (1 : ℕ)) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)), withhcomm : ∑' (c : ℕ) (b : ℕ), f b c = ∑' (b : ℕ) (c : ℕ), f b c.Lean, line 300
have hcomm := hU.tsum_comm' (fun m => (inner1 m).summable) (fun s => (inner2 s).summable)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 300 at
879b5c03f7df↗
hrem_all.split3Thave∀ (n : ℕ), (3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withsplit3T : ∀ (n : ℕ), (3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,zero_add.Lean, lines 306–344
have split3T : ∀ (n : ℕ), 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) + ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) := by intro n set g : ℕ → ℝ := fun m => (3 : ℝ) / (2 ^ (m + 1) - 3) with hg have hsum : Summable (fun m => g (m + 1)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have : (4 : ℝ) ≤ 2 ^ (m + 1 + 1) := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega) simp only [hg]; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + 1 + 1) := le_of_eq (by ring_nf) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring simp only [hg] calc (3 : ℝ) / (2 ^ (m + 1 + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring have hs : Summable g := (summable_nat_add_iff 1).mp hsum have e1 := hs.sum_add_tsum_nat_add n have e2 := hs.sum_add_tsum_nat_add 2 have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑' m, g (m + 2) := by rw [← tsum_mul_left] refine tsum_congr (fun m => ?_) simp only [hg] rw [show m + 2 + 1 = m + 3 by ring] ring have hfirst : ∑ i ∈ Finset.range 2, g i = 0 := by simp only [hg, Finset.sum_range_succ, Finset.sum_range_zero] norm_num rw [h3T] have htail : ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) = ∑' m, g (m + n) := by refine tsum_congr (fun m => ?_) simp only [hg] rw [htail] have hrange : ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) = ∑ i ∈ Finset.range n, g i := by simp only [hg] rw [hrange, e1] rw [← e2, hfirst, zero_add]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 306–344 at
879b5c03f7df↗hrem_all.split3T.hsumhaveSummable fun (m : ℕ) => g (m + (1 : ℕ))Leaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withhsum : Summable fun (m : ℕ) => g (m + (1 : ℕ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Summable.of_nonneg_of_leComparison test of convergence of series of non-negative real numbers. ,summable_geometric_two.Lean, lines 311–323
have hsum : Summable (fun m => g (m + 1)) := by refine Summable.of_nonneg_of_le (fun m => ?_) (fun m => ?_) ((summable_geometric_two).mul_left 3) · have : (4 : ℝ) ≤ 2 ^ (m + 1 + 1) := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega) simp only [hg]; exact div_nonneg (by norm_num) (by linarith) · have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + 1 + 1) := le_of_eq (by ring_nf) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring simp only [hg] calc (3 : ℝ) / (2 ^ (m + 1 + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 311–323 at
879b5c03f7df↗hrem_all.split3T.hsum.s1caseLeaves
(0 : ℝ) ≤ g (m + (1 : ℕ)).Uses library
div_nonneg.Lean, lines 313–316
· have : (4 : ℝ) ≤ 2 ^ (m + 1 + 1) := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega) simp only [hg]; exact div_nonneg (by norm_num) (by linarith)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 313–316 at
879b5c03f7df↗hrem_all.split3T.hsum.s1.thishave(4 : ℝ) ≤ (2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ))Leaves
(0 : ℝ) ≤ g (m + (1 : ℕ)), withthis : (4 : ℝ) ≤ (2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ)).Lean, lines 313–315
· have : (4 : ℝ) ≤ 2 ^ (m + 1 + 1) := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 313–315 at
879b5c03f7df↗hrem_all.split3T.hsum.s1.this.s1calc(4 : ℝ) = (2 : ℝ) ^ (2 : ℕ)routine: norm_numCloses the goal.
Lean, line 314
calc (4 : ℝ) = 2 ^ 2 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 314 at
879b5c03f7df↗hrem_all.split3T.hsum.s1.this.s2calc(2 : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ))Closes the goal.
Uses library
pow_le_pow_right₀.Lean, line 315
_ ≤ 2 ^ (m + 1 + 1) := pow_le_pow_right₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 315 at
879b5c03f7df↗
hrem_all.split3T.hsum.s2caseLeaves
g (m + (1 : ℕ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m.Lean, lines 317–323
· have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + 1 + 1) := le_of_eq (by ring_nf) have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring simp only [hg] calc (3 : ℝ) / (2 ^ (m + 1 + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) _ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 317–323 at
879b5c03f7df↗hrem_all.split3T.hsum.s2.hpowhave(2 : ℝ) ^ (m + (2 : ℕ)) ≤ (2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ))Leaves
g (m + (1 : ℕ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withhpow : (2 : ℝ) ^ (m + (2 : ℕ)) ≤ (2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ)).Uses library
le_of_eq.Lean, line 317
· have hpow : (2 : ℝ) ^ (m + 2) ≤ 2 ^ (m + 1 + 1) := le_of_eq (by ring_nf)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 317 at
879b5c03f7df↗hrem_all.split3T.hsum.s2.h1have(1 : ℝ) ≤ (2 : ℝ) ^ mLeaves
g (m + (1 : ℕ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withh1 : (1 : ℝ) ≤ (2 : ℝ) ^ m.Uses library
one_le_pow₀.Lean, line 318
have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 318 at
879b5c03f7df↗hrem_all.split3T.hsum.s2.h2have(2 : ℝ) ^ (m + (2 : ℕ)) = (4 : ℝ) * (2 : ℝ) ^ mLeaves
g (m + (1 : ℕ)) ≤ (3 : ℝ) * (1 / 2 : ℝ) ^ m, withh2 : (2 : ℝ) ^ (m + (2 : ℕ)) = (4 : ℝ) * (2 : ℝ) ^ m.Uses library
pow_add.Lean, line 319
have h2 : (2 : ℝ) ^ (m + 2) = 4 * 2 ^ m := by rw [pow_add]; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 319 at
879b5c03f7df↗hrem_all.split3T.hsum.s2.s4calc(3 : ℝ) / ((2 : ℝ) ^ (m + (1 : ℕ) + (1 : ℕ)) - (3 : ℝ)) ≤ (3 : ℝ) / (2 : ℝ) ^ mCloses the goal.
Uses library
div_le_div_of_nonneg_left.Lean, lines 321–322
calc (3 : ℝ) / (2 ^ (m + 1 + 1) - 3) ≤ 3 / 2 ^ m := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 321–322 at
879b5c03f7df↗hrem_all.split3T.hsum.s2.s5calcCloses the goal.
Uses library
one_div_pow.Lean, line 323
_ = 3 * (1 / 2) ^ m := by rw [one_div_pow]; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 323 at
879b5c03f7df↗
hrem_all.split3T.hshaveSummable gLeaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withhs : Summable g.Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,summable_nat_add_iff.Lean, line 324
have hs : Summable g := (summable_nat_add_iff 1).mp hsum
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 324 at
879b5c03f7df↗hrem_all.split3T.e1have∑ i ∈ Finset.range n, g i + ∑' (i : ℕ), g (i + n) = ∑' (i : ℕ), g iLeaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withe1 : ∑ i ∈ Finset.range n, g i + ∑' (i : ℕ), g (i + n) = ∑' (i : ℕ), g i.Lean, line 325
have e1 := hs.sum_add_tsum_nat_add n
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 325 at
879b5c03f7df↗hrem_all.split3T.e2have∑ i ∈ Finset.range (2 : ℕ), g i + ∑' (i : ℕ), g (i + (2 : ℕ)) = ∑' (i : ℕ), g iLeaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withe2 : ∑ i ∈ Finset.range (2 : ℕ), g i + ∑' (i : ℕ), g (i + (2 : ℕ)) = ∑' (i : ℕ), g i.Lean, line 326
have e2 := hs.sum_add_tsum_nat_add 2
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 326 at
879b5c03f7df↗hrem_all.split3T.h3Thave(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑' (m : ℕ), g (m + (2 : ℕ))Leaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withh3T : (3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑' (m : ℕ), g (m + (2 : ℕ)).Uses library
tsum_mul_left,tsum_congr.Lean, lines 327–332
have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑' m, g (m + 2) := by rw [← tsum_mul_left] refine tsum_congr (fun m => ?_) simp only [hg] rw [show m + 2 + 1 = m + 3 by ring] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 327–332 at
879b5c03f7df↗hrem_all.split3T.hfirsthave∑ i ∈ Finset.range (2 : ℕ), g i = (0 : ℝ)routine: simp, norm_numLeaves
(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withhfirst : ∑ i ∈ Finset.range (2 : ℕ), g i = (0 : ℝ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_range_succ,Finset.sum_range_zero.Lean, lines 333–335
have hfirst : ∑ i ∈ Finset.range 2, g i = 0 := by simp only [hg, Finset.sum_range_succ, Finset.sum_range_zero] norm_numtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 333–335 at
879b5c03f7df↗hrem_all.split3T.htailhave∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (m : ℕ), g (m + n)Leaves
∑' (m : ℕ), g (m + (2 : ℕ)) = (Finset.range n).sum g + ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)), withhtail : ∑' (m : ℕ), (3 : ℝ) / ((2 : ℝ) ^ (m + n + (1 : ℕ)) - (3 : ℝ)) = ∑' (m : ℕ), g (m + n).Uses library
tsum_congr.Lean, lines 337–339
have htail : ∑' m : ℕ, (3 : ℝ) / (2 ^ (m + n + 1) - 3) = ∑' m, g (m + n) := by refine tsum_congr (fun m => ?_) simp only [hg]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 337–339 at
879b5c03f7df↗hrem_all.split3T.hrangehave∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) = ∑ i ∈ Finset.range n, g iroutine: simpLeaves
∑' (m : ℕ), g (m + (2 : ℕ)) = (Finset.range n).sum g + ∑' (m : ℕ), g (m + n), withhrange : ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) = ∑ i ∈ Finset.range n, g i.Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 341–342
have hrange : ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) = ∑ i ∈ Finset.range n, g i := by simp only [hg]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 341–342 at
879b5c03f7df↗
hrem_all.cauchy_finhave∀ (n : ℕ) (q a : ℕ → ℝ) (x A : ℝ), HasSum (fun (s : ℕ) => a s * x ^ (s + (1 : ℕ))) A → HasSum (fun (K : ℕ) => ∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then q j * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), q j * x ^ j) * A)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withcauchy_fin : ∀ (n : ℕ) (q a : ℕ → ℝ) (x A : ℝ), HasSum (fun (s : ℕ) => a s * x ^ (s + (1 : ℕ))) A → HasSum (fun (K : ℕ) => ∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then q j * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), q j * x ^ j) * A).Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. ,Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_mul,hasSum_sum,hasSum_nat_add_iff',sub_zero.Lean, lines 346–366
have cauchy_fin : ∀ (n : ℕ) (q a : ℕ → ℝ) (x A : ℝ) (hA : HasSum (fun s => a s * x ^ (s + 1)) A), HasSum (fun K => ∑ j ∈ Finset.range (n + 1), if j < K then q j * a (K - j - 1) * x ^ K else 0) ((∑ j ∈ Finset.range (n + 1), q j * x ^ j) * A) := by intro n q a x A hA rw [Finset.sum_mul] apply hasSum_sum intro j _ have h := hA.mul_left (q j * x ^ j) rw [← hasSum_nat_add_iff' (j + 1)] have hz : ∑ i ∈ Finset.range (j + 1), (if j < i then q j * a (i - j - 1) * x ^ i else 0) = 0 := Finset.sum_eq_zero (fun i hi => by have := Finset.mem_range.mp hi rw [if_neg (by omega)]) rw [hz, sub_zero] have hfun : (fun s => if j < s + (j + 1) then q j * a (s + (j + 1) - j - 1) * x ^ (s + (j + 1)) else 0) = fun s => q j * x ^ j * (a s * x ^ (s + 1)) := by funext s rw [if_pos (by omega), show s + (j + 1) - j - 1 = s by omega, show s + (j + 1) = j + (s + 1) by ring, pow_add] ring rw [hfun] exact htargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 346–366 at
879b5c03f7df↗hrem_all.cauchy_fin.hhaveHasSum (fun (i : ℕ) => q j * x ^ j * (a i * x ^ (i + (1 : ℕ)))) (q j * x ^ j * A)Leaves
HasSum (fun (b : ℕ) => if j < b then q j * a (b - j - (1 : ℕ)) * x ^ b else (0 : ℝ)) (q j * x ^ j * A), withh : HasSum (fun (i : ℕ) => q j * x ^ j * (a i * x ^ (i + (1 : ℕ)))) (q j * x ^ j * A).Lean, line 353
have h := hA.mul_left (q j * x ^ j)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 353 at
879b5c03f7df↗hrem_all.cauchy_fin.hzhave(∑ i ∈ Finset.range (j + (1 : ℕ)), if j < i then q j * a (i - j - (1 : ℕ)) * x ^ i else (0 : ℝ)) = (0 : ℝ)Leaves
HasSum (fun (n : ℕ) => if j < n + (j + (1 : ℕ)) then q j * a (n + (j + (1 : ℕ)) - j - (1 : ℕ)) * x ^ (n + (j + (1 : ℕ))) else (0 : ℝ)) (q j * x ^ j * A - ∑ i ∈ Finset.range (j + (1 : ℕ)), if j < i then q j * a (i - j - (1 : ℕ)) * x ^ i else (0 : ℝ)), withhz : (∑ i ∈ Finset.range (j + (1 : ℕ)), if j < i then q j * a (i - j - (1 : ℕ)) * x ^ i else (0 : ℝ)) = (0 : ℝ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_eq_zero,if_neg.Lean, lines 355–358
have hz : ∑ i ∈ Finset.range (j + 1), (if j < i then q j * a (i - j - 1) * x ^ i else 0) = 0 := Finset.sum_eq_zero (fun i hi => by have := Finset.mem_range.mp hi rw [if_neg (by omega)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 355–358 at
879b5c03f7df↗hrem_all.cauchy_fin.hz.thishavei < j + (1 : ℕ)Leaves
(if j < i then q j * a (i - j - (1 : ℕ)) * x ^ i else (0 : ℝ)) = (0 : ℝ), withthis : i < j + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 357
have := Finset.mem_range.mp hi
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 357 at
879b5c03f7df↗
hrem_all.cauchy_fin.hfunhave(fun (s : ℕ) => if j < s + (j + (1 : ℕ)) then q j * a (s + (j + (1 : ℕ)) - j - (1 : ℕ)) * x ^ (s + (j + (1 : ℕ))) else (0 : ℝ)) = fun (s : ℕ) => q j * x ^ j * (a s * x ^ (s + (1 : ℕ)))Leaves
HasSum (fun (n : ℕ) => if j < n + (j + (1 : ℕ)) then q j * a (n + (j + (1 : ℕ)) - j - (1 : ℕ)) * x ^ (n + (j + (1 : ℕ))) else (0 : ℝ)) (q j * x ^ j * A), withhfun : (fun (s : ℕ) => if j < s + (j + (1 : ℕ)) then q j * a (s + (j + (1 : ℕ)) - j - (1 : ℕ)) * x ^ (s + (j + (1 : ℕ))) else (0 : ℝ)) = fun (s : ℕ) => q j * x ^ j * (a s * x ^ (s + (1 : ℕ))).Uses library
if_pos,pow_add.Lean, lines 360–364
have hfun : (fun s => if j < s + (j + 1) then q j * a (s + (j + 1) - j - 1) * x ^ (s + (j + 1)) else 0) = fun s => q j * x ^ j * (a s * x ^ (s + 1)) := by funext s rw [if_pos (by omega), show s + (j + 1) - j - 1 = s by omega, show s + (j + 1) = j + (s + 1) by ring, pow_add] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 360–364 at
879b5c03f7df↗
hrem_all.h4_serieshave∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), (1 : ℕ) ≤ n → HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withh4_series : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), (1 : ℕ) ≤ n → HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, lines 368–487
have h4_series : ∀ (Qc : ℕ → ℕ → ℚ) (hQc : (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)))) (Qx : ℕ → ℚ) (hQx : (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)) (Aq : ℕ → ℚ) (hAq : (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))) (n : ℕ) (hn : 1 ≤ n), HasSum (fun K : ℕ => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * ((3 : ℝ) / 2 ^ n) ^ K else 0) ((Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ)) := by intro Qc hQc Qx hQx Aq hAq n hn set x : ℝ := (3 : ℝ) / 2 ^ n with hxdef have hx0 : 0 ≤ x := by positivity have hx2 : x / 2 < 1 := by have : (2 : ℝ) ≤ 2 ^ n := by calc (2 : ℝ) = 2 ^ 1 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_lt_one (by positivity)]; linarith set a : ℕ → ℝ := fun s => (1 : ℝ) / (2 ^ (s + 1) - 1) with hadef have hapos : ∀ s, 0 < (2 : ℝ) ^ (s + 1) - 1 := fun s => by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarith have hAsum : Summable (fun s => a s * x ^ (s + 1)) := by refine Summable.of_nonneg_of_le (fun s => ?_) (fun s => ?_) ((summable_geometric_of_lt_one (by positivity) hx2).mul_left x) · simp only [hadef]; exact mul_nonneg (div_nonneg (by norm_num) (le_of_lt (hapos s))) (by positivity) · simp only [hadef] have h1 : (2 : ℝ) ^ s ≤ 2 ^ (s + 1) - 1 := by have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num) rw [pow_succ]; linarith have hxs : 0 ≤ x ^ (s + 1) := by positivity calc 1 / (2 ^ (s + 1) - 1) * x ^ (s + 1) ≤ 1 / 2 ^ s * x ^ (s + 1) := by gcongr _ = x * (x / 2) ^ s := by have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simp exact e x set A := ∑' s, a s * x ^ (s + 1) with hAdef have hA : HasSum (fun s => a s * x ^ (s + 1)) A := hAsum.hasSum -- 3T = c + A have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) + A := by rw [split3T n, tail3 n hn, hAdef] congr 1 refine tsum_congr (fun s => ?_) simp only [hadef, hxdef] ring have hQxR : (Qx n : ℝ) = ∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j := by rw [hQx]; push_cast; rfl have hAqR : (Aq n : ℝ) = ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (k - j) - 1)) * x ^ k + (Qx n : ℝ) * ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) := by rw [hAq]; push_cast; rfl have hC := cauchy_fin n (fun j => (Qc n j : ℝ)) a x A hA set P : ℝ := ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (k - j) - 1)) * x ^ k with hPdef have hP : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) P := by have h0 : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := hasSum_sum_of_ne_finset_zero (fun b hb => by rw [if_neg (by simpa using hb)]) have h1 : (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) = P := by rw [hPdef] exact Finset.sum_congr rfl (fun K hK => by rw [if_pos (Finset.mem_range.mp hK)]) rw [h1] at h0 exact h0 have hD := hC.sub hP have hval : (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) = (∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j) * A - P := by rw [h3T, hAqR, hQxR]; ring rw [hval] have hid1 : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ L) := fun j hj => by subst hQc; exact id1_full n j hj have hfun : (fun K : ℕ => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * ((3 : ℝ) / 2 ^ n) ^ K else 0) = fun K => (∑ j ∈ Finset.range (n + 1), if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) - (if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := by funext K symm by_cases hK : K < n + 1 · rw [if_pos hK, if_neg (by omega)] rw [Finset.sum_range_succ (fun j => (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) K, Nat.sub_self, pow_zero, sub_self, div_zero, add_zero] have hsplit : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ∑ j ∈ Finset.range K, (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1) * x ^ K := by rw [← Finset.sum_range_add_sum_Ico _ (show K ≤ n + 1 by omega)] rw [Finset.sum_eq_zero (s := Finset.Ico K (n + 1)) (fun j hj => by rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK := Finset.mem_range.mp hj rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hsplit, Finset.sum_mul, sub_self] · rw [if_neg hK, sub_zero] have hS : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ((∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) : ℚ) : ℝ) * x ^ K := by push_cast rw [Finset.sum_mul] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK : j < K := by have := Finset.mem_range.mp hj; omega rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hS, tail_coeff n K (by omega) Qc hid1] push_cast by_cases h2 : 2 * n < K · rw [if_pos h2] · rw [if_neg h2] rw [Finset.prod_eq_zero (i := K) (Finset.mem_Ioc.mpr ⟨by omega, by omega⟩) (sub_self _)] simp rw [hfun] exact hDtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 368–487 at
879b5c03f7df↗hrem_all.h4_series.hx0have(0 : ℝ) ≤ xroutine: positivityLeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhx0 : (0 : ℝ) ≤ x.Lean, line 383
have hx0 : 0 ≤ x := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 383 at
879b5c03f7df↗hrem_all.h4_series.hx2havex / (2 : ℝ) < (1 : ℝ)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhx2 : x / (2 : ℝ) < (1 : ℝ).Uses library
div_div,div_lt_one.Lean, lines 384–388
have hx2 : x / 2 < 1 := by have : (2 : ℝ) ≤ 2 ^ n := by calc (2 : ℝ) = 2 ^ 1 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_lt_one (by positivity)]; linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 384–388 at
879b5c03f7df↗hrem_all.h4_series.hx2.thishave(2 : ℝ) ≤ (2 : ℝ) ^ nLeaves
x / (2 : ℝ) < (1 : ℝ), withthis : (2 : ℝ) ≤ (2 : ℝ) ^ n.Lean, lines 385–387
have : (2 : ℝ) ≤ 2 ^ n := by calc (2 : ℝ) = 2 ^ 1 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hntargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 385–387 at
879b5c03f7df↗hrem_all.h4_series.hx2.this.s1calc(2 : ℝ) = (2 : ℝ) ^ (1 : ℕ)routine: norm_numCloses the goal.
Lean, line 386
calc (2 : ℝ) = 2 ^ 1 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 386 at
879b5c03f7df↗hrem_all.h4_series.hx2.this.s2calc(2 : ℝ) ^ (1 : ℕ) ≤ (2 : ℝ) ^ nCloses the goal.
Uses library
pow_le_pow_right₀.Lean, line 387
_ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 387 at
879b5c03f7df↗
hrem_all.h4_series.haposhave∀ (s : ℕ), (0 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhapos : ∀ (s : ℕ), (0 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ).Lean, lines 390–392
have hapos : ∀ s, 0 < (2 : ℝ) ^ (s + 1) - 1 := fun s => by have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega) linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 390–392 at
879b5c03f7df↗hrem_all.h4_series.hapos.thishave(1 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ))Leaves
(0 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ), withthis : (1 : ℝ) < (2 : ℝ) ^ (s + (1 : ℕ)).Uses library
one_lt_pow₀.Lean, line 391
have : (1 : ℝ) < 2 ^ (s + 1) := one_lt_pow₀ (by norm_num) (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 391 at
879b5c03f7df↗
hrem_all.h4_series.hAsumhaveSummable fun (s : ℕ) => a s * x ^ (s + (1 : ℕ))Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhAsum : Summable fun (s : ℕ) => a s * x ^ (s + (1 : ℕ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Summable.of_nonneg_of_leComparison test of convergence of series of non-negative real numbers. ,summable_geometric_of_lt_one.Lean, lines 393–406
have hAsum : Summable (fun s => a s * x ^ (s + 1)) := by refine Summable.of_nonneg_of_le (fun s => ?_) (fun s => ?_) ((summable_geometric_of_lt_one (by positivity) hx2).mul_left x) · simp only [hadef]; exact mul_nonneg (div_nonneg (by norm_num) (le_of_lt (hapos s))) (by positivity) · simp only [hadef] have h1 : (2 : ℝ) ^ s ≤ 2 ^ (s + 1) - 1 := by have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num) rw [pow_succ]; linarith have hxs : 0 ≤ x ^ (s + 1) := by positivity calc 1 / (2 ^ (s + 1) - 1) * x ^ (s + 1) ≤ 1 / 2 ^ s * x ^ (s + 1) := by gcongr _ = x * (x / 2) ^ s := by have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simp exact e xtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 393–406 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s1caseLeaves
(0 : ℝ) ≤ a s * x ^ (s + (1 : ℕ)).Uses library
mul_nonnegAlias ofLeft.mul_nonneg. ,div_nonneg,le_of_lt.Lean, line 395
· simp only [hadef]; exact mul_nonneg (div_nonneg (by norm_num) (le_of_lt (hapos s))) (by positivity)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 395 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2caseLeaves
a s * x ^ (s + (1 : ℕ)) ≤ x * (x / (2 : ℝ)) ^ s.Lean, lines 396–406
· simp only [hadef] have h1 : (2 : ℝ) ^ s ≤ 2 ^ (s + 1) - 1 := by have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num) rw [pow_succ]; linarith have hxs : 0 ≤ x ^ (s + 1) := by positivity calc 1 / (2 ^ (s + 1) - 1) * x ^ (s + 1) ≤ 1 / 2 ^ s * x ^ (s + 1) := by gcongr _ = x * (x / 2) ^ s := by have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simp exact e xtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 396–406 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2.h1have(2 : ℝ) ^ s ≤ (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)Leaves
(1 : ℝ) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)) * x ^ (s + (1 : ℕ)) ≤ x * (x / (2 : ℝ)) ^ s, withh1 : (2 : ℝ) ^ s ≤ (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ).Uses library
pow_succ.Lean, lines 397–399
have h1 : (2 : ℝ) ^ s ≤ 2 ^ (s + 1) - 1 := by have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num) rw [pow_succ]; linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 397–399 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2.h1.thishave(1 : ℝ) ≤ (2 : ℝ) ^ sLeaves
(2 : ℝ) ^ s ≤ (2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ), withthis : (1 : ℝ) ≤ (2 : ℝ) ^ s.Uses library
one_le_pow₀.Lean, line 398
have : (1 : ℝ) ≤ 2 ^ s := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 398 at
879b5c03f7df↗
hrem_all.h4_series.hAsum.s2.hxshave(0 : ℝ) ≤ x ^ (s + (1 : ℕ))routine: positivityLeaves
(1 : ℝ) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)) * x ^ (s + (1 : ℕ)) ≤ x * (x / (2 : ℝ)) ^ s, withhxs : (0 : ℝ) ≤ x ^ (s + (1 : ℕ)).Lean, line 400
have hxs : 0 ≤ x ^ (s + 1) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 400 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2.s3calc(1 : ℝ) / ((2 : ℝ) ^ (s + (1 : ℕ)) - (1 : ℝ)) * x ^ (s + (1 : ℕ)) ≤ (1 : ℝ) / (2 : ℝ) ^ s * x ^ (s + (1 : ℕ))Closes the goal.
Lean, lines 401–402
calc 1 / (2 ^ (s + 1) - 1) * x ^ (s + 1) ≤ 1 / 2 ^ s * x ^ (s + 1) := by gcongrtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 401–402 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2.s4calcCloses the goal.
Lean, lines 403–406
_ = x * (x / 2) ^ s := by have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simp exact e xtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 403–406 at
879b5c03f7df↗hrem_all.h4_series.hAsum.s2.s4.ehave∀ (y : ℝ), (1 : ℝ) / (2 : ℝ) ^ s * y ^ (s + (1 : ℕ)) = y * (y / (2 : ℝ)) ^ sLeaves
(1 : ℝ) / (2 : ℝ) ^ s * x ^ (s + (1 : ℕ)) = x * (x / (2 : ℝ)) ^ s, withe : ∀ (y : ℝ), (1 : ℝ) / (2 : ℝ) ^ s * y ^ (s + (1 : ℕ)) = y * (y / (2 : ℝ)) ^ s.Uses library
div_pow,pow_succ.Lean, lines 404–405
have e : ∀ y : ℝ, 1 / 2 ^ s * y ^ (s + 1) = y * (y / 2) ^ s := by intro y; rw [div_pow, pow_succ]; field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 404–405 at
879b5c03f7df↗
hrem_all.h4_series.hAhaveHasSum (fun (s : ℕ) => a s * x ^ (s + (1 : ℕ))) ALeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhA : HasSum (fun (s : ℕ) => a s * x ^ (s + (1 : ℕ))) A.Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. .Lean, line 408
have hA : HasSum (fun s => a s * x ^ (s + 1)) A := hAsum.hasSum
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 408 at
879b5c03f7df↗hrem_all.h4_series.h3Thave(3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) + ALeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withh3T : (3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) = ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)) + A.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,tsum_congr.Lean, lines 410–415
have h3T : 3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) = ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) + A := by rw [split3T n, tail3 n hn, hAdef] congr 1 refine tsum_congr (fun s => ?_) simp only [hadef, hxdef] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 410–415 at
879b5c03f7df↗hrem_all.h4_series.hQxRhave(↑(Qx n) : ℝ) = ∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ jLeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhQxR : (↑(Qx n) : ℝ) = ∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j.Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 416–417
have hQxR : (Qx n : ℝ) = ∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j := by rw [hQx]; push_cast; rfltargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 416–417 at
879b5c03f7df↗hrem_all.h4_series.hAqRhave(↑(Aq n) : ℝ) = ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (k - j) - (1 : ℝ))) * x ^ k + (↑(Qx n) : ℝ) * ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ))Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhAqR : (↑(Aq n) : ℝ) = ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (k - j) - (1 : ℝ))) * x ^ k + (↑(Qx n) : ℝ) * ∑ j ∈ Finset.range n, (3 : ℝ) / ((2 : ℝ) ^ (j + (1 : ℕ)) - (3 : ℝ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 418–421
have hAqR : (Aq n : ℝ) = ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (k - j) - 1)) * x ^ k + (Qx n : ℝ) * ∑ j ∈ Finset.range n, (3 : ℝ) / (2 ^ (j + 1) - 3) := by rw [hAq]; push_cast; rfltargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 418–421 at
879b5c03f7df↗hrem_all.h4_series.hChaveHasSum (fun (K : ℕ) => ∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhC : HasSum (fun (K : ℕ) => ∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A).Lean, line 422
have hC := cauchy_fin n (fun j => (Qc n j : ℝ)) a x A hA
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 422 at
879b5c03f7df↗hrem_all.h4_series.hPhaveHasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) PLeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhP : HasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) P.Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. ,Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 425–437
have hP : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) P := by have h0 : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := hasSum_sum_of_ne_finset_zero (fun b hb => by rw [if_neg (by simpa using hb)]) have h1 : (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) = P := by rw [hPdef] exact Finset.sum_congr rfl (fun K hK => by rw [if_pos (Finset.mem_range.mp hK)]) rw [h1] at h0 exact h0targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 425–437 at
879b5c03f7df↗hrem_all.h4_series.hP.h0haveHasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) (∑ K ∈ Finset.range (n + (1 : ℕ)), if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ))Leaves
HasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) P, withh0 : HasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) (∑ K ∈ Finset.range (n + (1 : ℕ)), if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)).Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. ,Finset.rangerange nis the set of natural numbers less thann. ,hasSum_sum_of_ne_finset_zeroIf a functionfvanishes outside of a finite sets, then itHasSum∑ b ∈ s, f b. ,if_neg.Lean, lines 427–431
have h0 : HasSum (fun K => if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := hasSum_sum_of_ne_finset_zero (fun b hb => by rw [if_neg (by simpa using hb)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 427–431 at
879b5c03f7df↗hrem_all.h4_series.hP.h1have(∑ K ∈ Finset.range (n + (1 : ℕ)), if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) = PLeaves
HasSum (fun (K : ℕ) => if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) P, withh1 : (∑ K ∈ Finset.range (n + (1 : ℕ)), if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) = P.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,if_pos,Finset.mem_range.Lean, lines 432–435
have h1 : (∑ K ∈ Finset.range (n + 1), if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) = P := by rw [hPdef] exact Finset.sum_congr rfl (fun K hK => by rw [if_pos (Finset.mem_range.mp hK)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 432–435 at
879b5c03f7df↗
hrem_all.h4_series.hDhaveHasSum (fun (b : ℕ) => (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < b then (↑(Qc n j) : ℝ) * a (b - j - (1 : ℕ)) * x ^ b else (0 : ℝ)) - if b < n + (1 : ℕ) then (∑ j ∈ Finset.range (b + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (b - j) - (1 : ℝ))) * x ^ b else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - P)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhD : HasSum (fun (b : ℕ) => (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < b then (↑(Qc n j) : ℝ) * a (b - j - (1 : ℕ)) * x ^ b else (0 : ℝ)) - if b < n + (1 : ℕ) then (∑ j ∈ Finset.range (b + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (b - j) - (1 : ℝ))) * x ^ b else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - P).Lean, line 438
have hD := hC.sub hP
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 438 at
879b5c03f7df↗hrem_all.h4_series.hvalhave(↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) = (∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - PLeaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhval : (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) = (∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - P.Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 439–441
have hval : (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) = (∑ j ∈ Finset.range (n + 1), (Qc n j : ℝ) * x ^ j) * A - P := by rw [h3T, hAqR, hQxR]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 439–441 at
879b5c03f7df↗hrem_all.h4_series.hid1have∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ L)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - P), withhid1 : ∀ j ≤ n, Qc n j * (2 : ℚ) ^ j * ∏ i ∈ (Finset.range (n + (1 : ℕ))).erase j, ((2 : ℚ) ^ j - (2 : ℚ) ^ i) = ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℚ) ^ j - (2 : ℚ) ^ L).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, lines 443–444
have hid1 : ∀ j ≤ n, Qc n j * 2 ^ j * ∏ i ∈ (Finset.range (n + 1)).erase j, ((2 : ℚ) ^ j - 2 ^ i) = ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℚ) ^ j - 2 ^ L) := fun j hj => by subst hQc; exact id1_full n j hjtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 443–444 at
879b5c03f7df↗hrem_all.h4_series.hfunhave(fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) = fun (K : ℕ) => (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) - if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)Leaves
HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K else (0 : ℝ)) ((∑ j ∈ Finset.range (n + (1 : ℕ)), (↑(Qc n j) : ℝ) * x ^ j) * A - P), withhfun : (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) = fun (K : ℕ) => (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) - if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 445–485
have hfun : (fun K : ℕ => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * ((3 : ℝ) / 2 ^ n) ^ K else 0) = fun K => (∑ j ∈ Finset.range (n + 1), if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) - (if K < n + 1 then (∑ j ∈ Finset.range (K + 1), (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) * x ^ K else 0) := by funext K symm by_cases hK : K < n + 1 · rw [if_pos hK, if_neg (by omega)] rw [Finset.sum_range_succ (fun j => (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) K, Nat.sub_self, pow_zero, sub_self, div_zero, add_zero] have hsplit : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ∑ j ∈ Finset.range K, (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1) * x ^ K := by rw [← Finset.sum_range_add_sum_Ico _ (show K ≤ n + 1 by omega)] rw [Finset.sum_eq_zero (s := Finset.Ico K (n + 1)) (fun j hj => by rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK := Finset.mem_range.mp hj rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hsplit, Finset.sum_mul, sub_self] · rw [if_neg hK, sub_zero] have hS : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ((∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) : ℚ) : ℝ) * x ^ K := by push_cast rw [Finset.sum_mul] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK : j < K := by have := Finset.mem_range.mp hj; omega rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hS, tail_coeff n K (by omega) Qc hid1] push_cast by_cases h2 : 2 * n < K · rw [if_pos h2] · rw [if_neg h2] rw [Finset.prod_eq_zero (i := K) (Finset.mem_Ioc.mpr ⟨by omega, by omega⟩) (sub_self _)] simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 445–485 at
879b5c03f7df↗hrem_all.h4_series.hfun.s1caseLeaves
((∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) - if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) = if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ).Uses library
if_pos,if_neg,Finset.sum_range_succ,Nat.sub_self,pow_zero,sub_self,div_zero,add_zero,Finset.sum_mul.Lean, lines 453–467
· rw [if_pos hK, if_neg (by omega)] rw [Finset.sum_range_succ (fun j => (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1)) K, Nat.sub_self, pow_zero, sub_self, div_zero, add_zero] have hsplit : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ∑ j ∈ Finset.range K, (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1) * x ^ K := by rw [← Finset.sum_range_add_sum_Ico _ (show K ≤ n + 1 by omega)] rw [Finset.sum_eq_zero (s := Finset.Ico K (n + 1)) (fun j hj => by rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK := Finset.mem_range.mp hj rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hsplit, Finset.sum_mul, sub_self]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 453–467 at
879b5c03f7df↗hrem_all.h4_series.hfun.s1.hsplithave(∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = ∑ j ∈ Finset.range K, (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ)) * x ^ KLeaves
(∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) - (∑ x ∈ Finset.range K, (↑(Qc n x) : ℝ) / ((2 : ℝ) ^ (K - x) - (1 : ℝ))) * x ^ K = (0 : ℝ), withhsplit : (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = ∑ j ∈ Finset.range K, (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ)) * x ^ K.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_range_add_sum_Ico,Finset.sum_eq_zero,Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,if_neg,add_zero,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,if_pos.Lean, lines 456–466
have hsplit : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ∑ j ∈ Finset.range K, (Qc n j : ℝ) / ((2 : ℝ) ^ (K - j) - 1) * x ^ K := by rw [← Finset.sum_range_add_sum_Ico _ (show K ≤ n + 1 by omega)] rw [Finset.sum_eq_zero (s := Finset.Ico K (n + 1)) (fun j hj => by rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK := Finset.mem_range.mp hj rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 456–466 at
879b5c03f7df↗hrem_all.h4_series.hfun.s1.hsplit.thishaveK ≤ j ∧ j < n + (1 : ℕ)Leaves
¬j < K, withthis : K ≤ j ∧ j < n + (1 : ℕ).Uses library
Finset.mem_Ico.Lean, line 460
rw [if_neg (by have := Finset.mem_Ico.mp hj; omega)]), add_zero]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 460 at
879b5c03f7df↗hrem_all.h4_series.hfun.s1.hsplit.hjKhavej < KLeaves
(if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ)) * x ^ K, withhjK : j < K.Uses library
Finset.mem_range.Lean, line 462
have hjK := Finset.mem_range.mp hj
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 462 at
879b5c03f7df↗
hrem_all.h4_series.hfun.s2caseLeaves
((∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) - if K < n + (1 : ℕ) then (∑ j ∈ Finset.range (K + (1 : ℕ)), (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ))) * x ^ K else (0 : ℝ)) = if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ).Uses library
if_neg,sub_zero.Lean, lines 468–485
· rw [if_neg hK, sub_zero] have hS : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ((∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) : ℚ) : ℝ) * x ^ K := by push_cast rw [Finset.sum_mul] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK : j < K := by have := Finset.mem_range.mp hj; omega rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ring rw [hS, tail_coeff n K (by omega) Qc hid1] push_cast by_cases h2 : 2 * n < K · rw [if_pos h2] · rw [if_neg h2] rw [Finset.prod_eq_zero (i := K) (Finset.mem_Ioc.mpr ⟨by omega, by omega⟩) (sub_self _)] simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 468–485 at
879b5c03f7df↗hrem_all.h4_series.hfun.s2.hShave(∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = (↑(∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ))) : ℝ) * x ^ KLeaves
(∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ), withhS : (∑ j ∈ Finset.range (n + (1 : ℕ)), if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = (↑(∑ j ∈ Finset.range (n + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (K - j) - (1 : ℚ))) : ℝ) * x ^ K.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_mul,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,if_pos.Lean, lines 469–478
have hS : ∑ j ∈ Finset.range (n + 1), (if j < K then (Qc n j : ℝ) * a (K - j - 1) * x ^ K else 0) = ((∑ j ∈ Finset.range (n + 1), Qc n j / ((2 : ℚ) ^ (K - j) - 1) : ℚ) : ℝ) * x ^ K := by push_cast rw [Finset.sum_mul] refine Finset.sum_congr rfl (fun j hj => ?_) have hjK : j < K := by have := Finset.mem_range.mp hj; omega rw [if_pos hjK] simp only [hadef] rw [show K - j - 1 + 1 = K - j by omega] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 469–478 at
879b5c03f7df↗hrem_all.h4_series.hfun.s2.hS.hjKhavej < KLeaves
(if j < K then (↑(Qc n j) : ℝ) * a (K - j - (1 : ℕ)) * x ^ K else (0 : ℝ)) = (↑(Qc n j) : ℝ) / ((2 : ℝ) ^ (K - j) - (1 : ℝ)) * x ^ K, withhjK : j < K.Lean, line 474
have hjK : j < K := by have := Finset.mem_range.mp hj; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 474 at
879b5c03f7df↗hrem_all.h4_series.hfun.s2.hS.hjK.thishavej < n + (1 : ℕ)Leaves
j < K, withthis : j < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 474
have hjK : j < K := by have := Finset.mem_range.mp hj; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 474 at
879b5c03f7df↗
hrem_all.h4_series.hfun.s2.s2caseLeaves
((∏ x ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ x)) / ∏ x ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ x)) * x ^ K = if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ).Uses library
if_pos.Lean, line 482
· rw [if_pos h2]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 482 at
879b5c03f7df↗hrem_all.h4_series.hfun.s2.s3caseLeaves
((∏ x ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ x)) / ∏ x ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ x)) * x ^ K = if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ).Uses library
if_neg,Finset.prod_eq_zero,Finset.mem_Ioc,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,sub_self.Lean, lines 483–485
· rw [if_neg h2] rw [Finset.prod_eq_zero (i := K) (Finset.mem_Ioc.mpr ⟨by omega, by omega⟩) (sub_self _)] simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 483–485 at
879b5c03f7df↗
hrem_all.prod_one_sub_gehave∀ (s : Finset ℕ) (a : ℕ → ℝ), (∀ i ∈ s, (0 : ℝ) ≤ a i) → (∀ i ∈ s, a i ≤ (1 : ℝ)) → (1 : ℝ) - ∑ i ∈ s, a i ≤ ∏ i ∈ s, ((1 : ℝ) - a i)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withprod_one_sub_ge : ∀ (s : Finset ℕ) (a : ℕ → ℝ), (∀ i ∈ s, (0 : ℝ) ≤ a i) → (∀ i ∈ s, a i ≤ (1 : ℝ)) → (1 : ℝ) - ∑ i ∈ s, a i ≤ ∏ i ∈ s, ((1 : ℝ) - a i).Uses library
FinsetFinset αis the type of finite sets of elements ofα. ,Finset.induction_onTo prove a proposition about an arbitraryFinset α, it suffices to prove it for the emptyFinset, and to show that if it holds for someFinset α, then it holds for theFinsetobtained by inserting a new element. .Lean, lines 490–505
have prod_one_sub_ge : ∀ (s : Finset ℕ) (a : ℕ → ℝ) (h0 : ∀ i ∈ s, 0 ≤ a i) (h1 : ∀ i ∈ s, a i ≤ 1), 1 - ∑ i ∈ s, a i ≤ ∏ i ∈ s, (1 - a i) := by intro s a h0 h1 induction s using Finset.induction_on with | empty => simp | insert j s hj ih => rw [Finset.sum_insert hj, Finset.prod_insert hj] have ih' := ih (fun i hi => h0 i (Finset.mem_insert_of_mem hi)) (fun i hi => h1 i (Finset.mem_insert_of_mem hi)) have haj0 := h0 j (Finset.mem_insert_self j s) have haj1 := h1 j (Finset.mem_insert_self j s) have hP : 0 ≤ ∏ i ∈ s, (1 - a i) := Finset.prod_nonneg (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) have hP1 : ∏ i ∈ s, (1 - a i) ≤ 1 := Finset.prod_le_one (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) (fun i hi => by linarith [h0 i (Finset.mem_insert_of_mem hi)]) nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 490–505 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s1case printed form did not read back: shown as its Lean lines onlyhrem_all.prod_one_sub_ge.s2caseLeaves
(1 : ℝ) - ∑ i ∈ insert j s, a i ≤ ∏ i ∈ insert j s, ((1 : ℝ) - a i), withj : ℕ,s : Finset ℕ,hj : j ∉ s,ih : (∀ i ∈ s, (0 : ℝ) ≤ a i) → (∀ i ∈ s, a i ≤ (1 : ℝ)) → (1 : ℝ) - ∑ i ∈ s, a i ≤ ∏ i ∈ s, ((1 : ℝ) - a i),h0 : ∀ i ∈ insert j s, (0 : ℝ) ≤ a i,h1 : ∀ i ∈ insert j s, a i ≤ (1 : ℝ).Uses library
Finset.sum_insert,Finset.prod_insert.Lean, lines 495–505
| insert j s hj ih => rw [Finset.sum_insert hj, Finset.prod_insert hj] have ih' := ih (fun i hi => h0 i (Finset.mem_insert_of_mem hi)) (fun i hi => h1 i (Finset.mem_insert_of_mem hi)) have haj0 := h0 j (Finset.mem_insert_self j s) have haj1 := h1 j (Finset.mem_insert_self j s) have hP : 0 ≤ ∏ i ∈ s, (1 - a i) := Finset.prod_nonneg (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) have hP1 : ∏ i ∈ s, (1 - a i) ≤ 1 := Finset.prod_le_one (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) (fun i hi => by linarith [h0 i (Finset.mem_insert_of_mem hi)]) nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 495–505 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s2.ih'have(1 : ℝ) - ∑ i ∈ s, a i ≤ ∏ i ∈ s, ((1 : ℝ) - a i)Leaves
(1 : ℝ) - (a j + ∑ x ∈ s, a x) ≤ ((1 : ℝ) - a j) * ∏ x ∈ s, ((1 : ℝ) - a x), withih' : (1 : ℝ) - ∑ i ∈ s, a i ≤ ∏ i ∈ s, ((1 : ℝ) - a i).Uses library
Finset.mem_insert_of_mem.Lean, line 497
have ih' := ih (fun i hi => h0 i (Finset.mem_insert_of_mem hi)) (fun i hi => h1 i (Finset.mem_insert_of_mem hi))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 497 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s2.haj0have(0 : ℝ) ≤ a jLeaves
(1 : ℝ) - (a j + ∑ x ∈ s, a x) ≤ ((1 : ℝ) - a j) * ∏ x ∈ s, ((1 : ℝ) - a x), withhaj0 : (0 : ℝ) ≤ a j.Uses library
Finset.mem_insert_self.Lean, line 498
have haj0 := h0 j (Finset.mem_insert_self j s)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 498 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s2.haj1havea j ≤ (1 : ℝ)Leaves
(1 : ℝ) - (a j + ∑ x ∈ s, a x) ≤ ((1 : ℝ) - a j) * ∏ x ∈ s, ((1 : ℝ) - a x), withhaj1 : a j ≤ (1 : ℝ).Uses library
Finset.mem_insert_self.Lean, line 499
have haj1 := h1 j (Finset.mem_insert_self j s)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 499 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s2.hPhave(0 : ℝ) ≤ ∏ i ∈ s, ((1 : ℝ) - a i)Leaves
(1 : ℝ) - (a j + ∑ x ∈ s, a x) ≤ ((1 : ℝ) - a j) * ∏ x ∈ s, ((1 : ℝ) - a x), withhP : (0 : ℝ) ≤ ∏ i ∈ s, ((1 : ℝ) - a i).Uses library
Finset.prod_nonneg,Finset.mem_insert_of_mem.Lean, lines 500–501
have hP : 0 ≤ ∏ i ∈ s, (1 - a i) := Finset.prod_nonneg (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 500–501 at
879b5c03f7df↗hrem_all.prod_one_sub_ge.s2.hP1have∏ i ∈ s, ((1 : ℝ) - a i) ≤ (1 : ℝ)Leaves
(1 : ℝ) - (a j + ∑ x ∈ s, a x) ≤ ((1 : ℝ) - a j) * ∏ x ∈ s, ((1 : ℝ) - a x), withhP1 : ∏ i ∈ s, ((1 : ℝ) - a i) ≤ (1 : ℝ).Uses library
Finset.prod_le_oneIf eachf i,i ∈ sbelongs to[0, 1], then their product is less than or equal to one. ,Finset.mem_insert_of_mem.Lean, lines 502–504
have hP1 : ∏ i ∈ s, (1 - a i) ≤ 1 := Finset.prod_le_one (fun i hi => by linarith [h1 i (Finset.mem_insert_of_mem hi)]) (fun i hi => by linarith [h0 i (Finset.mem_insert_of_mem hi)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 502–504 at
879b5c03f7df↗
hrem_all.nd_boundhave∀ (n K : ℕ), (1 : ℕ) ≤ n → (2 : ℕ) * n + (1 : ℕ) ≤ K → (0 : ℝ) < (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ∧ (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ KLeaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withnd_bound : ∀ (n K : ℕ), (1 : ℕ) ≤ n → (2 : ℕ) * n + (1 : ℕ) ≤ K → (0 : ℝ) < (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ∧ (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. ,div_pos,div_le_iff₀Seediv_le_iff₀'for a version with multiplication on the other side. .Lean, lines 507–562
have nd_bound : ∀ (n K : ℕ) (hn : 1 ≤ n) (hK : 2 * n + 1 ≤ K), 0 < (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) ∧ (∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) ≤ 2 * (1 / 2) ^ K := by intro n K hn hK have hlt : ∀ i, i < K → (0 : ℝ) < 2 ^ K - 2 ^ i := fun i hi => by have : (2 : ℝ) ^ i < 2 ^ K := pow_lt_pow_right₀ (by norm_num) hi linarith have hNpos : 0 < ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) := Finset.prod_pos (fun L hL => hlt L (by have := Finset.mem_Ioc.mp hL; omega)) have hDpos : 0 < ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := Finset.prod_pos (fun i hi => hlt i (by have := Finset.mem_range.mp hi; omega)) refine ⟨div_pos hNpos hDpos, ?_⟩ have hN : ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := by have := Finset.prod_le_prod (s := Finset.Ioc n (2 * n)) (f := fun L => (2 : ℝ) ^ K - 2 ^ L) (g := fun _ => (2 : ℝ) ^ K) (fun L hL => le_of_lt (hlt L (by have := Finset.mem_Ioc.mp hL; omega))) (fun L _ => by have : (0 : ℝ) < 2 ^ L := by positivity linarith) rw [Finset.prod_const, Nat.card_Ioc, show 2 * n - n = n by omega] at this exact this have hD : (2 ^ K) ^ (n + 1) / 2 ≤ ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by have hfac : ∀ i ∈ Finset.range (n + 1), (2 : ℝ) ^ K - 2 ^ i = 2 ^ K * (1 - (1 / 2) ^ (K - i)) := by intro i hi have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega have e : (2 : ℝ) ^ K = 2 ^ i * 2 ^ (K - i) := by rw [← pow_add]; congr 1; omega rw [mul_sub, mul_one, one_div_pow, mul_one_div, e] field_simp rw [Finset.prod_congr rfl hfac, Finset.prod_mul_distrib, Finset.prod_const, Finset.card_range] have hsum : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) ≤ 1 / 2 := by have e : ∀ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) = (1 / 2) ^ (K - n) * (1 / 2) ^ (n - i) := by intro i hi have := Finset.mem_range.mp hi rw [← pow_add]; congr 1; omega rw [Finset.sum_congr rfl e, ← Finset.mul_sum] have hg : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (n - i) ≤ 2 := by have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1) simp only [Nat.add_sub_cancel] at hr rw [hr] exact sum_geometric_two_le (n + 1) have hk : ((1 : ℝ) / 2) ^ (K - n) ≤ (1 / 2) ^ 2 := pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega) have hpos : 0 ≤ ((1 : ℝ) / 2) ^ (K - n) := by positivity nlinarith have hprod := prod_one_sub_ge (Finset.range (n + 1)) (fun i => ((1 : ℝ) / 2) ^ (K - i)) (fun i _ => by positivity) (fun i _ => pow_le_one₀ (by norm_num) (by norm_num)) have h2K : (0 : ℝ) < (2 ^ K) ^ (n + 1) := by positivity nlinarith rw [div_le_iff₀ hDpos] have h2K : (2 : ℝ) ^ K * (1 / 2) ^ K = 1 := by rw [← mul_pow]; norm_num have e2 : 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ (n + 1) / 2) = (2 ^ K) ^ n := by rw [pow_succ] calc 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ n * 2 ^ K / 2) = (2 ^ K * (1 / 2) ^ K) * (2 ^ K) ^ n := by ring _ = (2 ^ K) ^ n := by rw [h2K, one_mul] calc ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := hN _ = 2 * (1 / 2) ^ K * ((2 ^ K) ^ (n + 1) / 2) := e2.symm _ ≤ 2 * (1 / 2) ^ K * ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by gcongrtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 507–562 at
879b5c03f7df↗hrem_all.nd_bound.hlthave∀ i < K, (0 : ℝ) < (2 : ℝ) ^ K - (2 : ℝ) ^ iLeaves
(0 : ℝ) < (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ∧ (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K, withhlt : ∀ i < K, (0 : ℝ) < (2 : ℝ) ^ K - (2 : ℝ) ^ i.Lean, lines 512–514
have hlt : ∀ i, i < K → (0 : ℝ) < 2 ^ K - 2 ^ i := fun i hi => by have : (2 : ℝ) ^ i < 2 ^ K := pow_lt_pow_right₀ (by norm_num) hi linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 512–514 at
879b5c03f7df↗hrem_all.nd_bound.hlt.thishave(2 : ℝ) ^ i < (2 : ℝ) ^ KLeaves
(0 : ℝ) < (2 : ℝ) ^ K - (2 : ℝ) ^ i, withthis : (2 : ℝ) ^ i < (2 : ℝ) ^ K.Uses library
pow_lt_pow_right₀.Lean, line 513
have : (2 : ℝ) ^ i < 2 ^ K := pow_lt_pow_right₀ (by norm_num) hi
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 513 at
879b5c03f7df↗
hrem_all.nd_bound.hNposhave(0 : ℝ) < ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)Leaves
(0 : ℝ) < (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ∧ (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K, withhNpos : (0 : ℝ) < ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L).Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.prod_pos.Lean, lines 515–516
have hNpos : 0 < ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) := Finset.prod_pos (fun L hL => hlt L (by have := Finset.mem_Ioc.mp hL; omega))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 515–516 at
879b5c03f7df↗hrem_all.nd_bound.hNpos.thishaven < L ∧ L ≤ (2 : ℕ) * nLeaves
L < K, withthis : n < L ∧ L ≤ (2 : ℕ) * n.Uses library
Finset.mem_Ioc.Lean, line 516
Finset.prod_pos (fun L hL => hlt L (by have := Finset.mem_Ioc.mp hL; omega))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 516 at
879b5c03f7df↗
hrem_all.nd_bound.hDposhave(0 : ℝ) < ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)Leaves
(0 : ℝ) < (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ∧ (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K, withhDpos : (0 : ℝ) < ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_pos.Lean, lines 517–518
have hDpos : 0 < ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := Finset.prod_pos (fun i hi => hlt i (by have := Finset.mem_range.mp hi; omega))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 517–518 at
879b5c03f7df↗hrem_all.nd_bound.hDpos.thishavei < n + (1 : ℕ)Leaves
i < K, withthis : i < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 518
Finset.prod_pos (fun i hi => hlt i (by have := Finset.mem_range.mp hi; omega))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 518 at
879b5c03f7df↗
hrem_all.nd_bound.hNhave∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ ((2 : ℝ) ^ K) ^ nLeaves
(∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K, withhN : ∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ ((2 : ℝ) ^ K) ^ n.Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.prod_const,Nat.card_Ioc.Lean, lines 520–526
have hN : ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := by have := Finset.prod_le_prod (s := Finset.Ioc n (2 * n)) (f := fun L => (2 : ℝ) ^ K - 2 ^ L) (g := fun _ => (2 : ℝ) ^ K) (fun L hL => le_of_lt (hlt L (by have := Finset.mem_Ioc.mp hL; omega))) (fun L _ => by have : (0 : ℝ) < 2 ^ L := by positivity linarith) rw [Finset.prod_const, Nat.card_Ioc, show 2 * n - n = n by omega] at this exact thistargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 520–526 at
879b5c03f7df↗hrem_all.nd_bound.hN.thishave∏ i ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ ∏ i ∈ Finset.Ioc n ((2 : ℕ) * n), (2 : ℝ) ^ KLeaves
∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ ((2 : ℝ) ^ K) ^ n, withthis : ∏ i ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ ∏ i ∈ Finset.Ioc n ((2 : ℕ) * n), (2 : ℝ) ^ K.Uses library
Finset.prod_le_prodIf allf i,i ∈ s, are nonnegative and eachf iis less than or equal tog i, then the product off iis less than or equal to the product ofg i. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,le_of_lt.Lean, lines 521–524
have := Finset.prod_le_prod (s := Finset.Ioc n (2 * n)) (f := fun L => (2 : ℝ) ^ K - 2 ^ L) (g := fun _ => (2 : ℝ) ^ K) (fun L hL => le_of_lt (hlt L (by have := Finset.mem_Ioc.mp hL; omega))) (fun L _ => by have : (0 : ℝ) < 2 ^ L := by positivity linarith)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 521–524 at
879b5c03f7df↗hrem_all.nd_bound.hN.this.s1haven < L ∧ L ≤ (2 : ℕ) * nLeaves
L < K, withthis : n < L ∧ L ≤ (2 : ℕ) * n.Uses library
Finset.mem_Ioc.Lean, line 522
(fun L hL => le_of_lt (hlt L (by have := Finset.mem_Ioc.mp hL; omega))) (fun L _ => by
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 522 at
879b5c03f7df↗hrem_all.nd_bound.hN.this.s2have(0 : ℝ) < (2 : ℝ) ^ Lroutine: positivityLeaves
(2 : ℝ) ^ K - (2 : ℝ) ^ L ≤ (2 : ℝ) ^ K, withthis : (0 : ℝ) < (2 : ℝ) ^ L.Lean, line 523
have : (0 : ℝ) < 2 ^ L := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 523 at
879b5c03f7df↗
hrem_all.nd_bound.hDhave((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)Leaves
(∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K, withhD : ((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.prod_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.prod_mul_distrib,Finset.prod_const,Finset.card_range.Lean, lines 527–553
have hD : (2 ^ K) ^ (n + 1) / 2 ≤ ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by have hfac : ∀ i ∈ Finset.range (n + 1), (2 : ℝ) ^ K - 2 ^ i = 2 ^ K * (1 - (1 / 2) ^ (K - i)) := by intro i hi have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega have e : (2 : ℝ) ^ K = 2 ^ i * 2 ^ (K - i) := by rw [← pow_add]; congr 1; omega rw [mul_sub, mul_one, one_div_pow, mul_one_div, e] field_simp rw [Finset.prod_congr rfl hfac, Finset.prod_mul_distrib, Finset.prod_const, Finset.card_range] have hsum : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) ≤ 1 / 2 := by have e : ∀ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) = (1 / 2) ^ (K - n) * (1 / 2) ^ (n - i) := by intro i hi have := Finset.mem_range.mp hi rw [← pow_add]; congr 1; omega rw [Finset.sum_congr rfl e, ← Finset.mul_sum] have hg : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (n - i) ≤ 2 := by have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1) simp only [Nat.add_sub_cancel] at hr rw [hr] exact sum_geometric_two_le (n + 1) have hk : ((1 : ℝ) / 2) ^ (K - n) ≤ (1 / 2) ^ 2 := pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega) have hpos : 0 ≤ ((1 : ℝ) / 2) ^ (K - n) := by positivity nlinarith have hprod := prod_one_sub_ge (Finset.range (n + 1)) (fun i => ((1 : ℝ) / 2) ^ (K - i)) (fun i _ => by positivity) (fun i _ => pow_le_one₀ (by norm_num) (by norm_num)) have h2K : (0 : ℝ) < (2 ^ K) ^ (n + 1) := by positivity nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 527–553 at
879b5c03f7df↗hrem_all.nd_bound.hD.hfachave∀ i ∈ Finset.range (n + (1 : ℕ)), (2 : ℝ) ^ K - (2 : ℝ) ^ i = (2 : ℝ) ^ K * ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i))Leaves
((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i), withhfac : ∀ i ∈ Finset.range (n + (1 : ℕ)), (2 : ℝ) ^ K - (2 : ℝ) ^ i = (2 : ℝ) ^ K * ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,mul_subAlias ofmul_sub_left_distrib. ,mul_one,one_div_pow,mul_one_div.Lean, lines 528–533
have hfac : ∀ i ∈ Finset.range (n + 1), (2 : ℝ) ^ K - 2 ^ i = 2 ^ K * (1 - (1 / 2) ^ (K - i)) := by intro i hi have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega have e : (2 : ℝ) ^ K = 2 ^ i * 2 ^ (K - i) := by rw [← pow_add]; congr 1; omega rw [mul_sub, mul_one, one_div_pow, mul_one_div, e] field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 528–533 at
879b5c03f7df↗hrem_all.nd_bound.hD.hfac.hiKhavei ≤ KLeaves
(2 : ℝ) ^ K - (2 : ℝ) ^ i = (2 : ℝ) ^ K * ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i)), withhiK : i ≤ K.Lean, line 530
have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 530 at
879b5c03f7df↗hrem_all.nd_bound.hD.hfac.hiK.thishavei < n + (1 : ℕ)Leaves
i ≤ K, withthis : i < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 530
have hiK : i ≤ K := by have := Finset.mem_range.mp hi; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 530 at
879b5c03f7df↗
hrem_all.nd_bound.hD.hfac.ehave(2 : ℝ) ^ K = (2 : ℝ) ^ i * (2 : ℝ) ^ (K - i)Leaves
(2 : ℝ) ^ K - (2 : ℝ) ^ i = (2 : ℝ) ^ K * ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i)), withe : (2 : ℝ) ^ K = (2 : ℝ) ^ i * (2 : ℝ) ^ (K - i).Uses library
pow_add.Lean, line 531
have e : (2 : ℝ) ^ K = 2 ^ i * 2 ^ (K - i) := by rw [← pow_add]; congr 1; omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 531 at
879b5c03f7df↗
hrem_all.nd_bound.hD.hsumhave∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) ≤ (1 / 2 : ℝ)Leaves
((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) * ∏ x ∈ Finset.range (n + (1 : ℕ)), ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - x)), withhsum : ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) ≤ (1 / 2 : ℝ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_congr,rflrfl : a = ais the unique constructor of the equality type. ,Finset.mul_sum.Lean, lines 535–549
have hsum : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) ≤ 1 / 2 := by have e : ∀ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) = (1 / 2) ^ (K - n) * (1 / 2) ^ (n - i) := by intro i hi have := Finset.mem_range.mp hi rw [← pow_add]; congr 1; omega rw [Finset.sum_congr rfl e, ← Finset.mul_sum] have hg : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (n - i) ≤ 2 := by have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1) simp only [Nat.add_sub_cancel] at hr rw [hr] exact sum_geometric_two_le (n + 1) have hk : ((1 : ℝ) / 2) ^ (K - n) ≤ (1 / 2) ^ 2 := pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega) have hpos : 0 ≤ ((1 : ℝ) / 2) ^ (K - n) := by positivity nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 535–549 at
879b5c03f7df↗hrem_all.nd_bound.hD.hsum.ehave∀ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) = (1 / 2 : ℝ) ^ (K - n) * (1 / 2 : ℝ) ^ (n - i)Leaves
∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) ≤ (1 / 2 : ℝ), withe : ∀ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) = (1 / 2 : ℝ) ^ (K - n) * (1 / 2 : ℝ) ^ (n - i).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_add.Lean, lines 536–539
have e : ∀ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (K - i) = (1 / 2) ^ (K - n) * (1 / 2) ^ (n - i) := by intro i hi have := Finset.mem_range.mp hi rw [← pow_add]; congr 1; omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 536–539 at
879b5c03f7df↗hrem_all.nd_bound.hD.hsum.e.thishavei < n + (1 : ℕ)Leaves
(1 / 2 : ℝ) ^ (K - i) = (1 / 2 : ℝ) ^ (K - n) * (1 / 2 : ℝ) ^ (n - i), withthis : i < n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 538
have := Finset.mem_range.mp hi
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 538 at
879b5c03f7df↗
hrem_all.nd_bound.hD.hsum.hghave∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (2 : ℝ)Leaves
(1 / 2 : ℝ) ^ (K - n) * ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (1 / 2 : ℝ), withhg : ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (2 : ℝ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Nat.add_sub_cancel,sum_geometric_two_le.Lean, lines 541–545
have hg : ∑ i ∈ Finset.range (n + 1), ((1 : ℝ) / 2) ^ (n - i) ≤ 2 := by have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1) simp only [Nat.add_sub_cancel] at hr rw [hr] exact sum_geometric_two_le (n + 1)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 541–545 at
879b5c03f7df↗hrem_all.nd_bound.hD.hsum.hg.hrhave∑ j ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n + (1 : ℕ) - (1 : ℕ) - j) = ∑ j ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ jLeaves
∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (2 : ℝ), withhr : ∑ j ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n + (1 : ℕ) - (1 : ℕ) - j) = ∑ j ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ j.Uses library
Finset.sum_range_reflect.Lean, line 542
have hr := Finset.sum_range_reflect (fun i => ((1 : ℝ) / 2) ^ i) (n + 1)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 542 at
879b5c03f7df↗
hrem_all.nd_bound.hD.hsum.hkhave(1 / 2 : ℝ) ^ (K - n) ≤ (1 / 2 : ℝ) ^ (2 : ℕ)Leaves
(1 / 2 : ℝ) ^ (K - n) * ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (1 / 2 : ℝ), withhk : (1 / 2 : ℝ) ^ (K - n) ≤ (1 / 2 : ℝ) ^ (2 : ℕ).Uses library
pow_le_pow_of_le_one.Lean, lines 546–547
have hk : ((1 : ℝ) / 2) ^ (K - n) ≤ (1 / 2) ^ 2 := pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 546–547 at
879b5c03f7df↗hrem_all.nd_bound.hD.hsum.hposhave(0 : ℝ) ≤ (1 / 2 : ℝ) ^ (K - n)routine: positivityLeaves
(1 / 2 : ℝ) ^ (K - n) * ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (n - i) ≤ (1 / 2 : ℝ), withhpos : (0 : ℝ) ≤ (1 / 2 : ℝ) ^ (K - n).Lean, line 548
have hpos : 0 ≤ ((1 : ℝ) / 2) ^ (K - n) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 548 at
879b5c03f7df↗
hrem_all.nd_bound.hD.hprodhave(1 : ℝ) - ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) ≤ ∏ i ∈ Finset.range (n + (1 : ℕ)), ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i))Leaves
((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) * ∏ x ∈ Finset.range (n + (1 : ℕ)), ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - x)), withhprod : (1 : ℝ) - ∑ i ∈ Finset.range (n + (1 : ℕ)), (1 / 2 : ℝ) ^ (K - i) ≤ ∏ i ∈ Finset.range (n + (1 : ℕ)), ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - i)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,pow_le_one₀.Lean, lines 550–551
have hprod := prod_one_sub_ge (Finset.range (n + 1)) (fun i => ((1 : ℝ) / 2) ^ (K - i)) (fun i _ => by positivity) (fun i _ => pow_le_one₀ (by norm_num) (by norm_num))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 550–551 at
879b5c03f7df↗hrem_all.nd_bound.hD.h2Khave(0 : ℝ) < ((2 : ℝ) ^ K) ^ (n + (1 : ℕ))routine: positivityLeaves
((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ) ≤ ((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) * ∏ x ∈ Finset.range (n + (1 : ℕ)), ((1 : ℝ) - (1 / 2 : ℝ) ^ (K - x)), withh2K : (0 : ℝ) < ((2 : ℝ) ^ K) ^ (n + (1 : ℕ)).Lean, line 552
have h2K : (0 : ℝ) < (2 ^ K) ^ (n + 1) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 552 at
879b5c03f7df↗
hrem_all.nd_bound.h2Khave(2 : ℝ) ^ K * (1 / 2 : ℝ) ^ K = (1 : ℝ)Leaves
∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K * ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i), withh2K : (2 : ℝ) ^ K * (1 / 2 : ℝ) ^ K = (1 : ℝ).Uses library
mul_pow.Lean, line 555
have h2K : (2 : ℝ) ^ K * (1 / 2) ^ K = 1 := by rw [← mul_pow]; norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 555 at
879b5c03f7df↗hrem_all.nd_bound.e2have(2 : ℝ) * (1 / 2 : ℝ) ^ K * (((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ)) = ((2 : ℝ) ^ K) ^ nLeaves
∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K * ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i), withe2 : (2 : ℝ) * (1 / 2 : ℝ) ^ K * (((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ)) = ((2 : ℝ) ^ K) ^ n.Uses library
pow_succ.Lean, lines 556–559
have e2 : 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ (n + 1) / 2) = (2 ^ K) ^ n := by rw [pow_succ] calc 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ n * 2 ^ K / 2) = (2 ^ K * (1 / 2) ^ K) * (2 ^ K) ^ n := by ring _ = (2 ^ K) ^ n := by rw [h2K, one_mul]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 556–559 at
879b5c03f7df↗hrem_all.nd_bound.e2.s1calc(2 : ℝ) * (1 / 2 : ℝ) ^ K * (((2 : ℝ) ^ K) ^ n * (2 : ℝ) ^ K / (2 : ℝ)) = (2 : ℝ) ^ K * (1 / 2 : ℝ) ^ K * ((2 : ℝ) ^ K) ^ nroutine: ringCloses the goal.
Lean, line 558
calc 2 * (1 / 2 : ℝ) ^ K * ((2 ^ K) ^ n * 2 ^ K / 2) = (2 ^ K * (1 / 2) ^ K) * (2 ^ K) ^ n := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 558 at
879b5c03f7df↗hrem_all.nd_bound.e2.s2calcCloses the goal.
Uses library
one_mul.Lean, line 559
_ = (2 ^ K) ^ n := by rw [h2K, one_mul]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 559 at
879b5c03f7df↗
hrem_all.nd_bound.s8calc∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L) ≤ ((2 : ℝ) ^ K) ^ nCloses the goal.
Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. .Lean, line 560
calc ∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L) ≤ (2 ^ K) ^ n := hN
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 560 at
879b5c03f7df↗hrem_all.nd_bound.s9calc((2 : ℝ) ^ K) ^ n = (2 : ℝ) * (1 / 2 : ℝ) ^ K * (((2 : ℝ) ^ K) ^ (n + (1 : ℕ)) / (2 : ℝ))Closes the goal.
Lean, line 561
_ = 2 * (1 / 2) ^ K * ((2 ^ K) ^ (n + 1) / 2) := e2.symm
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 561 at
879b5c03f7df↗hrem_all.nd_bound.s10calcCloses the goal.
Uses library
Finset.rangerange nis the set of natural numbers less thann. .Lean, line 562
_ ≤ 2 * (1 / 2) ^ K * ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i) := by gcongr
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 562 at
879b5c03f7df↗
hrem_all.ineq_powhave∀ (n : ℕ), (2 : ℕ) ≤ n → (9 : ℕ) * (81 : ℕ) ^ n ≤ (256 : ℕ) ^ nLeaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withineq_pow : ∀ (n : ℕ), (2 : ℕ) ≤ n → (9 : ℕ) * (81 : ℕ) ^ n ≤ (256 : ℕ) ^ n.Lean, lines 565–575
have ineq_pow : ∀ (n : ℕ) (hn : 2 ≤ n), 9 * 81 ^ n ≤ 256 ^ n := by intro n hn induction n with | zero => omega | succ m ih => rcases (show m = 1 ∨ 2 ≤ m by omega) with rfl | hm · norm_num · have := ih hm rw [pow_succ, pow_succ] omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 565–575 at
879b5c03f7df↗hrem_all.ineq_pow.s1case routine: omegaLeaves
(9 : ℕ) * (81 : ℕ) ^ (0 : ℕ) ≤ (256 : ℕ) ^ (0 : ℕ), withhn : (2 : ℕ) ≤ (0 : ℕ).Uses library
Nat.zeroZero, the smallest natural number. .Lean, line 569
| zero => omega
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 569 at
879b5c03f7df↗hrem_all.ineq_pow.s2caseLeaves
(9 : ℕ) * (81 : ℕ) ^ (m + (1 : ℕ)) ≤ (256 : ℕ) ^ (m + (1 : ℕ)), withm : ℕ,ih : (2 : ℕ) ≤ m → (9 : ℕ) * (81 : ℕ) ^ m ≤ (256 : ℕ) ^ m,hn : (2 : ℕ) ≤ m + (1 : ℕ).Uses library
Nat.succThe successor of a natural numbern. .Lean, lines 570–575
| succ m ih => rcases (show m = 1 ∨ 2 ≤ m by omega) with rfl | hm · norm_num · have := ih hm rw [pow_succ, pow_succ] omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 570–575 at
879b5c03f7df↗hrem_all.ineq_pow.s2.s1case routine: norm_numLeaves
(9 : ℕ) * (81 : ℕ) ^ ((1 : ℕ) + (1 : ℕ)) ≤ (256 : ℕ) ^ ((1 : ℕ) + (1 : ℕ)).Lean, line 572
· norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 572 at
879b5c03f7df↗hrem_all.ineq_pow.s2.s2caseLeaves
(9 : ℕ) * (81 : ℕ) ^ (m + (1 : ℕ)) ≤ (256 : ℕ) ^ (m + (1 : ℕ)).Uses library
pow_succ.Lean, lines 573–575
· have := ih hm rw [pow_succ, pow_succ] omegatargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 573–575 at
879b5c03f7df↗hrem_all.ineq_pow.s2.s2.thishave(9 : ℕ) * (81 : ℕ) ^ m ≤ (256 : ℕ) ^ mLeaves
(9 : ℕ) * (81 : ℕ) ^ (m + (1 : ℕ)) ≤ (256 : ℕ) ^ (m + (1 : ℕ)), withthis : (9 : ℕ) * (81 : ℕ) ^ m ≤ (256 : ℕ) ^ m.Lean, line 573
· have := ih hm
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 573 at
879b5c03f7df↗
hrem_all.h4_bighave∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), (2 : ℕ) ≤ n → (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withh4_big : ∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → ∀ (n : ℕ), (2 : ℕ) ≤ n → (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 577–670
have h4_big : ∀ (Qc : ℕ → ℕ → ℚ) (hQc : (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)))) (Qx : ℕ → ℚ) (hQx : (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k)) (Aq : ℕ → ℚ) (hAq : (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)))) (n : ℕ) (hn : 2 ≤ n), (0 : ℝ) < (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) ∧ ((Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ)) ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ (2 : ℝ) ^ (2 * n + 4) := by intro Qc hQc Qx hQx Aq hAq n hn have hS := h4_series Qc hQc Qx hQx Aq hAq n (by omega) set r := (Qx n : ℝ) * (3 * ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3)) - (Aq n : ℝ) with hr set x : ℝ := (3 : ℝ) / 2 ^ n with hxdef have hx0 : 0 < x := by positivity have hx2 : x / 2 ≤ 3 / 8 := by have : (4 : ℝ) ≤ 2 ^ n := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_le_div_iff₀ (by positivity) (by norm_num)]; linarith set G : ℕ → ℝ := fun K => if 2 * n < K then ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K else 0 with hG have hGnn : ∀ K, 0 ≤ G K := by intro K; simp only [hG] split_ifs with h · exact mul_nonneg (le_of_lt (nd_bound n K (by omega) (by omega)).1) (by positivity) · exact le_refl 0 have hGpos : 0 < G (2 * n + 1) := by simp only [hG]; rw [if_pos (by omega)] exact mul_pos (nd_bound n (2 * n + 1) (by omega) (by omega)).1 (by positivity) refine ⟨?_, ?_⟩ · exact hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS · set H : ℕ → ℝ := fun K => if 2 * n < K then 2 * (x / 2) ^ K else 0 with hH have hGH : ∀ K, G K ≤ H K := by intro K; simp only [hG, hH] split_ifs with h · have hb := (nd_bound n K (by omega) (by omega)).2 calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongr _ = 2 * (x / 2) ^ K := by ring · exact le_refl 0 have hq : x / 2 < 1 := by linarith have hHsum : HasSum H (2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹) := by rw [← hasSum_nat_add_iff' (2 * n + 1)] have hz : ∑ i ∈ Finset.range (2 * n + 1), H i = 0 := Finset.sum_eq_zero (fun i hi => by simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)]) rw [hz, sub_zero] have hgeo := (hasSum_geometric_of_lt_one (by positivity) hq).mul_left (2 * (x / 2) ^ (2 * n + 1)) have hfun : (fun s => H (s + (2 * n + 1))) = fun s => 2 * (x / 2) ^ (2 * n + 1) * (x / 2) ^ s := by funext s; simp only [hH]; rw [if_pos (by omega), pow_add]; ring rw [hfun] exact hgeo have hrle : r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hasSum_le hGH hS hHsum have hr0 : 0 ≤ r := le_of_lt (hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS) have hr8 : r ≤ 8 * (x / 2) ^ (2 * n + 1) := by have hinv : (1 - x / 2)⁻¹ ≤ 4 := by rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith have hp : 0 ≤ 2 * (x / 2) ^ (2 * n + 1) := by positivity calc r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hrle _ ≤ 2 * (x / 2) ^ (2 * n + 1) * 4 := by gcongr _ = 8 * (x / 2) ^ (2 * n + 1) := by ring have hsq : r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := pow_le_pow_left₀ hr0 hr8 2 have hnat : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by have e1 : (2 : ℕ) ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) = 2 ^ (4 * n * n) * (64 * 256 ^ n) := by rw [← pow_mul, ← pow_add, show (256 : ℕ) = 2 ^ 8 by norm_num, ← pow_mul, show (64 : ℕ) = 2 ^ 6 by norm_num, ← pow_add, ← pow_add] congr 1; ring have e2 : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) = 2 ^ (4 * n * n) * (64 * (9 * 81 ^ n)) := by rw [show (81 : ℕ) = 3 ^ 4 by norm_num, ← pow_mul, pow_add]; ring rw [e1, e2] have := ineq_pow n hn gcongr have hreal : (64 : ℝ) * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by exact_mod_cast hnat have hx2' : x / 2 = 3 / 2 ^ (n + 1) := by rw [hxdef, pow_succ]; field_simp have hsq' : r ^ 2 ≤ 64 * (x / 2) ^ (4 * n + 2) := by calc r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := hsq _ = 64 * (x / 2) ^ (4 * n + 2) := by ring have hkey : (x / 2) ^ (4 * n + 2) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 3 ^ (4 * n + 2) := by rw [← mul_pow, hx2', div_mul_cancel₀ _ (by positivity)] have hP : (0 : ℝ) < ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := by positivity have hmain : 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) := by refine le_of_mul_le_mul_right ?_ hP calc 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) := by rw [← hkey]; ring _ ≤ 2 ^ (2 * n + 4) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := hreal calc r ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ 64 * (x / 2) ^ (4 * n + 2) * 2 ^ (4 * n * n) := by gcongr _ ≤ 2 ^ (2 * n + 4) := hmaintargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 577–670 at
879b5c03f7df↗hrem_all.h4_big.hShaveHasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ))Leaves
(0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhS : HasSum (fun (K : ℕ) => if (2 : ℕ) * n < K then ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * ((3 : ℝ) / (2 : ℝ) ^ n) ^ K else (0 : ℝ)) ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)).Lean, line 590
have hS := h4_series Qc hQc Qx hQx Aq hAq n (by omega)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 590 at
879b5c03f7df↗hrem_all.h4_big.hx0have(0 : ℝ) < xroutine: positivityLeaves
(0 : ℝ) < r ∧ r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhx0 : (0 : ℝ) < x.Lean, line 593
have hx0 : 0 < x := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 593 at
879b5c03f7df↗hrem_all.h4_big.hx2havex / (2 : ℝ) ≤ (3 / 8 : ℝ)Leaves
(0 : ℝ) < r ∧ r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhx2 : x / (2 : ℝ) ≤ (3 / 8 : ℝ).Uses library
div_div,div_le_div_iff₀.Lean, lines 594–598
have hx2 : x / 2 ≤ 3 / 8 := by have : (4 : ℝ) ≤ 2 ^ n := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn rw [hxdef, div_div, div_le_div_iff₀ (by positivity) (by norm_num)]; linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 594–598 at
879b5c03f7df↗hrem_all.h4_big.hx2.thishave(4 : ℝ) ≤ (2 : ℝ) ^ nLeaves
x / (2 : ℝ) ≤ (3 / 8 : ℝ), withthis : (4 : ℝ) ≤ (2 : ℝ) ^ n.Lean, lines 595–597
have : (4 : ℝ) ≤ 2 ^ n := by calc (4 : ℝ) = 2 ^ 2 := by norm_num _ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hntargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 595–597 at
879b5c03f7df↗hrem_all.h4_big.hx2.this.s1calc(4 : ℝ) = (2 : ℝ) ^ (2 : ℕ)routine: norm_numCloses the goal.
Lean, line 596
calc (4 : ℝ) = 2 ^ 2 := by norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 596 at
879b5c03f7df↗hrem_all.h4_big.hx2.this.s2calc(2 : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ nCloses the goal.
Uses library
pow_le_pow_right₀.Lean, line 597
_ ≤ 2 ^ n := pow_le_pow_right₀ (by norm_num) hn
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 597 at
879b5c03f7df↗
hrem_all.h4_big.hGnnhave∀ (K : ℕ), (0 : ℝ) ≤ G KLeaves
(0 : ℝ) < r ∧ r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhGnn : ∀ (K : ℕ), (0 : ℝ) ≤ G K.Lean, lines 602–606
have hGnn : ∀ K, 0 ≤ G K := by intro K; simp only [hG] split_ifs with h · exact mul_nonneg (le_of_lt (nd_bound n K (by omega) (by omega)).1) (by positivity) · exact le_refl 0targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 602–606 at
879b5c03f7df↗hrem_all.h4_big.hGnn.s1caseLeaves
(0 : ℝ) ≤ ((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ L ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) * x ^ K.Uses library
mul_nonnegAlias ofLeft.mul_nonneg. ,le_of_lt.Lean, line 605
· exact mul_nonneg (le_of_lt (nd_bound n K (by omega) (by omega)).1) (by positivity)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 605 at
879b5c03f7df↗hrem_all.h4_big.hGnn.s2caseLeaves
(0 : ℝ) ≤ (0 : ℝ).Uses library
le_reflThe relation≤on a preorder is reflexive. .Lean, line 606
· exact le_refl 0
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 606 at
879b5c03f7df↗
hrem_all.h4_big.hGposhave(0 : ℝ) < G ((2 : ℕ) * n + (1 : ℕ))Leaves
(0 : ℝ) < r ∧ r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhGpos : (0 : ℝ) < G ((2 : ℕ) * n + (1 : ℕ)).Uses library
if_pos,mul_posAlias ofLeft.mul_pos. .Lean, lines 607–609
have hGpos : 0 < G (2 * n + 1) := by simp only [hG]; rw [if_pos (by omega)] exact mul_pos (nd_bound n (2 * n + 1) (by omega) (by omega)).1 (by positivity)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 607–609 at
879b5c03f7df↗hrem_all.h4_big.s6caseLeaves
(0 : ℝ) < r.Uses library
hasSum_lt,hasSum_zeroConstant zero function has sum0.Lean, line 611
· exact hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 611 at
879b5c03f7df↗hrem_all.h4_big.s7caseLeaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Lean, lines 612–670
· set H : ℕ → ℝ := fun K => if 2 * n < K then 2 * (x / 2) ^ K else 0 with hH have hGH : ∀ K, G K ≤ H K := by intro K; simp only [hG, hH] split_ifs with h · have hb := (nd_bound n K (by omega) (by omega)).2 calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongr _ = 2 * (x / 2) ^ K := by ring · exact le_refl 0 have hq : x / 2 < 1 := by linarith have hHsum : HasSum H (2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹) := by rw [← hasSum_nat_add_iff' (2 * n + 1)] have hz : ∑ i ∈ Finset.range (2 * n + 1), H i = 0 := Finset.sum_eq_zero (fun i hi => by simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)]) rw [hz, sub_zero] have hgeo := (hasSum_geometric_of_lt_one (by positivity) hq).mul_left (2 * (x / 2) ^ (2 * n + 1)) have hfun : (fun s => H (s + (2 * n + 1))) = fun s => 2 * (x / 2) ^ (2 * n + 1) * (x / 2) ^ s := by funext s; simp only [hH]; rw [if_pos (by omega), pow_add]; ring rw [hfun] exact hgeo have hrle : r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hasSum_le hGH hS hHsum have hr0 : 0 ≤ r := le_of_lt (hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS) have hr8 : r ≤ 8 * (x / 2) ^ (2 * n + 1) := by have hinv : (1 - x / 2)⁻¹ ≤ 4 := by rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith have hp : 0 ≤ 2 * (x / 2) ^ (2 * n + 1) := by positivity calc r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hrle _ ≤ 2 * (x / 2) ^ (2 * n + 1) * 4 := by gcongr _ = 8 * (x / 2) ^ (2 * n + 1) := by ring have hsq : r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := pow_le_pow_left₀ hr0 hr8 2 have hnat : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by have e1 : (2 : ℕ) ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) = 2 ^ (4 * n * n) * (64 * 256 ^ n) := by rw [← pow_mul, ← pow_add, show (256 : ℕ) = 2 ^ 8 by norm_num, ← pow_mul, show (64 : ℕ) = 2 ^ 6 by norm_num, ← pow_add, ← pow_add] congr 1; ring have e2 : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) = 2 ^ (4 * n * n) * (64 * (9 * 81 ^ n)) := by rw [show (81 : ℕ) = 3 ^ 4 by norm_num, ← pow_mul, pow_add]; ring rw [e1, e2] have := ineq_pow n hn gcongr have hreal : (64 : ℝ) * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by exact_mod_cast hnat have hx2' : x / 2 = 3 / 2 ^ (n + 1) := by rw [hxdef, pow_succ]; field_simp have hsq' : r ^ 2 ≤ 64 * (x / 2) ^ (4 * n + 2) := by calc r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := hsq _ = 64 * (x / 2) ^ (4 * n + 2) := by ring have hkey : (x / 2) ^ (4 * n + 2) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 3 ^ (4 * n + 2) := by rw [← mul_pow, hx2', div_mul_cancel₀ _ (by positivity)] have hP : (0 : ℝ) < ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := by positivity have hmain : 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) := by refine le_of_mul_le_mul_right ?_ hP calc 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) := by rw [← hkey]; ring _ ≤ 2 ^ (2 * n + 4) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := hreal calc r ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ 64 * (x / 2) ^ (4 * n + 2) * 2 ^ (4 * n * n) := by gcongr _ ≤ 2 ^ (2 * n + 4) := hmaintargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 612–670 at
879b5c03f7df↗hrem_all.h4_big.s7.hGHhave∀ (K : ℕ), G K ≤ H KLeaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhGH : ∀ (K : ℕ), G K ≤ H K.Lean, lines 613–621
have hGH : ∀ K, G K ≤ H K := by intro K; simp only [hG, hH] split_ifs with h · have hb := (nd_bound n K (by omega) (by omega)).2 calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongr _ = 2 * (x / 2) ^ K := by ring · exact le_refl 0targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 613–621 at
879b5c03f7df↗hrem_all.h4_big.s7.hGH.s1caseLeaves
((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ L ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) * x ^ K ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ K.Lean, lines 616–620
· have hb := (nd_bound n K (by omega) (by omega)).2 calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongr _ = 2 * (x / 2) ^ K := by ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 616–620 at
879b5c03f7df↗hrem_all.h4_big.s7.hGH.s1.hbhave(∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ KLeaves
((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ L ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) * x ^ K ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ K, withhb : (∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i) ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K.Lean, line 616
· have hb := (nd_bound n K (by omega) (by omega)).2
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 616 at
879b5c03f7df↗hrem_all.h4_big.s7.hGH.s1.s2calc((∏ L ∈ Finset.Ioc n ((2 : ℕ) * n), ((2 : ℝ) ^ K - (2 : ℝ) ^ L)) / ∏ i ∈ Finset.range (n + (1 : ℕ)), ((2 : ℝ) ^ K - (2 : ℝ) ^ i)) * x ^ K ≤ (2 : ℝ) * (1 / 2 : ℝ) ^ K * x ^ KCloses the goal.
Uses library
Finset.IocThe finset $(a, b]$ of elementsxsuch thata < xandx ≤ b. ,Finset.rangerange nis the set of natural numbers less thann. .Lean, lines 617–619
calc ((∏ L ∈ Finset.Ioc n (2 * n), ((2 : ℝ) ^ K - 2 ^ L)) / ∏ i ∈ Finset.range (n + 1), ((2 : ℝ) ^ K - 2 ^ i)) * x ^ K ≤ 2 * (1 / 2) ^ K * x ^ K := by gcongrtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 617–619 at
879b5c03f7df↗hrem_all.h4_big.s7.hGH.s1.s3calc routine: ringCloses the goal.
Lean, line 620
_ = 2 * (x / 2) ^ K := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 620 at
879b5c03f7df↗
hrem_all.h4_big.s7.hGH.s2caseLeaves
(0 : ℝ) ≤ (0 : ℝ).Uses library
le_reflThe relation≤on a preorder is reflexive. .Lean, line 621
· exact le_refl 0
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 621 at
879b5c03f7df↗
hrem_all.h4_big.s7.hqhavex / (2 : ℝ) < (1 : ℝ)routine: linarithLeaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhq : x / (2 : ℝ) < (1 : ℝ).Lean, line 622
have hq : x / 2 < 1 := by linarith
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 622 at
879b5c03f7df↗hrem_all.h4_big.s7.hHsumhaveHasSum H ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹)Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhHsum : HasSum H ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹).Uses library
HasSumHasSum f a Lmeans that the (potentially infinite) sum of thef bforb : βconverges toaalong the SummationFilterL. ,hasSum_nat_add_iff',sub_zero.Lean, lines 623–633
have hHsum : HasSum H (2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹) := by rw [← hasSum_nat_add_iff' (2 * n + 1)] have hz : ∑ i ∈ Finset.range (2 * n + 1), H i = 0 := Finset.sum_eq_zero (fun i hi => by simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)]) rw [hz, sub_zero] have hgeo := (hasSum_geometric_of_lt_one (by positivity) hq).mul_left (2 * (x / 2) ^ (2 * n + 1)) have hfun : (fun s => H (s + (2 * n + 1))) = fun s => 2 * (x / 2) ^ (2 * n + 1) * (x / 2) ^ s := by funext s; simp only [hH]; rw [if_pos (by omega), pow_add]; ring rw [hfun] exact hgeotargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 623–633 at
879b5c03f7df↗hrem_all.h4_big.s7.hHsum.hzhave∑ i ∈ Finset.range ((2 : ℕ) * n + (1 : ℕ)), H i = (0 : ℝ)Leaves
HasSum (fun (n_1 : ℕ) => H (n_1 + ((2 : ℕ) * n + (1 : ℕ)))) ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹ - ∑ i ∈ Finset.range ((2 : ℕ) * n + (1 : ℕ)), H i), withhz : ∑ i ∈ Finset.range ((2 : ℕ) * n + (1 : ℕ)), H i = (0 : ℝ).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.sum_eq_zero,if_neg.Lean, lines 625–627
have hz : ∑ i ∈ Finset.range (2 * n + 1), H i = 0 := Finset.sum_eq_zero (fun i hi => by simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)])targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 625–627 at
879b5c03f7df↗hrem_all.h4_big.s7.hHsum.hz.thishavei < (2 : ℕ) * n + (1 : ℕ)Leaves
¬(2 : ℕ) * n < i, withthis : i < (2 : ℕ) * n + (1 : ℕ).Uses library
Finset.mem_range.Lean, line 627
simp only [hH]; rw [if_neg (by have := Finset.mem_range.mp hi; omega)])
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 627 at
879b5c03f7df↗
hrem_all.h4_big.s7.hHsum.hgeohaveHasSum (fun (i : ℕ) => (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * (x / (2 : ℝ)) ^ i) ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹)Leaves
HasSum (fun (n_1 : ℕ) => H (n_1 + ((2 : ℕ) * n + (1 : ℕ)))) ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹), withhgeo : HasSum (fun (i : ℕ) => (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * (x / (2 : ℝ)) ^ i) ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹).Uses library
hasSum_geometric_of_lt_one.Lean, line 629
have hgeo := (hasSum_geometric_of_lt_one (by positivity) hq).mul_left (2 * (x / 2) ^ (2 * n + 1))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 629 at
879b5c03f7df↗hrem_all.h4_big.s7.hHsum.hfunhave(fun (s : ℕ) => H (s + ((2 : ℕ) * n + (1 : ℕ)))) = fun (s : ℕ) => (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * (x / (2 : ℝ)) ^ sLeaves
HasSum (fun (n_1 : ℕ) => H (n_1 + ((2 : ℕ) * n + (1 : ℕ)))) ((2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹), withhfun : (fun (s : ℕ) => H (s + ((2 : ℕ) * n + (1 : ℕ)))) = fun (s : ℕ) => (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * (x / (2 : ℝ)) ^ s.Uses library
if_pos,pow_add.Lean, lines 630–631
have hfun : (fun s => H (s + (2 * n + 1))) = fun s => 2 * (x / 2) ^ (2 * n + 1) * (x / 2) ^ s := by funext s; simp only [hH]; rw [if_pos (by omega), pow_add]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 630–631 at
879b5c03f7df↗
hrem_all.h4_big.s7.hrlehaver ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhrle : r ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹.Uses library
hasSum_le.Lean, line 634
have hrle : r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hasSum_le hGH hS hHsum
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 634 at
879b5c03f7df↗hrem_all.h4_big.s7.hr0have(0 : ℝ) ≤ rLeaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhr0 : (0 : ℝ) ≤ r.Uses library
le_of_lt,hasSum_lt,hasSum_zeroConstant zero function has sum0.Lean, lines 635–636
have hr0 : 0 ≤ r := le_of_lt (hasSum_lt (f := fun _ => (0 : ℝ)) (g := G) (i := 2 * n + 1) (fun K => hGnn K) hGpos hasSum_zero hS)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 635–636 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8haver ≤ (8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhr8 : r ≤ (8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)).Lean, lines 637–643
have hr8 : r ≤ 8 * (x / 2) ^ (2 * n + 1) := by have hinv : (1 - x / 2)⁻¹ ≤ 4 := by rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith have hp : 0 ≤ 2 * (x / 2) ^ (2 * n + 1) := by positivity calc r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hrle _ ≤ 2 * (x / 2) ^ (2 * n + 1) * 4 := by gcongr _ = 8 * (x / 2) ^ (2 * n + 1) := by ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 637–643 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8.hinvhave((1 : ℝ) - x / (2 : ℝ))⁻¹ ≤ (4 : ℝ)Leaves
r ≤ (8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)), withhinv : ((1 : ℝ) - x / (2 : ℝ))⁻¹ ≤ (4 : ℝ).Uses library
inv_le_comm₀See alsoinv_le_of_inv_le₀for a one-sided implication with one fewer assumption. .Lean, lines 638–639
have hinv : (1 - x / 2)⁻¹ ≤ 4 := by rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 638–639 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8.hphave(0 : ℝ) ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ))routine: positivityLeaves
r ≤ (8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)), withhp : (0 : ℝ) ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)).Lean, line 640
have hp : 0 ≤ 2 * (x / 2) ^ (2 * n + 1) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 640 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8.s3calcr ≤ (2 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ)) * ((1 : ℝ) - x / (2 : ℝ))⁻¹Closes the goal.
Lean, line 641
calc r ≤ 2 * (x / 2) ^ (2 * n + 1) * (1 - x / 2)⁻¹ := hrle
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 641 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8.s4calcCloses the goal.
Lean, line 642
_ ≤ 2 * (x / 2) ^ (2 * n + 1) * 4 := by gcongr
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 642 at
879b5c03f7df↗hrem_all.h4_big.s7.hr8.s5calc routine: ringCloses the goal.
Lean, line 643
_ = 8 * (x / 2) ^ (2 * n + 1) := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 643 at
879b5c03f7df↗
hrem_all.h4_big.s7.hsqhaver ^ (2 : ℕ) ≤ ((8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ))) ^ (2 : ℕ)Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhsq : r ^ (2 : ℕ) ≤ ((8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ))) ^ (2 : ℕ).Uses library
pow_le_pow_left₀.Lean, line 644
have hsq : r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := pow_le_pow_left₀ hr0 hr8 2
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 644 at
879b5c03f7df↗hrem_all.h4_big.s7.hnathave(64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhnat : (64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)).Lean, lines 645–654
have hnat : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by have e1 : (2 : ℕ) ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) = 2 ^ (4 * n * n) * (64 * 256 ^ n) := by rw [← pow_mul, ← pow_add, show (256 : ℕ) = 2 ^ 8 by norm_num, ← pow_mul, show (64 : ℕ) = 2 ^ 6 by norm_num, ← pow_add, ← pow_add] congr 1; ring have e2 : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) = 2 ^ (4 * n * n) * (64 * (9 * 81 ^ n)) := by rw [show (81 : ℕ) = 3 ^ 4 by norm_num, ← pow_mul, pow_add]; ring rw [e1, e2] have := ineq_pow n hn gcongrtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 645–654 at
879b5c03f7df↗hrem_all.h4_big.s7.hnat.e1have(2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)) = (2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * (256 : ℕ) ^ n)Leaves
(64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)), withe1 : (2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)) = (2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * (256 : ℕ) ^ n).Uses library
pow_mul,pow_add.Lean, lines 646–649
have e1 : (2 : ℕ) ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) = 2 ^ (4 * n * n) * (64 * 256 ^ n) := by rw [← pow_mul, ← pow_add, show (256 : ℕ) = 2 ^ 8 by norm_num, ← pow_mul, show (64 : ℕ) = 2 ^ 6 by norm_num, ← pow_add, ← pow_add] congr 1; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 646–649 at
879b5c03f7df↗hrem_all.h4_big.s7.hnat.e2have(64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) = (2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * ((9 : ℕ) * (81 : ℕ) ^ n))Leaves
(64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℕ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℕ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)), withe2 : (64 : ℕ) * (3 : ℕ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℕ) ^ ((4 : ℕ) * n * n) = (2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * ((9 : ℕ) * (81 : ℕ) ^ n)).Uses library
pow_mul,pow_add.Lean, lines 650–651
have e2 : 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) = 2 ^ (4 * n * n) * (64 * (9 * 81 ^ n)) := by rw [show (81 : ℕ) = 3 ^ 4 by norm_num, ← pow_mul, pow_add]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 650–651 at
879b5c03f7df↗hrem_all.h4_big.s7.hnat.thishave(9 : ℕ) * (81 : ℕ) ^ n ≤ (256 : ℕ) ^ nLeaves
(2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * ((9 : ℕ) * (81 : ℕ) ^ n)) ≤ (2 : ℕ) ^ ((4 : ℕ) * n * n) * ((64 : ℕ) * (256 : ℕ) ^ n), withthis : (9 : ℕ) * (81 : ℕ) ^ n ≤ (256 : ℕ) ^ n.Lean, line 653
have := ineq_pow n hn
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 653 at
879b5c03f7df↗
hrem_all.h4_big.s7.hrealhave(64 : ℝ) * (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhreal : (64 : ℝ) * (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)).Lean, lines 655–656
have hreal : (64 : ℝ) * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) * (2 ^ (n + 1)) ^ (4 * n + 2) := by exact_mod_cast hnattargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 655–656 at
879b5c03f7df↗hrem_all.h4_big.s7.hx2'havex / (2 : ℝ) = (3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhx2' : x / (2 : ℝ) = (3 : ℝ) / (2 : ℝ) ^ (n + (1 : ℕ)).Uses library
pow_succ.Lean, line 657
have hx2' : x / 2 = 3 / 2 ^ (n + 1) := by rw [hxdef, pow_succ]; field_simp
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 657 at
879b5c03f7df↗hrem_all.h4_big.s7.hsq'haver ^ (2 : ℕ) ≤ (64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhsq' : r ^ (2 : ℕ) ≤ (64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)).Lean, lines 658–660
have hsq' : r ^ 2 ≤ 64 * (x / 2) ^ (4 * n + 2) := by calc r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := hsq _ = 64 * (x / 2) ^ (4 * n + 2) := by ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 658–660 at
879b5c03f7df↗hrem_all.h4_big.s7.hsq'.s1calcr ^ (2 : ℕ) ≤ ((8 : ℝ) * (x / (2 : ℝ)) ^ ((2 : ℕ) * n + (1 : ℕ))) ^ (2 : ℕ)Closes the goal.
Lean, line 659
calc r ^ 2 ≤ (8 * (x / 2) ^ (2 * n + 1)) ^ 2 := hsq
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 659 at
879b5c03f7df↗hrem_all.h4_big.s7.hsq'.s2calc routine: ringCloses the goal.
Lean, line 660
_ = 64 * (x / 2) ^ (4 * n + 2) := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 660 at
879b5c03f7df↗
hrem_all.h4_big.s7.hkeyhave(x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)) = (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhkey : (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)) = (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ)).Uses library
mul_pow,div_mul_cancel₀.Lean, lines 661–662
have hkey : (x / 2) ^ (4 * n + 2) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 3 ^ (4 * n + 2) := by rw [← mul_pow, hx2', div_mul_cancel₀ _ (by positivity)]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 661–662 at
879b5c03f7df↗hrem_all.h4_big.s7.hPhave(0 : ℝ) < ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ))routine: positivityLeaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhP : (0 : ℝ) < ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)).Lean, line 663
have hP : (0 : ℝ) < ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 663 at
879b5c03f7df↗hrem_all.h4_big.s7.hmainhave(64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
r ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhmain : (64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Uses library
le_of_mul_le_mul_right.Lean, lines 664–668
have hmain : 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) ≤ 2 ^ (2 * n + 4) := by refine le_of_mul_le_mul_right ?_ hP calc 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) := by rw [← hkey]; ring _ ≤ 2 ^ (2 * n + 4) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := hrealtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 664–668 at
879b5c03f7df↗hrem_all.h4_big.s7.hmain.s1calc(64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ)) = (64 : ℝ) * (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n)Closes the goal.
Lean, lines 666–667
calc 64 * (x / 2) ^ (4 * n + 2) * (2 : ℝ) ^ (4 * n * n) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) = 64 * 3 ^ (4 * n + 2) * 2 ^ (4 * n * n) := by rw [← hkey]; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 666–667 at
879b5c03f7df↗hrem_all.h4_big.s7.hmain.s2calc(64 : ℝ) * (3 : ℝ) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * ((2 : ℝ) ^ (n + (1 : ℕ))) ^ ((4 : ℕ) * n + (2 : ℕ))Closes the goal.
Lean, line 668
_ ≤ 2 ^ (2 * n + 4) * ((2 : ℝ) ^ (n + 1)) ^ (4 * n + 2) := hreal
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 668 at
879b5c03f7df↗
hrem_all.h4_big.s7.s15calcr ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n)Closes the goal.
Lean, line 669
calc r ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ 64 * (x / 2) ^ (4 * n + 2) * 2 ^ (4 * n * n) := by gcongr
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 669 at
879b5c03f7df↗hrem_all.h4_big.s7.s16calc(64 : ℝ) * (x / (2 : ℝ)) ^ ((4 : ℕ) * n + (2 : ℕ)) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Closes the goal.
Lean, line 670
_ ≤ 2 ^ (2 * n + 4) := hmain
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 670 at
879b5c03f7df↗
hrem_all.T_factshave(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withT_facts : (Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 673–696
have T_facts : Summable (fun m : ℕ => (1 : ℝ) / (2 ^ (m + 3) - 3)) ∧ 0 < ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ∧ ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ 2 / 5 := by have h5 : ∀ m : ℕ, 5 * (2 : ℝ) ^ m ≤ 2 ^ (m + 3) - 3 := by intro m have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have e : (2 : ℝ) ^ (m + 3) = 8 * 2 ^ m := by rw [pow_add]; norm_num; ring rw [e]; linarith have hpos : ∀ m : ℕ, 0 < (2 : ℝ) ^ (m + 3) - 3 := fun m => by have := h5 m; have : (0 : ℝ) < 2 ^ m := by positivity linarith have hle : ∀ m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ (1 / 5) * (1 / 2) ^ m := by intro m have e : (1 / 5 : ℝ) * (1 / 2) ^ m = 1 / (5 * 2 ^ m) := by rw [one_div_pow]; field_simp rw [e] exact one_div_le_one_div_of_le (by positivity) (h5 m) have hs : Summable (fun m : ℕ => (1 : ℝ) / (2 ^ (m + 3) - 3)) := Summable.of_nonneg_of_le (fun m => le_of_lt (one_div_pos.mpr (hpos m))) hle (summable_geometric_two.mul_left (1 / 5)) refine ⟨hs, ?_, ?_⟩ · exact hs.tsum_pos (fun m => le_of_lt (one_div_pos.mpr (hpos m))) 0 (one_div_pos.mpr (hpos 0)) · calc ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ ∑' m : ℕ, (1 / 5 : ℝ) * (1 / 2) ^ m := hs.tsum_le_tsum hle (summable_geometric_two.mul_left (1 / 5)) _ = 2 / 5 := by rw [tsum_mul_left, tsum_geometric_two]; norm_numtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 673–696 at
879b5c03f7df↗hrem_all.T_facts.h5have∀ (m : ℕ), (5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)Leaves
(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ), withh5 : ∀ (m : ℕ), (5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ).Lean, lines 675–679
have h5 : ∀ m : ℕ, 5 * (2 : ℝ) ^ m ≤ 2 ^ (m + 3) - 3 := by intro m have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num) have e : (2 : ℝ) ^ (m + 3) = 8 * 2 ^ m := by rw [pow_add]; norm_num; ring rw [e]; linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 675–679 at
879b5c03f7df↗hrem_all.T_facts.h5.h1have(1 : ℝ) ≤ (2 : ℝ) ^ mLeaves
(5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ), withh1 : (1 : ℝ) ≤ (2 : ℝ) ^ m.Uses library
one_le_pow₀.Lean, line 677
have h1 : (1 : ℝ) ≤ 2 ^ m := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 677 at
879b5c03f7df↗hrem_all.T_facts.h5.ehave(2 : ℝ) ^ (m + (3 : ℕ)) = (8 : ℝ) * (2 : ℝ) ^ mLeaves
(5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ), withe : (2 : ℝ) ^ (m + (3 : ℕ)) = (8 : ℝ) * (2 : ℝ) ^ m.Uses library
pow_add.Lean, line 678
have e : (2 : ℝ) ^ (m + 3) = 8 * 2 ^ m := by rw [pow_add]; norm_num; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 678 at
879b5c03f7df↗
hrem_all.T_facts.hposhave∀ (m : ℕ), (0 : ℝ) < (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)Leaves
(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ), withhpos : ∀ (m : ℕ), (0 : ℝ) < (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ).Lean, lines 680–682
have hpos : ∀ m : ℕ, 0 < (2 : ℝ) ^ (m + 3) - 3 := fun m => by have := h5 m; have : (0 : ℝ) < 2 ^ m := by positivity linarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 680–682 at
879b5c03f7df↗hrem_all.T_facts.hpos.s1have(5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)Leaves
(0 : ℝ) < (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ), withthis : (5 : ℝ) * (2 : ℝ) ^ m ≤ (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ).Lean, line 681
have := h5 m; have : (0 : ℝ) < 2 ^ m := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 681 at
879b5c03f7df↗hrem_all.T_facts.hpos.s2have(0 : ℝ) < (2 : ℝ) ^ mroutine: positivityLeaves
(0 : ℝ) < (2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ), withthis : (0 : ℝ) < (2 : ℝ) ^ m.Lean, line 681
have := h5 m; have : (0 : ℝ) < 2 ^ m := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 681 at
879b5c03f7df↗
hrem_all.T_facts.hlehave∀ (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 5 : ℝ) * (1 / 2 : ℝ) ^ mLeaves
(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ), withhle : ∀ (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 5 : ℝ) * (1 / 2 : ℝ) ^ m.Uses library
one_div_le_one_div_of_le.Lean, lines 683–688
have hle : ∀ m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ (1 / 5) * (1 / 2) ^ m := by intro m have e : (1 / 5 : ℝ) * (1 / 2) ^ m = 1 / (5 * 2 ^ m) := by rw [one_div_pow]; field_simp rw [e] exact one_div_le_one_div_of_le (by positivity) (h5 m)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 683–688 at
879b5c03f7df↗hrem_all.T_facts.hle.ehave(1 / 5 : ℝ) * (1 / 2 : ℝ) ^ m = (1 : ℝ) / ((5 : ℝ) * (2 : ℝ) ^ m)Leaves
(1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 5 : ℝ) * (1 / 2 : ℝ) ^ m, withe : (1 / 5 : ℝ) * (1 / 2 : ℝ) ^ m = (1 : ℝ) / ((5 : ℝ) * (2 : ℝ) ^ m).Uses library
one_div_pow.Lean, lines 685–686
have e : (1 / 5 : ℝ) * (1 / 2) ^ m = 1 / (5 * 2 ^ m) := by rw [one_div_pow]; field_simptargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 685–686 at
879b5c03f7df↗
hrem_all.T_facts.hshaveSummable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))Leaves
(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ), withhs : Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Summable.of_nonneg_of_leComparison test of convergence of series of non-negative real numbers. ,le_of_lt,one_div_pos,summable_geometric_two.Lean, lines 689–691
have hs : Summable (fun m : ℕ => (1 : ℝ) / (2 ^ (m + 3) - 3)) := Summable.of_nonneg_of_le (fun m => le_of_lt (one_div_pos.mpr (hpos m))) hle (summable_geometric_two.mul_left (1 / 5))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 689–691 at
879b5c03f7df↗hrem_all.T_facts.s5caseLeaves
(0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)).Uses library
le_of_lt,one_div_pos.Lean, line 693
· exact hs.tsum_pos (fun m => le_of_lt (one_div_pos.mpr (hpos m))) 0 (one_div_pos.mpr (hpos 0))
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 693 at
879b5c03f7df↗hrem_all.T_facts.s6caseLeaves
∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ).Lean, lines 694–696
· calc ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ ∑' m : ℕ, (1 / 5 : ℝ) * (1 / 2) ^ m := hs.tsum_le_tsum hle (summable_geometric_two.mul_left (1 / 5)) _ = 2 / 5 := by rw [tsum_mul_left, tsum_geometric_two]; norm_numtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 694–696 at
879b5c03f7df↗hrem_all.T_facts.s6.s1calc∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ ∑' (m : ℕ), (1 / 5 : ℝ) * (1 / 2 : ℝ) ^ mCloses the goal.
Uses library
summable_geometric_two.Lean, lines 694–695
· calc ∑' m : ℕ, (1 : ℝ) / (2 ^ (m + 3) - 3) ≤ ∑' m : ℕ, (1 / 5 : ℝ) * (1 / 2) ^ m := hs.tsum_le_tsum hle (summable_geometric_two.mul_left (1 / 5))targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 694–695 at
879b5c03f7df↗hrem_all.T_facts.s6.s2calcCloses the goal.
Uses library
tsum_mul_left,tsum_geometric_two.Lean, line 696
_ = 2 / 5 := by rw [tsum_mul_left, tsum_geometric_two]; norm_num
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 696 at
879b5c03f7df↗
hrem_all.s17obtain(Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ))) ∧ (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ∧ ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ)Leaves
∀ (Qc : ℕ → ℕ → ℚ), (Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) → ∀ (Qx : ℕ → ℚ), (Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k) → ∀ (Aq : ℕ → ℚ), (Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))) → (∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n) → ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withleft✝ : Summable fun (m : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)),hTpos : (0 : ℝ) < ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)),hTle : ∑' (m : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (m + (3 : ℕ)) - (3 : ℝ)) ≤ (2 / 5 : ℝ).Lean, line 697
obtain ⟨_, hTpos, hTle⟩ := T_facts
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 697 at
879b5c03f7df↗hrem_all.hQx0haveQx (0 : ℕ) = (1 : ℚ)Leaves
(0 : ℝ) < (↑(Qx (0 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (0 : ℕ)) : ℝ) ∧ ((↑(Qx (0 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (0 : ℕ)) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (0 : ℕ) * (0 : ℕ)) ≤ (2 : ℝ) ^ ((2 : ℕ) * (0 : ℕ) + (4 : ℕ)), withhQx0 : Qx (0 : ℕ) = (1 : ℚ).Lean, line 701
have hQx0 : Qx 0 = 1 := by rw [hQx, hQc]; simp
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 701 at
879b5c03f7df↗hrem_all.hAq0haveAq (0 : ℕ) = (0 : ℚ)Leaves
(0 : ℝ) < (↑(Qx (0 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (0 : ℕ)) : ℝ) ∧ ((↑(Qx (0 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (0 : ℕ)) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (0 : ℕ) * (0 : ℕ)) ≤ (2 : ℝ) ^ ((2 : ℕ) * (0 : ℕ) + (4 : ℕ)), withhAq0 : Aq (0 : ℕ) = (0 : ℚ).Lean, line 702
have hAq0 : Aq 0 = 0 := by rw [hAq]; simp
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 702 at
879b5c03f7df↗hrem_all.ehave((1 : ℝ) * ((3 : ℝ) * T) - (0 : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (0 : ℕ) * (0 : ℕ)) = (9 : ℝ) * (T * T)routine: ringLeaves
((1 : ℝ) * ((3 : ℝ) * T) - (0 : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ (0 : ℕ) ≤ (2 : ℝ) ^ (4 : ℕ), withe : ((1 : ℝ) * ((3 : ℝ) * T) - (0 : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (0 : ℕ) * (0 : ℕ)) = (9 : ℝ) * (T * T).Lean, line 707
have e : ((1 : ℝ) * (3 * T) - 0) ^ 2 * (2 : ℝ) ^ (4 * 0 * 0) = 9 * (T * T) := by ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 707 at
879b5c03f7df↗hrem_all.hQx1haveQx (1 : ℕ) = (3 / 2 : ℚ)Leaves
(0 : ℝ) < (↑(Qx (1 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (1 : ℕ)) : ℝ) ∧ ((↑(Qx (1 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (1 : ℕ)) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (1 : ℕ) * (1 : ℕ)) ≤ (2 : ℝ) ^ ((2 : ℕ) * (1 : ℕ) + (4 : ℕ)), withhQx1 : Qx (1 : ℕ) = (3 / 2 : ℚ).Uses library
Finset.sum_range_succ,Finset.prod_range_succ.Lean, lines 713–714
have hQx1 : Qx 1 = 3 / 2 := by rw [hQx, hQc]; norm_num [Finset.sum_range_succ, Finset.prod_range_succ]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 713–714 at
879b5c03f7df↗hrem_all.hAq1haveAq (1 : ℕ) = (0 : ℚ)Leaves
(0 : ℝ) < (↑(Qx (1 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (1 : ℕ)) : ℝ) ∧ ((↑(Qx (1 : ℕ)) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq (1 : ℕ)) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * (1 : ℕ) * (1 : ℕ)) ≤ (2 : ℝ) ^ ((2 : ℕ) * (1 : ℕ) + (4 : ℕ)), withhAq1 : Aq (1 : ℕ) = (0 : ℚ).Uses library
Finset.sum_range_succ,Finset.prod_range_succ.Lean, lines 715–717
have hAq1 : Aq 1 = 0 := by rw [hAq]; simp only [hQx1]; rw [hQc] norm_num [Finset.sum_range_succ, Finset.prod_range_succ]targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 715–717 at
879b5c03f7df↗
s2obtain∃ (Qc : ℕ → ℕ → ℚ), Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))Leaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withQc : ℕ → ℕ → ℚ,hQc : Qc = fun (n k : ℕ) => ((-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - (1 : ℕ)) / (2 : ℕ)) * ∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ))) * ∏ i ∈ Finset.range n, ((2 : ℚ) ^ ((2 : ℕ) * n - k - i) - (1 : ℚ)) / ((2 : ℚ) ^ (i + (1 : ℕ)) - (1 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 729–732
obtain ⟨Qc, hQc⟩ : ∃ Qc : ℕ → ℕ → ℚ, Qc = fun n k => (-1 : ℚ) ^ k * (2 : ℚ) ^ (k * (k - 1) / 2) * (∏ i ∈ Finset.range k, ((2 : ℚ) ^ (n - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) * (∏ i ∈ Finset.range n, ((2 : ℚ) ^ (2 * n - k - i) - 1) / ((2 : ℚ) ^ (i + 1) - 1)) := ⟨_, rfl⟩targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 729–732 at
879b5c03f7df↗s3obtain∃ (Qx : ℕ → ℚ), Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ kLeaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withQx : ℕ → ℚ,hQx : Qx = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k.Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 733–734
obtain ⟨Qx, hQx⟩ : ∃ Qx : ℕ → ℚ, Qx = fun n => ∑ k ∈ Finset.range (n + 1), Qc n k * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k := ⟨_, rfl⟩targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 733–734 at
879b5c03f7df↗s4obtain∃ (Aq : ℕ → ℚ), Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ))Leaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withAq : ℕ → ℚ,hAq : Aq = fun (n : ℕ) => ∑ k ∈ Finset.range (n + (1 : ℕ)), (∑ j ∈ Finset.range (k + (1 : ℕ)), Qc n j / ((2 : ℚ) ^ (k - j) - (1 : ℚ))) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + (1 : ℕ)) - (3 : ℚ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Exists.introExistential introduction. ,rflrfl : a = ais the unique constructor of the equality type. .Lean, lines 735–738
obtain ⟨Aq, hAq⟩ : ∃ Aq : ℕ → ℚ, Aq = fun n => ∑ k ∈ Finset.range (n + 1), (∑ j ∈ Finset.range (k + 1), Qc n j / ((2 : ℚ) ^ (k - j) - 1)) * ((3 : ℚ) / (2 : ℚ) ^ n) ^ k + Qx n * ∑ j ∈ Finset.range n, (3 : ℚ) / ((2 : ℚ) ^ (j + 1) - 3) := ⟨_, rfl⟩targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 735–738 at
879b5c03f7df↗hdenhave∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq nLeaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withhden : ∀ (n : ℕ), ∃ (d : ℕ), (0 : ℕ) < d ∧ (↑d : ℝ) ^ (2 : ℕ) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) ∧ (∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Qx n) ∧ ∃ (z : ℤ), (↑z : ℚ) = (↑d : ℚ) * Aq n.Uses statements erdos-1050--h1-v2--h3.
Lean, lines 740–742
have hden : ∀ n : ℕ, ∃ d : ℕ, 0 < d ∧ ((d : ℝ)) ^ 2 ≤ (2 : ℝ) ^ (3 * n * n) ∧ (∃ z : ℤ, (z : ℚ) = d * Qx n) ∧ ∃ z : ℤ, (z : ℚ) = d * Aq n := erdos_1050__h1_v2__h3 Qc hQc Qx hQx Aq hAqtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 740–742 at
879b5c03f7df↗hremhave∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withhrem : ∀ (n : ℕ), (0 : ℝ) < (↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ) ∧ ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)) ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Lean, lines 744–748
have hrem : ∀ n : ℕ, 0 < (Qx n : ℝ) * (3 * ∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - (Aq n : ℝ) ∧ ((Qx n : ℝ) * (3 * ∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - (Aq n : ℝ)) ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ (2 : ℝ) ^ (2 * n + 4) := hrem_all Qc hQc Qx hQx Aq hAq hdentargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 744–748 at
879b5c03f7df↗keyhave∀ (n : ℕ), (↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) = (↑(d n) : ℝ) * ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ))Leaves
(∀ (n : ℕ), (↑((fun (n : ℕ) => (3 : ℤ) * b n) n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑((fun (n : ℕ) => (3 : ℤ) * b n) n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withkey : ∀ (n : ℕ), (↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) = (↑(d n) : ℝ) * ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)).Lean, lines 754–761
have key : ∀ n : ℕ, (((3 * b n : ℤ)) : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n = (d n : ℝ) * ((Qx n : ℝ) * (3 * ∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - (Aq n : ℝ)) := by intro n have hb' : (b n : ℝ) = (d n : ℝ) * (Qx n : ℝ) := by exact_mod_cast hb n have ha' : (a n : ℝ) = (d n : ℝ) * (Aq n : ℝ) := by exact_mod_cast ha n push_cast rw [hb', ha'] ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 754–761 at
879b5c03f7df↗key.hb'have(↑(b n) : ℝ) = (↑(d n) : ℝ) * (↑(Qx n) : ℝ)Leaves
(↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) = (↑(d n) : ℝ) * ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withhb' : (↑(b n) : ℝ) = (↑(d n) : ℝ) * (↑(Qx n) : ℝ).Lean, line 757
have hb' : (b n : ℝ) = (d n : ℝ) * (Qx n : ℝ) := by exact_mod_cast hb n
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 757 at
879b5c03f7df↗key.ha'have(↑(a n) : ℝ) = (↑(d n) : ℝ) * (↑(Aq n) : ℝ)Leaves
(↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) = (↑(d n) : ℝ) * ((↑(Qx n) : ℝ) * ((3 : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))) - (↑(Aq n) : ℝ)), withha' : (↑(a n) : ℝ) = (↑(d n) : ℝ) * (↑(Aq n) : ℝ).Lean, line 758
have ha' : (a n : ℝ) = (d n : ℝ) * (Aq n : ℝ) := by exact_mod_cast ha n
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 758 at
879b5c03f7df↗
poshave∀ (n : ℕ), (0 : ℝ) < (↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)Leaves
(∀ (n : ℕ), (↑((fun (n : ℕ) => (3 : ℤ) * b n) n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑((fun (n : ℕ) => (3 : ℤ) * b n) n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)), withpos : ∀ (n : ℕ), (0 : ℝ) < (↑((3 : ℤ) * b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ).Uses library
mul_posAlias ofLeft.mul_pos. .Lean, lines 762–765
have pos : ∀ n : ℕ, 0 < (((3 * b n : ℤ)) : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n := by intro n rw [key n] exact mul_pos (by exact_mod_cast hd0 n) (hrem n).1targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 762–765 at
879b5c03f7df↗boundhave∀ (n : ℕ), e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ nLeaves
Filter.Tendsto e Filter.atTop (nhds (0 : ℝ)), withbound : ∀ (n : ℕ), e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n.Uses library
one_div_pow,mul_one_div,le_div_iff₀Seele_div_iff₀'for a version with multiplication on the other side. .Lean, lines 769–789
have bound : ∀ n : ℕ, e n ^ 2 ≤ 64 * (1 / 2 : ℝ) ^ n := by intro n have h1 : e n ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ (2 : ℝ) ^ (3 * n * n) * (2 : ℝ) ^ (2 * n + 4) := by simp only [he] rw [key n, mul_pow, mul_assoc] exact mul_le_mul (hdb n) (hrem n).2 (by positivity) (by positivity) have h2 : (2 : ℝ) ^ (4 * n * n) = (2 : ℝ) ^ (n * n) * (2 : ℝ) ^ (3 * n * n) := by rw [← pow_add]; ring_nf have h3 : e n ^ 2 * (2 : ℝ) ^ (n * n) ≤ (2 : ℝ) ^ (2 * n + 4) := by have hp : (0 : ℝ) < (2 : ℝ) ^ (3 * n * n) := by positivity rw [h2] at h1 nlinarith have h4 : (2 : ℝ) ^ (2 * n + 4) * 2 ^ n ≤ 64 * (2 : ℝ) ^ (n * n) := by have : 3 * n + 4 ≤ n * n + 6 := by nlinarith [sq_nonneg ((n : ℤ) - 2)] calc (2 : ℝ) ^ (2 * n + 4) * 2 ^ n = 2 ^ (3 * n + 4) := by rw [← pow_add]; ring_nf _ ≤ 2 ^ (n * n + 6) := pow_le_pow_right₀ (by norm_num) this _ = 64 * (2 : ℝ) ^ (n * n) := by rw [pow_add]; norm_num; ring have hpn : (0 : ℝ) < (2 : ℝ) ^ n := by positivity have hpnn : (0 : ℝ) < (2 : ℝ) ^ (n * n) := by positivity rw [one_div_pow, mul_one_div, le_div_iff₀ hpn] nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 769–789 at
879b5c03f7df↗bound.h1havee n ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) * (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withh1 : e n ^ (2 : ℕ) * (2 : ℝ) ^ ((4 : ℕ) * n * n) ≤ (2 : ℝ) ^ ((3 : ℕ) * n * n) * (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Uses library
mul_pow,mul_assoc,mul_le_mulAlias ofmul_le_mul_of_nonneg'. .Lean, lines 771–774
have h1 : e n ^ 2 * (2 : ℝ) ^ (4 * n * n) ≤ (2 : ℝ) ^ (3 * n * n) * (2 : ℝ) ^ (2 * n + 4) := by simp only [he] rw [key n, mul_pow, mul_assoc] exact mul_le_mul (hdb n) (hrem n).2 (by positivity) (by positivity)targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 771–774 at
879b5c03f7df↗bound.h2have(2 : ℝ) ^ ((4 : ℕ) * n * n) = (2 : ℝ) ^ (n * n) * (2 : ℝ) ^ ((3 : ℕ) * n * n)Leaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withh2 : (2 : ℝ) ^ ((4 : ℕ) * n * n) = (2 : ℝ) ^ (n * n) * (2 : ℝ) ^ ((3 : ℕ) * n * n).Uses library
pow_add.Lean, lines 775–776
have h2 : (2 : ℝ) ^ (4 * n * n) = (2 : ℝ) ^ (n * n) * (2 : ℝ) ^ (3 * n * n) := by rw [← pow_add]; ring_nftargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 775–776 at
879b5c03f7df↗bound.h3havee n ^ (2 : ℕ) * (2 : ℝ) ^ (n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ))Leaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withh3 : e n ^ (2 : ℕ) * (2 : ℝ) ^ (n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)).Lean, lines 777–780
have h3 : e n ^ 2 * (2 : ℝ) ^ (n * n) ≤ (2 : ℝ) ^ (2 * n + 4) := by have hp : (0 : ℝ) < (2 : ℝ) ^ (3 * n * n) := by positivity rw [h2] at h1 nlinarithtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 777–780 at
879b5c03f7df↗bound.h3.hphave(0 : ℝ) < (2 : ℝ) ^ ((3 : ℕ) * n * n)routine: positivityLeaves
e n ^ (2 : ℕ) * (2 : ℝ) ^ (n * n) ≤ (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)), withhp : (0 : ℝ) < (2 : ℝ) ^ ((3 : ℕ) * n * n).Lean, line 778
have hp : (0 : ℝ) < (2 : ℝ) ^ (3 * n * n) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 778 at
879b5c03f7df↗
bound.h4have(2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * (2 : ℝ) ^ n ≤ (64 : ℝ) * (2 : ℝ) ^ (n * n)Leaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withh4 : (2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * (2 : ℝ) ^ n ≤ (64 : ℝ) * (2 : ℝ) ^ (n * n).Lean, lines 781–785
have h4 : (2 : ℝ) ^ (2 * n + 4) * 2 ^ n ≤ 64 * (2 : ℝ) ^ (n * n) := by have : 3 * n + 4 ≤ n * n + 6 := by nlinarith [sq_nonneg ((n : ℤ) - 2)] calc (2 : ℝ) ^ (2 * n + 4) * 2 ^ n = 2 ^ (3 * n + 4) := by rw [← pow_add]; ring_nf _ ≤ 2 ^ (n * n + 6) := pow_le_pow_right₀ (by norm_num) this _ = 64 * (2 : ℝ) ^ (n * n) := by rw [pow_add]; norm_num; ringtargets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 781–785 at
879b5c03f7df↗bound.h4.thishave(3 : ℕ) * n + (4 : ℕ) ≤ n * n + (6 : ℕ)routine: nlinarithLeaves
(2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * (2 : ℝ) ^ n ≤ (64 : ℝ) * (2 : ℝ) ^ (n * n), withthis : (3 : ℕ) * n + (4 : ℕ) ≤ n * n + (6 : ℕ).Uses library
sq_nonneg.Lean, line 782
have : 3 * n + 4 ≤ n * n + 6 := by nlinarith [sq_nonneg ((n : ℤ) - 2)]
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 782 at
879b5c03f7df↗bound.h4.s2calc(2 : ℝ) ^ ((2 : ℕ) * n + (4 : ℕ)) * (2 : ℝ) ^ n = (2 : ℝ) ^ ((3 : ℕ) * n + (4 : ℕ))Closes the goal.
Uses library
pow_add.Lean, line 783
calc (2 : ℝ) ^ (2 * n + 4) * 2 ^ n = 2 ^ (3 * n + 4) := by rw [← pow_add]; ring_nf
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 783 at
879b5c03f7df↗bound.h4.s3calc(2 : ℝ) ^ ((3 : ℕ) * n + (4 : ℕ)) ≤ (2 : ℝ) ^ (n * n + (6 : ℕ))Closes the goal.
Uses library
pow_le_pow_right₀.Lean, line 784
_ ≤ 2 ^ (n * n + 6) := pow_le_pow_right₀ (by norm_num) this
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 784 at
879b5c03f7df↗bound.h4.s4calcCloses the goal.
Uses library
pow_add.Lean, line 785
_ = 64 * (2 : ℝ) ^ (n * n) := by rw [pow_add]; norm_num; ring
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 785 at
879b5c03f7df↗
bound.hpnhave(0 : ℝ) < (2 : ℝ) ^ nroutine: positivityLeaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withhpn : (0 : ℝ) < (2 : ℝ) ^ n.Lean, line 786
have hpn : (0 : ℝ) < (2 : ℝ) ^ n := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 786 at
879b5c03f7df↗bound.hpnnhave(0 : ℝ) < (2 : ℝ) ^ (n * n)routine: positivityLeaves
e n ^ (2 : ℕ) ≤ (64 : ℝ) * (1 / 2 : ℝ) ^ n, withhpnn : (0 : ℝ) < (2 : ℝ) ^ (n * n).Lean, line 787
have hpnn : (0 : ℝ) < (2 : ℝ) ^ (n * n) := by positivity
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 787 at
879b5c03f7df↗
hsqhaveFilter.Tendsto (fun (n : ℕ) => e n ^ (2 : ℕ)) Filter.atTop (nhds (0 : ℝ))Leaves
Filter.Tendsto e Filter.atTop (nhds (0 : ℝ)), withhsq : Filter.Tendsto (fun (n : ℕ) => e n ^ (2 : ℕ)) Filter.atTop (nhds (0 : ℝ)).Uses library
Filter.TendstoFilter.Tendstois the generic "limit of a function" predicate. ,Filter.atTopatTopis the filter representing the limit→ ∞on an ordered set. ,nhdsA set is called a neighborhood ofxif it contains an open set aroundx. ,squeeze_zeroSpecial case of the sandwich lemma; seetendsto_of_tendsto_of_tendsto_of_le_of_leandtendsto_of_tendsto_of_tendsto_of_le_of_le'for the general case. ,sq_nonneg,tendsto_pow_atTop_nhds_zero_of_lt_one.Lean, lines 790–793
have hsq : Filter.Tendsto (fun n => e n ^ 2) Filter.atTop (nhds 0) := by refine squeeze_zero (fun n => sq_nonneg _) bound ?_ simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num)).const_mul 64targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 790–793 at
879b5c03f7df↗thishaveFilter.Tendsto (fun (x : ℕ) => √(e x ^ (2 : ℕ))) Filter.atTop (nhds √(0 : ℝ))Leaves
Filter.Tendsto e Filter.atTop (nhds (0 : ℝ)), withthis : Filter.Tendsto (fun (x : ℕ) => √(e x ^ (2 : ℕ))) Filter.atTop (nhds √(0 : ℝ)).Lean, line 794
have := hsq.sqrt
targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, line 794 at
879b5c03f7df↗
Proof: targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 1–797 at
879b5c03f7df.Informal account, unverified — unverified prose about a kernel-checked proof; shown section by section, each labelled with who drafted, wrote or verified it (D-3 v3.31).
Unverified: explainer, its words from explainer/3de2a7dc7466….md, written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06; explainer/03e9a42c8cc9….md, written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06.
Overview
Draft · drafted, by the model named above
The statement asks for integer sequences $a_n, b_n$ with $b_n T - a_n$ never zero and tending to $0$, where $T = \sum_{m \ge 0} 1/(2^{m+3}-3)$. The proof builds them from explicit Padé-type rational approximations in the style of Borwein's $q$-series argument (the file's comment cites annex
f593a93a8960on this node for the informal account). With $x_n = 3/2^n$ it defines three explicit families of rationals, $Q_c(n,k)$, $Q_x(n)$ and $A_q(n)$, and considers the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$. Two estimates do the work:- a denominator bound: some positive integer $d_n$ with $d_n^2 \le 2^{3n^2}$ makes $d_n Q_x(n)$ and $d_n A_q(n)$ integers. This is taken from the hole node
erdos-1050--h1-v2--h3, not proved here; - a remainder bound: $r_n > 0$ and $r_n^2 \, 2^{4n^2} \le 2^{2n+4}$. This is the statement of the node
erdos-1050--h1-v2--h4, but the file proves it inline (stephrem_all), so that the proof uses only the hole--h3.
Then $b_n = 3 d_n Q_x(n)$ and $a_n = d_n A_q(n)$ are integers, $b_n T - a_n = d_n r_n > 0$, and $(b_n T - a_n)^2 \le 64 \cdot 2^{-n}$, which tends to $0$. The four holes
--h1to--h4are declared dependencies; the proof term uses--h3only.Product identities for the Gaussian coefficients
Draft · drafted, by the model named above
These are identities between finite products of numbers $2^a - 1$ and $2^j - 2^i$ in $\mathbb{Q}$.
id1_testsplits $\prod_{s<n}(2^{s+1}-1)$ at $j \le n$.lower_testandupper_testfactor $\prod_{i<j}(2^j - 2^i)$ and $\prod_{j<i\le n}(2^j - 2^i)$ into a power of $2$, a sign and a product of $2^{s+1}-1$;rhs_testdoes the same for $\prod_{n<K\le 2n}(2^j - 2^K)$. Combined,id1_fullsays that for $j \le n$, $Q_c(n,j)\cdot 2^j \cdot \prod_{i \le n,\, i \ne j} (2^j - 2^i) = \prod_{n < K \le 2n} (2^j - 2^K)$, where $Q_c(n,j)$ is written out by its defining formula. Read withlagr_evalbelow, this says that the numbers $Q_c(n,j)\,2^j$ are the Lagrange-interpolation weights, at the nodes $2^0, \dots, 2^n$, of the degree-$n$ polynomial $\prod_{n<K\le 2n}(X - 2^K)$.Interpolation and the vanishing coefficients
Draft · drafted, by the model named above
lagr_evalis Lagrange interpolation over $\mathbb{Q}$: a polynomial $N$ of degree at most $n$, whose values at $n+1$ distinct points $x_0, \dots, x_n$ are $r_j \prod_{i \ne j}(x_j - x_i)$, equals $\sum_j r_j \prod_{i \ne j}(X - x_i)$.tail_coeffuses it: for every $K > n$, if $Q_c$ satisfies the identity ofid1_full, then $\sum_{j \le n} Q_c(n,j)/(2^{K-j}-1) = \prod_{n<L\le 2n}(2^K - 2^L) \big/ \prod_{i \le n}(2^K - 2^i)$. For $n < K \le 2n$ the numerator has the factor $L = K$, so this is zero: these are the coefficients that cancel in the remainder.T as a constant plus a power series
Draft · drafted, by the model named above
split3Tsplits, for every $n$, $3T = \sum_{j<n} 3/(2^{j+1}-3) + \sum_{m \ge 0} 3/(2^{m+n+1}-3)$; the first part is the rational constant that appears at the end of $A_q(n)$.tail3expands the tail, for $n \ge 1$, as a power series in $x_n = 3/2^n$: $\sum_m 3/(2^{m+n+1}-3) = \sum_{s \ge 0} x_n^{s+1}/(2^{s+1}-1)$.cauchy_finmultiplies a polynomial $\sum_{j\le n} q_j x^j$ by a convergent series $\sum_s a_s x^{s+1}$ term by term.h4_seriesputs these together: for $n \ge 1$, the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$ is the sum over $K > 2n$ only of $\dfrac{\prod_{n<L\le 2n}(2^K - 2^L)}{\prod_{i \le n}(2^K - 2^i)}\, x_n^K$ (aHasSum, with every term for $K \le 2n$ equal to zero).Size estimates
Draft · drafted, by the model named above
prod_one_sub_geis the inequality $1 - \sum_i a_i \le \prod_i (1 - a_i)$ for $0 \le a_i \le 1$.nd_bounduses it to show that, for $n \ge 1$ and $K \ge 2n+1$, the coefficient above lies in $(0,\ 2 \cdot 2^{-K}]$.ineq_powis the numerical fact $9 \cdot 81^n \le 256^n$ for $n \ge 2$. From these,h4_bigproves the remainder bound for $n \ge 2$: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$.T_factsshows the series for $T$ is summable and $0 < T \le 2/5$, by comparison with $\tfrac15 (\tfrac12)^m$.The remainder bound for every n
Draft · drafted, by the model named above
hrem_allis the statement of nodeerdos-1050--h1-v2--h4: for $Q_c$, $Q_x$, $A_q$ given by their formulas, and under the denominator hypothesis of--h3, for every $n$, $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$. The proof introduces the denominator hypothesis without a name and does not use it. It takes $0 < T \le 2/5$ fromT_facts(s17) and splits on $n$. For $n = 0$: $Q_x(0) = 1$ and $A_q(0) = 0$ (hQx0,hAq0), so $r_0 = 3T > 0$ and the bound reads $9T^2 \le 16$ (e). For $n = 1$: $Q_x(1) = 3/2$ and $A_q(1) = 0$ (hQx1,hAq1), so $r_1 = \tfrac92 T > 0$ and the bound reads $\tfrac{81}{4} T^2 \cdot 16 \le 64$. Both follow from $T \le 2/5$. For $n \ge 2$ it appliesh4_big.The approximants
Draft · drafted, by the model named above
The main proof names the three families by their formulas (each
obtainintroduces a function and the equation defining it): $Q_c(n,k) = (-1)^k\, 2^{k(k-1)/2} \prod_{i<k} \frac{2^{n-i}-1}{2^{i+1}-1} \prod_{i<n} \frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (s2), the product of a sign, a power of $2$ and two Gaussian binomial coefficients at $q = 2$; $Q_x(n) = \sum_{k \le n} Q_c(n,k)\, x_n^k$ (s3); $A_q(n) = \sum_{k \le n} \big(\sum_{j \le k} Q_c(n,j)/(2^{k-j}-1)\big)\, x_n^k + Q_x(n) \sum_{j<n} 3/(2^{j+1}-3)$ (s4). All are rationals. Exponents are natural numbers, so $2n-k-i$ and $k(k-1)/2$ use truncated subtraction and natural-number division. In $A_q$ the term with $j = k$ divides by $2^0 - 1 = 0$, which Lean defines to be $0$.Denominators and remainder
Draft · drafted, by the model named above
hdenapplies the holeerdos-1050--h1-v2--h3(the theoremerdos_1050__h1_v2__h3from this node'sContext.lean) to these three families: for every $n$ there is a natural number $d_n > 0$ with $d_n^2 \le 2^{3n^2}$ such that $d_n Q_x(n)$ and $d_n A_q(n)$ are integers.hremapplieshrem_allto the same families and tohden: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$ for every $n$.The integer sequences
Draft · drafted, by the model named above
From
hdenthe proof chooses, for every $n$, the $d_n$ and integers $\beta_n = d_n Q_x(n)$ and $a_n = d_n A_q(n)$ (Lean'schoose, not an outline step), and offers $a_n$ and $b_n = 3\beta_n$ as the sequences the statement asks for. Stepkeyshows $b_n T - a_n = d_n\, r_n$, using $\beta_n = d_n Q_x(n)$ (key.hb') and $a_n = d_n A_q(n)$ (key.ha') in $\mathbb{R}$. Stepposconcludes $b_n T - a_n > 0$, since $d_n > 0$ and $r_n > 0$; in particular it is never zero, which is the first half of the statement.The limit
Draft · drafted, by the model named above
Write $e_n = b_n T - a_n$. Step
boundshows $e_n^2 \le 64 \cdot (1/2)^n$: squaringkeyand multiplying the bounds ofhdenandhremgives $e_n^2\, 2^{4n^2} \le 2^{3n^2}\, 2^{2n+4}$ (bound.h1); writing $2^{4n^2} = 2^{n^2}\,2^{3n^2}$ (bound.h2) and cancelling $2^{3n^2}$ gives $e_n^2\, 2^{n^2} \le 2^{2n+4}$ (bound.h3); and $2^{2n+4}\, 2^n \le 64 \cdot 2^{n^2}$ because $3n + 4 \le n^2 + 6$ (bound.h4). Stephsqconcludes $e_n^2 \to 0$ by squeezing between $0$ and $64 \cdot (1/2)^n$. Stepthistakes square roots, $\sqrt{e_n^2} \to \sqrt 0 = 0$; since $e_n > 0$ (pos), $\sqrt{e_n^2} = e_n$, so $e_n \to 0$, the second half of the statement.History: 2 versions on record
2026-10-06 · written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · explainer/3de2a7dc7466….md · the first version of its chain
Read this version
Overview
The statement asks for integer sequences $a_n, b_n$ with $b_n T - a_n$ never zero and tending to $0$, where $T = \sum_{m \ge 0} 1/(2^{m+3}-3)$. The proof builds them from explicit Padé-type rational approximations in the style of Borwein's $q$-series argument (the file's comment cites annex
f593a93a8960on this node for the informal account). With $x_n = 3/2^n$ it defines three explicit families of rationals, $Q_c(n,k)$, $Q_x(n)$ and $A_q(n)$, and considers the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$. Two estimates do the work:- a denominator bound: some positive integer $d_n$ with $d_n^2 \le 2^{3n^2}$ makes $d_n Q_x(n)$ and $d_n A_q(n)$ integers. This is taken from the hole node
erdos-1050--h1-v2--h3, not proved here; - a remainder bound: $r_n > 0$ and $r_n^2 \, 2^{4n^2} \le 2^{2n+4}$. This is the statement of the node
erdos-1050--h1-v2--h4, but the file proves it inline (stephrem_all), so that the proof uses only the hole--h3.
Then $b_n = 3 d_n Q_x(n)$ and $a_n = d_n A_q(n)$ are integers, $b_n T - a_n = d_n r_n > 0$, and $(b_n T - a_n)^2 \le 64 \cdot 2^{-n}$, which tends to $0$. The four holes
--h1to--h4are declared dependencies; the proof term uses--h3only.Product identities for the Gaussian coefficients (hrem_all.id1_test hrem_all.lower_test hrem_all.upper_test hrem_all.rhs_test hrem_all.id1_full)
These are identities between finite products of numbers $2^a - 1$ and $2^j - 2^i$ in $\mathbb{Q}$.
id1_testsplits $\prod_{s<n}(2^{s+1}-1)$ at $j \le n$.lower_testandupper_testfactor $\prod_{i<j}(2^j - 2^i)$ and $\prod_{j<i\le n}(2^j - 2^i)$ into a power of $2$, a sign and a product of $2^{s+1}-1$;rhs_testdoes the same for $\prod_{n<K\le 2n}(2^j - 2^K)$. Combined,id1_fullsays that for $j \le n$, $Q_c(n,j)\cdot 2^j \cdot \prod_{i \le n,\, i \ne j} (2^j - 2^i) = \prod_{n < K \le 2n} (2^j - 2^K)$, where $Q_c(n,j)$ is written out by its defining formula. That is, the coefficients $Q_c(n,\cdot)$ are the Lagrange-interpolation weights of the polynomial $\prod_{n<K\le 2n}(X - 2^K)$ at the nodes $2^0, \dots, 2^n$.Interpolation and the vanishing coefficients (hrem_all.lagr_eval hrem_all.tail_coeff)
lagr_evalis Lagrange interpolation over $\mathbb{Q}$: a polynomial $N$ of degree at most $n$, whose values at $n+1$ distinct points $x_0, \dots, x_n$ are $r_j \prod_{i \ne j}(x_j - x_i)$, equals $\sum_j r_j \prod_{i \ne j}(X - x_i)$.tail_coeffuses it: for every $K > n$, if $Q_c$ satisfies the identity ofid1_full, then $\sum_{j \le n} Q_c(n,j)/(2^{K-j}-1) = \prod_{n<L\le 2n}(2^K - 2^L) \big/ \prod_{i \le n}(2^K - 2^i)$. For $n < K \le 2n$ the numerator has the factor $L = K$, so this is zero: these are the coefficients that cancel in the remainder.T as a constant plus a power series (hrem_all.tail3 hrem_all.split3T hrem_all.cauchy_fin hrem_all.h4_series)
split3Tsplits, for every $n$, $3T = \sum_{j<n} 3/(2^{j+1}-3) + \sum_{m \ge 0} 3/(2^{m+n+1}-3)$; the first part is the rational constant that appears at the end of $A_q(n)$.tail3expands the tail, for $n \ge 1$, as a power series in $x_n = 3/2^n$: $\sum_m 3/(2^{m+n+1}-3) = \sum_{s \ge 0} x_n^{s+1}/(2^{s+1}-1)$.cauchy_finmultiplies a polynomial $\sum_{j\le n} q_j x^j$ by a convergent series $\sum_s a_s x^{s+1}$ term by term.h4_seriesputs these together: for $n \ge 1$, the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$ is the sum over $K > 2n$ only of $\dfrac{\prod_{n<L\le 2n}(2^K - 2^L)}{\prod_{i \le n}(2^K - 2^i)}\, x_n^K$ (aHasSum, with every term for $K \le 2n$ equal to zero).Size estimates (hrem_all.prod_one_sub_ge hrem_all.nd_bound hrem_all.ineq_pow hrem_all.h4_big hrem_all.T_facts)
prod_one_sub_geis the inequality $1 - \sum_i a_i \le \prod_i (1 - a_i)$ for $0 \le a_i \le 1$.nd_bounduses it to show that, for $n \ge 1$ and $K \ge 2n+1$, the coefficient above lies in $(0,\ 2 \cdot 2^{-K}]$.ineq_powis the numerical fact $9 \cdot 81^n \le 256^n$ for $n \ge 2$. From these,h4_bigproves the remainder bound for $n \ge 2$: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$.T_factsshows the series for $T$ is summable and $0 < T \le 2/5$, by comparison with $\tfrac15 (\tfrac12)^m$.The remainder bound for every n (hrem_all hrem_all.s17 hrem_all.hQx0 hrem_all.hAq0 hrem_all.e hrem_all.hQx1 hrem_all.hAq1)
hrem_allis the statement of nodeerdos-1050--h1-v2--h4: for $Q_c$, $Q_x$, $A_q$ given by their formulas, and under the denominator hypothesis of--h3, for every $n$, $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$. The proof introduces the denominator hypothesis without a name and does not use it. It takes $0 < T \le 2/5$ fromT_facts(s17) and splits on $n$. For $n = 0$: $Q_x(0) = 1$ and $A_q(0) = 0$ (hQx0,hAq0), so $r_0 = 3T > 0$ and the bound reads $9T^2 \le 16$ (e). For $n = 1$: $Q_x(1) = 3/2$ and $A_q(1) = 0$ (hQx1,hAq1), so $r_1 = \tfrac92 T > 0$ and the bound reads $\tfrac{81}{4} T^2 \cdot 16 \le 64$. Both follow from $T \le 2/5$. For $n \ge 2$ it appliesh4_big.The approximants (s2 s3 s4)
The main proof names the three families by their formulas (each
obtainintroduces a function and the equation defining it): $Q_c(n,k) = (-1)^k\, 2^{k(k-1)/2} \prod_{i<k} \frac{2^{n-i}-1}{2^{i+1}-1} \prod_{i<n} \frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (s2), the product of a sign, a power of $2$ and two Gaussian binomial coefficients at $q = 2$; $Q_x(n) = \sum_{k \le n} Q_c(n,k)\, x_n^k$ (s3); $A_q(n) = \sum_{k \le n} \big(\sum_{j \le k} Q_c(n,j)/(2^{k-j}-1)\big)\, x_n^k + Q_x(n) \sum_{j<n} 3/(2^{j+1}-3)$ (s4). All are rationals. Exponents are natural numbers, so $2n-k-i$ and $k(k-1)/2$ use truncated subtraction and natural-number division. In $A_q$ the term with $j = k$ divides by $2^0 - 1 = 0$, which Lean defines to be $0$.Denominators and remainder (hden hrem)
hdenapplies the holeerdos-1050--h1-v2--h3(the theoremerdos_1050__h1_v2__h3from this node'sContext.lean) to these three families: for every $n$ there is a natural number $d_n > 0$ with $d_n^2 \le 2^{3n^2}$ such that $d_n Q_x(n)$ and $d_n A_q(n)$ are integers.hremapplieshrem_allto the same families and tohden: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$ for every $n$.The integer sequences (key pos)
From
hdenthe proof chooses, for every $n$, the $d_n$ and integers $\beta_n = d_n Q_x(n)$ and $a_n = d_n A_q(n)$ (Lean'schoose, not an outline step), and offers $a_n$ and $b_n = 3\beta_n$ as the sequences the statement asks for. Stepkeyshows $b_n T - a_n = d_n\, r_n$, using $\beta_n = d_n Q_x(n)$ (key.hb') and $a_n = d_n A_q(n)$ (key.ha') in $\mathbb{R}$. Stepposconcludes $b_n T - a_n > 0$, since $d_n > 0$ and $r_n > 0$; in particular it is never zero, which is the first half of the statement.The limit (bound hsq this)
Write $e_n = b_n T - a_n$. Step
boundshows $e_n^2 \le 64 \cdot (1/2)^n$: squaringkeyand multiplying the bounds ofhdenandhremgives $e_n^2\, 2^{4n^2} \le 2^{3n^2}\, 2^{2n+4}$ (bound.h1); dividing by $2^{3n^2}$ (bound.h2) gives $e_n^2\, 2^{n^2} \le 2^{2n+4}$ (bound.h3); and $2^{2n+4}\, 2^n \le 64 \cdot 2^{n^2}$ because $3n + 4 \le n^2 + 6$ (bound.h4). Stephsqconcludes $e_n^2 \to 0$ by squeezing between $0$ and $64 \cdot (1/2)^n$. Stepthistakes square roots, $\sqrt{e_n^2} \to \sqrt 0 = 0$; since $e_n > 0$ (pos), $\sqrt{e_n^2} = e_n$, so $e_n \to 0$, the second half of the statement.- a denominator bound: some positive integer $d_n$ with $d_n^2 \le 2^{3n^2}$ makes $d_n Q_x(n)$ and $d_n A_q(n)$ integers. This is taken from the hole node
2026-10-06 · written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · current · explainer/03e9a42c8cc9….md · diff to its predecessor
Read this version
Overview
The statement asks for integer sequences $a_n, b_n$ with $b_n T - a_n$ never zero and tending to $0$, where $T = \sum_{m \ge 0} 1/(2^{m+3}-3)$. The proof builds them from explicit Padé-type rational approximations in the style of Borwein's $q$-series argument (the file's comment cites annex
f593a93a8960on this node for the informal account). With $x_n = 3/2^n$ it defines three explicit families of rationals, $Q_c(n,k)$, $Q_x(n)$ and $A_q(n)$, and considers the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$. Two estimates do the work:- a denominator bound: some positive integer $d_n$ with $d_n^2 \le 2^{3n^2}$ makes $d_n Q_x(n)$ and $d_n A_q(n)$ integers. This is taken from the hole node
erdos-1050--h1-v2--h3, not proved here; - a remainder bound: $r_n > 0$ and $r_n^2 \, 2^{4n^2} \le 2^{2n+4}$. This is the statement of the node
erdos-1050--h1-v2--h4, but the file proves it inline (stephrem_all), so that the proof uses only the hole--h3.
Then $b_n = 3 d_n Q_x(n)$ and $a_n = d_n A_q(n)$ are integers, $b_n T - a_n = d_n r_n > 0$, and $(b_n T - a_n)^2 \le 64 \cdot 2^{-n}$, which tends to $0$. The four holes
--h1to--h4are declared dependencies; the proof term uses--h3only.Product identities for the Gaussian coefficients (hrem_all.id1_test hrem_all.lower_test hrem_all.upper_test hrem_all.rhs_test hrem_all.id1_full)
These are identities between finite products of numbers $2^a - 1$ and $2^j - 2^i$ in $\mathbb{Q}$.
id1_testsplits $\prod_{s<n}(2^{s+1}-1)$ at $j \le n$.lower_testandupper_testfactor $\prod_{i<j}(2^j - 2^i)$ and $\prod_{j<i\le n}(2^j - 2^i)$ into a power of $2$, a sign and a product of $2^{s+1}-1$;rhs_testdoes the same for $\prod_{n<K\le 2n}(2^j - 2^K)$. Combined,id1_fullsays that for $j \le n$, $Q_c(n,j)\cdot 2^j \cdot \prod_{i \le n,\, i \ne j} (2^j - 2^i) = \prod_{n < K \le 2n} (2^j - 2^K)$, where $Q_c(n,j)$ is written out by its defining formula. Read withlagr_evalbelow, this says that the numbers $Q_c(n,j)\,2^j$ are the Lagrange-interpolation weights, at the nodes $2^0, \dots, 2^n$, of the degree-$n$ polynomial $\prod_{n<K\le 2n}(X - 2^K)$.Interpolation and the vanishing coefficients (hrem_all.lagr_eval hrem_all.tail_coeff)
lagr_evalis Lagrange interpolation over $\mathbb{Q}$: a polynomial $N$ of degree at most $n$, whose values at $n+1$ distinct points $x_0, \dots, x_n$ are $r_j \prod_{i \ne j}(x_j - x_i)$, equals $\sum_j r_j \prod_{i \ne j}(X - x_i)$.tail_coeffuses it: for every $K > n$, if $Q_c$ satisfies the identity ofid1_full, then $\sum_{j \le n} Q_c(n,j)/(2^{K-j}-1) = \prod_{n<L\le 2n}(2^K - 2^L) \big/ \prod_{i \le n}(2^K - 2^i)$. For $n < K \le 2n$ the numerator has the factor $L = K$, so this is zero: these are the coefficients that cancel in the remainder.T as a constant plus a power series (hrem_all.tail3 hrem_all.split3T hrem_all.cauchy_fin hrem_all.h4_series)
split3Tsplits, for every $n$, $3T = \sum_{j<n} 3/(2^{j+1}-3) + \sum_{m \ge 0} 3/(2^{m+n+1}-3)$; the first part is the rational constant that appears at the end of $A_q(n)$.tail3expands the tail, for $n \ge 1$, as a power series in $x_n = 3/2^n$: $\sum_m 3/(2^{m+n+1}-3) = \sum_{s \ge 0} x_n^{s+1}/(2^{s+1}-1)$.cauchy_finmultiplies a polynomial $\sum_{j\le n} q_j x^j$ by a convergent series $\sum_s a_s x^{s+1}$ term by term.h4_seriesputs these together: for $n \ge 1$, the remainder $r_n = Q_x(n)\cdot 3T - A_q(n)$ is the sum over $K > 2n$ only of $\dfrac{\prod_{n<L\le 2n}(2^K - 2^L)}{\prod_{i \le n}(2^K - 2^i)}\, x_n^K$ (aHasSum, with every term for $K \le 2n$ equal to zero).Size estimates (hrem_all.prod_one_sub_ge hrem_all.nd_bound hrem_all.ineq_pow hrem_all.h4_big hrem_all.T_facts)
prod_one_sub_geis the inequality $1 - \sum_i a_i \le \prod_i (1 - a_i)$ for $0 \le a_i \le 1$.nd_bounduses it to show that, for $n \ge 1$ and $K \ge 2n+1$, the coefficient above lies in $(0,\ 2 \cdot 2^{-K}]$.ineq_powis the numerical fact $9 \cdot 81^n \le 256^n$ for $n \ge 2$. From these,h4_bigproves the remainder bound for $n \ge 2$: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$.T_factsshows the series for $T$ is summable and $0 < T \le 2/5$, by comparison with $\tfrac15 (\tfrac12)^m$.The remainder bound for every n (hrem_all hrem_all.s17 hrem_all.hQx0 hrem_all.hAq0 hrem_all.e hrem_all.hQx1 hrem_all.hAq1)
hrem_allis the statement of nodeerdos-1050--h1-v2--h4: for $Q_c$, $Q_x$, $A_q$ given by their formulas, and under the denominator hypothesis of--h3, for every $n$, $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$. The proof introduces the denominator hypothesis without a name and does not use it. It takes $0 < T \le 2/5$ fromT_facts(s17) and splits on $n$. For $n = 0$: $Q_x(0) = 1$ and $A_q(0) = 0$ (hQx0,hAq0), so $r_0 = 3T > 0$ and the bound reads $9T^2 \le 16$ (e). For $n = 1$: $Q_x(1) = 3/2$ and $A_q(1) = 0$ (hQx1,hAq1), so $r_1 = \tfrac92 T > 0$ and the bound reads $\tfrac{81}{4} T^2 \cdot 16 \le 64$. Both follow from $T \le 2/5$. For $n \ge 2$ it appliesh4_big.The approximants (s2 s3 s4)
The main proof names the three families by their formulas (each
obtainintroduces a function and the equation defining it): $Q_c(n,k) = (-1)^k\, 2^{k(k-1)/2} \prod_{i<k} \frac{2^{n-i}-1}{2^{i+1}-1} \prod_{i<n} \frac{2^{2n-k-i}-1}{2^{i+1}-1}$ (s2), the product of a sign, a power of $2$ and two Gaussian binomial coefficients at $q = 2$; $Q_x(n) = \sum_{k \le n} Q_c(n,k)\, x_n^k$ (s3); $A_q(n) = \sum_{k \le n} \big(\sum_{j \le k} Q_c(n,j)/(2^{k-j}-1)\big)\, x_n^k + Q_x(n) \sum_{j<n} 3/(2^{j+1}-3)$ (s4). All are rationals. Exponents are natural numbers, so $2n-k-i$ and $k(k-1)/2$ use truncated subtraction and natural-number division. In $A_q$ the term with $j = k$ divides by $2^0 - 1 = 0$, which Lean defines to be $0$.Denominators and remainder (hden hrem)
hdenapplies the holeerdos-1050--h1-v2--h3(the theoremerdos_1050__h1_v2__h3from this node'sContext.lean) to these three families: for every $n$ there is a natural number $d_n > 0$ with $d_n^2 \le 2^{3n^2}$ such that $d_n Q_x(n)$ and $d_n A_q(n)$ are integers.hremapplieshrem_allto the same families and tohden: $r_n > 0$ and $r_n^2\, 2^{4n^2} \le 2^{2n+4}$ for every $n$.The integer sequences (key pos)
From
hdenthe proof chooses, for every $n$, the $d_n$ and integers $\beta_n = d_n Q_x(n)$ and $a_n = d_n A_q(n)$ (Lean'schoose, not an outline step), and offers $a_n$ and $b_n = 3\beta_n$ as the sequences the statement asks for. Stepkeyshows $b_n T - a_n = d_n\, r_n$, using $\beta_n = d_n Q_x(n)$ (key.hb') and $a_n = d_n A_q(n)$ (key.ha') in $\mathbb{R}$. Stepposconcludes $b_n T - a_n > 0$, since $d_n > 0$ and $r_n > 0$; in particular it is never zero, which is the first half of the statement.The limit (bound hsq this)
Write $e_n = b_n T - a_n$. Step
boundshows $e_n^2 \le 64 \cdot (1/2)^n$: squaringkeyand multiplying the bounds ofhdenandhremgives $e_n^2\, 2^{4n^2} \le 2^{3n^2}\, 2^{2n+4}$ (bound.h1); writing $2^{4n^2} = 2^{n^2}\,2^{3n^2}$ (bound.h2) and cancelling $2^{3n^2}$ gives $e_n^2\, 2^{n^2} \le 2^{2n+4}$ (bound.h3); and $2^{2n+4}\, 2^n \le 64 \cdot 2^{n^2}$ because $3n + 4 \le n^2 + 6$ (bound.h4). Stephsqconcludes $e_n^2 \to 0$ by squeezing between $0$ and $64 \cdot (1/2)^n$. Stepthistakes square roots, $\sqrt{e_n^2} \to \sqrt 0 = 0$; since $e_n > 0$ (pos), $\sqrt{e_n^2} = e_n$, so $e_n \to 0$, the second half of the statement.- a denominator bound: some positive integer $d_n$ with $d_n^2 \le 2^{3n^2}$ makes $d_n Q_x(n)$ and $d_n A_q(n)$ integers. This is taken from the hole node
Diff of
03e9a42c8cc9against3de2a7dc7466@@ -13,5 +13,5 @@ These are identities between finite products of numbers $2^a - 1$ and $2^j - 2^i$ in $\mathbb{Q}$. `id1_test` splits $\prod_{s<n}(2^{s+1}-1)$ at $j \le n$. `lower_test` and `upper_test` factor $\prod_{i<j}(2^j - 2^i)$ and $\prod_{j<i\le n}(2^j - 2^i)$ into a power of $2$, a sign and a product of $2^{s+1}-1$; `rhs_test` does the same for $\prod_{n<K\le 2n}(2^j - 2^K)$. Combined, `id1_full` says that for $j \le n$, $Q_c(n,j)\cdot 2^j \cdot \prod_{i \le n,\, i \ne j} (2^j - 2^i) = \prod_{n < K \le 2n} (2^j - 2^K)$, -where $Q_c(n,j)$ is written out by its defining formula. That is, the coefficients $Q_c(n,\cdot)$ are the Lagrange-interpolation weights of the polynomial $\prod_{n<K\le 2n}(X - 2^K)$ at the nodes $2^0, \dots, 2^n$. +where $Q_c(n,j)$ is written out by its defining formula. Read with `lagr_eval` below, this says that the numbers $Q_c(n,j)\,2^j$ are the Lagrange-interpolation weights, at the nodes $2^0, \dots, 2^n$, of the degree-$n$ polynomial $\prod_{n<K\le 2n}(X - 2^K)$. ## Interpolation and the vanishing coefficients {steps: hrem_all.lagr_eval, hrem_all.tail_coeff} @@ -52,3 +52,3 @@ ## The limit {steps: bound, hsq, this} -Write $e_n = b_n T - a_n$. Step `bound` shows $e_n^2 \le 64 \cdot (1/2)^n$: squaring `key` and multiplying the bounds of `hden` and `hrem` gives $e_n^2\, 2^{4n^2} \le 2^{3n^2}\, 2^{2n+4}$ (`bound.h1`); dividing by $2^{3n^2}$ (`bound.h2`) gives $e_n^2\, 2^{n^2} \le 2^{2n+4}$ (`bound.h3`); and $2^{2n+4}\, 2^n \le 64 \cdot 2^{n^2}$ because $3n + 4 \le n^2 + 6$ (`bound.h4`). Step `hsq` concludes $e_n^2 \to 0$ by squeezing between $0$ and $64 \cdot (1/2)^n$. Step `this` takes square roots, $\sqrt{e_n^2} \to \sqrt 0 = 0$; since $e_n > 0$ (`pos`), $\sqrt{e_n^2} = e_n$, so $e_n \to 0$, the second half of the statement. +Write $e_n = b_n T - a_n$. Step `bound` shows $e_n^2 \le 64 \cdot (1/2)^n$: squaring `key` and multiplying the bounds of `hden` and `hrem` gives $e_n^2\, 2^{4n^2} \le 2^{3n^2}\, 2^{2n+4}$ (`bound.h1`); writing $2^{4n^2} = 2^{n^2}\,2^{3n^2}$ (`bound.h2`) and cancelling $2^{3n^2}$ gives $e_n^2\, 2^{n^2} \le 2^{2n+4}$ (`bound.h3`); and $2^{2n+4}\, 2^n \le 64 \cdot 2^{n^2}$ because $3n + 4 \le n^2 + 6$ (`bound.h4`). Step `hsq` concludes $e_n^2 \to 0$ by squeezing between $0$ and $64 \cdot (1/2)^n$. Step `this` takes square roots, $\sqrt{e_n^2} \to \sqrt 0 = 0$; since $e_n > 0$ (`pos`), $\sqrt{e_n^2} = e_n$, so $e_n \to 0$, the second half of the statement.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
erdos-1050 proved
Statement not audited — fidelity mechanical-only; QA pass incomplete; no signer yet.
theorem Opn.erdos_1050 : Irrational (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 1) - 3)) := by sorryA statement is written
:= by sorry: thesorryholds 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 →Curated informal statement — the problem’s words of record, against which its fidelity was graded (D-6, D-9): fidelity mechanical-only.
Erdős Problem 1050. The series $\sum_{n=1}^\infty \frac{1}{2^n - 3}$ is irrational. The source sum runs over $n \ge 1$; as a
tsumoverℕ(which starts at $0$) it is reindexed $n \mapsto n + 1$, i.e. $\sum_{n=0}^\infty 1/(2^{n+1} - 3)$.In words, unverified — what this statement says; written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06; no one has read it against the Lean and signed it. A gloss of a root is not its words of record: the curated statement above is (D-9).
Draft · drafted, by the model named above
This file states the theorem
Opn.erdos_1050: the real number $\displaystyle \sum_{n=0}^{\infty} \frac{1}{2^{n+1}-3}$ is irrational.In detail:
- The sum is Lean's
∑'over all natural numbers $n = 0, 1, 2, \dots$ (Mathlib's unconditional sum, atsum). Each term is the real number $1/(2^{n+1}-3)$, computed in $\mathbb{R}$. The terms are $-1, 1, \tfrac{1}{5}, \tfrac{1}{13}, \tfrac{1}{29}, \dots$; the first, at $n = 0$, is $1/(2-3) = -1$. - Re-indexed with $m = n+1$, this is the sum $\sum_{m \ge 1} 1/(2^m - 3)$ of Erdős problem 1050. The file's own comment says the statement is imported, as stated, from google-deepmind/formal-conjectures (
FormalConjectures/ErdosProblems/1050.lean, Apache-2.0). Irrational xis Mathlib's predicate: $x$ is not equal to $p/q$, read as a real number, for any rational $p/q$.- Two Lean conventions do not come into play here, but a reader should know the file leans on neither. Division by zero is defined to be $0$ in Lean; no denominator $2^{n+1}-3$ is zero (it is $-1$ at $n = 0$ and at least $1$ afterwards). And
∑'of a family that is not summable is defined to be $0$; the statement itself does not assert that the series converges, so the claim is about thetsumas Lean defines it. (The series does converge absolutely, since its terms are eventually bounded by a multiple of $2^{-n}$, so thetsumis the ordinary sum; the merged proof checks summability in its stephT.)
The statement has no hypotheses and no free variables. The file imports all of Mathlib; its body is
sorry, the placeholder a statement file carries in place of a proof.Rendered from gloss/27192f22f314….md · Improve these words →
Checked by the kernel — an outline of the proof attested in attestations/000326.json, merge commit
e80916551a30.Outline of
Proof.lean, extracted by the gate at82834c4684b8from 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.s1obtain∃ (a : ℕ → ℤ) (b : ℕ → ℤ), (∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ)) ∧ Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ))Leaves
Irrational (∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ))), witha : ℕ → ℤ,b : ℕ → ℤ,hne : ∀ (n : ℕ), (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ) ≠ (0 : ℝ),hlim : Filter.Tendsto (fun (n : ℕ) => (↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)) Filter.atTop (nhds (0 : ℝ)).Uses statements erdos-1050--h1-v2.
Lean, line 26
obtain ⟨a, b, hne, hlim⟩ := erdos_1050__h1
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 26 at
e80916551a30↗hThaveSummable fun (n : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))Leaves
Irrational (∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ))), withhT : Summable fun (n : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,Summable.of_nonneg_of_leComparison test of convergence of series of non-negative real numbers. ,summable_geometric_two.Lean, lines 28–36
have hT : Summable (fun n : ℕ => (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) := by refine Summable.of_nonneg_of_le (fun n => ?_) (fun n => ?_) (summable_geometric_two.mul_left (1 / 4)) · have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) have h2 : (0 : ℝ) < 2 ^ (n + 3) - 3 := by rw [pow_add]; norm_num; linarith exact le_of_lt (one_div_pos.mpr h2) · have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) have e : (1 / 4 : ℝ) * (1 / 2) ^ n = 1 / (4 * 2 ^ n) := by rw [one_div_pow]; field_simp rw [e, pow_add] exact one_div_le_one_div_of_le (by positivity) (by norm_num; linarith)targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 28–36 at
e80916551a30↗hT.s1caseLeaves
(0 : ℝ) ≤ (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)).Uses library
le_of_lt,one_div_pos.Lean, lines 30–32
· have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) have h2 : (0 : ℝ) < 2 ^ (n + 3) - 3 := by rw [pow_add]; norm_num; linarith exact le_of_lt (one_div_pos.mpr h2)targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 30–32 at
e80916551a30↗hT.s1.h1have(1 : ℝ) ≤ (2 : ℝ) ^ nLeaves
(0 : ℝ) ≤ (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)), withh1 : (1 : ℝ) ≤ (2 : ℝ) ^ n.Uses library
one_le_pow₀.Lean, line 30
· have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 30 at
e80916551a30↗hT.s1.h2have(0 : ℝ) < (2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)Leaves
(0 : ℝ) ≤ (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)), withh2 : (0 : ℝ) < (2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ).Uses library
pow_add.Lean, line 31
have h2 : (0 : ℝ) < 2 ^ (n + 3) - 3 := by rw [pow_add]; norm_num; linarith
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 31 at
e80916551a30↗
hT.s2caseLeaves
(1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ n.Uses library
pow_add,one_div_le_one_div_of_le.Lean, lines 33–36
· have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num) have e : (1 / 4 : ℝ) * (1 / 2) ^ n = 1 / (4 * 2 ^ n) := by rw [one_div_pow]; field_simp rw [e, pow_add] exact one_div_le_one_div_of_le (by positivity) (by norm_num; linarith)targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 33–36 at
e80916551a30↗hT.s2.h1have(1 : ℝ) ≤ (2 : ℝ) ^ nLeaves
(1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ n, withh1 : (1 : ℝ) ≤ (2 : ℝ) ^ n.Uses library
one_le_pow₀.Lean, line 33
· have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ (by norm_num)
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 33 at
e80916551a30↗hT.s2.ehave(1 / 4 : ℝ) * (1 / 2 : ℝ) ^ n = (1 : ℝ) / ((4 : ℝ) * (2 : ℝ) ^ n)Leaves
(1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) ≤ (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ n, withe : (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ n = (1 : ℝ) / ((4 : ℝ) * (2 : ℝ) ^ n).Uses library
one_div_pow.Lean, line 34
have e : (1 / 4 : ℝ) * (1 / 2) ^ n = 1 / (4 * 2 ^ n) := by rw [one_div_pow]; field_simp
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 34 at
e80916551a30↗
hroothave∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ)) = ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ))Leaves
Irrational (∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ))), withhroot : ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ)) = ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)).Uses library
Finset.sum_range_succ,add_assoc.Lean, lines 37–41
have hroot : ∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 1) - 3) = ∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3) := by have hs : Summable (fun n : ℕ => (1 : ℝ) / ((2 : ℝ) ^ (n + 1) - 3)) := (summable_nat_add_iff 2).mp (by simpa only [add_assoc] using hT) rw [← hs.sum_add_tsum_nat_add 2] norm_num [Finset.sum_range_succ, add_assoc]targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 37–41 at
e80916551a30↗hroot.hshaveSummable fun (n : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ))Leaves
∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ)) = ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)), withhs : Summable fun (n : ℕ) => (1 : ℝ) / ((2 : ℝ) ^ (n + (1 : ℕ)) - (3 : ℝ)).Uses library
SummableSummable fmeans thatfhas some (infinite) sum with respect toL. ,summable_nat_add_iff,add_assoc.Lean, lines 38–39
have hs : Summable (fun n : ℕ => (1 : ℝ) / ((2 : ℝ) ^ (n + 1) - 3)) := (summable_nat_add_iff 2).mp (by simpa only [add_assoc] using hT)targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 38–39 at
e80916551a30↗
hqhave(0 : ℝ) < (↑r.den : ℝ)Leaves
False, withhq : (0 : ℝ) < (↑r.den : ℝ).Lean, line 45
have hq : (0 : ℝ) < r.den := by exact_mod_cast r.den_pos
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 45 at
e80916551a30↗hinthave∀ (n : ℕ), (↑(b n * r.num - a n * (↑r.den : ℤ)) : ℝ) = (↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ))Leaves
False, withhint : ∀ (n : ℕ), (↑(b n * r.num - a n * (↑r.den : ℤ)) : ℝ) = (↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ)).Lean, lines 46–51
have hint : ∀ n : ℕ, ((b n * r.num - a n * r.den : ℤ) : ℝ) = (r.den : ℝ) * ((b n : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n) := by intro n rw [← hr] have : (r : ℝ) = r.num / r.den := by exact_mod_cast (Rat.num_div_den r).symm rw [this]; push_cast; field_simptargets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 46–51 at
e80916551a30↗hint.thishave(↑r : ℝ) = (↑r.num : ℝ) / (↑r.den : ℝ)Leaves
(↑(b n * r.num - a n * (↑r.den : ℤ)) : ℝ) = (↑r.den : ℝ) * ((↑(b n) : ℝ) * (↑r : ℝ) - (↑(a n) : ℝ)), withthis : (↑r : ℝ) = (↑r.num : ℝ) / (↑r.den : ℝ).Uses library
Rat.num_div_den.Lean, line 50
have : (r : ℝ) = r.num / r.den := by exact_mod_cast (Rat.num_div_den r).symm
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 50 at
e80916551a30↗
h0haveFilter.Tendsto (fun (n : ℕ) => (↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ))) Filter.atTop (nhds (0 : ℝ))Leaves
False, withh0 : Filter.Tendsto (fun (n : ℕ) => (↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ))) Filter.atTop (nhds (0 : ℝ)).Uses library
Filter.TendstoFilter.Tendstois the generic "limit of a function" predicate. ,Filter.atTopatTopis the filter representing the limit→ ∞on an ordered set. ,nhdsA set is called a neighborhood ofxif it contains an open set aroundx. .Lean, lines 52–54
have h0 : Filter.Tendsto (fun n : ℕ => (r.den : ℝ) * ((b n : ℝ) * (∑' n : ℕ, (1 : ℝ) / ((2 : ℝ) ^ (n + 3) - 3)) - a n)) Filter.atTop (nhds 0) := by simpa using hlim.const_mul (r.den : ℝ)targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 52–54 at
e80916551a30↗s7obtain∃ (N : ℕ), ∀ n ≥ N, dist ((↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ))) (0 : ℝ) < (1 : ℝ)Leaves
False, withN : ℕ,hN : ∀ n ≥ N, dist ((↑r.den : ℝ) * ((↑(b n) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a n) : ℝ))) (0 : ℝ) < (1 : ℝ).Uses library
Metric.tendsto_atTop,one_posAlias ofzero_lt_one. .Lean, line 55
obtain ⟨N, hN⟩ := (Metric.tendsto_atTop.mp h0) 1 one_pos
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 55 at
e80916551a30↗hsmallhavedist ((↑r.den : ℝ) * ((↑(b N) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a N) : ℝ))) (0 : ℝ) < (1 : ℝ)Leaves
False, withhsmall : dist ((↑r.den : ℝ) * ((↑(b N) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a N) : ℝ))) (0 : ℝ) < (1 : ℝ).Uses library
le_rflA version ofle_reflwhere the argument is implicit .Lean, line 56
have hsmall := hN N le_rfl
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 56 at
e80916551a30↗hnzhaveb N * r.num - a N * (↑r.den : ℤ) ≠ (0 : ℤ)Leaves
False, withhnz : b N * r.num - a N * (↑r.den : ℤ) ≠ (0 : ℤ).Uses library
Int.cast_zero,mul_eq_zeroIfαhas no zero divisors, then the product of two elements equals zero iff one of them equals zero. .Lean, lines 58–63
have hnz : (b N * r.num - a N * r.den : ℤ) ≠ 0 := by intro hz apply hne N have h2 := hint N rw [hz, Int.cast_zero] at h2 exact (mul_eq_zero.mp h2.symm).resolve_left hq.ne'targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 58–63 at
e80916551a30↗hnz.h2have(↑(b N * r.num - a N * (↑r.den : ℤ)) : ℝ) = (↑r.den : ℝ) * ((↑(b N) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a N) : ℝ))Leaves
(↑(b N) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a N) : ℝ) = (0 : ℝ), withh2 : (↑(b N * r.num - a N * (↑r.den : ℤ)) : ℝ) = (↑r.den : ℝ) * ((↑(b N) : ℝ) * ∑' (n : ℕ), (1 : ℝ) / ((2 : ℝ) ^ (n + (3 : ℕ)) - (3 : ℝ)) - (↑(a N) : ℝ)).Lean, line 61
have h2 := hint N
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 61 at
e80916551a30↗
thishave(1 : ℝ) ≤ |(↑(b N * r.num - a N * (↑r.den : ℤ)) : ℝ)|Leaves
False, withthis : (1 : ℝ) ≤ |(↑(b N * r.num - a N * (↑r.den : ℤ)) : ℝ)|.Uses library
Int.one_le_abs.Lean, line 64
have : (1 : ℝ) ≤ |((b N * r.num - a N * r.den : ℤ) : ℝ)| := by exact_mod_cast Int.one_le_abs hnz
targets/erdos-1050/nodes/erdos-1050/Proof.lean, line 64 at
e80916551a30↗
Proof: targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 1–65 at
e80916551a30.Informal account, unverified — unverified prose about a kernel-checked proof; shown section by section, each labelled with who drafted, wrote or verified it (D-3 v3.31).
Unverified: explainer, its words from explainer/6dcb5fb7486d….md, written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session, 2026-10-06.
Overview
Draft · drafted, by the model named above
The proof is the classical irrationality criterion, applied to a number $T$ for which another node supplies the approximations. Write $T = \sum_{m \ge 0} 1/(2^{m+3}-3)$. Node
erdos-1050--h1-v2states that there are integer sequences $a_n, b_n$ with $b_n T - a_n \neq 0$ for every $n$ and $b_n T - a_n \to 0$. The proof takes those sequences, shows that the root's sum equals $T$, and then argues: if $T = p/q$ were rational, $q(b_n T - a_n) = b_n p - a_n q$ would be a nonzero integer for every $n$ that also tends to $0$, which is impossible. All the depth sits inerdos-1050--h1-v2; this file is short.The approximating sequences
Draft · drafted, by the model named above
The proof opens by unpacking the statement of
erdos-1050--h1-v2(in Lean, the theoremerdos_1050__h1, which the node'sContext.leanprovides): integer sequences $a, b$, the facthnethat $b_n T - a_n \ne 0$ for all $n$, and the facthlimthat $b_n T - a_n \to 0$.The root's series is T
Draft · drafted, by the model named above
Step
hTshows that $\sum_m 1/(2^{m+3}-3)$ is summable, by comparison with the geometric series $\tfrac14 (\tfrac12)^m$: each term is positive, because $2^{m+3} - 3 > 0$ (sub-stepshT.s1.h1,hT.s1.h2), and at most $1/(4 \cdot 2^m)$, because $4 \cdot 2^m \le 2^{m+3} - 3$ whenever $2^m \ge 1$ (sub-stepshT.s2.h1,hT.s2.e).Step
hrootshows that the root's sum $\sum_{n \ge 0} 1/(2^{n+1}-3)$ equals $T$. Shifting the index by two turns the root's series into the series ofhT, so the root's series is summable too (hroot.hs). Its first two terms are $1/(2-3) = -1$ and $1/(4-3) = 1$, which cancel, and its tail from $n = 2$ on is exactly $T$. The proof then rewrites the goal from the irrationality of the root's sum to the irrationality of $T$.Suppose T is rational
Draft · drafted, by the model named above
Mathlib's
Irrational xmeans $x$ is not the image of any rational number, so the proof assumes a rational $r$ whose value in $\mathbb{R}$ is $T$ (therintroon the line beforehq, which the outline does not list as a step) and derives a contradiction. Write $r = p/q$ in lowest terms, with numerator $p$ =r.numand denominator $q$ =r.den. Stephqrecords $q > 0$. Stephintshows, for every $n$, that the integer $b_n p - a_n q$, read as a real number, equals $q\,(b_n T - a_n)$; it uses $r = p/q$ (sub-stephint.this) and clears the denominator.The integers become small
Draft · drafted, by the model named above
Step
h0multiplies the limithlimby the constant $q$: $q\,(b_n T - a_n) \to 0$. Steps7reads off the definition of a limit with $\varepsilon = 1$: there is an $N$ such that $|q\,(b_n T - a_n)| < 1$ for all $n \ge N$. Stephsmalltakes $n = N$. Byhint, this says the integer $b_N p - a_N q$ has absolute value less than $1$.The contradiction
Draft · drafted, by the model named above
Step
hnzshows that the integer $b_N p - a_N q$ is not zero: if it were,hintat $N$ (sub-stephnz.h2) would give $q\,(b_N T - a_N) = 0$, and since $q \ne 0$, $b_N T - a_N = 0$, contradictinghne. Stepthisthen uses that a nonzero integer has absolute value at least $1$. Together withhsmall(absolute value less than $1$), this is a contradiction, whichlinarithcloses on the last line.History: 1 version on record
2026-10-06 · written by t1006-w1, drafted with Claude Opus 5.5 (claude-opus-5-5) in a Claude Code agent session · not signed · current · explainer/6dcb5fb7486d….md · the first version of its chain
Read this version
Overview
The proof is the classical irrationality criterion, applied to a number $T$ for which another node supplies the approximations. Write $T = \sum_{m \ge 0} 1/(2^{m+3}-3)$. Node
erdos-1050--h1-v2states that there are integer sequences $a_n, b_n$ with $b_n T - a_n \neq 0$ for every $n$ and $b_n T - a_n \to 0$. The proof takes those sequences, shows that the root's sum equals $T$, and then argues: if $T = p/q$ were rational, $q(b_n T - a_n) = b_n p - a_n q$ would be a nonzero integer for every $n$ that also tends to $0$, which is impossible. All the depth sits inerdos-1050--h1-v2; this file is short.The approximating sequences (s1)
The proof opens by unpacking the statement of
erdos-1050--h1-v2(in Lean, the theoremerdos_1050__h1, which the node'sContext.leanprovides): integer sequences $a, b$, the facthnethat $b_n T - a_n \ne 0$ for all $n$, and the facthlimthat $b_n T - a_n \to 0$.The root's series is T (hT hroot)
Step
hTshows that $\sum_m 1/(2^{m+3}-3)$ is summable, by comparison with the geometric series $\tfrac14 (\tfrac12)^m$: each term is positive, because $2^{m+3} - 3 > 0$ (sub-stepshT.s1.h1,hT.s1.h2), and at most $1/(4 \cdot 2^m)$, because $4 \cdot 2^m \le 2^{m+3} - 3$ whenever $2^m \ge 1$ (sub-stepshT.s2.h1,hT.s2.e).Step
hrootshows that the root's sum $\sum_{n \ge 0} 1/(2^{n+1}-3)$ equals $T$. Shifting the index by two turns the root's series into the series ofhT, so the root's series is summable too (hroot.hs). Its first two terms are $1/(2-3) = -1$ and $1/(4-3) = 1$, which cancel, and its tail from $n = 2$ on is exactly $T$. The proof then rewrites the goal from the irrationality of the root's sum to the irrationality of $T$.Suppose T is rational (hq hint)
Mathlib's
Irrational xmeans $x$ is not the image of any rational number, so the proof assumes a rational $r$ whose value in $\mathbb{R}$ is $T$ (therintroon the line beforehq, which the outline does not list as a step) and derives a contradiction. Write $r = p/q$ in lowest terms, with numerator $p$ =r.numand denominator $q$ =r.den. Stephqrecords $q > 0$. Stephintshows, for every $n$, that the integer $b_n p - a_n q$, read as a real number, equals $q\,(b_n T - a_n)$; it uses $r = p/q$ (sub-stephint.this) and clears the denominator.The integers become small (h0 s7 hsmall)
Step
h0multiplies the limithlimby the constant $q$: $q\,(b_n T - a_n) \to 0$. Steps7reads off the definition of a limit with $\varepsilon = 1$: there is an $N$ such that $|q\,(b_n T - a_n)| < 1$ for all $n \ge N$. Stephsmalltakes $n = N$. Byhint, this says the integer $b_N p - a_N q$ has absolute value less than $1$.The contradiction (hnz this)
Step
hnzshows that the integer $b_N p - a_N q$ is not zero: if it were,hintat $N$ (sub-stephnz.h2) would give $q\,(b_N T - a_N) = 0$, and since $q \ne 0$, $b_N T - a_N = 0$, contradictinghne. Stepthisthen uses that a nonzero integer has absolute value at least $1$. Together withhsmall(absolute value less than $1$), this is a contradiction, whichlinarithcloses on the last line.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
- The sum is Lean's
Correspondence
Checked by the kernel — each row’s declaration, file, lines and attestation are the attested record; the explainer column says only whether unverified prose exists and who signed it.
| Statement | Declaration | Proof file and lines | Attestation | Explainer |
|---|---|---|---|---|
| erdos-1050--h1-v2--h3 | erdos_1050__h1_v2__h3 | targets/erdos-1050/nodes/erdos-1050--h1-v2--h3/Proof.lean, lines 1–845 at 2987e49b6fb3 | attestations/000292.json | unverified, 22 sections: 22 drafted |
| erdos-1050--h1-v2 | erdos_1050__h1 | targets/erdos-1050/nodes/erdos-1050--h1-v2/Proof.lean, lines 1–797 at 879b5c03f7df | attestations/000319.json | unverified, 10 sections: 10 drafted |
| erdos-1050 | Opn.erdos_1050 | targets/erdos-1050/nodes/erdos-1050/Proof.lean, lines 1–65 at e80916551a30 | attestations/000326.json | unverified, 6 sections: 6 drafted |