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
sumset_contains_n
[41, 1]
[98, 56]
exact Set.InjOn.mono (fun x hx ↦ (mem_Ioo.1 (mem_filter.1 hx).1).2.le) $ fun x hx y hy ↦ tsub_inj_right hx hy
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A n + countelements B n h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 hfim : image (fun x => n - x) (filter (fun x => x ∈ B) (Ioo 0 n)) = filter (fun x => x ∈ {n} - B) (Ioo 0 n) ⊒ Set.InjOn (fun x => n - x) ↑(filter (fun x => x ∈ B) (Ioo 0 n))
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← hca, ← hcb] at hc
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A n + countelements B n h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) ⊒ (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).Nonempty
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) ⊒ (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).Nonempty
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rwa [← Finset.card_pos]
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hin : 0 < (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ⊒ (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).Nonempty
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← filter_or, ← tsub_zero n, ← Nat.card_Ioo]
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) ⊒ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) ⊒ (filter (fun a => a ∈ A ∨ a ∈ {n - 0} - B) (Ioo 0 (n - 0))).card ≀ (Ioo 0 n).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
exact card_filter_le _ _
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) ⊒ (filter (fun a => a ∈ A ∨ a ∈ {n - 0} - B) (Ioo 0 (n - 0))).card ≀ (Ioo 0 n).card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [card_union_add_card_inter, ← lem1, countelements]
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1)
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ (filter (fun x => x ∈ A) (Ioo 0 n)).card + (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card + (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
congr
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ (filter (fun x => x ∈ A) (Ioo 0 n)).card + (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card + (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card
case e_a.e_s.e_s.e_b A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ n = ((n - 1).add 0).succ
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
exact (tsub_add_cancel_of_le $ Nat.succ_le_iff.2 hn1).symm
case e_a.e_s.e_s.e_b A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ n = ((n - 1).add 0).succ
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← hui] at hc
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A (n - 1) + countelements B (n - 1) h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) ⊒ 0 < (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) ⊒ 0 < (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
by_contra! hip
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ⊒ 0 < (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 ⊒ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have hnn : n ≀ (n - 1) := le_trans hip0 hip1
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 ⊒ False
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : n ≀ n - 1 ⊒ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← not_lt] at hnn
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : n ≀ n - 1 ⊒ False
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : Β¬n - 1 < n ⊒ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
apply hnn
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : Β¬n - 1 < n ⊒ False
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : Β¬n - 1 < n ⊒ n - 1 < n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [propext (Nat.lt_iff_le_pred hn1)]
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) hun : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hui : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements A (n - 1) + countelements B (n - 1) hun1 : (filter (fun x => x ∈ A) (Ioo 0 n) βˆͺ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip0 : n ≀ n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card hip : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ 0 hip1 : n - 1 + (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card ≀ n - 1 hnn : Β¬n - 1 < n ⊒ n - 1 < n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← filter_and, ← coe_nonempty, coe_filter, Set.setOf_and, Set.setOf_and, Set.setOf_mem_eq, Set.inter_comm] at lem3
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A n + countelements B n h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) lem3 : (filter (fun x => x ∈ A) (Ioo 0 n) ∩ filter (fun x => βˆƒ x_1 ∈ B, n - x_1 = x) (Ioo 0 n)).Nonempty ⊒ (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A n + countelements B n h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) lem3 : (A ∩ {a | βˆƒ x ∈ B, n - x = a} ∩ {a | a ∈ Ioo 0 n}).Nonempty ⊒ (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
convert lem3 using 3 <;> ext <;> simp
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hc : n ≀ countelements A n + countelements B n h : n βˆ‰ A + B hnA : n βˆ‰ A hnB : n βˆ‰ B hca : countelements A (n - 1) = countelements A n hcb : countelements B (n - 1) = countelements B n hn1 : n > 0 lem1 : (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1) lem3 : (A ∩ {a | βˆƒ x ∈ B, n - x = a} ∩ {a | a ∈ Ioo 0 n}).Nonempty ⊒ (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sum_schnirelmannDensity_ge_one_sumset_nat
[100, 1]
[109, 45]
refine Set.eq_univ_of_forall $ fun n ↦ sumset_contains_n hA hB ?_
A B : Set β„• n : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B ⊒ A + B = Set.univ
A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• ⊒ n ≀ countelements A n + countelements B n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sum_schnirelmannDensity_ge_one_sumset_nat
[100, 1]
[109, 45]
obtain rfl | hn := eq_or_ne n 0
A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• ⊒ n ≀ countelements A n + countelements B n
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 case inr A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• hn : n β‰  0 ⊒ n ≀ countelements A n + countelements B n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sum_schnirelmannDensity_ge_one_sumset_nat
[100, 1]
[109, 45]
rw [← Nat.cast_le (Ξ± := ℝ), ← one_le_div (by positivity)]
case inr A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• hn : n β‰  0 ⊒ n ≀ countelements A n + countelements B n
case inr A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• hn : n β‰  0 ⊒ 1 ≀ ↑(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]
calc _ ≀ _ := hAB _ ≀ _ := add_le_add (schnirelmannDensity_le_div hn) (schnirelmannDensity_le_div hn) _ = _ := by push_cast; rw [add_div]; rfl
case inr A B : Set β„• n✝ : β„• hA : 0 ∈ A hB : 0 ∈ B hAB : 1 ≀ schnirelmannDensity A + schnirelmannDensity B n : β„• hn : n β‰  0 ⊒ 1 ≀ ↑(countelements A n + countelements B n) / ↑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]
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