Equations
- EuclideanGeometry.«termℝ²» = Lean.ParserDescr.node `EuclideanGeometry.«termℝ²» 1024 (Lean.ParserDescr.symbol "ℝ²")
Instances For
Oriented angles make sense in 2d.
Note: this can't blindly be added to mathlib as it creates an "instance diamond"
with an instance for modules satisfying is_empty.
Equations
- Module.orientedEuclideanSpaceFinTwo = { positiveOrientation := (Pi.basisFun ℝ (Fin 2)).orientation }
Two dimensional euclidean space is two-dimensional.
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
- EuclideanGeometry.NonTrilinear A = A.Triplewise fun (x y z : P) => ¬Collinear ℝ {x, y, z}
Instances For
ConvexIndep S means that S consists of extremal points of its convex hull,
i.e., the point set encloses a convex shape.
Also known as a "convex-independent set".
Equations
- EuclideanGeometry.ConvexIndep S = ∀ a ∈ S, a ∉ (convexHull ℝ) (S \ {a})
Instances For
The set P contains a convex n-gon.
See also IsConvexPolygon.
Equations
- EuclideanGeometry.HasConvexNGon n P = ∃ (S : Finset (EuclideanSpace ℝ (Fin 2))), S.card = n ∧ ↑S ⊆ P ∧ EuclideanGeometry.ConvexIndep ↑S
Instances For
The statement that a sequence of points form a counter-clockwise convex polygon.
Equations
- EuclideanGeometry.IsCcwConvexPolygon p = ∀ ⦃i j k : Fin n⦄, i < j → j < k → (EuclideanGeometry.oangle (p i) (p j) (p k)).sign = 1
Instances For
The statement that a sequence of points form a convex polygon.
Equations
- EuclideanGeometry.IsConvexPolygon p = (EuclideanGeometry.IsCcwConvexPolygon p ∨ EuclideanGeometry.IsCcwConvexPolygon fun (i : Fin n) => p (-i))
Instances For
Three affine independent points always form a convex polygon.
Equations
- EuclideanGeometry.triangle_area a b c = (positiveOrientation.areaForm (a -ᵥ c)) (b -ᵥ c) / 2
Instances For
Given a finite set of points in the plane, we define the number of distinct distances between pairs of points.
Equations
- EuclideanGeometry.distinctDistances points = (Finset.image (fun (pair : EuclideanSpace ℝ (Fin 2) × EuclideanSpace ℝ (Fin 2)) => dist pair.1 pair.2) points.offDiag).card
Instances For
Equations
- A.IsIsosceles = (Nonempty ↑A ∧ A.Triplewise fun (x1 x2 x3 : α) => IsIsosceles x1 x2 x3)