Download data/lean/OAI/Combinatorics/CompleteCrossing/Main.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.88 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/CompleteCrossing/Main.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/CompleteCrossing/Main.lean
-
curl -L -o Main.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/CompleteCrossing/Main.lean
3.88 kB
| import OAI.Combinatorics.CompleteCrossing.Counting | |
| import OAI.Combinatorics.CompleteCrossing.CycleIdentity | |
| import OAI.Combinatorics.CompleteCrossing.Deletion | |
| import OAI.Combinatorics.CompleteCrossing.LowerBound | |
| import OAI.Combinatorics.CompleteCrossing.Normalization | |
| import OAI.Combinatorics.CompleteCrossing.TwoPage | |
| namespace OAI | |
| /-! Odd and even lower bounds, explicit attainment, and the ordinary complete-graph crossing formula. -/ | |
| section | |
| noncomputable section | |
| open scoped BigOperators Classical | |
| namespace Paper170 | |
| theorem complete_graph_odd_lower_bound (s : β) (hs : 2 β€ s) | |
| (N : NormalizedDrawing (completeGraph (2 * s + 1))) : | |
| (s.choose 2) ^ 2 β€ crossingCount N.toAdmissibleDrawing := by | |
| obtain β¨Oβ© := spoke_orders_exist _ N | |
| obtain β¨orders, hlocalβ© := complete_local_orders N O | |
| obtain β¨hleft, hright, hrevleft, hrevright, hskewβ© := raw_cycle_symmetries N O | |
| let node : Fin (2 * s + 1) β β := fun i => i.val | |
| have hn : Function.Injective node := by | |
| intro i j h | |
| exact Fin.ext (Nat.cast_injective h) | |
| have ht (H : Poly4) (hH : H β box4 (2 * s - 1)) : | |
| polynomialTest node (rawCycleIntersection O) H = 0 := by | |
| apply polynomial_cycle_tests (by omega) node hn (rawCycleIntersection O) | |
| (raw_cycle_pairing N O) H | |
| convert hH using 1 | |
| congr 1 | |
| have hl := support_cardinality_lower_bound hs node hn (rawCycleIntersection O) orders | |
| hleft hright hrevleft hrevright hskew hlocal ht | |
| have hu := signed_support_bound N O | |
| omega | |
| lemma complete_graph_odd_lower_arbitrary (s : β) (hs : 2 β€ s) | |
| (D : AdmissibleDrawing (completeGraph (2 * s + 1))) : hill (2 * s + 1) β€ crossingCount D := by | |
| obtain β¨N, hNβ© := polygonal_no_adjacent_normalization _ D | |
| rw [hill_odd] | |
| exact (complete_graph_odd_lower_bound s hs N).trans hN | |
| lemma complete_graph_even_lower_normalized (s : β) (hs : 2 β€ s) | |
| (N : NormalizedDrawing (completeGraph (2 * s + 2))) : | |
| hill (2 * s + 2) β€ crossingCount N.toAdmissibleDrawing := by | |
| obtain β¨A, _, hAβ© := vertex_deletion_count (2 * s + 1) (by omega) N | |
| have hl : β v, hill (2 * s + 1) β€ crossingCount (A v) := | |
| fun v => complete_graph_odd_lower_arbitrary s hs (A v) | |
| have hh := Finset.sum_le_sum (s := Finset.univ) (fun v _ => hl v) | |
| rw [hA] at hh | |
| simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul] at hh | |
| have he : 2 * (s + 1) = 2 * s + 2 := by omega | |
| have ho : 2 * s + 2 - 1 = 2 * s + 1 := by omega | |
| conv_lhs => rw [β he] | |
| apply even_lower_bound_of_deletion (s + 1) _ (by omega) | |
| simpa only [he, ho, Nat.add_assoc] using hh | |
| theorem complete_graph_lower_bound (n : β) (hn : 3 β€ n) | |
| (D : AdmissibleDrawing (completeGraph n)) : hill n β€ crossingCount D := by | |
| by_cases hsmall : n < 5 | |
| Β· interval_cases n <;> norm_num [hill] | |
| by_cases hodd : n % 2 = 1 | |
| Β· obtain β¨s, rflβ© : β s, n = 2 * s + 1 := β¨n / 2, by omegaβ© | |
| exact complete_graph_odd_lower_arbitrary s (by omega) D | |
| Β· obtain β¨s, rflβ© : β s, n = 2 * s + 2 := β¨n / 2 - 1, by omegaβ© | |
| obtain β¨N, hNβ© := polygonal_no_adjacent_normalization _ D | |
| exact (complete_graph_even_lower_normalized s (by omega) N).trans hN | |
| theorem complete_graph_upper_bound (n : β) (hn : 3 β€ n) : | |
| β D : AdmissibleDrawing (completeGraph n), crossingCount D = hill n := by | |
| obtain β¨D, hDβ© := complete_graph_upper_drawing n | |
| exact β¨D, hD.trans (crossingTuples_card hn)β© | |
| theorem complete_graph_crossing_number (n : β) (hn : 3 β€ n) : | |
| ordinaryCrossingNumber (completeGraph n) = hill n := by | |
| obtain β¨D, hDβ© := complete_graph_upper_bound n hn | |
| apply Nat.le_antisymm | |
| Β· rw [β hD] | |
| exact Paper170Geometry.ordinaryCrossingNumber_le_count D | |
| Β· obtain β¨A,hA,_β© := minimum_drawing_exists (completeGraph n) | |
| rw [β hA] | |
| exact complete_graph_lower_bound n hn A | |
| end Paper170 | |
| end | |
| end | |
| end OAI | |