Documentation

Mathlib.Geometry.Polygon.Basic

Polygons #

This file defines polygons in affine spaces.

Main definitions #

structure Polygon (P : Type u_1) (n : โ„•) :
Type u_1

A polygon with n vertices in a type P.

  • vertices : Fin n โ†’ P

    The vertices of the polygon, indexed by Fin n.

Instances For
    instance Polygon.instCoeFunForallFin {P : Type u_3} {n : โ„•} :
    CoeFun (Polygon P n) fun (x : Polygon P n) => Fin n โ†’ P

    A coercion to function so that vertices can be written as poly i instead of poly.vertices i

    Equations
      def Polygon.edgePath (R : Type u_1) {V : Type u_2} {P : Type u_3} {n : โ„•} [Ring R] [AddCommGroup V] [Module R V] [AddTorsor V P] (poly : Polygon P n) (i : Fin n) :

      The i-th edge as an affine map R โ†’แตƒ[R] P.

      Equations
        Instances For
          def Polygon.edgeSet (R : Type u_1) {V : Type u_2} {P : Type u_3} {n : โ„•} [Ring R] [AddCommGroup V] [Module R V] [AddTorsor V P] [PartialOrder R] (poly : Polygon P n) (i : Fin n) :
          Set P

          The i-th edge as a set of points using an affineSegment.

          Equations
            Instances For
              theorem Polygon.edgeSet_eq_image_edgePath (R : Type u_1) {V : Type u_2} {P : Type u_3} {n : โ„•} [Ring R] [AddCommGroup V] [Module R V] [AddTorsor V P] [PartialOrder R] (poly : Polygon P n) (i : Fin n) :
              edgeSet R poly i = โ‡‘(edgePath R poly i) '' Set.Icc 0 1

              The edgeSet is equivalent to the image of the edgePath.

              def Polygon.boundary (R : Type u_1) {V : Type u_2} {P : Type u_3} {n : โ„•} [Ring R] [AddCommGroup V] [Module R V] [AddTorsor V P] [PartialOrder R] (poly : Polygon P n) :
              Set P

              The boundary of the polygon is the union of all its edges.

              Equations
                Instances For