Documentation

LeanPool.DistinctDistances.PlanarGeneralPosition

Planar general-position primitives #

Original copyright: Copyright 2025 The Formal Conjectures Authors. These Apache-2.0 definitions were copied verbatim from the formal-conjectures support library.

A small set of planar-geometry predicates that the Elekes–Sharir / Guth–Katz base reduction layer (namespace Esgk) consumes. None of these exist in mathlib v4.30 — they are originals from the formal-conjectures support layer (FormalConjecturesForMathlib/Geometry/2d.lean and .../Data/Set/Triplewise.lean, Apache 2.0), copied verbatim and given a permanent home here so the project stays mathlib-only with no cross-version dependency.

What they are built on — Collinear, EuclideanGeometry.Cospherical, EuclideanSpace ℝ (Fin 2) — are mathlib citizens; only the predicates themselves (Set.Triplewise, NonTrilinear, distinctDistances, InGeneralPosition) and the ℝ² notation are formal-conjectures-specific.

Provided here:

The earlier FormalConjectures/Util.lean shim hosted these alongside the answer( … ) / category / AMS macro-and-attribute machinery and the vendored Erdős problem statements (96/97/98). Those statements have been removed (formal-conjectures now tracks mathlib v4.30 directly), and the dead ConvexIndep / unitDistancePairsCount / bare Triplewise defs and the shim machinery went with them; only the live primitives survive here.

ℝ² notation (verbatim: FormalConjecturesForMathlib/Geometry/2d.lean) #

The Euclidean plane over the real numbers.

Equations
Instances For

    Set.Triplewise (verbatim: FormalConjecturesForMathlib/Data/Set/Triplewise.lean) #

    def Set.Triplewise {α : Type u_1} (s : Set α) (r : α → α → α → Prop) :

    The ternary relation r holds triplewise on the set s if r x y z for all distinct x y z ∈ s.

    Equations
    • s.Triplewise r = ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → ∀ ⦃z : α⦄, z ∈ s → x ≠ y → y ≠ z → x ≠ z → r x y z
    Instances For

      Planar geometry (verbatim: FormalConjecturesForMathlib/Geometry/2d.lean) #

      We say a subset A of points in the plane is non-trilinear if it contains no three points that lie on the same line.

      Equations
      Instances For

        Given a finite set of points in the plane, we define the number of distinct distances between pairs of points.

        Equations
        Instances For

          A collection $x_1, \dots, x_n\in\mathbb{R}^2$ is in general position if no three are collinear and no four lie on a circle.

          Equations
          Instances For