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/Skeleton.lean
Geometry.SimplicialComplex.Pure.skeleton
[53, 1]
[61, 18]
obtain ⟨t, ht, hst⟩ := subfacet (skeleton_le hs.1)
case inr 𝕜 : Type u_1 E : Type u_2 inst✝³ : LinearOrderedField 𝕜 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : FiniteDimensional 𝕜 E m n k : ℕ K : SimplicialComplex 𝕜 E s✝ t : Finset E A : Set (Finset E) hK : K.Pure n hn : n ≤ k s : Finset E hs : s ∈ (K.skeleton k).facets ⊢ s.card = n + 1
case inr.intro.intro 𝕜 : Type u_1 E : Type u_2 inst✝³ : LinearOrderedField 𝕜 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : FiniteDimensional 𝕜 E m n k : ℕ K : SimplicialComplex 𝕜 E s✝ t✝ : Finset E A : Set (Finset E) hK : K.Pure n hn : n ≤ k s : Finset E hs : s ∈ (K.skeleton k).facets t : Finset E ht : t ∈ K.facets hst : s ⊆ t ⊢ s.card = n + 1
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Skeleton.lean
Geometry.SimplicialComplex.Pure.skeleton
[53, 1]
[61, 18]
rw [hs.2 ⟨facets_subset ht, (hK.2 ht).le.trans (add_le_add_right hn _)⟩ hst]
case inr.intro.intro 𝕜 : Type u_1 E : Type u_2 inst✝³ : LinearOrderedField 𝕜 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : FiniteDimensional 𝕜 E m n k : ℕ K : SimplicialComplex 𝕜 E s✝ t✝ : Finset E A : Set (Finset E) hK : K.Pure n hn : n ≤ k s : Finset E hs : s ∈ (K.skeleton k).facets t : Finset E ht : t ∈ K.facets hst : s ⊆ t ⊢ s.card = n + 1
case inr.intro.intro 𝕜 : Type u_1 E : Type u_2 inst✝³ : LinearOrderedField 𝕜 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : FiniteDimensional 𝕜 E m n k : ℕ K : SimplicialComplex 𝕜 E s✝ t✝ : Finset E A : Set (Finset E) hK : K.Pure n hn : n ≤ k s : Finset E hs : s ∈ (K.skeleton k).facets t : Finset E ht : t ∈ K.facets hst : s ⊆ t ⊢ t.card = n + 1
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/SimplicialComplex/Skeleton.lean
Geometry.SimplicialComplex.Pure.skeleton
[53, 1]
[61, 18]
exact hK.2 ht
case inr.intro.intro 𝕜 : Type u_1 E : Type u_2 inst✝³ : LinearOrderedField 𝕜 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : FiniteDimensional 𝕜 E m n k : ℕ K : SimplicialComplex 𝕜 E s✝ t✝ : Finset E A : Set (Finset E) hK : K.Pure n hn : n ≤ k s : Finset E hs : s ∈ (K.skeleton k).facets t : Finset E ht : t ∈ K.facets hst : s ⊆ t ⊢ t.card = n + 1
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
haveI : Fact p.Prime := ⟨hp⟩
p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
obtain h | h := eq_bot_or_eq_top (AddAction.stabilizer (ZMod p) (s + t))
p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊥ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊤ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
refine' min_le_of_right_le _
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊥ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊥ ⊢ s.card + t.card - 1 ≤ (s + t).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
rw [← AddSubgroup.coe_eq_zero, ← coe_addStab (hs.add ht), coe_eq_zero] at h
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊥ ⊢ s.card + t.card - 1 ≤ (s + t).card
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = 0 ⊢ s.card + t.card - 1 ≤ (s + t).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
simpa [*] using add_kneser s t
case inl p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = 0 ⊢ s.card + t.card - 1 ≤ (s + t).card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
rw [← AddSubgroup.coe_eq_univ, ← coe_addStab (hs.add ht), coe_eq_univ] at h
case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : AddAction.stabilizer (ZMod p) (s + t) = ⊤ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = univ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
refine' card_addStab_le_card.trans' _
case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = univ ⊢ min p (s.card + t.card - 1) ≤ (s + t).card
case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = univ ⊢ min p (s.card + t.card - 1) ≤ (s + t).addStab.card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Archive/CauchyDavenportFromKneser.lean
ZMod.min_le_card_add'
[27, 1]
[37, 24]
simp [*, card_univ]
case inr p : ℕ hp : p.Prime s t : Finset (ZMod p) hs : s.Nonempty ht : t.Nonempty this : Fact p.Prime h : (s + t).addStab = univ ⊢ min p (s.card + t.card - 1) ≤ (s + t).addStab.card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.map_id
[17, 1]
[17, 99]
ext <;> simp
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H : SimpleGraph V G : SimpleGraph α G' : G.Subgraph ⊢ Subgraph.map Hom.id G' = G'
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.map_comp
[19, 1]
[21, 30]
ext <;> simp [Subgraph.map]
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β I : SimpleGraph γ G' : G.Subgraph f : G →g H g : H →g I ⊢ Subgraph.map (g.comp f) G' = Subgraph.map g (Subgraph.map f G')
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
ext e
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph ⊢ (Subgraph.map f G').edgeSet = Sym2.map ⇑f '' G'.edgeSet
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph e : Sym2 β ⊢ e ∈ (Subgraph.map f G').edgeSet ↔ e ∈ Sym2.map ⇑f '' G'.edgeSet
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
induction' e using Sym2.ind with a b
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph e : Sym2 β ⊢ e ∈ (Subgraph.map f G').edgeSet ↔ e ∈ Sym2.map ⇑f '' G'.edgeSet
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ s(a, b) ∈ (Subgraph.map f G').edgeSet ↔ s(a, b) ∈ Sym2.map ⇑f '' G'.edgeSet
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
simp only [mem_edgeSet, Sym2.exists, Relation.Map, and_or_left, exists_or, map_adj, Set.mem_image, Sym2.map_pair_eq, Sym2.eq, Sym2.rel_iff]
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ s(a, b) ∈ (Subgraph.map f G').edgeSet ↔ s(a, b) ∈ Sym2.map ⇑f '' G'.edgeSet
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ (∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = a ∧ f b_1 = b) ↔ (∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = a ∧ f b_1 = b) ∨ ∃ x x_1, G'.Adj x x_1 ∧ f x = b ∧ f x_1 = a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
refine' (or_iff_left_of_imp _).symm
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ (∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = a ∧ f b_1 = b) ↔ (∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = a ∧ f b_1 = b) ∨ ∃ x x_1, G'.Adj x x_1 ∧ f x = b ∧ f x_1 = a
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ (∃ x x_1, G'.Adj x x_1 ∧ f x = b ∧ f x_1 = a) → ∃ a_2 b_1, G'.Adj a_2 b_1 ∧ f a_2 = a ∧ f b_1 = b
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
rintro ⟨a, b, hab, rfl, rfl⟩
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : β ⊢ (∃ x x_1, G'.Adj x x_1 ∧ f x = b ∧ f x_1 = a) → ∃ a_2 b_1, G'.Adj a_2 b_1 ∧ f a_2 = a ∧ f b_1 = b
case h.h.intro.intro.intro.intro α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : α hab : G'.Adj a b ⊢ ∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = f b ∧ f b_1 = f a
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_map
[23, 1]
[31, 35]
exact ⟨b, a, hab.symm, rfl, rfl⟩
case h.h.intro.intro.intro.intro α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G✝ H✝ : SimpleGraph V G : SimpleGraph α H : SimpleGraph β f : G →g H G' : G.Subgraph a b : α hab : G'.Adj a b ⊢ ∃ a_1 b_1, G'.Adj a_1 b_1 ∧ f a_1 = f b ∧ f b_1 = f a
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_coe
[33, 1]
[34, 52]
ext e
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph ⊢ G'.coe.edgeSet = Sym2.map Subtype.val ⁻¹' G'.edgeSet
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph e : Sym2 ↑G'.verts ⊢ e ∈ G'.coe.edgeSet ↔ e ∈ Sym2.map Subtype.val ⁻¹' G'.edgeSet
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_coe
[33, 1]
[34, 52]
induction' e using Sym2.ind with a b
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph e : Sym2 ↑G'.verts ⊢ e ∈ G'.coe.edgeSet ↔ e ∈ Sym2.map Subtype.val ⁻¹' G'.edgeSet
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : ↑G'.verts ⊢ s(a, b) ∈ G'.coe.edgeSet ↔ s(a, b) ∈ Sym2.map Subtype.val ⁻¹' G'.edgeSet
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.edgeSet_coe
[33, 1]
[34, 52]
simp
case h.h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : ↑G'.verts ⊢ s(a, b) ∈ G'.coe.edgeSet ↔ s(a, b) ∈ Sym2.map Subtype.val ⁻¹' G'.edgeSet
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.image_coe_edgeSet_coe
[36, 1]
[41, 83]
rw [edgeSet_coe, Set.image_preimage_eq_iff]
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph ⊢ Sym2.map Subtype.val '' G'.coe.edgeSet = G'.edgeSet
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph ⊢ G'.edgeSet ⊆ Set.range (Sym2.map Subtype.val)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.image_coe_edgeSet_coe
[36, 1]
[41, 83]
rintro e he
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph ⊢ G'.edgeSet ⊆ Set.range (Sym2.map Subtype.val)
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph e : Sym2 V he : e ∈ G'.edgeSet ⊢ e ∈ Set.range (Sym2.map Subtype.val)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.image_coe_edgeSet_coe
[36, 1]
[41, 83]
induction' e using Sym2.ind with a b
α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph e : Sym2 V he : e ∈ G'.edgeSet ⊢ e ∈ Set.range (Sym2.map Subtype.val)
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : V he : s(a, b) ∈ G'.edgeSet ⊢ s(a, b) ∈ Set.range (Sym2.map Subtype.val)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.image_coe_edgeSet_coe
[36, 1]
[41, 83]
rw [Subgraph.mem_edgeSet] at he
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : V he : s(a, b) ∈ G'.edgeSet ⊢ s(a, b) ∈ Set.range (Sym2.map Subtype.val)
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : V he : G'.Adj a b ⊢ s(a, b) ∈ Set.range (Sym2.map Subtype.val)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
SimpleGraph.Subgraph.image_coe_edgeSet_coe
[36, 1]
[41, 83]
exact ⟨s(⟨a, edge_vert _ he⟩, ⟨b, edge_vert _ he.symm⟩), Sym2.map_pair_eq _ _ _⟩
case h α : Type u_1 β : Type u_2 γ : Type u_3 V : Type u_4 G H : SimpleGraph V G' : G.Subgraph a b : V he : G'.Adj a b ⊢ s(a, b) ∈ Set.range (Sym2.map Subtype.val)
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
ext t
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty ⊢ ∂ (initSeg s) = initSeg (s.erase (s.min' hs))
case a α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ t ∈ ∂ (initSeg s) ↔ t ∈ initSeg (s.erase (s.min' hs))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
simp only [mem_shadow_iff_insert_mem, mem_initSeg, exists_prop]
case a α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ t ∈ ∂ (initSeg s) ↔ t ∈ initSeg (s.erase (s.min' hs))
case a α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }) ↔ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
constructor
case a α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }) ↔ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
case a.mp α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }) → (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) } case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) } → ∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
simp_rw [le_iff_eq_or_lt, lt_iff_exists_forall_lt_mem_iff_mem]
case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) } → ∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }
case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card ∧ ({ ofColex := t } = { ofColex := s.erase (s.min' hs) } ∨ ∃ w ∈ s.erase (s.min' hs), w ∉ t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs))) → ∃ a ∉ t, s.card = (insert a t).card ∧ ({ ofColex := insert a t } = { ofColex := s } ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
simp only [toColex_inj, ofColex_toColex, ne_eq, and_imp]
case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card ∧ ({ ofColex := t } = { ofColex := s.erase (s.min' hs) } ∨ ∃ w ∈ s.erase (s.min' hs), w ∉ t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs))) → ∃ a ∉ t, s.card = (insert a t).card ∧ ({ ofColex := insert a t } = { ofColex := s } ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card → (t = s.erase (s.min' hs) ∨ ∃ w ∈ s.erase (s.min' hs), w ∉ t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs))) → ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rintro cards' (rfl | ⟨k, hks, hkt, z⟩)
case a.mpr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (s.erase (s.min' hs)).card = t.card → (t = s.erase (s.min' hs) ∨ ∃ w ∈ s.erase (s.min' hs), w ∉ t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs))) → ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ ∃ a ∉ s.erase (s.min' hs), s.card = (insert a (s.erase (s.min' hs))).card ∧ (insert a (s.erase (s.min' hs)) = s ∨ ∃ w ∈ s, w ∉ insert a (s.erase (s.min' hs)) ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a (s.erase (s.min' hs)) ↔ a_1 ∈ s)) case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
set j := min' tᶜ ⟨k, mem_compl.2 hkt⟩
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
have hjk : j ≤ k := min'_le _ _ (mem_compl.2 ‹k ∉ t›)
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
have : j ∉ t := mem_compl.1 (min'_mem _ _)
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
have hcard : card s = card (insert j t) := by rw [card_insert_of_not_mem ‹j ∉ t›, ← ‹_ = card t›, card_erase_add_one (min'_mem _ _)]
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
refine' ⟨j, ‹_›, hcard, _⟩
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card ⊢ ∃ a ∉ t, s.card = (insert a t).card ∧ (insert a t = s ∨ ∃ w ∈ s, w ∉ insert a t ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a t ↔ a_1 ∈ s))
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
obtain hjk | r₁ := hjk.lt_or_eq
case a.mpr.inr.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s)
case a.mpr.inr.intro.intro.intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk✝ : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card hjk : j < k ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s) case a.mpr.inr.intro.intro.intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
refine' Or.inl (eq_of_subset_of_card_le (fun a ha ↦ _) hcard.ge).symm
case a.mpr.inr.intro.intro.intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s)
case a.mpr.inr.intro.intro.intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s ⊢ a ∈ insert j t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rcases lt_trichotomy k a with (lt | rfl | gt)
case a.mpr.inr.intro.intro.intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s ⊢ a ∈ insert j t
case a.mpr.inr.intro.intro.intro.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ insert j t case a.mpr.inr.intro.intro.intro.inr.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ha : k ∈ s ⊢ k ∈ insert j t case a.mpr.inr.intro.intro.intro.inr.inr.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < k ⊢ a ∈ insert j t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rintro ⟨a, ha, hst, hts⟩
case a.mp α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α ⊢ (∃ a ∉ t, s.card = (insert a t).card ∧ { ofColex := insert a t } ≤ { ofColex := s }) → (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
case a.mp.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
constructor
case a.mp.intro.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ (s.erase (s.min' hs)).card = t.card ∧ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
case a.mp.intro.intro.intro.left α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ (s.erase (s.min' hs)).card = t.card case a.mp.intro.intro.intro.right α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [card_erase_of_mem (min'_mem _ _), hst, card_insert_of_not_mem ha, add_tsub_cancel_right]
case a.mp.intro.intro.intro.left α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ (s.erase (s.min' hs)).card = t.card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
simpa [ha] using erase_le_erase_min' hts hst.ge (mem_insert_self _ _)
case a.mp.intro.intro.intro.right α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α a : α ha : a ∉ t hst : s.card = (insert a t).card hts : { ofColex := insert a t } ≤ { ofColex := s } ⊢ { ofColex := t } ≤ { ofColex := s.erase (s.min' hs) }
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
refine' ⟨min' s hs, not_mem_erase _ _, _⟩
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ ∃ a ∉ s.erase (s.min' hs), s.card = (insert a (s.erase (s.min' hs))).card ∧ (insert a (s.erase (s.min' hs)) = s ∨ ∃ w ∈ s, w ∉ insert a (s.erase (s.min' hs)) ∧ ∀ ⦃a_1 : α⦄, w < a_1 → (a_1 ∈ insert a (s.erase (s.min' hs)) ↔ a_1 ∈ s))
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ s.card = (insert (s.min' hs) (s.erase (s.min' hs))).card ∧ (insert (s.min' hs) (s.erase (s.min' hs)) = s ∨ ∃ w ∈ s, w ∉ insert (s.min' hs) (s.erase (s.min' hs)) ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert (s.min' hs) (s.erase (s.min' hs)) ↔ a ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [insert_erase (min'_mem _ _)]
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ s.card = (insert (s.min' hs) (s.erase (s.min' hs))).card ∧ (insert (s.min' hs) (s.erase (s.min' hs)) = s ∨ ∃ w ∈ s, w ∉ insert (s.min' hs) (s.erase (s.min' hs)) ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert (s.min' hs) (s.erase (s.min' hs)) ↔ a ∈ s))
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ s.card = s.card ∧ (s = s ∨ ∃ w ∈ s, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ s))
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
exact ⟨rfl, Or.inl rfl⟩
case a.mpr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty cards' : (s.erase (s.min' hs)).card = (s.erase (s.min' hs)).card ⊢ s.card = s.card ∧ (s = s ∨ ∃ w ∈ s, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ s))
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [card_insert_of_not_mem ‹j ∉ t›, ← ‹_ = card t›, card_erase_add_one (min'_mem _ _)]
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t ⊢ s.card = (insert j t).card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
refine Or.inr ⟨k, mem_of_mem_erase ‹_›, fun hk ↦ hkt $ mem_of_mem_insert_of_ne hk hjk.ne', fun x hx ↦ ?_⟩
case a.mpr.inr.intro.intro.intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk✝ : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card hjk : j < k ⊢ insert j t = s ∨ ∃ w ∈ s, w ∉ insert j t ∧ ∀ ⦃a : α⦄, w < a → (a ∈ insert j t ↔ a ∈ s)
case a.mpr.inr.intro.intro.intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk✝ : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card hjk : j < k x : α hx : k < x ⊢ x ∈ insert j t ↔ x ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
simpa only [mem_insert, z hx, (hjk.trans hx).ne', mem_erase, Ne, false_or_iff, and_iff_right_iff_imp] using fun _ ↦ ((min'_le _ _ $ mem_of_mem_erase hks).trans_lt hx).ne'
case a.mpr.inr.intro.intro.intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk✝ : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card hjk : j < k x : α hx : k < x ⊢ x ∈ insert j t ↔ x ∈ s
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
apply mem_insert_of_mem
case a.mpr.inr.intro.intro.intro.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ insert j t
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [z lt]
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ t
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ s.erase (s.min' hs)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
refine' mem_erase_of_ne_of_mem (lt_of_le_of_lt _ lt).ne' ha
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ a ∈ s.erase (s.min' hs)
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ s.min' hs ≤ k
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
apply min'_le _ _ (mem_of_mem_erase ‹_›)
case a.mpr.inr.intro.intro.intro.inr.inl.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s lt : k < a ⊢ s.min' hs ≤ k
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [r₁]
case a.mpr.inr.intro.intro.intro.inr.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ha : k ∈ s ⊢ k ∈ insert j t
case a.mpr.inr.intro.intro.intro.inr.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ha : k ∈ s ⊢ k ∈ insert k t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
apply mem_insert_self
case a.mpr.inr.intro.intro.intro.inr.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k ha : k ∈ s ⊢ k ∈ insert k t
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
apply mem_insert_of_mem
case a.mpr.inr.intro.intro.intro.inr.inr.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < k ⊢ a ∈ insert j t
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < k ⊢ a ∈ t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rw [← r₁] at gt
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < k ⊢ a ∈ t
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j ⊢ a ∈ t
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
by_contra
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j ⊢ a ∈ t
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j x✝ : a ∉ t ⊢ False
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
apply (min'_le tᶜ _ _).not_lt gt
case a.mpr.inr.intro.intro.intro.inr.inr.inr.h α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j x✝ : a ∉ t ⊢ False
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j x✝ : a ∉ t ⊢ a ∈ tᶜ
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.shadow_initSeg
[83, 1]
[131, 20]
rwa [mem_compl]
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t✝ : Finset α r : ℕ inst✝ : Fintype α hs : s.Nonempty t : Finset α cards' : (s.erase (s.min' hs)).card = t.card k : α hks : k ∈ s.erase (s.min' hs) hkt : k ∉ t z : ∀ ⦃a : α⦄, k < a → (a ∈ t ↔ a ∈ s.erase (s.min' hs)) j : α := tᶜ.min' ⋯ hjk : j ≤ k this : j ∉ t hcard : s.card = (insert j t).card r₁ : j = k a : α ha : a ∈ s gt : a < j x✝ : a ∉ t ⊢ a ∈ tᶜ
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
cases nonempty_fintype α
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r ⊢ IsInitSeg (∂ 𝒜) (r - 1)
case intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α ⊢ IsInitSeg (∂ 𝒜) (r - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
obtain rfl | hr := Nat.eq_zero_or_pos r
case intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α ⊢ IsInitSeg (∂ 𝒜) (r - 1)
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 ⊢ IsInitSeg (∂ 𝒜) (0 - 1) case intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α hr : r > 0 ⊢ IsInitSeg (∂ 𝒜) (r - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
obtain rfl | h𝒜 := 𝒜.eq_empty_or_nonempty
case intro.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α hr : r > 0 ⊢ IsInitSeg (∂ 𝒜) (r - 1)
case intro.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α val✝ : Fintype α hr : r > 0 h₁ : IsInitSeg ∅ r ⊢ IsInitSeg (∂ ∅) (r - 1) case intro.inr.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α hr : r > 0 h𝒜 : 𝒜.Nonempty ⊢ IsInitSeg (∂ 𝒜) (r - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
obtain ⟨s, rfl, rfl⟩ := h₁.exists_initSeg h𝒜
case intro.inr.inr α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α h₁ : IsInitSeg 𝒜 r val✝ : Fintype α hr : r > 0 h𝒜 : 𝒜.Nonempty ⊢ IsInitSeg (∂ 𝒜) (r - 1)
case intro.inr.inr.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ IsInitSeg (∂ (initSeg s)) (s.card - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
rw [shadow_initSeg (card_pos.1 hr), ← card_erase_of_mem (min'_mem _ _)]
case intro.inr.inr.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ IsInitSeg (∂ (initSeg s)) (s.card - 1)
case intro.inr.inr.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ IsInitSeg (initSeg (s.erase (s.min' ⋯))) (s.erase (s.min' ?m.16021)).card α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ s.Nonempty
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
exact isInitSeg_initSeg
case intro.inr.inr.intro.intro α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ IsInitSeg (initSeg (s.erase (s.min' ⋯))) (s.erase (s.min' ?m.16021)).card α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α s : Finset α hr : s.card > 0 h𝒜 : (initSeg s).Nonempty h₁ : IsInitSeg (initSeg s) s.card ⊢ s.Nonempty
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
have : 𝒜 ⊆ {∅} := fun s hs ↦ by rw [mem_singleton, ← Finset.card_eq_zero]; exact h₁.1 hs
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this : 𝒜 ⊆ {∅} ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
have := shadow_monotone this
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this : 𝒜 ⊆ {∅} ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this✝ : 𝒜 ⊆ {∅} this : ∂ 𝒜 ≤ ∂ {∅} ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
simp only [subset_empty, le_eq_subset, shadow_singleton_empty] at this
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this✝ : 𝒜 ⊆ {∅} this : ∂ 𝒜 ≤ ∂ {∅} ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this✝ : 𝒜 ⊆ {∅} this : ∂ 𝒜 = ∅ ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
simp [this]
case intro.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 this✝ : 𝒜 ⊆ {∅} this : ∂ 𝒜 = ∅ ⊢ IsInitSeg (∂ 𝒜) (0 - 1)
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
rw [mem_singleton, ← Finset.card_eq_zero]
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 s : Finset α hs : s ∈ 𝒜 ⊢ s ∈ {∅}
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 s : Finset α hs : s ∈ 𝒜 ⊢ s.card = 0
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
exact h₁.1 hs
α : Type u_1 inst✝¹ : LinearOrder α 𝒜 𝒜₁ 𝒜₂ : Finset (Finset α) s✝ t : Finset α inst✝ : Finite α val✝ : Fintype α h₁ : IsInitSeg 𝒜 0 s : Finset α hs : s ∈ 𝒜 ⊢ s.card = 0
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.Colex.IsInitSeg.shadow
[133, 1]
[145, 26]
simp
case intro.inr.inl α : Type u_1 inst✝¹ : LinearOrder α 𝒜₁ 𝒜₂ : Finset (Finset α) s t : Finset α r : ℕ inst✝ : Finite α val✝ : Fintype α hr : r > 0 h₁ : IsInitSeg ∅ r ⊢ IsInitSeg (∂ ∅) (r - 1)
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
rw [compress, ite_ne_right_iff] at hA
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : compress U V s ≠ s ⊢ { ofColex := compress U V s } < { ofColex := s }
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s ⊢ { ofColex := compress U V s } < { ofColex := s }
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
rw [compress, if_pos hA.1, lt_iff_exists_forall_lt_mem_iff_mem]
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s ⊢ { ofColex := compress U V s } < { ofColex := s }
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s ⊢ ∃ w ∈ s, w ∉ (s ⊔ U) \ V ∧ ∀ ⦃a : α⦄, w < a → (a ∈ (s ⊔ U) \ V ↔ a ∈ s)
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
refine ⟨_, hA.1.2 $ max'_mem _ hV, not_mem_sdiff_of_mem_right $ max'_mem _ _, fun a ha ↦ ?_⟩
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s ⊢ ∃ w ∈ s, w ∉ (s ⊔ U) \ V ∧ ∀ ⦃a : α⦄, w < a → (a ∈ (s ⊔ U) \ V ↔ a ∈ s)
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
have : a ∉ V := fun H ↦ ha.not_le (le_max' _ _ H)
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a this : a ∉ V ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
have : a ∉ U := fun H ↦ ha.not_lt ((le_max' _ _ H).trans_lt h)
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a this : a ∉ V ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a this✝ : a ∉ V this : a ∉ U ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.toColex_compress_lt_toColex
[156, 1]
[165, 26]
simp [‹a ∉ U›, ‹a ∉ V›]
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ hU : U.Nonempty hV : V.Nonempty h : U.max' hU < V.max' hV hA : (Disjoint U s ∧ V ≤ s) ∧ (s ⊔ U) \ V ≠ s a : α ha : V.max' hV < a this✝ : a ∉ V this : a ∉ U ⊢ a ∈ (s ⊔ U) \ V ↔ a ∈ s
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
obtain ⟨UVd, same_size, hU, hV, max_lt⟩ := h₁
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₁ : Finset.UV.UsefulCompression U V h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 ⊢ (∂ (𝓒 U V 𝒜)).card ≤ (∂ 𝒜).card
case intro.intro.intro.intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV ⊢ (∂ (𝓒 U V 𝒜)).card ≤ (∂ 𝒜).card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
refine' card_shadow_compression_le _ _ fun x Hx ↦ ⟨min' V hV, min'_mem _ _, _⟩
case intro.intro.intro.intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV ⊢ (∂ (𝓒 U V 𝒜)).card ≤ (∂ 𝒜).card
case intro.intro.intro.intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
obtain hU' | hU' := eq_or_lt_of_le (succ_le_iff.2 hU.card_pos)
case intro.intro.intro.intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜 case intro.intro.intro.intro.inr α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
refine' h₂ ⟨UVd.mono (erase_subset _ _) (erase_subset _ _), _, _, _, _⟩ (card_erase_lt_of_mem Hx)
case intro.intro.intro.intro.inr α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inr.refine'_1 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).card = (V.erase (V.min' hV)).card case intro.intro.intro.intro.inr.refine'_2 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).Nonempty case intro.intro.intro.intro.inr.refine'_3 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (V.erase (V.min' hV)).Nonempty case intro.intro.intro.intro.inr.refine'_4 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).max' ?intro.intro.intro.intro.inr.refine'_2 < (V.erase (V.min' hV)).max' ?intro.intro.intro.intro.inr.refine'_3
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rw [← hU'] at same_size
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
have : erase U x = ∅ := by rw [← Finset.card_eq_zero, card_erase_of_mem Hx, ← hU']
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this : U.erase x = ∅ ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
have : erase V (min' V hV) = ∅ := by rw [← Finset.card_eq_zero, card_erase_of_mem (min'_mem _ _), ← same_size]
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this : U.erase x = ∅ ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this✝ : U.erase x = ∅ this : V.erase (V.min' hV) = ∅ ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rw [‹erase U x = ∅›, ‹erase V (min' V hV) = ∅›]
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this✝ : U.erase x = ∅ this : V.erase (V.min' hV) = ∅ ⊢ IsCompressed (U.erase x) (V.erase (V.min' hV)) 𝒜
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this✝ : U.erase x = ∅ this : V.erase (V.min' hV) = ∅ ⊢ IsCompressed ∅ ∅ 𝒜
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
exact isCompressed_self _ _
case intro.intro.intro.intro.inl α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this✝ : U.erase x = ∅ this : V.erase (V.min' hV) = ∅ ⊢ IsCompressed ∅ ∅ 𝒜
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rw [← Finset.card_eq_zero, card_erase_of_mem Hx, ← hU']
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card ⊢ U.erase x = ∅
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rw [← Finset.card_eq_zero, card_erase_of_mem (min'_mem _ _), ← same_size]
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : succ 0 = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 = U.card this : U.erase x = ∅ ⊢ V.erase (V.min' hV) = ∅
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rw [card_erase_of_mem (min'_mem _ _), card_erase_of_mem Hx, same_size]
case intro.intro.intro.intro.inr.refine'_1 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).card = (V.erase (V.min' hV)).card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rwa [← card_pos, card_erase_of_mem Hx, tsub_pos_iff_lt]
case intro.intro.intro.intro.inr.refine'_2 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).Nonempty
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rwa [← Finset.card_pos, card_erase_of_mem (min'_mem _ _), ← same_size, tsub_pos_iff_lt]
case intro.intro.intro.intro.inr.refine'_3 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (V.erase (V.min' hV)).Nonempty
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
refine' (Finset.max'_subset _ $ erase_subset _ _).trans_lt (max_lt.trans_le $ le_max' _ _ $ mem_erase.2 ⟨(min'_lt_max'_of_card _ _).ne', max'_mem _ _⟩)
case intro.intro.intro.intro.inr.refine'_4 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ (U.erase x).max' ⋯ < (V.erase (V.min' hV)).max' ⋯
case intro.intro.intro.intro.inr.refine'_4 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ 1 < V.card
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.compression_improved
[174, 1]
[195, 22]
rwa [← same_size]
case intro.intro.intro.intro.inr.refine'_4 α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ 𝒜 : Finset (Finset α) h₂ : ∀ ⦃U₁ V₁ : Finset α⦄, Finset.UV.UsefulCompression U₁ V₁ → U₁.card < U.card → IsCompressed U₁ V₁ 𝒜 UVd : Disjoint U V same_size : U.card = V.card hU : U.Nonempty hV : V.Nonempty max_lt : U.max' hU < V.max' hV x : α Hx : x ∈ U hU' : succ 0 < U.card ⊢ 1 < V.card
no goals
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.isInitSeg_of_compressed
[197, 1]
[218, 73]
refine' ⟨h₁, _⟩
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ ⊢ IsInitSeg ℬ r
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ ⊢ ∀ ⦃s t : Finset α⦄, s ∈ ℬ → { ofColex := t } < { ofColex := s } ∧ t.card = r → t ∈ ℬ
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.isInitSeg_of_compressed
[197, 1]
[218, 73]
rintro A B hA ⟨hBA, sizeA⟩
α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ ⊢ ∀ ⦃s t : Finset α⦄, s ∈ ℬ → { ofColex := t } < { ofColex := s } ∧ t.card = r → t ∈ ℬ
case intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ A B : Finset α hA : A ∈ ℬ hBA : { ofColex := B } < { ofColex := A } sizeA : B.card = r ⊢ B ∈ ℬ
https://github.com/YaelDillies/LeanCamCombi.git
034199694e3b91536d03bc4a8b0cdbd659cdf50f
LeanCamCombi/KruskalKatona.lean
Finset.UV.isInitSeg_of_compressed
[197, 1]
[218, 73]
by_contra hB
case intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ A B : Finset α hA : A ∈ ℬ hBA : { ofColex := B } < { ofColex := A } sizeA : B.card = r ⊢ B ∈ ℬ
case intro α : Type u_1 inst✝ : LinearOrder α s U V : Finset α n : ℕ ℬ : Finset (Finset α) r : ℕ h₁ : Set.Sized r ↑ℬ h₂ : ∀ (U V : Finset α), Finset.UV.UsefulCompression U V → IsCompressed U V ℬ A B : Finset α hA : A ∈ ℬ hBA : { ofColex := B } < { ofColex := A } sizeA : B.card = r hB : B ∉ ℬ ⊢ False