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/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
erw [sum_sigma' (Ici x) fun z ↦ Icc x z]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ x_1 ∈ (Ici x).sigma fun y => Ici y, (mu 𝕜) x x_1.fst * (zeta 𝕜) x_1.fst x_1.snd * f x_1.snd = ∑ z ∈ Ici x, ∑ y ∈ Icc x z, (mu 𝕜) x y * (zeta 𝕜) y z * f z
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ x_1 ∈ (Ici x).sigma fun y => Ici y, (mu 𝕜) x x_1.fst * (zeta 𝕜) x_1.fst x_1.snd * f x_1.snd = ∑ x_1 ∈ (Ici x).sigma fun z => Icc x z, (mu 𝕜) x x_1.snd * (zeta 𝕜) x_1.snd x_1.fst * f x_1.fst
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
simp only [mul_boole, MulZeroClass.zero_mul, ite_mul, zeta_apply]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ x_1 ∈ (Ici x).sigma fun y => Ici y, (mu 𝕜) x x_1.fst * (zeta 𝕜) x_1.fst x_1.snd * f x_1.snd = ∑ x_1 ∈ (Ici x).sigma fun z => Icc x z, (mu 𝕜) x x_1.snd * (zeta 𝕜) x_1.snd x_1.fst * f x_1.fst
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ (∑ x_1 ∈ (Ici x).sigma fun y => Ici y, if x_1.fst ≤ x_1.snd then (mu 𝕜) x x_1.fst * f x_1.snd else 0) = ∑ x_1 ∈ (Ici x).sigma fun z => Icc x z, if x_1.snd ≤ x_1.fst then (mu 𝕜) x x_1.snd * f x_1.fst else 0
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
apply sum_nbij' (fun ⟨a, b⟩ ↦ ⟨b, a⟩) (fun ⟨a, b⟩ ↦ ⟨b, a⟩) <;> aesop (add simp mul_assoc) (add unsafe le_trans)
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ (∑ x_1 ∈ (Ici x).sigma fun y => Ici y, if x_1.fst ≤ x_1.snd then (mu 𝕜) x x_1.fst * f x_1.snd else 0) = ∑ x_1 ∈ (Ici x).sigma fun z => Icc x z, if x_1.snd ≤ x_1.fst then (mu 𝕜) x x_1.snd * f x_1.fst else 0
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
simp_rw [mul_apply, sum_mul]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ z ∈ Ici x, ∑ y ∈ Icc x z, (mu 𝕜) x y * (zeta 𝕜) y z * f z = ∑ z ∈ Ici x, (mu 𝕜 * zeta 𝕜) x z * f z
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
simp [mu_mul_zeta 𝕜, ← add_sum_Ioi]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ z ∈ Ici x, (mu 𝕜 * zeta 𝕜) x z * f z = ∑ y ∈ Ici x, ∑ z ∈ Ici y, 1 x z * f z
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ (∑ x_1 ∈ Ioi x, if x_1 ≤ x then f x else 0) = 0
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
exact sum_eq_zero fun y hy ↦ if_neg (mem_Ioi.mp hy).not_le
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ (∑ x_1 ∈ Ioi x, if x_1 ≤ x then f x else 0) = 0
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_top
[572, 1]
[598, 65]
simp [one_apply, ← add_sum_Ioi]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ ∑ y ∈ Ici x, ∑ z ∈ Ici y, 1 x z * f z = f x
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderTop α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α a b : α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Ici x, f y x : α this : DecidableRel fun x x_1 => x ≤ x_1 := Classical.decRel fun x x_1 => x ≤ x_1 ⊢ (∑ x_1 ∈ Ioi x, if x_1 ≤ x then f x else 0) = 0
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_bot
[606, 1]
[610, 76]
convert moebius_inversion_top (α := αᵒᵈ) f g h x using 3
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderBot α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Iic x, f y x : α ⊢ f x = ∑ y ∈ Iic x, (mu 𝕜) y x * g y
case h.e'_3.a.h.e'_5 𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderBot α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Iic x, f y x x✝ : α a✝ : x✝ ∈ Ici x ⊢ (mu 𝕜) x✝ x = (mu 𝕜) x x✝
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.moebius_inversion_bot
[606, 1]
[610, 76]
erw [mu_toDual]
case h.e'_3.a.h.e'_5 𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : PartialOrder α inst✝² : OrderBot α inst✝¹ : LocallyFiniteOrder α inst✝ : DecidableEq α f g : α → 𝕜 h : ∀ (x : α), g x = ∑ y ∈ Iic x, f y x x✝ : α a✝ : x✝ ∈ Ici x ⊢ (mu 𝕜) x✝ x = (mu 𝕜) x x✝
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Incidence.lean
IncidenceAlgebra.zeta_prod_apply
[626, 1]
[627, 42]
simp [← ite_and, Prod.le_def, and_comm]
𝕄 : Type u_1 F : Type u_2 𝕜 : Type u_3 𝕝 : Type u_4 𝕞 : Type u_5 α : Type u_6 β : Type u_7 inst✝⁴ : Ring 𝕜 inst✝³ : Preorder α inst✝² : Preorder β inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1 inst✝ : DecidableRel fun x x_1 => x ≤ x_1 a b : α × β ⊢ (zeta 𝕜) a b = (zeta 𝕜) a.1 b.1 * (zeta 𝕜) a.2 b.2
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.cons_le_cons
[11, 1]
[16, 27]
obtain rfl | hab := eq_or_ne a b
α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α ha : a ∉ s hb : b ∉ s ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons b s hb } ↔ a ≤ b
case inl α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a : α ha hb : a ∉ s ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons a s hb } ↔ a ≤ a case inr α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α ha : a ∉ s hb : b ∉ s hab : a ≠ b ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons b s hb } ↔ a ≤ b
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.cons_le_cons
[11, 1]
[16, 27]
classical rw [← toColex_sdiff_le_toColex_sdiff', cons_sdiff_cons hab, cons_sdiff_cons hab.symm, singleton_le_singleton]
case inr α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α ha : a ∉ s hb : b ∉ s hab : a ≠ b ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons b s hb } ↔ a ≤ b
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.cons_le_cons
[11, 1]
[16, 27]
simp
case inl α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a : α ha hb : a ∉ s ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons a s hb } ↔ a ≤ a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.cons_le_cons
[11, 1]
[16, 27]
rw [← toColex_sdiff_le_toColex_sdiff', cons_sdiff_cons hab, cons_sdiff_cons hab.symm, singleton_le_singleton]
case inr α : Type u_1 β : Type u_2 inst✝¹ : PartialOrder α inst✝ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α ha : a ∉ s hb : b ∉ s hab : a ≠ b ⊢ { ofColex := cons a s ha } ≤ { ofColex := cons b s hb } ↔ a ≤ b
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.insert_le_insert
[23, 1]
[25, 70]
rw [← cons_eq_insert _ _ ha, ← cons_eq_insert _ _ hb, cons_le_cons]
α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∉ s hb : b ∉ s ⊢ { ofColex := insert a s } ≤ { ofColex := insert b s } ↔ a ≤ b
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.insert_lt_insert
[27, 1]
[29, 70]
rw [← cons_eq_insert _ _ ha, ← cons_eq_insert _ _ hb, cons_lt_cons]
α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∉ s hb : b ∉ s ⊢ { ofColex := insert a s } < { ofColex := insert b s } ↔ a < b
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase
[31, 1]
[37, 27]
obtain rfl | hab := eq_or_ne a b
α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∈ s hb : b ∈ s ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase b } ↔ b ≤ a
case inl α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a : α inst✝ : DecidableEq α ha hb : a ∈ s ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase a } ↔ a ≤ a case inr α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∈ s hb : b ∈ s hab : a ≠ b ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase b } ↔ b ≤ a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase
[31, 1]
[37, 27]
classical rw [← toColex_sdiff_le_toColex_sdiff', erase_sdiff_erase hab hb, erase_sdiff_erase hab.symm ha, singleton_le_singleton]
case inr α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∈ s hb : b ∈ s hab : a ≠ b ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase b } ↔ b ≤ a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase
[31, 1]
[37, 27]
simp
case inl α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a : α inst✝ : DecidableEq α ha hb : a ∈ s ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase a } ↔ a ≤ a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase
[31, 1]
[37, 27]
rw [← toColex_sdiff_le_toColex_sdiff', erase_sdiff_erase hab hb, erase_sdiff_erase hab.symm ha, singleton_le_singleton]
case inr α : Type u_1 β : Type u_2 inst✝² : PartialOrder α inst✝¹ : PartialOrder β f : α → β 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t u : Finset α a b : α inst✝ : DecidableEq α ha : a ∈ s hb : b ∈ s hab : a ≠ b ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase b } ↔ b ≤ a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
simp only [lt_iff_exists_forall_lt]
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α ⊢ { ofColex := s } < { ofColex := t } ↔ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α ⊢ (∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a) ↔ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
refine ⟨fun h ↦ ?_, ?_⟩
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α ⊢ (∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a) ↔ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) case refine_2 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α ⊢ (∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)) → ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
let u := (t \ s).filter fun w ↦ ∀ a ∈ s, a ∉ t → a < w
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
have mem_u {w : α} : w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w := by simp [u, and_assoc]
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
have hu : u.Nonempty := h.imp fun _ ↦ mem_u.2
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
let m := max' _ hu
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
have ⟨hmt, hms, hm⟩ : m ∈ t ∧ m ∉ s ∧ ∀ a ∈ s, a ∉ t → a < m := mem_u.1 $ max'_mem _ _
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
refine ⟨m, hmt, hms, fun a hma ↦ ⟨fun has ↦ not_imp_comm.1 (hm _ has) hma.asymm, fun hat ↦ ?_⟩⟩
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m ⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t ⊢ a ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
by_contra has
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t ⊢ a ∈ s
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t has : a ∉ s ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
have hau : a ∈ u := mem_u.2 ⟨hat, has, fun b hbs hbt ↦ (hm _ hbs hbt).trans hma⟩
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t has : a ∉ s ⊢ False
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t has : a ∉ s hau : a ∈ u ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
exact hma.not_le $ le_max' _ _ hau
case refine_1 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) mem_u : ∀ {w : α}, w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w hu : u.Nonempty m : α := u.max' hu hmt : m ∈ t hms : m ∉ s hm : ∀ a ∈ s, a ∉ t → a < m a : α hma : m < a hat : a ∈ t has : a ∉ s hau : a ∈ u ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
simp [u, and_assoc]
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a u : Finset α := filter (fun w => ∀ a ∈ s, a ∉ t → a < w) (t \ s) w : α ⊢ w ∈ u ↔ w ∈ t ∧ w ∉ s ∧ ∀ a ∈ s, a ∉ t → a < w
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
rintro ⟨w, hwt, hws, hw⟩
case refine_2 α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α ⊢ (∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)) → ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
refine ⟨w, hwt, hws, fun a has hat ↦ ?_⟩
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) a : α has : a ∈ s hat : a ∉ t ⊢ a < w
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
by_contra! hwa
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) a : α has : a ∈ s hat : a ∉ t ⊢ a < w
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) a : α has : a ∈ s hat : a ∉ t hwa : w ≤ a ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.lt_iff_exists_forall_lt_mem_iff_mem
[55, 1]
[71, 73]
exact hat $ (hw $ hwa.lt_of_ne $ ne_of_mem_of_not_mem hwt hat).1 has
case refine_2.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a✝ w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) a : α has : a ∈ s hat : a ∉ t hwa : w ≤ a ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
generalize_proofs ht
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase (t.min' ⋯) }
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase (t.min' ht) }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
set m := min' t ht
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase (t.min' ht) }
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain rfl | h' := eq_or_ne s t
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s : Finset α a : α ha : a ∈ s hst : { ofColex := s } ≤ { ofColex := s } hcard : s.card ≤ s.card ht : s.Nonempty m : α := s.min' ht ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase m } case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
replace hst := hst.lt_of_ne $ toColex_inj.not.2 h'
case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hst : { ofColex := s } ≤ { ofColex := t } hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hst : { ofColex := s } < { ofColex := t } ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
simp only [lt_iff_exists_forall_lt_mem_iff_mem] at hst
case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hst : { ofColex := s } < { ofColex := t } ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hst : ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain ⟨w, hwt, hws, hw⟩ := hst
case inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hst : ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain hwa | haw := (ne_of_mem_of_not_mem ha hws).symm.lt_or_lt
case inr.intro.intro.intro α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m } case inr.intro.intro.intro.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain rfl | hmw : m = w ∨ m < w := (min'_le _ _ hwt).eq_or_lt
case inr.intro.intro.intro.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m } case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
exact (erase_le_erase ha $ min'_mem _ _).2 $ min'_le _ _ $ ha
case inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s : Finset α a : α ha : a ∈ s hst : { ofColex := s } ≤ { ofColex := s } hcard : s.card ≤ s.card ht : s.Nonempty m : α := s.min' ht ⊢ { ofColex := s.erase a } ≤ { ofColex := s.erase m }
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
have hma : m < a := (min'_le _ _ hwt).trans_lt hwa
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
refine (lt_iff_exists_forall_lt.2 ⟨a, mem_erase.2 ⟨hma.ne', (hw hwa).1 ha⟩, not_mem_erase _ _, fun b hbs hbt ↦ ?_⟩).le
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ { ofColex := { val := t.val.erase m, nodup := ⋯ } }.ofColex ⊢ b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
change b ∉ t.erase m at hbt
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ { ofColex := { val := t.val.erase m, nodup := ⋯ } }.ofColex ⊢ b < a
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t.erase m ⊢ b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rw [mem_erase, not_and_or, not_ne_iff] at hbt
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t.erase m ⊢ b < a
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b = m ∨ b ∉ t ⊢ b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain rfl | hbt := hbt
case inr.intro.intro.intro.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b = m ∨ b ∉ t ⊢ b < a
case inr.intro.intro.intro.inl.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a hbs : m ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex ⊢ m < a case inr.intro.intro.intro.inl.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t ⊢ b < a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
assumption
case inr.intro.intro.intro.inl.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a hbs : m ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex ⊢ m < a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
by_contra! hab
case inr.intro.intro.intro.inl.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t ⊢ b < a
case inr.intro.intro.intro.inl.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t hab : a ≤ b ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
exact hbt $ (hw $ hwa.trans_le hab).1 $ mem_of_mem_erase hbs
case inr.intro.intro.intro.inl.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) hwa : w < a hma : m < a b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t hab : a ≤ b ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
have : erase t m ⊆ erase s a := by rintro b hb rw [mem_erase] at hb ⊢ exact ⟨(haw.trans_le $ min'_le _ _ hb.2).ne', (hw $ hb.1.lt_of_le' $ min'_le _ _ hb.2).2 hb.2⟩
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rw [eq_of_subset_of_card_le this]
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ (s.erase a).card ≤ (t.erase m).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rw [card_erase_of_mem ha, card_erase_of_mem (min'_mem _ _)]
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ (s.erase a).card ≤ (t.erase m).card
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ s.card - 1 ≤ t.card - 1
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
exact tsub_le_tsub_right hcard _
case inr.intro.intro.intro.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m this : t.erase m ⊆ s.erase a ⊢ s.card - 1 ≤ t.card - 1
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rintro b hb
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m ⊢ t.erase m ⊆ s.erase a
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m b : α hb : b ∈ t.erase m ⊢ b ∈ s.erase a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rw [mem_erase] at hb ⊢
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m b : α hb : b ∈ t.erase m ⊢ b ∈ s.erase a
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m b : α hb : b ≠ m ∧ b ∈ t ⊢ b ≠ a ∧ b ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
exact ⟨(haw.trans_le $ min'_le _ _ hb.2).ne', (hw $ hb.1.lt_of_le' $ min'_le _ _ hb.2).2 hb.2⟩
α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t hwt : m ∈ t hws : m ∉ s hw : ∀ ⦃a : α⦄, m < a → (a ∈ s ↔ a ∈ t) haw : a < m b : α hb : b ≠ m ∧ b ∈ t ⊢ b ≠ a ∧ b ∈ s
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
refine (lt_iff_exists_forall_lt.2 ⟨w, mem_erase.2 ⟨hmw.ne', hwt⟩, mt mem_of_mem_erase hws, fun b hbs hbt ↦ ?_⟩).le
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w ⊢ { ofColex := s.erase a } ≤ { ofColex := t.erase m }
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ { ofColex := { val := t.val.erase m, nodup := ⋯ } }.ofColex ⊢ b < w
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
change b ∉ t.erase m at hbt
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ { ofColex := { val := t.val.erase m, nodup := ⋯ } }.ofColex ⊢ b < w
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t.erase m ⊢ b < w
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
rw [mem_erase, not_and_or, not_ne_iff] at hbt
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t.erase m ⊢ b < w
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b = m ∨ b ∉ t ⊢ b < w
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
obtain rfl | hbt := hbt
case inr.intro.intro.intro.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b = m ∨ b ∉ t ⊢ b < w
case inr.intro.intro.intro.inr.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w hbs : m ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex ⊢ m < w case inr.intro.intro.intro.inr.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t ⊢ b < w
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
assumption
case inr.intro.intro.intro.inr.inr.inl α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w hbs : m ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex ⊢ m < w
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
by_contra! hwb
case inr.intro.intro.intro.inr.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t ⊢ b < w
case inr.intro.intro.intro.inr.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t hwb : w ≤ b ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Colex.lean
Finset.Colex.erase_le_erase_min'
[73, 1]
[115, 94]
exact hbt $ (hw $ hwb.lt_of_ne $ ne_of_mem_of_not_mem hwt hbt).1 $ mem_of_mem_erase hbs
case inr.intro.intro.intro.inr.inr.inr α : Type u_1 β : Type u_2 inst✝ : LinearOrder α s t : Finset α a : α hcard : s.card ≤ t.card ha : a ∈ s ht : t.Nonempty m : α := t.min' ht h' : s ≠ t w : α hwt : w ∈ t hws : w ∉ s hw : ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t) haw : a < w hmw : m < w b : α hbs : b ∈ { ofColex := { val := s.val.erase a, nodup := ⋯ } }.ofColex hbt : b ∉ t hwb : w ≤ b ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
one_le_schnirelmannDensity_iff
[10, 1]
[12, 76]
rw [schnirelmannDensity_le_one.ge_iff_eq, schnirelmannDensity_eq_one_iff]
A B : Set ℕ n : ℕ ⊢ 1 ≤ schnirelmannDensity A ↔ {0}ᶜ ⊆ A
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
one_le_schnirelmannDensity_iff_of_zero_mem
[14, 1]
[17, 91]
rw [schnirelmannDensity_le_one.ge_iff_eq, schnirelmannDensity_eq_one_iff_of_zero_mem hA]
A B : Set ℕ n : ℕ hA : 0 ∈ A ⊢ 1 ≤ schnirelmannDensity A ↔ A = Set.univ
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_nonneg
[22, 1]
[22, 90]
positivity
A✝ B : Set ℕ n✝ : ℕ A : Set ℕ n : ℕ ⊢ 0 ≤ countelements A n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
card_Icc_one_n_n
[24, 1]
[25, 47]
rw [Nat.card_Icc 1 n, add_tsub_cancel_right]
A B : Set ℕ n✝ n : ℕ ⊢ (Icc 1 n).card = n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_le_n
[27, 1]
[28, 57]
simpa [countelements] using card_filter_le (Icc 1 n) _
A✝ B : Set ℕ n✝ : ℕ A : Set ℕ n : ℕ ⊢ countelements A n ≤ n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
repeat rw [countelements]
A B : Set ℕ n : ℕ hn : n ∉ A ⊢ countelements A (n - 1) = countelements A n
A B : Set ℕ n : ℕ hn : n ∉ A ⊢ (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card = (filter (fun x => x ∈ A) (Icc 1 n)).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
refine card_le_card fun x hx ↦ ?_
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A ⊢ (filter (fun x => x ∈ A) (Icc 1 n)).card ≤ (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : x ∈ filter (fun x => x ∈ A) (Icc 1 n) ⊢ x ∈ filter (fun x => x ∈ A) (Icc 1 (n - 1))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
rw [mem_filter]
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : x ∈ filter (fun x => x ∈ A) (Icc 1 n) ⊢ x ∈ filter (fun x => x ∈ A) (Icc 1 (n - 1))
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : x ∈ filter (fun x => x ∈ A) (Icc 1 n) ⊢ x ∈ Icc 1 (n - 1) ∧ x ∈ A
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
rw [mem_filter, mem_Icc] at hx
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : x ∈ filter (fun x => x ∈ A) (Icc 1 n) ⊢ x ∈ Icc 1 (n - 1) ∧ x ∈ A
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : (1 ≤ x ∧ x ≤ n) ∧ x ∈ A ⊢ x ∈ Icc 1 (n - 1) ∧ x ∈ A
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
refine ⟨mem_Icc.2 ⟨hx.1.1, Nat.le_pred_of_lt $ hx.1.2.lt_of_ne ?_⟩, hx.2⟩
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : (1 ≤ x ∧ x ≤ n) ∧ x ∈ A ⊢ x ∈ Icc 1 (n - 1) ∧ x ∈ A
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : (1 ≤ x ∧ x ≤ n) ∧ x ∈ A ⊢ x ≠ n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
rintro rfl
case refine_2 A B : Set ℕ n : ℕ hn : n ∉ A x : ℕ hx : (1 ≤ x ∧ x ≤ n) ∧ x ∈ A ⊢ x ≠ n
case refine_2 A B : Set ℕ x : ℕ hn : x ∉ A hx : (1 ≤ x ∧ x ≤ x) ∧ x ∈ A ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
exact hn hx.2
case refine_2 A B : Set ℕ x : ℕ hn : x ∉ A hx : (1 ≤ x ∧ x ≤ x) ∧ x ∈ A ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
rw [countelements]
A B : Set ℕ n : ℕ hn : n ∉ A ⊢ (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card = countelements A n
A B : Set ℕ n : ℕ hn : n ∉ A ⊢ (filter (fun x => x ∈ A) (Icc 1 (n - 1))).card = (filter (fun x => x ∈ A) (Icc 1 n)).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
countelements_pred
[30, 1]
[39, 16]
simp only [tsub_le_iff_right, le_add_iff_nonneg_right, zero_le_one]
case refine_1 A B : Set ℕ n : ℕ hn : n ∉ A ⊢ n - 1 ≤ n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
by_contra! h
A B : Set ℕ n : ℕ hA : 0 ∈ A hB : 0 ∈ B hc : n ≤ countelements A n + countelements B n ⊢ n ∈ A + B
A B : Set ℕ n : ℕ hA : 0 ∈ A hB : 0 ∈ B hc : n ≤ countelements A n + countelements B n h : n ∉ A + B ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have hnA : n ∉ A := Set.not_mem_subset (Set.subset_add_left _ hB) h
A B : Set ℕ n : ℕ hA : 0 ∈ A hB : 0 ∈ B hc : n ≤ countelements A n + countelements B n h : n ∉ A + B ⊢ False
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 ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have hnB : n ∉ B := Set.not_mem_subset (Set.subset_add_right _ hA) h
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 ⊢ False
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 ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have hca : countelements A (n - 1) = countelements A n := countelements_pred hnA
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 ⊢ False
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 ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have hcb : countelements B (n - 1) = countelements B n := countelements_pred hnB
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 ⊢ False
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 ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
obtain rfl | hn1 := n.eq_zero_or_pos
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 ⊢ False
case inl A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B hc : 0 ≤ countelements A 0 + countelements B 0 h : 0 ∉ A + B hnA : 0 ∉ A hnB : 0 ∉ B hca : countelements A (0 - 1) = countelements A 0 hcb : countelements B (0 - 1) = countelements B 0 ⊢ False case inr 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 ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
apply h
case inr 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 ⊢ False
case inr 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 ⊢ n ∈ A + B
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
simp only [Nat.lt_one_iff, tsub_eq_zero_iff_le, mem_Ioo, and_imp, Set.singleton_sub, Set.mem_image, ne_eq] at lem3
case inr 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 ∈ {n} - B) (Ioo 0 n)).Nonempty ⊢ n ∈ A + B
case inr 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 ⊢ n ∈ A + B
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
have lem31 : (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty := by rw [← filter_and, ← coe_nonempty, coe_filter, Set.setOf_and, Set.setOf_and, Set.setOf_mem_eq, Set.inter_comm] at lem3 convert lem3 using 3 <;> ext <;> simp
case inr 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 ⊢ n ∈ A + B
case inr 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 lem31 : (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty ⊢ n ∈ A + B
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
obtain ⟨_, ⟨hxA, n, rfl, x, hxB, rfl⟩, hx⟩ := lem31
case inr 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 lem31 : (A ∩ ({n} - B) ∩ Set.Ioo 0 n).Nonempty ⊢ n ∈ A + B
case inr.intro.intro.intro.intro.intro.intro.intro A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B n : ℕ 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 x : ℕ hxB : x ∈ B hxA : (fun x x_1 => x - x_1) n x ∈ A hx : (fun x x_1 => x - x_1) n x ∈ Set.Ioo 0 n ⊢ n ∈ A + B
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
simp only [Set.mem_Ioo, Nat.succ_le_iff, tsub_pos_iff_lt, tsub_le_iff_right] at hx
case inr.intro.intro.intro.intro.intro.intro.intro A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B n : ℕ 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 x : ℕ hxB : x ∈ B hxA : (fun x x_1 => x - x_1) n x ∈ A hx : (fun x x_1 => x - x_1) n x ∈ Set.Ioo 0 n ⊢ n ∈ A + B
case inr.intro.intro.intro.intro.intro.intro.intro A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B n : ℕ 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 x : ℕ hxB : x ∈ B hxA : (fun x x_1 => x - x_1) n x ∈ A hx : x < n ∧ n - x < n ⊢ n ∈ A + B
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
exact ⟨_, hxA, x, hxB, tsub_add_cancel_of_le hx.1.le⟩
case inr.intro.intro.intro.intro.intro.intro.intro A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B n : ℕ 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 x : ℕ hxB : x ∈ B hxA : (fun x x_1 => x - x_1) n x ∈ A hx : x < n ∧ n - x < n ⊢ n ∈ A + B
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
contradiction
case inl A B : Set ℕ hA : 0 ∈ A hB : 0 ∈ B hc : 0 ≤ countelements A 0 + countelements B 0 h : 0 ∉ A + B hnA : 0 ∉ A hnB : 0 ∉ B hca : countelements A (0 - 1) = countelements A 0 hcb : countelements B (0 - 1) = countelements B 0 ⊢ False
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [countelements]
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 ⊢ (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = countelements B (n - 1)
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 ⊢ (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = (filter (fun x => x ∈ B) (Icc 1 (n - 1))).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
rw [← hfim, card_image_of_injOn]
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) ⊢ (filter (fun x => x ∈ {n} - B) (Ioo 0 n)).card = (filter (fun x => x ∈ B) (Icc 1 (n - 1))).card
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) ⊢ (filter (fun x => x ∈ B) (Ioo 0 n)).card = (filter (fun x => x ∈ B) (Icc 1 (n - 1))).card 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))
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 + 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) ⊢ (filter (fun x => x ∈ B) (Ioo 0 n)).card = (filter (fun x => x ∈ B) (Icc 1 (n - 1))).card 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))
case e_s.e_s.e_b 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) ⊢ n = ((n - 1).add 0).succ 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))
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_s.e_s.e_b 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) ⊢ n = ((n - 1).add 0).succ 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))
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))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
ext
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 ⊢ image (fun x => n - x) (filter (fun x => x ∈ B) (Ioo 0 n)) = filter (fun x => x ∈ {n} - B) (Ioo 0 n)
case a 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 a✝ : ℕ ⊢ a✝ ∈ image (fun x => n - x) (filter (fun x => x ∈ B) (Ioo 0 n)) ↔ a✝ ∈ filter (fun x => x ∈ {n} - B) (Ioo 0 n)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/Schnirelmann.lean
sumset_contains_n
[41, 1]
[98, 56]
aesop
case a 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 a✝ : ℕ ⊢ a✝ ∈ image (fun x => n - x) (filter (fun x => x ∈ B) (Ioo 0 n)) ↔ a✝ ∈ filter (fun x => x ∈ {n} - B) (Ioo 0 n)
no goals