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/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
exact ⟨t, hF ht, hxt⟩
case intro.intro.intro.intro.intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ x : E s : Finset E hs : s ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hsint : combiInterior ℝ s = ⋃ s₁ ∈ F, combiInterior ℝ s₁ t : Finset E ht : t ∈ F hxt : x ∈ combiInterior ℝ t ⊒ βˆƒ i, βˆƒ (_ : i ∈ K₁), x ∈ combiInterior ℝ i
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
obtain ⟨t, ht⟩ := hempty ⟨_, hs⟩
case mpr.intro.intro.inl π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s t : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space hs : βˆ… ∈ K₁ ⊒ βˆƒ sβ‚‚ ∈ Kβ‚‚, (convexHull ℝ) β†‘βˆ… βŠ† (convexHull ℝ) ↑sβ‚‚
case mpr.intro.intro.inl.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space hs : βˆ… ∈ K₁ t : Finset E ht : t ∈ Kβ‚‚.faces ⊒ βˆƒ sβ‚‚ ∈ Kβ‚‚, (convexHull ℝ) β†‘βˆ… βŠ† (convexHull ℝ) ↑sβ‚‚
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
exact ⟨t, ht, by simp⟩
case mpr.intro.intro.inl.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space hs : βˆ… ∈ K₁ t : Finset E ht : t ∈ Kβ‚‚.faces ⊒ βˆƒ sβ‚‚ ∈ Kβ‚‚, (convexHull ℝ) β†‘βˆ… βŠ† (convexHull ℝ) ↑sβ‚‚
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
simp
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space hs : βˆ… ∈ K₁ t : Finset E ht : t ∈ Kβ‚‚.faces ⊒ (convexHull ℝ) β†‘βˆ… βŠ† (convexHull ℝ) ↑t
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
rw [hinterior, mem_iUnionβ‚‚] at hxt ⊒
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ x ∈ combiInterior ℝ t
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hxt : βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
obtain ⟨u, hu, hxu⟩ := hxt
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hxt : βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F hxu : x ∈ combiInterior ℝ u ⊒ βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
exact ⟨u, hu, hxu⟩
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F hxu : x ∈ combiInterior ℝ u ⊒ βˆƒ i, βˆƒ (_ : i ∈ F), x ∈ combiInterior ℝ i
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
rw [hinterior', mem_iUnionβ‚‚] at hxt' ⊒
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ hxt' : x' ∈ combiInterior ℝ t' F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ x ∈ combiInterior ℝ t'
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hxt' : βˆƒ i, βˆƒ (_ : i ∈ F'), x' ∈ combiInterior ℝ i hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ βˆƒ i, βˆƒ (_ : i ∈ F'), x ∈ combiInterior ℝ i
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
obtain ⟨u, hu, hxu⟩ := hxt'
π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hxt' : βˆƒ i, βˆƒ (_ : i ∈ F'), x' ∈ combiInterior ℝ i hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ ⊒ βˆƒ i, βˆƒ (_ : i ∈ F'), x ∈ combiInterior ℝ i
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ βˆƒ i, βˆƒ (_ : i ∈ F'), x ∈ combiInterior ℝ i
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
refine' ⟨u, hu, _⟩
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ βˆƒ i, βˆƒ (_ : i ∈ F'), x ∈ combiInterior ℝ i
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ x ∈ combiInterior ℝ u
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
rw [← disjoint_interiors hs (hF' hu) hx' hxu]
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ x ∈ combiInterior ℝ u
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ x ∈ combiInterior ℝ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Subdivision.lean
Geometry.SimplicialComplex.subdivides_iff_partition
[68, 1]
[128, 15]
exact hx
case intro.intro π•œ : Type u_1 E : Type u_2 inst✝² : SeminormedAddCommGroup E inst✝¹ : T2Space E inst✝ : NormedSpace ℝ E s✝ t✝ : Finset E m : β„• K₁ Kβ‚‚ : SimplicialComplex ℝ E hempty : K₁.faces.Nonempty β†’ Kβ‚‚.faces.Nonempty hspace✝ : K₁.space βŠ† Kβ‚‚.space hpartition : βˆ€ sβ‚‚ ∈ Kβ‚‚, βˆƒ F βŠ† K₁.faces, combiInterior ℝ sβ‚‚ = ⋃ s₁ ∈ F, combiInterior ℝ s₁ hspace : K₁.space = Kβ‚‚.space s : Finset E hs : s ∈ K₁ hsnonempty : s.Nonempty x : E hx : x ∈ combiInterior ℝ s t : Finset E ht : t ∈ Kβ‚‚ hxt : x ∈ combiInterior ℝ t x' : E hx' : x' ∈ combiInterior ℝ s t' : Finset E ht' : t' ∈ Kβ‚‚ F : Set (Finset E) hF : F βŠ† K₁.faces hinterior : combiInterior ℝ t = ⋃ s₁ ∈ F, combiInterior ℝ s₁ F' : Set (Finset E) hF' : F' βŠ† K₁.faces hinterior' : combiInterior ℝ t' = ⋃ s₁ ∈ F', combiInterior ℝ s₁ u : Finset E hu : u ∈ F' hxu : x' ∈ combiInterior ℝ u ⊒ x ∈ combiInterior ℝ s
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/GroupTheory/QuotientGroup.lean
QuotientGroup.preimage_image_mk_eq_iUnion_smul
[11, 1]
[15, 27]
simp_rw [QuotientGroup.preimage_image_mk_eq_iUnion_image N s, ← image_smul, Submonoid.smul_def, smul_eq_mul, mul_comm]
Ξ± : Type u_1 inst✝¹ : CommGroup Ξ± N : Subgroup Ξ± inst✝ : N.Normal s : Set Ξ± ⊒ mk ⁻¹' (mk '' s) = ⋃ x, x β€’ s
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Data/Multiset/Basic.lean
Multiset.exists_intermediate
[14, 1]
[19, 16]
induction' s using Quotient.inductionOn with lβ‚€
Ξ± : Type u_1 s t : Multiset Ξ± n : β„• hst : s ≀ t hs : card s ≀ n ht : n ≀ card t ⊒ βˆƒ u, s ≀ u ∧ u ≀ t ∧ card u = n
case h Ξ± : Type u_1 s t : Multiset Ξ± n : β„• ht : n ≀ card t lβ‚€ : List Ξ± hst : ⟦lβ‚€βŸ§ ≀ t hs : card ⟦lβ‚€βŸ§ ≀ n ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ t ∧ card u = n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Data/Multiset/Basic.lean
Multiset.exists_intermediate
[14, 1]
[19, 16]
induction' t using Quotient.inductionOn with lβ‚‚
case h Ξ± : Type u_1 s t : Multiset Ξ± n : β„• ht : n ≀ card t lβ‚€ : List Ξ± hst : ⟦lβ‚€βŸ§ ≀ t hs : card ⟦lβ‚€βŸ§ ≀ n ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ t ∧ card u = n
case h.h Ξ± : Type u_1 s t : Multiset Ξ± n : β„• lβ‚€ : List Ξ± hs : card ⟦lβ‚€βŸ§ ≀ n lβ‚‚ : List Ξ± ht : n ≀ card ⟦lβ‚‚βŸ§ hst : ⟦lβ‚€βŸ§ ≀ ⟦lβ‚‚βŸ§ ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ ⟦lβ‚‚βŸ§ ∧ card u = n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Data/Multiset/Basic.lean
Multiset.exists_intermediate
[14, 1]
[19, 16]
obtain ⟨l₁, h⟩ := hst.exists_intermediate hs ht
case h.h Ξ± : Type u_1 s t : Multiset Ξ± n : β„• lβ‚€ : List Ξ± hs : card ⟦lβ‚€βŸ§ ≀ n lβ‚‚ : List Ξ± ht : n ≀ card ⟦lβ‚‚βŸ§ hst : ⟦lβ‚€βŸ§ ≀ ⟦lβ‚‚βŸ§ ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ ⟦lβ‚‚βŸ§ ∧ card u = n
case h.h.intro Ξ± : Type u_1 s t : Multiset Ξ± n : β„• lβ‚€ : List Ξ± hs : card ⟦lβ‚€βŸ§ ≀ n lβ‚‚ : List Ξ± ht : n ≀ card ⟦lβ‚‚βŸ§ hst : ⟦lβ‚€βŸ§ ≀ ⟦lβ‚‚βŸ§ l₁ : List Ξ± h : lβ‚€.Subperm l₁ ∧ l₁.Subperm lβ‚‚ ∧ l₁.length = n ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ ⟦lβ‚‚βŸ§ ∧ card u = n
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Data/Multiset/Basic.lean
Multiset.exists_intermediate
[14, 1]
[19, 16]
exact ⟨l₁, h⟩
case h.h.intro Ξ± : Type u_1 s t : Multiset Ξ± n : β„• lβ‚€ : List Ξ± hs : card ⟦lβ‚€βŸ§ ≀ n lβ‚‚ : List Ξ± ht : n ≀ card ⟦lβ‚‚βŸ§ hst : ⟦lβ‚€βŸ§ ≀ ⟦lβ‚‚βŸ§ l₁ : List Ξ± h : lβ‚€.Subperm l₁ ∧ l₁.Subperm lβ‚‚ ∧ l₁.length = n ⊒ βˆƒ u, ⟦lβ‚€βŸ§ ≀ u ∧ u ≀ ⟦lβ‚‚βŸ§ ∧ card u = n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Data/Multiset/Basic.lean
Multiset.exists_le_card_eq
[21, 1]
[22, 65]
simpa using exists_intermediate (zero_le _) (Nat.zero_le _) hn
Ξ± : Type u_1 s t : Multiset Ξ± n : β„• hn : n ≀ card s ⊒ βˆƒ t ≀ s, card t = n
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Finite.lean
SimpleGraph.disjoint_edgeFinset
[8, 1]
[10, 68]
simp_rw [← Finset.disjoint_coe, coe_edgeFinset, disjoint_edgeSet]
Ξ± : Type u_1 G H : SimpleGraph Ξ± inst✝¹ : Fintype ↑G.edgeSet inst✝ : Fintype ↑H.edgeSet ⊒ Disjoint G.edgeFinset H.edgeFinset ↔ Disjoint G H
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Finite.lean
SimpleGraph.edgeFinset_eq_empty
[12, 1]
[13, 40]
rw [← edgeFinset_bot, edgeFinset_inj]
Ξ± : Type u_1 G H : SimpleGraph Ξ± inst✝ : Fintype ↑G.edgeSet ⊒ G.edgeFinset = βˆ… ↔ G = βŠ₯
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Finite.lean
SimpleGraph.edgeFinset_nonempty
[15, 1]
[16, 60]
rw [Finset.nonempty_iff_ne_empty, edgeFinset_eq_empty.ne]
Ξ± : Type u_1 G H : SimpleGraph Ξ± inst✝ : Fintype ↑G.edgeSet ⊒ G.edgeFinset.Nonempty ↔ G β‰  βŠ₯
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_zero
[18, 1]
[19, 47]
rw [hasSliceRankLE_iff]
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE 0 f ↔ f = 0
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (0 = 0 ∧ f = 0 ∨ βˆƒ n f_1 i g h, HasSliceRankLE n f_1 ∧ 0 = n + 1 ∧ f = f_1 + fun x => g (x i) * h fun j x_1 => x j) ↔ f = 0
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_zero
[18, 1]
[19, 47]
simp [@eq_comm _ 0]
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (0 = 0 ∧ f = 0 ∨ βˆƒ n f_1 i g h, HasSliceRankLE n f_1 ∧ 0 = n + 1 ∧ f = f_1 + fun x => g (x i) * h fun j x_1 => x j) ↔ f = 0
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_succ
[21, 1]
[25, 8]
rw [hasSliceRankLE_iff]
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE (n + 1) f ↔ βˆƒ f' i g h, HasSliceRankLE n f' ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (n + 1 = 0 ∧ f = 0 ∨ βˆƒ n_1 f_1 i g h, HasSliceRankLE n_1 f_1 ∧ n + 1 = n_1 + 1 ∧ f = f_1 + fun x => g (x i) * h fun j x_1 => x j) ↔ βˆƒ f' i g h, HasSliceRankLE n f' ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_succ
[21, 1]
[25, 8]
sorry
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (n + 1 = 0 ∧ f = 0 ∨ βˆƒ n_1 f_1 i g h, HasSliceRankLE n_1 f_1 ∧ n + 1 = n_1 + 1 ∧ f = f_1 + fun x => g (x i) * h fun j x_1 => x j) ↔ βˆƒ f' i g h, HasSliceRankLE n f' ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_one
[27, 1]
[29, 77]
simp [hasSliceRankLE_succ]
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE 1 f ↔ βˆƒ i g h, f = fun x => g (x i) * h fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
induction' n with n ih generalizing f
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j
case zero ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE 0 f ↔ βˆƒ i g h, f = βˆ‘ k : Fin 0, fun x => g k (x (i k)) * h k fun j x_1 => x j case succ ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE (n + 1) f ↔ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
simp_rw [hasSliceRankLE_succ, ih]
case succ ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE (n + 1) f ↔ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j
case succ ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j) ↔ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
constructor
case succ ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j) ↔ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j
case succ.mp ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j) β†’ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j case succ.mpr ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) β†’ βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
simp
case zero ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE 0 f ↔ βˆƒ i g h, f = βˆ‘ k : Fin 0, fun x => g k (x (i k)) * h k fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
rintro ⟨f', iβ‚™, gβ‚™, hβ‚™, ⟨i, g, h, rfl⟩, rfl⟩
case succ.mp ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j) β†’ βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ βˆƒ i_1 g_1 h_1, ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = βˆ‘ k : Fin (n + 1), fun x => g_1 k (x (i_1 k)) * h_1 k fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
refine ⟨Fin.cons iβ‚™ i, Fin.cons gβ‚™ g, Fin.cons hβ‚™ h, ?_⟩
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ βˆƒ i_1 g_1 h_1, ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = βˆ‘ k : Fin (n + 1), fun x => g_1 k (x (i_1 k)) * h_1 k fun j x_1 => x j
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = βˆ‘ k : Fin (n + 1), fun x => Fin.cons gβ‚™ g k (x (Fin.cons iβ‚™ i k)) * Fin.cons hβ‚™ h k fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
ext x
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = βˆ‘ k : Fin (n + 1), fun x => Fin.cons gβ‚™ g k (x (Fin.cons iβ‚™ i k)) * Fin.cons hβ‚™ h k fun j x_1 => x j
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) x = (βˆ‘ k : Fin (n + 1), fun x => Fin.cons gβ‚™ g k (x (Fin.cons iβ‚™ i k)) * Fin.cons hβ‚™ h k fun j x_1 => x j) x
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
simp only [ne_eq, Pi.add_apply, Finset.sum_apply, add_comm (_ * _), Fin.sum_univ_succ, Fin.cons_zero, Fin.cons_succ]
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) + fun x => gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) x = (βˆ‘ k : Fin (n + 1), fun x => Fin.cons gβ‚™ g k (x (Fin.cons iβ‚™ i k)) * Fin.cons hβ‚™ h k fun j x_1 => x j) x
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ c : Fin n, g c (x (i c)) * h c fun j x_1 => x j) + gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = (βˆ‘ x_1 : Fin n, g x_1 (x (Fin.cons iβ‚™ i x_1.succ)) * h x_1 fun j x_2 => x j) + gβ‚™ (x (Fin.cons iβ‚™ i 0)) * hβ‚™ fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
congr
case succ.mp.intro.intro.intro.intro.intro.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j iβ‚™ : ΞΉ gβ‚™ : Ξ± iβ‚™ β†’ R hβ‚™ : ((j : ΞΉ) β†’ j β‰  iβ‚™ β†’ Ξ± j) β†’ R i : Fin n β†’ ΞΉ g : (k : Fin n) β†’ Ξ± (i k) β†’ R h : (k : Fin n) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ c : Fin n, g c (x (i c)) * h c fun j x_1 => x j) + gβ‚™ (x iβ‚™) * hβ‚™ fun j x_1 => x j) = (βˆ‘ x_1 : Fin n, g x_1 (x (Fin.cons iβ‚™ i x_1.succ)) * h x_1 fun j x_2 => x j) + gβ‚™ (x (Fin.cons iβ‚™ i 0)) * hβ‚™ fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
rintro ⟨i, g, h, rfl⟩
case succ.mpr ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ (βˆƒ i g h, f = βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) β†’ βˆƒ f' i g h, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ f = f' + fun x => g (x i) * h fun j x_1 => x j
case succ.mpr.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ βˆƒ f' i_1 g_1 h_1, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) = f' + fun x => g_1 (x i_1) * h_1 fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
refine ⟨_, i 0, g 0, h 0, ⟨Fin.tail i, Fin.tail g, Fin.tail h, rfl⟩, ?_⟩
case succ.mpr.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ βˆƒ f' i_1 g_1 h_1, (βˆƒ i g h, f' = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j) ∧ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) = f' + fun x => g_1 (x i_1) * h_1 fun j x_1 => x j
case succ.mpr.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) = (βˆ‘ k : Fin n, fun x => Fin.tail g k (x (Fin.tail i k)) * Fin.tail h k fun j x_1 => x j) + fun x => g 0 (x (i 0)) * h 0 fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
ext x
case succ.mpr.intro.intro.intro ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R ⊒ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) = (βˆ‘ k : Fin n, fun x => Fin.tail g k (x (Fin.tail i k)) * Fin.tail h k fun j x_1 => x j) + fun x => g 0 (x (i 0)) * h 0 fun j x_1 => x j
case succ.mpr.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) x = ((βˆ‘ k : Fin n, fun x => Fin.tail g k (x (Fin.tail i k)) * Fin.tail h k fun j x_1 => x j) + fun x => g 0 (x (i 0)) * h 0 fun j x_1 => x j) x
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
simp only [ne_eq, Pi.add_apply, Finset.sum_apply, add_comm (_ * _), Fin.sum_univ_succ, Fin.cons_zero, Fin.cons_succ]
case succ.mpr.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ (βˆ‘ k : Fin (n + 1), fun x => g k (x (i k)) * h k fun j x_1 => x j) x = ((βˆ‘ k : Fin n, fun x => Fin.tail g k (x (Fin.tail i k)) * Fin.tail h k fun j x_1 => x j) + fun x => g 0 (x (i 0)) * h 0 fun j x_1 => x j) x
case succ.mpr.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ i_1 : Fin n, g i_1.succ (x (i i_1.succ)) * h i_1.succ fun j x_1 => x j) + g 0 (x (i 0)) * h 0 fun j x_1 => x j) = (βˆ‘ c : Fin n, Fin.tail g c (x (Fin.tail i c)) * Fin.tail h c fun j x_1 => x j) + g 0 (x (i 0)) * h 0 fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_iff_exists_sum
[31, 1]
[49, 10]
congr
case succ.mpr.intro.intro.intro.h ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m : β„• f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R n : β„• ih : βˆ€ {f : ((i : ΞΉ) β†’ Ξ± i) β†’ R}, HasSliceRankLE n f ↔ βˆƒ i g h, f = βˆ‘ k : Fin n, fun x => g k (x (i k)) * h k fun j x_1 => x j i : Fin (n + 1) β†’ ΞΉ g : (k : Fin (n + 1)) β†’ Ξ± (i k) β†’ R h : (k : Fin (n + 1)) β†’ ((j : ΞΉ) β†’ j β‰  i k β†’ Ξ± j) β†’ R x : (i : ΞΉ) β†’ Ξ± i ⊒ ((βˆ‘ i_1 : Fin n, g i_1.succ (x (i i_1.succ)) * h i_1.succ fun j x_1 => x j) + g 0 (x (i 0)) * h 0 fun j x_1 => x j) = (βˆ‘ c : Fin n, Fin.tail g c (x (Fin.tail i c)) * Fin.tail h c fun j x_1 => x j) + g 0 (x (i 0)) * h 0 fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
HasSliceRankLE.add
[51, 1]
[54, 74]
simpa
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R h₁ : HasSliceRankLE m f₁ ⊒ HasSliceRankLE (m + 0) (f₁ + 0)
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
HasSliceRankLE.add
[51, 1]
[54, 74]
simpa [add_assoc] using (h₁.add hβ‚‚).succ g h
ΞΉ : Type u_1 R : Type u_2 inst✝¹ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝ : Semiring R m n : β„• f f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R h₁ : HasSliceRankLE m f₁ n✝ : β„• f✝ : ((i : ΞΉ) β†’ (fun i => Ξ± i) i) β†’ R i✝ : ΞΉ g : Ξ± i✝ β†’ R h : ((j : ΞΉ) β†’ j β‰  i✝ β†’ Ξ± j) β†’ R hβ‚‚ : HasSliceRankLE n✝ f✝ ⊒ HasSliceRankLE (m + (n✝ + 1)) (f₁ + (f✝ + fun x => g (x i✝) * h fun j x_1 => x j))
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_card
[56, 1]
[60, 8]
rw [hasSliceRankLE_iff_exists_sum]
ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Fintype ΞΉ inst✝ : (i : ΞΉ) β†’ Fintype (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ HasSliceRankLE (Fintype.card ((i : ΞΉ) β†’ Ξ± i)) f
ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Fintype ΞΉ inst✝ : (i : ΞΉ) β†’ Fintype (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ βˆƒ i g h, f = βˆ‘ k : Fin (Fintype.card ((i : ΞΉ) β†’ Ξ± i)), fun x => g k (x (i k)) * h k fun j x_1 => x j
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
hasSliceRankLE_card
[56, 1]
[60, 8]
sorry
ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Fintype ΞΉ inst✝ : (i : ΞΉ) β†’ Fintype (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ βˆƒ i g h, f = βˆ‘ k : Fin (Fintype.card ((i : ΞΉ) β†’ Ξ± i)), fun x => g k (x (i k)) * h k fun j x_1 => x j
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
exists_hasSliceRankLE
[62, 1]
[67, 35]
cases nonempty_fintype ΞΉ
ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Finite ΞΉ inst✝ : βˆ€ (i : ΞΉ), Finite (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R ⊒ βˆƒ n, HasSliceRankLE n f
case intro ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Finite ΞΉ inst✝ : βˆ€ (i : ΞΉ), Finite (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R val✝ : Fintype ΞΉ ⊒ βˆƒ n, HasSliceRankLE n f
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
exists_hasSliceRankLE
[62, 1]
[67, 35]
have (i) := Fintype.ofFinite (Ξ± i)
case intro ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Finite ΞΉ inst✝ : βˆ€ (i : ΞΉ), Finite (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R val✝ : Fintype ΞΉ ⊒ βˆƒ n, HasSliceRankLE n f
case intro ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Finite ΞΉ inst✝ : βˆ€ (i : ΞΉ), Finite (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R val✝ : Fintype ΞΉ this : (i : ΞΉ) β†’ Fintype (Ξ± i) ⊒ βˆƒ n, HasSliceRankLE n f
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SliceRank.lean
exists_hasSliceRankLE
[62, 1]
[67, 35]
exact ⟨_, hasSliceRankLE_card _⟩
case intro ΞΉ : Type u_1 R : Type u_2 inst✝³ : DecidableEq ΞΉ Ξ± : ΞΉ β†’ Type u_3 inst✝² : Semiring R m n : β„• f✝ f₁ fβ‚‚ : ((i : ΞΉ) β†’ Ξ± i) β†’ R inst✝¹ : Finite ΞΉ inst✝ : βˆ€ (i : ΞΉ), Finite (Ξ± i) f : ((i : ΞΉ) β†’ Ξ± i) β†’ R val✝ : Fintype ΞΉ this : (i : ΞΉ) β†’ Fintype (Ξ± i) ⊒ βˆƒ n, HasSliceRankLE n f
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
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