Buckets:
| import OAI.Combinatorics.SharpThreshold.Model | |
| namespace OAI | |
| universe u | |
| noncomputable section | |
| namespace Problem313 | |
| /-- A permutation supported on a finite block can map any two equally sized | |
| subsets of the block to one another. -/ | |
| theorem exists_block_perm_map {α : Type u} [Fintype α] [DecidableEq α] | |
| (B s t : Finset α) (hs : s ⊆ B) (ht : t ⊆ B) | |
| (hc : s.card = t.card) : | |
| ∃ π : Equiv.Perm α, (∀ u, u ∉ B → π u = u) ∧ | |
| s.map π.toEmbedding = t := by | |
| classical | |
| let sB := s.subtype (· ∈ B) | |
| let tB := t.subtype (· ∈ B) | |
| have hsmap : sB.map (Function.Embedding.subtype _) = s := | |
| Finset.subtype_map_of_mem hs | |
| have htmap : tB.map (Function.Embedding.subtype _) = t := | |
| Finset.subtype_map_of_mem ht | |
| have hcB : sB.card = tB.card := by | |
| have hsc := congrArg Finset.card hsmap | |
| have htc := congrArg Finset.card htmap | |
| simpa using hsc.trans (hc.trans htc.symm) | |
| obtain ⟨σ, hσ⟩ := Equiv.Perm.exists_map_finset_eq sB tB hcB | |
| let π : Equiv.Perm α := σ.extendDomain (Equiv.refl {u // u ∈ B}) | |
| refine ⟨π, ?_, ?_⟩ | |
| · intro u hu | |
| exact Equiv.Perm.extendDomain_apply_not_subtype _ _ hu | |
| · calc | |
| s.map π.toEmbedding = (sB.map (Function.Embedding.subtype _)).map π.toEmbedding := by | |
| rw [hsmap] | |
| _ = (sB.map σ.toEmbedding).map (Function.Embedding.subtype _) := by | |
| rw [Finset.map_map, Finset.map_map] | |
| congr 1 | |
| ext u | |
| exact Equiv.Perm.extendDomain_apply_image σ (Equiv.refl _) u | |
| _ = t := by rw [hσ, htmap] | |
| /-- The edge orbit under permutations fixing the complement of `B` pointwise. -/ | |
| def blockEdgeOrbit {n : ℕ} (B : Finset (Fin n)) (e : GraphEdge n) : | |
| Finset (GraphEdge n) := by | |
| classical | |
| exact Finset.univ.filter (fun e' => ∃ π : Equiv.Perm (Fin n), | |
| (∀ u, u ∉ B → π u = u) ∧ permEdge π e = e') | |
| @[simp] theorem mem_blockEdgeOrbit {n : ℕ} {B : Finset (Fin n)} | |
| {e e' : GraphEdge n} : e' ∈ blockEdgeOrbit B e ↔ | |
| ∃ π : Equiv.Perm (Fin n), (∀ u, u ∉ B → π u = u) ∧ permEdge π e = e' := by | |
| classical | |
| simp [blockEdgeOrbit] | |
| /-- All edges wholly contained in a block are in one supported-permutation orbit. -/ | |
| theorem block_internal_mem_orbit {n : ℕ} {B : Finset (Fin n)} | |
| {e e' : GraphEdge n} (he : e.val ⊆ B) (he' : e'.val ⊆ B) : | |
| e' ∈ blockEdgeOrbit B e := by | |
| obtain ⟨π, hπ, hmap⟩ := exists_block_perm_map B e.val e'.val he he' (e.property.trans e'.property.symm) | |
| exact mem_blockEdgeOrbit.mpr ⟨π, hπ, Subtype.ext hmap⟩ | |
| /-- The number of graph edges wholly contained in a vertex block. -/ | |
| theorem card_block_internal_edges {n : ℕ} (B : Finset (Fin n)) : | |
| (Finset.univ.filter (fun e : GraphEdge n => e.val ⊆ B)).card = B.card.choose 2 := by | |
| classical | |
| rw [← Finset.card_powersetCard] | |
| apply Finset.card_bij (fun e _ => e.val) | |
| · intro e he | |
| exact Finset.mem_powersetCard.mpr ⟨(Finset.mem_filter.mp he).2, e.property⟩ | |
| · intro e he e' he' h | |
| exact Subtype.ext h | |
| · intro s hs | |
| obtain ⟨hsB, hsc⟩ := Finset.mem_powersetCard.mp hs | |
| exact ⟨⟨s, hsc⟩, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hsB⟩, rfl⟩ | |
| theorem block_card_le_choose_two (m : ℕ) (hm : 3 ≤ m) : m ≤ m.choose 2 := by | |
| rw [Nat.choose_two_right] | |
| apply (Nat.le_div_iff_mul_le (by omega : 0 < 2)).mpr | |
| exact Nat.mul_le_mul_left m (by omega) | |
| /-- Internal edge orbits have at least as many edges as the block has vertices. -/ | |
| theorem block_internal_orbit_card {n : ℕ} {B : Finset (Fin n)} | |
| {e : GraphEdge n} (hB : 3 ≤ B.card) (he : e.val ⊆ B) : | |
| B.card ≤ (blockEdgeOrbit B e).card := by | |
| classical | |
| calc | |
| B.card ≤ B.card.choose 2 := block_card_le_choose_two _ hB | |
| _ = (Finset.univ.filter (fun e' : GraphEdge n => e'.val ⊆ B)).card := | |
| (card_block_internal_edges B).symm | |
| _ ≤ (blockEdgeOrbit B e).card := Finset.card_le_card (by | |
| intro e' he' | |
| exact block_internal_mem_orbit he (Finset.mem_filter.mp he').2) | |
| /-- The boundary edge joining a vertex of the block to a fixed exterior vertex. -/ | |
| def blockBoundaryEdge {n : ℕ} {B : Finset (Fin n)} (w : Fin n) (hw : w ∉ B) | |
| (u : B) : GraphEdge n := | |
| ⟨{u.val, w}, Finset.card_pair (by | |
| intro h | |
| exact hw (h ▸ u.property))⟩ | |
| theorem blockBoundaryEdge_injective {n : ℕ} {B : Finset (Fin n)} | |
| (w : Fin n) (hw : w ∉ B) : Function.Injective (blockBoundaryEdge w hw) := by | |
| intro u v h | |
| have he : ({u.val, w} : Finset (Fin n)) = {v.val, w} := congrArg Subtype.val h | |
| have hu : u.val ∈ ({v.val, w} : Finset (Fin n)) := by rw [← he]; simp | |
| rcases (show u.val = v.val ∨ u.val = w by simpa using hu) with huv | huw | |
| · exact Subtype.ext huv | |
| · exact False.elim (hw (huw ▸ u.property)) | |
| /-- Boundary edges with the same exterior endpoint are in one block orbit. -/ | |
| theorem block_boundary_mem_orbit {n : ℕ} {B : Finset (Fin n)} | |
| {e : GraphEdge n} {u w : Fin n} (hu : u ∈ B) (hw : w ∉ B) | |
| (he : e.val = {u, w}) (v : B) : | |
| blockBoundaryEdge w hw v ∈ blockEdgeOrbit B e := by | |
| classical | |
| refine mem_blockEdgeOrbit.mpr ⟨Equiv.swap u v.val, ?_, ?_⟩ | |
| · intro z hz | |
| apply Equiv.swap_apply_of_ne_of_ne | |
| · intro hzu | |
| exact hz (hzu ▸ hu) | |
| · intro hzv | |
| exact hz (hzv ▸ v.property) | |
| · apply Subtype.ext | |
| have hwu : w ≠ u := by intro h; exact hw (h ▸ hu) | |
| have hwv : w ≠ v.val := by intro h; exact hw (h ▸ v.property) | |
| simp [permEdge, blockBoundaryEdge, he, Equiv.swap_apply_of_ne_of_ne hwu hwv] | |
| /-- Boundary edge orbits contain at least one edge for every block vertex. -/ | |
| theorem block_boundary_orbit_card {n : ℕ} {B : Finset (Fin n)} | |
| {e : GraphEdge n} {u w : Fin n} (hu : u ∈ B) (hw : w ∉ B) | |
| (he : e.val = {u, w}) : B.card ≤ (blockEdgeOrbit B e).card := by | |
| classical | |
| let emb : B ↪ GraphEdge n := ⟨blockBoundaryEdge w hw, blockBoundaryEdge_injective w hw⟩ | |
| calc | |
| B.card = (Finset.univ.map emb).card := by simp | |
| _ ≤ (blockEdgeOrbit B e).card := Finset.card_le_card (by | |
| intro e' he' | |
| obtain ⟨v, hv, rfl⟩ := Finset.mem_map.mp he' | |
| exact block_boundary_mem_orbit hu hw he v) | |
| /-- Every edge incident with a block of at least three vertices has a | |
| supported-permutation orbit of cardinality at least the block cardinality. -/ | |
| theorem blockEdgeOrbit_card_lower {n : ℕ} {B : Finset (Fin n)} | |
| {e : GraphEdge n} (hB : 3 ≤ B.card) (hmeet : (e.val ∩ B).Nonempty) : | |
| B.card ≤ (blockEdgeOrbit B e).card := by | |
| classical | |
| by_cases he : e.val ⊆ B | |
| · exact block_internal_orbit_card hB he | |
| obtain ⟨a, b, hab, heab⟩ := Finset.card_eq_two.mp e.property | |
| by_cases ha : a ∈ B | |
| · have hb : b ∉ B := by | |
| intro hb | |
| apply he | |
| intro z hz | |
| rw [heab] at hz | |
| rcases (show z = a ∨ z = b by simpa using hz) with rfl | rfl | |
| · exact ha | |
| · exact hb | |
| exact block_boundary_orbit_card ha hb heab | |
| · have hb : b ∈ B := by | |
| obtain ⟨z, hz⟩ := hmeet | |
| obtain ⟨hze, hzB⟩ := Finset.mem_inter.mp hz | |
| rw [heab] at hze | |
| rcases (show z = a ∨ z = b by simpa using hze) with rfl | rfl | |
| · exact False.elim (ha hzB) | |
| · exact hzB | |
| apply block_boundary_orbit_card hb ha | |
| simpa [Finset.pair_comm] using heab | |
| end Problem313 | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 7.28 kB
- Xet hash:
- 4427d76d83f24b9d5a755074c7f808c88ef6f5292c0b43eb647cc920e46eea57
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.