Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax56.Geometry

Point visibility in the real plane

concepts/Lax56/Geometry.lean · lax-56

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Definition

    A pair of distinct points of a finite planar point set is visible when the open segment joining it contains no point of the ambient set. This module also defines the visibility graph and the two geometric alternatives used in the headline theorem.

    Lean source view on GitHub

    1import Mathlib.Analysis.Convex.Segment
    2import Mathlib.Combinatorics.SimpleGraph.Basic
    3import Mathlib.Data.Real.Basic
    4import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional
    5
    6/-!
    7---
    8title: Point visibility in the real plane
    9type: definition
    10---
    11A pair of distinct points of a finite planar point set is visible when the
    12open segment joining it contains no point of the ambient set. This module
    13also defines the visibility graph and the two geometric alternatives used in
    14the headline theorem.
    15-/
    16
    17namespace Lax56.Geometry
    18
    19/-- The real affine plane, represented by Cartesian coordinates. -/
    20abbrev Point := ℝ × ℝ
    21
    22/-- The signed twice-area of the oriented triangle `p q r`. -/
    23def turn (p q r : Point) : ℝ :=
    24 (q.1 - p.1) * (r.2 - p.2) - (q.2 - p.2) * (r.1 - p.1)
    25
    26/-- `p` and `q` see one another with respect to the ambient finite set `P`. -/
    27def Visible (P : Finset Point) (p q : Point) : Prop :=
    28 p ≠ q ∧ ∀ r ∈ P, r ∉ openSegment ℝ p q
    29
    30/-- The point-visibility graph of `P`; its vertices retain their membership proofs. -/
    31def visibilityGraph (P : Finset Point) : SimpleGraph P where
    32 Adj p q := Visible P p q
    33 symm := by
    34 intro p q hpq
    35 refine ⟨hpq.1.symm, ?_⟩
    36 simpa only [openSegment_symm] using hpq.2
    37 loopless := ⟨fun p hp => hp.1 rfl⟩
    38
    39/-- The finite point set contains four distinct collinear points. -/
    40def HasFourCollinear (P : Finset Point) : Prop :=
    41 ∃ f : Fin 4Point,
    42 Function.Injective f ∧ (∀ i, f i ∈ P) ∧ Collinear ℝ (Set.range f)
    43
    44/-- The finite point set contains three distinct collinear points. -/
    45def HasThreeCollinear (P : Finset Point) : Prop :=
    46 ∃ f : Fin 3Point,
    47 Function.Injective f ∧ (∀ i, f i ∈ P) ∧ Collinear ℝ (Set.range f)
    48
    49/-- The finite point set contains `k` points that pairwise see one another. -/
    50def HasVisibleClique (P : Finset Point) (k : ℕ) : Prop :=
    51 ∃ f : Fin k → Point,
    52 Function.Injective f ∧ (∀ i, f i ∈ P) ∧
    53 Set.Pairwise (Set.range f) (Visible P)
    54
    55end Lax56.Geometry
    56

    Community review

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.

    0 comments

    Loading discussion…