url
stringclasses 147
values | commit
stringclasses 147
values | file_path
stringlengths 7
101
| full_name
stringlengths 1
94
| start
stringlengths 6
10
| end
stringlengths 6
11
| tactic
stringlengths 1
11.2k
| state_before
stringlengths 3
2.09M
| state_after
stringlengths 6
2.09M
|
---|---|---|---|---|---|---|---|---|
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | sum_schnirelmannDensity_ge_one_sumset_nat | [100, 1] | [109, 45] | exact countelements_nonneg A 0 | case inl
A B : Set ℕ
n : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
⊢ 0 ≤ countelements A 0 + countelements B 0 | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | sum_schnirelmannDensity_ge_one_sumset_nat | [100, 1] | [109, 45] | positivity | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ 0 < ↑n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | sum_schnirelmannDensity_ge_one_sumset_nat | [100, 1] | [109, 45] | push_cast | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n + ↑(filter (fun x => x ∈ B) (Ioc 0 n)).card / ↑n =
↑(countelements A n + countelements B n) / ↑n | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n + ↑(filter (fun x => x ∈ B) (Ioc 0 n)).card / ↑n =
(↑(countelements A n) + ↑(countelements B n)) / ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | sum_schnirelmannDensity_ge_one_sumset_nat | [100, 1] | [109, 45] | rw [add_div] | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n + ↑(filter (fun x => x ∈ B) (Ioc 0 n)).card / ↑n =
(↑(countelements A n) + ↑(countelements B n)) / ↑n | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n + ↑(filter (fun x => x ∈ B) (Ioc 0 n)).card / ↑n =
↑(countelements A n) / ↑n + ↑(countelements B n) / ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | sum_schnirelmannDensity_ge_one_sumset_nat | [100, 1] | [109, 45] | rfl | A B : Set ℕ
n✝ : ℕ
hA : 0 ∈ A
hB : 0 ∈ B
hAB : 1 ≤ schnirelmannDensity A + schnirelmannDensity B
n : ℕ
hn : n ≠ 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n + ↑(filter (fun x => x ∈ B) (Ioc 0 n)).card / ↑n =
↑(countelements A n) / ↑n + ↑(countelements B n) / ↑n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | set α := schnirelmannDensity A with halpha | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
⊢ schnirelmannDensity A + schnirelmannDensity B - schnirelmannDensity A * schnirelmannDensity B ≤
schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
⊢ α + schnirelmannDensity B - α * schnirelmannDensity B ≤ schnirelmannDensity (A + B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | set β := schnirelmannDensity B with hbeta | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
⊢ α + schnirelmannDensity B - α * schnirelmannDensity B ≤ schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
⊢ α + β - α * β ≤ schnirelmannDensity (A + B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have dum : α * (1 - β) + β = α + β - α * β := by ring | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
⊢ α + β - α * β ≤ schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ α + β - α * β ≤ schnirelmannDensity (A + B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [← dum] | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ α + β - α * β ≤ schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ α * (1 - β) + β ≤ schnirelmannDensity (A + B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rintro n | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | obtain rfl | n1 := n.eq_zero_or_pos | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inl
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ (α * (1 - β) + β) * ↑0 ≤ ↑(countelements (A + B) 0)
case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | ring | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
⊢ α * (1 - β) + β = α + β - α * β | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [schnirelmannDensity] | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ α * (1 - β) + β ≤ schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ α * (1 - β) + β ≤ ⨅ n, ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑n)).card / ↑↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have : Nonempty {n // n ≠ 0} := by
use 1
trivial | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ α * (1 - β) + β ≤ ⨅ n, ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑n)).card / ↑↑n | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
⊢ α * (1 - β) + β ≤ ⨅ n, ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑n)).card / ↑↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | apply le_ciInf | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
⊢ α * (1 - β) + β ≤ ⨅ n, ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑n)).card / ↑↑n | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
⊢ ∀ (x : { n // 0 < n }), α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | intro x | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
⊢ ∀ (x : { n // 0 < n }), α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
⊢ α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hx : (x : ℝ) ≠ 0 := by aesop | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
⊢ α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [le_div_iff] | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ α * (1 - β) + β ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card / ↑↑x | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ (α * (1 - β) + β) * ↑↑x ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card
case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ 0 < ↑↑x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | use 1 | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ Nonempty { n // n ≠ 0 } | case property
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ 1 ≠ 0 |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | trivial | case property
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
⊢ 1 ≠ 0 | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | aesop | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
⊢ ↑↑x ≠ 0 | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | specialize main x | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ (α * (1 - β) + β) * ↑↑x ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
main : (α * (1 - β) + β) * ↑↑x ≤ ↑(countelements (A + B) ↑x)
⊢ (α * (1 - β) + β) * ↑↑x ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact main | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
main : (α * (1 - β) + β) * ↑↑x ≤ ↑(countelements (A + B) ↑x)
⊢ (α * (1 - β) + β) * ↑↑x ≤ ↑(filter (fun x => x ∈ A + B) (Ioc 0 ↑x)).card | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | positivity | case H
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
main : ∀ (n : ℕ), (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n)
this : Nonempty { n // n ≠ 0 }
x : { n // 0 < n }
hx : ↑↑x ≠ 0
⊢ 0 < ↑↑x | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | ring_nf | case inl
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ (α * (1 - β) + β) * ↑0 ≤ ↑(countelements (A + B) 0) | case inl
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ 0 ≤ ↑(countelements (A + B) 0) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | positivity | case inl
A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
⊢ 0 ≤ ↑(countelements (A + B) 0) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have claim : countelements A n + β * (n - countelements A n) ≤
countelements (⋃ a : A, {c ∈ A + B | 0 < c - a ∧ (c : ℕ) ≤ (next_elm A a n)}) n := by
have hcc (a : A) :
1 + countelements B (next_elm A a n - a - 1) ≤
countelements {c ∈ A + B | 0 < c - a ∧ (c : ℕ) ≤ (next_elm A a n)} n := by
sorry
have hax (a x : A) (hh : a ≠ x) :
{c ∈ A + B | 0 < c - a ∧ (c : ℕ) ≤ (next_elm A a n)} ∩
{c ∈ A + B | 0 < c - x ∧ (c : ℕ) ≤ next_elm A x n} = ∅ := by sorry
sorry | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have ht : countelements A n + β * (n - countelements A n) ≤ countelements (A + B) n := by
apply le_trans claim _
norm_cast | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hc1 : countelements A n * (1 - β) + β * n =
countelements A n + β * (n - countelements A n) := by ring_nf | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hc3 : α * n * (1 - β) + β * n = (α * (1 - β) + β) * n := by ring_nf | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [hc1] at hc2 | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [hc3] at hc2 | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : (α * (1 - β) + β) * ↑n ≤ ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact le_trans hc2 ht | case inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : (α * (1 - β) + β) * ↑n ≤ ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc3 : α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n
⊢ (α * (1 - β) + β) * ↑n ≤ ↑(countelements (A + B) n) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [tsub_pos_iff_lt, Set.sep_and, Set.iUnion_coe_set, Nat.lt_one_iff, coe_Icc, not_le,
Set.subset_inter_iff, Set.iUnion_subset_iff] | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n) | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ (∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ A + B) ∧
∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ Set.Icc 1 n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | constructor | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ (∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ A + B) ∧
∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ Set.Icc 1 n | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ ∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ A + B
case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ ∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ Set.Icc 1 n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | intro i hi x hx | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ ∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ Set.Icc 1 n | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ Set.Icc 1 n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [Set.mem_inter_iff, Set.mem_setOf_eq] at hx | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ Set.Icc 1 n | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ∈ Set.Icc 1 n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [Set.mem_Icc] | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ∈ Set.Icc 1 n | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ 1 ≤ x ∧ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | constructor | case right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ 1 ≤ x ∧ x ≤ n | case right.left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ 1 ≤ x
case right.right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | obtain ⟨hx1, hx2, hx3⟩ := hx | case right.right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ≤ n | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 : x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [next_elm] at hx3 | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 : x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ≤ n | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 :
x ≤
if h : (filter (fun x => x ∈ A) (Ioc (↑⟨i, ⋯⟩) n)).Nonempty then (filter (fun x => x ∈ A) (Ioc (↑⟨i, ⋯⟩) n)).min' h
else n
⊢ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [mem_Ioc, and_imp, ne_eq, ite_not] at hx3 | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 :
x ≤
if h : (filter (fun x => x ∈ A) (Ioc (↑⟨i, ⋯⟩) n)).Nonempty then (filter (fun x => x ∈ A) (Ioc (↑⟨i, ⋯⟩) n)).min' h
else n
⊢ x ≤ n | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 : x ≤ if h : (filter (fun x => x ∈ A) (Ioc i n)).Nonempty then (filter (fun x => x ∈ A) (Ioc i n)).min' ⋯ else n
⊢ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | split_ifs at hx3 with h | case right.right.intro.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
hx3 : x ≤ if h : (filter (fun x => x ∈ A) (Ioc i n)).Nonempty then (filter (fun x => x ∈ A) (Ioc i n)).min' ⋯ else n
⊢ x ≤ n | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
h : (filter (fun x => x ∈ A) (Ioc i n)).Nonempty
hx3 : x ≤ (filter (fun x => x ∈ A) (Ioc i n)).min' ⋯
⊢ x ≤ n
case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
h : ¬(filter (fun x => x ∈ A) (Ioc i n)).Nonempty
hx3 : x ≤ n
⊢ x ≤ n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | intro i hi x hx | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
⊢ ∀ (i : ℕ) (i_1 : i ∈ A), {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n} ⊆ A + B | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [Set.mem_inter_iff] at hx | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∩ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ A + B | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∧ x ∈ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [Set.mem_setOf_eq] at hx | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : x ∈ {x | x ∈ A + B ∧ i < x} ∧ x ∈ {x | x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n}
⊢ x ∈ A + B | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact hx.1.1 | case left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ x ∈ A + B | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rcases i.eq_zero_or_pos with i0 | i1 | case right.left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
⊢ 1 ≤ x | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ 1 ≤ x
case right.left.inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i1 : i > 0
⊢ 1 ≤ x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [Nat.succ_le] | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ 1 ≤ x | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ 0 < x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [← i0] | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ 0 < x | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ i < x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact hx.1.2 | case right.left.inl
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i0 : i = 0
⊢ i < x | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [Nat.succ_le] | case right.left.inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i1 : i > 0
⊢ 1 ≤ x | case right.left.inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i1 : i > 0
⊢ 0 < x |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | apply lt_trans i1 hx.1.2 | case right.left.inr
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx : (x ∈ A + B ∧ i < x) ∧ x ∈ A + B ∧ x ≤ next_elm A ⟨i, ⋯⟩ n
i1 : i > 0
⊢ 0 < x | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact hx3.trans (mem_Ioc.1 (mem_filter.1 $ min'_mem _ _).1).2 | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
h : (filter (fun x => x ∈ A) (Ioc i n)).Nonempty
hx3 : x ≤ (filter (fun x => x ∈ A) (Ioc i n)).min' ⋯
⊢ x ≤ n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simpa using hx3 | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
i : ℕ
hi : i ∈ A
x : ℕ
hx1 : x ∈ A + B ∧ i < x
hx2 : x ∈ A + B
h : ¬(filter (fun x => x ∈ A) (Ioc i n)).Nonempty
hx3 : x ≤ n
⊢ x ≤ n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [countelements, countelements] | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
⊢ countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
⊢ (filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n)).card ≤
(filter (fun x => x ∈ A + B) (Icc 1 n)).card |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | apply card_le_card | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
⊢ (filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n)).card ≤
(filter (fun x => x ∈ A + B) (Icc 1 n)).card | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
⊢ filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n) ⊆
filter (fun x => x ∈ A + B) (Icc 1 n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | intro y | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
⊢ filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n) ⊆
filter (fun x => x ∈ A + B) (Icc 1 n) | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n) →
y ∈ filter (fun x => x ∈ A + B) (Icc 1 n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | repeat rw [mem_filter] | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ filter (fun x => x ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) (Icc 1 n) →
y ∈ filter (fun x => x ∈ A + B) (Icc 1 n) | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} → y ∈ Icc 1 n ∧ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | intro hy | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} → y ∈ Icc 1 n ∧ y ∈ A + B | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ Icc 1 n ∧ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | constructor | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ Icc 1 n ∧ y ∈ A + B | case a.left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ Icc 1 n
case a.right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [mem_filter] | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} → y ∈ filter (fun x => x ∈ A + B) (Icc 1 n) | case a
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
⊢ y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} → y ∈ Icc 1 n ∧ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact hy.1 | case a.left
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ Icc 1 n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | obtain ⟨hy1, hy2⟩ := hy | case a.right
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy : y ∈ Icc 1 n ∧ y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ A + B | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hs : y ∈ (A + B) ∩ (Icc 1 n) := by aesop | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ A + B | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
hs : y ∈ (A + B) ∩ ↑(Icc 1 n)
⊢ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [Set.mem_inter_iff] at hs | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
hs : y ∈ (A + B) ∩ ↑(Icc 1 n)
⊢ y ∈ A + B | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
hs : y ∈ A + B ∧ y ∈ ↑(Icc 1 n)
⊢ y ∈ A + B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact hs.1 | case a.right.intro
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
hs : y ∈ A + B ∧ y ∈ ↑(Icc 1 n)
⊢ y ∈ A + B | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | aesop | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
y : ℕ
hy1 : y ∈ Icc 1 n
hy2 : y ∈ ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}
⊢ y ∈ (A + B) ∩ ↑(Icc 1 n) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hcc (a : A) :
1 + countelements B (next_elm A a n - a - 1) ≤
countelements {c ∈ A + B | 0 < c - a ∧ (c : ℕ) ≤ (next_elm A a n)} n := by
sorry | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
hcc :
∀ (a : ↑A),
1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hax (a x : A) (hh : a ≠ x) :
{c ∈ A + B | 0 < c - a ∧ (c : ℕ) ≤ (next_elm A a n)} ∩
{c ∈ A + B | 0 < c - x ∧ (c : ℕ) ≤ next_elm A x n} = ∅ := by sorry | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
hcc :
∀ (a : ↑A),
1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
hcc :
∀ (a : ↑A),
1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n
hax :
∀ (a x : ↑A),
a ≠ x → {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ∩ {c | c ∈ A + B ∧ 0 < c - ↑x ∧ c ≤ next_elm A x n} = ∅
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | sorry | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
hcc :
∀ (a : ↑A),
1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n
hax :
∀ (a x : ↑A),
a ≠ x → {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ∩ {c | c ∈ A + B ∧ 0 < c - ↑x ∧ c ≤ next_elm A x n} = ∅
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | sorry | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
a : ↑A
⊢ 1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | sorry | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
hcc :
∀ (a : ↑A),
1 + countelements B (next_elm A a n - ↑a - 1) ≤ countelements {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} n
a x : ↑A
hh : a ≠ x
⊢ {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ∩ {c | c ∈ A + B ∧ 0 < c - ↑x ∧ c ≤ next_elm A x n} = ∅ | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | apply le_trans claim _ | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
⊢ ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n) | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
⊢ ↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) ≤ ↑(countelements (A + B) n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | norm_cast | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
⊢ ↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n) ≤ ↑(countelements (A + B) n) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | ring_nf | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
⊢ ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n)) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [halpha] | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
⊢ α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | by_cases hbo : β = 1 | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : β = 1
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n
case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [hbo] | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : β = 1
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : β = 1
⊢ schnirelmannDensity A * ↑n * (1 - 1) + 1 * ↑n ≤ ↑(countelements A n) * (1 - 1) + 1 * ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [sub_self, mul_zero, one_mul, zero_add, le_refl] | case pos
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : β = 1
⊢ schnirelmannDensity A * ↑n * (1 - 1) + 1 * ↑n ≤ ↑(countelements A n) * (1 - 1) + 1 * ↑n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hbn : 0 < (1 - schnirelmannDensity B) := by
rw [hbeta] at hbo
rw [lt_sub_iff_add_lt, zero_add, lt_iff_le_and_ne]
exact ⟨schnirelmannDensity_le_one, hbo⟩ | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | simp only [add_le_add_iff_right, sub_pos, sub_neg] | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n * (1 - β) ≤ ↑(countelements A n) * (1 - β) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [← le_div_iff (hbn)] | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n * (1 - β) ≤ ↑(countelements A n) * (1 - β) | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * (1 - β) / (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [mul_div_assoc] | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * (1 - β) / (1 - schnirelmannDensity B) | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * ((1 - β) / (1 - schnirelmannDensity B)) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | have hun : (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1 := by
rw [div_self]
positivity | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * ((1 - β) / (1 - schnirelmannDensity B)) | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
hun : (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * ((1 - β) / (1 - schnirelmannDensity B)) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [hun, mul_one] | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
hun : (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) * ((1 - β) / (1 - schnirelmannDensity B)) | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
hun : (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact schnirelmannDensity_mul_le_card_filter | case neg
A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
hun : (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1
⊢ schnirelmannDensity A * ↑n ≤ ↑(countelements A n) | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [hbeta] at hbo | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
⊢ 0 < 1 - schnirelmannDensity B | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬schnirelmannDensity B = 1
⊢ 0 < 1 - schnirelmannDensity B |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [lt_sub_iff_add_lt, zero_add, lt_iff_le_and_ne] | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬schnirelmannDensity B = 1
⊢ 0 < 1 - schnirelmannDensity B | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬schnirelmannDensity B = 1
⊢ schnirelmannDensity B ≤ 1 ∧ schnirelmannDensity B ≠ 1 |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | exact ⟨schnirelmannDensity_le_one, hbo⟩ | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬schnirelmannDensity B = 1
⊢ schnirelmannDensity B ≤ 1 ∧ schnirelmannDensity B ≠ 1 | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | rw [div_self] | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ (1 - schnirelmannDensity B) / (1 - schnirelmannDensity B) = 1 | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ 1 - schnirelmannDensity B ≠ 0 |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | positivity | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hbo : ¬β = 1
hbn : 0 < 1 - schnirelmannDensity B
⊢ 1 - schnirelmannDensity B ≠ 0 | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | le_schnirelmannDensity_add | [115, 1] | [216, 26] | ring_nf | A✝ B✝ : Set ℕ
n✝ : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
dum : α * (1 - β) + β = α + β - α * β
n : ℕ
n1 : n > 0
lem : ⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n} ⊆ (A + B) ∩ ↑(Icc 1 n)
aux : countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n ≤ countelements (A + B) n
claim :
↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤
↑(countelements (⋃ a, {c | c ∈ A + B ∧ 0 < c - ↑a ∧ c ≤ next_elm A a n}) n)
ht : ↑(countelements A n) + β * (↑n - ↑(countelements A n)) ≤ ↑(countelements (A + B) n)
hc1 : ↑(countelements A n) * (1 - β) + β * ↑n = ↑(countelements A n) + β * (↑n - ↑(countelements A n))
hc2 : α * ↑n * (1 - β) + β * ↑n ≤ ↑(countelements A n) * (1 - β) + β * ↑n
⊢ α * ↑n * (1 - β) + β * ↑n = (α * (1 - β) + β) * ↑n | no goals |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | let α := schnirelmannDensity A | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | have halpha : α = schnirelmannDensity A := rfl | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | let β := schnirelmannDensity B | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | have hbeta : β = schnirelmannDensity B := rfl | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | let γ := schnirelmannDensity (A + B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
γ : ℝ := schnirelmannDensity (A + B)
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | have hgamma : γ = schnirelmannDensity (A + B) := rfl | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
γ : ℝ := schnirelmannDensity (A + B)
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
γ : ℝ := schnirelmannDensity (A + B)
hgamma : γ = schnirelmannDensity (A + B)
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) |
https://github.com/YaelDillies/LeanCamCombi.git | 034199694e3b91536d03bc4a8b0cdbd659cdf50f | LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean | schnirelmannDensity_for_two | [218, 1] | [239, 11] | rw [← halpha, ← hbeta, ← hgamma] | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
γ : ℝ := schnirelmannDensity (A + B)
hgamma : γ = schnirelmannDensity (A + B)
⊢ 1 - schnirelmannDensity (A + B) ≤ (1 - schnirelmannDensity A) * (1 - schnirelmannDensity B) | A✝ B✝ : Set ℕ
n : ℕ
A B : Set ℕ
hA : 0 ∈ A
hB : 0 ∈ B
α : ℝ := schnirelmannDensity A
halpha : α = schnirelmannDensity A
β : ℝ := schnirelmannDensity B
hbeta : β = schnirelmannDensity B
γ : ℝ := schnirelmannDensity (A + B)
hgamma : γ = schnirelmannDensity (A + B)
⊢ 1 - γ ≤ (1 - α) * (1 - β) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.