math / data /lean /OAI /Combinatorics /Crossing /AxisAdmissibility.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.76 kB
import OAI.Combinatorics.Crossing.AxisFiniteCrossings
import OAI.Combinatorics.Crossing.AxisGenericPositions
import OAI.Combinatorics.Crossing.RowCrossingCount
namespace OAI
noncomputable section
namespace Zarankiewicz
variable {m n : β„•}
theorem axisContinuousDrawing_meeting_independent (a : Fin m β†’ ℝ) (b : Fin n β†’ ℝ)
(hai : Function.Injective a) (hbi : Function.Injective b)
(ha : βˆ€ i, a i β‰  0) (hb : βˆ€ p, b p β‰  0) (e f : BipartiteEdge m n) (hef : e β‰  f)
(x : Plane) (hx : x ∈ edgeInterior (axisContinuousDrawing a b hai hbi ha hb) e)
(hy : x ∈ edgeInterior (axisContinuousDrawing a b hai hbi ha hb) f) : e.1 β‰  f.1 ∧ e.2 β‰  f.2 := by
rw [axisContinuousDrawing_interior] at hx hy
obtain ⟨t,ht,he⟩ := hx
obtain ⟨u,hu,hf⟩ := hy
have hmeet : axisSegmentPoint (a e.1) (b e.2) t=axisSegmentPoint (a f.1) (b f.2) u := he.trans hf.symm
constructor
Β· intro hfirst
rw [hfirst] at hmeet
have hh := axisSegmentPoint_same_vertical (a f.1) (b e.2) (b f.2) t u (ha f.1) ht.1 hmeet
exact hef (Prod.ext hfirst (hbi hh))
Β· intro hsecond
rw [hsecond] at hmeet
have hh := axisSegmentPoint_same_horizontal (a e.1) (a f.1) (b f.2) t u (hb f.2) ht.2 hmeet
exact hef (Prod.ext (hai hh) hsecond)
theorem axisContinuousDrawing_line_equation (a : Fin m β†’ ℝ) (b : Fin n β†’ ℝ)
(hai : Function.Injective a) (hbi : Function.Injective b)
(ha : βˆ€ i, a i β‰  0) (hb : βˆ€ p, b p β‰  0) (e : BipartiteEdge m n) (x : Plane)
(hx : x ∈ edgeInterior (axisContinuousDrawing a b hai hbi ha hb) e) :
a e.1*x.1+b e.2*x.2=a e.1*b e.2 := by
rw [axisContinuousDrawing_interior] at hx
obtain ⟨t,ht,he⟩ := hx
rw [← he]
exact axisSegmentPoint_line_equation _ _ _
def axisAdmissibleDrawing (a : Fin m β†’ ℝ) (b : Fin n β†’ ℝ)
(hai : Function.Injective a) (hbi : Function.Injective b)
(ha : βˆ€ i, a i β‰  0) (hb : βˆ€ p, b p β‰  0)
(hgeneric : βˆ€ e f g : BipartiteEdge m n, AxisIndependentTriple e f g β†’
axisConcurrency (a e.1) (b e.2) (a f.1) (b f.2) (a g.1) (b g.2) β‰  0) : AdmissibleDrawing m n where
toContinuousDrawing := axisContinuousDrawing a b hai hbi ha hb
crossings_finite := axisContinuousDrawing_crossings_finite a b hai hbi ha hb
crossings_proper := axisContinuousDrawing_crossings_proper a b hai hbi ha hb
no_triples := by
intro e f g hef heg hfg
apply Set.eq_empty_iff_forall_notMem.mpr
rintro x ⟨⟨he,hf⟩,hg⟩
have hβ‚€ := axisContinuousDrawing_meeting_independent a b hai hbi ha hb e f hef x he hf
have h₁ := axisContinuousDrawing_meeting_independent a b hai hbi ha hb e g heg x he hg
have hβ‚‚ := axisContinuousDrawing_meeting_independent a b hai hbi ha hb f g hfg x hf hg
exact hgeneric e f g ⟨hβ‚€.1,h₁.1,hβ‚‚.1,hβ‚€.2,h₁.2,hβ‚‚.2⟩
(axisConcurrency_zero_of_meeting _ _ _ _ _ _ x
(axisContinuousDrawing_line_equation a b hai hbi ha hb e x he)
(axisContinuousDrawing_line_equation a b hai hbi ha hb f x hf)
(axisContinuousDrawing_line_equation a b hai hbi ha hb g x hg))
theorem axisAdmissibleDrawing_noAdjacent (a : Fin m β†’ ℝ) (b : Fin n β†’ ℝ)
(hai : Function.Injective a) (hbi : Function.Injective b)
(ha : βˆ€ i, a i β‰  0) (hb : βˆ€ p, b p β‰  0)
(hgeneric : βˆ€ e f g : BipartiteEdge m n, AxisIndependentTriple e f g β†’
axisConcurrency (a e.1) (b e.2) (a f.1) (b f.2) (a g.1) (b g.2) β‰  0) :
NoAdjacentCrossings (axisAdmissibleDrawing a b hai hbi ha hb hgeneric) := by
intro e f hef hadj
apply Set.eq_empty_iff_forall_notMem.mpr
rintro x ⟨hx,hy⟩
have hh := axisContinuousDrawing_meeting_independent a b hai hbi ha hb e f hef x hx hy
exact hadj.elim hh.1 hh.2
end Zarankiewicz
end
end OAI