Documentation

CslibFrontier.Foundations.Geometry.Polyhedra.PiecewiseLinear

Piecewise-linear maps on compact polyhedra #

This module defines affine maps on subsets (IsAffineOn) and piecewise-linear (PL) maps on compact polyhedra (IsPLOn), and establishes Rourke–Sanderson-style closure rules: continuity, restriction to subpolyhedra, gluing on finite closed covers and piecewise unions, real linear combinations, products/tuples, min/max/abs/finite suprema, composition, polyhedrality of images and preimages, and triangulation compatibility.

Main definitions #

Main results #

References #

def Cslib.Polyhedra.IsAffineOn {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] (f : E → F) (S : Set E) :

A map f : E → F is affine on S if it agrees on S with a global affine map g : E →ᵃ[ℝ] F.

theorem Cslib.Polyhedra.IsAffineOn.congr {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f f' : E → F} {S : Set E} (h : IsAffineOn f S) (heq : Set.EqOn f' f S) :
theorem Cslib.Polyhedra.IsAffineOn.mono {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {S T : Set E} (hST : S ⊆ T) (h : IsAffineOn f T) :
theorem Cslib.Polyhedra.IsAffineOn.const {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] (S : Set E) (c : F) :
IsAffineOn (fun (x : E) => c) S
theorem Cslib.Polyhedra.IsAffineOn.add {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f g : E → F} {S : Set E} (hf : IsAffineOn f S) (hg : IsAffineOn g S) :
IsAffineOn (fun (x : E) => f x + g x) S
theorem Cslib.Polyhedra.IsAffineOn.neg {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {S : Set E} (hf : IsAffineOn f S) :
IsAffineOn (fun (x : E) => -f x) S
theorem Cslib.Polyhedra.IsAffineOn.sub {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f g : E → F} {S : Set E} (hf : IsAffineOn f S) (hg : IsAffineOn g S) :
IsAffineOn (fun (x : E) => f x - g x) S
theorem Cslib.Polyhedra.IsAffineOn.smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {S : Set E} (c : ℝ) (hf : IsAffineOn f S) :
IsAffineOn (fun (x : E) => c • f x) S
theorem Cslib.Polyhedra.IsAffineOn.sum {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {ι : Type u_4} (s : Finset ι) {f : ι → E → F} {S : Set E} (hf : ∀ i ∈ s, IsAffineOn (f i) S) :
IsAffineOn (fun (x : E) => ∑ i ∈ s, f i x) S
theorem Cslib.Polyhedra.IsAffineOn.prodMk {E : Type u_1} {F : Type u_2} {G : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] {f : E → F} {g : E → G} {S : Set E} (hf : IsAffineOn f S) (hg : IsAffineOn g S) :
IsAffineOn (fun (x : E) => (f x, g x)) S
theorem Cslib.Polyhedra.IsAffineOn.pi {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {ι : Type u_4} [Fintype ι] {H : ι → Type u_5} [(i : ι) → NormedAddCommGroup (H i)] [(i : ι) → NormedSpace ℝ (H i)] {f : (i : ι) → E → H i} {S : Set E} (hf : ∀ (i : ι), IsAffineOn (f i) S) :
IsAffineOn (fun (x : E) (i : ι) => f i x) S
theorem Cslib.Polyhedra.IsAffineOn.comp {E : Type u_1} {F : Type u_2} {G : Type u_3} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] {f : E → F} {g : F → G} {S : Set E} {T : Set F} (hf : IsAffineOn f S) (hg : IsAffineOn g T) (hST : Set.MapsTo f S T) :
IsAffineOn (g ∘ f) S
theorem Cslib.Polyhedra.IsAffineOn.map_convex_combo {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {S : Set E} (hf : IsAffineOn f S) {x y : E} (hx : x ∈ S) (hy : y ∈ S) {a b : ℝ} (hab : a + b = 1) (hxy : a • x + b • y ∈ S) :
f (a • x + b • y) = a • f x + b • f y
theorem Cslib.Polyhedra.IsAffineOn.image_isPolytope {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {P : Set E} (hP : IsPolytope P) (hf : IsAffineOn f P) :
def Cslib.Polyhedra.IsPiecewiseOn {E : Type u_3} {F : Type u_4} [NormedAddCommGroup E] [NormedSpace ℝ E] (PropCell : (E → F) → Set E → Prop) (P : Set E) (f : E → F) :

Shared schema for functions on a compact polyhedron P satisfying a local cell predicate PropCell on every cell of a finite polytopal complex covering P.

theorem Cslib.Polyhedra.isPiecewiseOn_congr {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] {PropCell : (E → F) → Set E → Prop} (hcongr : ∀ {g g' : E → F} {S : Set E}, Set.EqOn g' g S → PropCell g S → PropCell g' S) {P : Set E} {f f' : E → F} (hf : IsPiecewiseOn PropCell P f) (heq : Set.EqOn f' f P) :
IsPiecewiseOn PropCell P f'
theorem Cslib.Polyhedra.isPiecewiseOn_continuousOn {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] {PropCell : (E → F) → Set E → Prop} (hcont : ∀ {g : E → F} {S : Set E}, PropCell g S → ContinuousOn g S) {P : Set E} {f : E → F} (hf : IsPiecewiseOn PropCell P f) :
def Cslib.Polyhedra.IsPLOn {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] (P : Set E) (f : E → F) :

A map f : E → F is piecewise-linear on P (IsPLOn P f) if P is a compact polyhedron admitted as the space of a finite polytopal complex on whose cells f is affine.

theorem Cslib.Polyhedra.IsPLOn.congr {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} {f f' : E → F} (hf : IsPLOn P f) (heq : Set.EqOn f' f P) :
IsPLOn P f'
theorem Cslib.Polyhedra.IsPLOn.neg {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} {f : E → F} (hf : IsPLOn P f) :
IsPLOn P fun (x : E) => -f x
theorem Cslib.Polyhedra.IsPLOn.smul {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} (c : ℝ) {f : E → F} (hf : IsPLOn P f) :
IsPLOn P fun (x : E) => c • f x
theorem Cslib.Polyhedra.isPiecewiseOn_empty {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] (PropCell : (E → F) → Set E → Prop) (f : E → F) :
IsPiecewiseOn PropCell ∅ f
theorem Cslib.Polyhedra.isPiecewiseOn_iff_simplicialComplex {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {PropCell : (E → F) → Set E → Prop} (hmono : ∀ {g : E → F} {S T : Set E}, T ⊆ S → PropCell g S → PropCell g T) {P : Set E} {f : E → F} :
IsPiecewiseOn PropCell P f ↔ ∃ (K : Geometry.SimplicialComplex ℝ E), K.faces.Finite ∧ K.space = P ∧ ∀ s ∈ K.faces, PropCell f ((convexHull ℝ) ↑s)
theorem Cslib.Polyhedra.isPiecewiseOn_iff_finite_polytope_cover {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {PropCell : (E → F) → Set E → Prop} (hmono : ∀ {g : E → F} {S T : Set E}, T ⊆ S → PropCell g S → PropCell g T) {P : Set E} {f : E → F} :
IsPiecewiseOn PropCell P f ↔ ∃ (ℱ : Set (Set E)), ℱ.Finite ∧ (∀ Q ∈ ℱ, IsPolytope Q ∧ PropCell f Q) ∧ P = ⋃ Q ∈ ℱ, Q
theorem Cslib.Polyhedra.isPiecewiseOn_of_finiteCover {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {PropCell : (E → F) → Set E → Prop} (hmono : ∀ {g : E → F} {S T : Set E}, T ⊆ S → PropCell g S → PropCell g T) {ι : Type u_3} [Finite ι] {P : Set E} {Q : ι → Set E} {f : E → F} (hcov : ⋃ (i : ι), Q i = P) (hf : ∀ (i : ι), IsPiecewiseOn PropCell (Q i) f) :
IsPiecewiseOn PropCell P f
theorem Cslib.Polyhedra.isPiecewiseOn_piecewise_union {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {PropCell : (E → F) → Set E → Prop} (hmono : ∀ {g : E → F} {S T : Set E}, T ⊆ S → PropCell g S → PropCell g T) (hcongr : ∀ {g g' : E → F} {S : Set E}, Set.EqOn g' g S → PropCell g S → PropCell g' S) {P Q : Set E} {f g : E → F} (hf : IsPiecewiseOn PropCell P f) (hg : IsPiecewiseOn PropCell Q g) (hagree : ∀ x ∈ P ∩ Q, f x = g x) :
IsPiecewiseOn PropCell (P ∪ Q) fun (x : E) => if x ∈ P then f x else g x
theorem Cslib.Polyhedra.isPiecewiseOn_restrict {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {PropCell : (E → F) → Set E → Prop} (hmono : ∀ {g : E → F} {S T : Set E}, T ⊆ S → PropCell g S → PropCell g T) {P Q : Set E} {f : E → F} (hf : IsPiecewiseOn PropCell P f) (hQ : IsPolyhedron Q) (hQP : Q ⊆ P) :
IsPiecewiseOn PropCell Q f
theorem Cslib.Polyhedra.isPiecewiseOn_exists_common_complex {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {F : Type u_2} {G : Type u_3} {Prop₁ : (E → F) → Set E → Prop} {Prop₂ : (E → G) → Set E → Prop} (hmono₁ : ∀ {f : E → F} {S T : Set E}, T ⊆ S → Prop₁ f S → Prop₁ f T) (hmono₂ : ∀ {g : E → G} {S T : Set E}, T ⊆ S → Prop₂ g S → Prop₂ g T) {P : Set E} {f : E → F} {g : E → G} (hf : IsPiecewiseOn Prop₁ P f) (hg : IsPiecewiseOn Prop₂ P g) :
∃ (C : PolytopalComplex E), C.space = P ∧ (∀ Q ∈ C.cells, Prop₁ f Q) ∧ ∀ Q ∈ C.cells, Prop₂ g Q
theorem Cslib.Polyhedra.isPLOn_iff_finite_polytope_cover {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} {f : E → F} :
IsPLOn P f ↔ ∃ (ℱ : Set (Set E)), ℱ.Finite ∧ (∀ Q ∈ ℱ, IsPolytope Q ∧ IsAffineOn f Q) ∧ P = ⋃ Q ∈ ℱ, Q
theorem Cslib.Polyhedra.IsPLOn.const {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} (hP : IsPolyhedron P) (c : F) :
IsPLOn P fun (x : E) => c
theorem Cslib.Polyhedra.IsPLOn.of_finiteCover {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {ι : Type u_3} [Finite ι] {P : Set E} {Q : ι → Set E} {f : E → F} (hcov : ⋃ (i : ι), Q i = P) (hf : ∀ (i : ι), IsPLOn (Q i) f) :
IsPLOn P f
theorem Cslib.Polyhedra.IsPLOn.piecewise_union {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P Q : Set E} {f g : E → F} (hf : IsPLOn P f) (hg : IsPLOn Q g) (hagree : ∀ x ∈ P ∩ Q, f x = g x) :
IsPLOn (P ∪ Q) fun (x : E) => if x ∈ P then f x else g x
theorem Cslib.Polyhedra.IsPLOn.restrict {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P Q : Set E} {f : E → F} (hf : IsPLOn P f) (hQ : IsPolyhedron Q) (hQP : Q ⊆ P) :
IsPLOn Q f
theorem Cslib.Polyhedra.IsPLOn.exists_common_complex {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {G : Type u_3} [NormedAddCommGroup G] [NormedSpace ℝ G] {P : Set E} {f : E → F} {g : E → G} (hf : IsPLOn P f) (hg : IsPLOn P g) :
∃ (C : PolytopalComplex E), C.space = P ∧ (∀ Q ∈ C.cells, IsAffineOn f Q) ∧ ∀ Q ∈ C.cells, IsAffineOn g Q
theorem Cslib.Polyhedra.IsPLOn.add {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} {f g : E → F} (hf : IsPLOn P f) (hg : IsPLOn P g) :
IsPLOn P fun (x : E) => f x + g x
theorem Cslib.Polyhedra.IsPLOn.sub {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {P : Set E} {f g : E → F} (hf : IsPLOn P f) (hg : IsPLOn P g) :
IsPLOn P fun (x : E) => f x - g x
theorem Cslib.Polyhedra.IsPLOn.sum {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {ι : Type u_3} (s : Finset ι) {P : Set E} (hP : IsPolyhedron P) {f : ι → E → F} (hf : ∀ i ∈ s, IsPLOn P (f i)) :
IsPLOn P fun (x : E) => ∑ i ∈ s, f i x
theorem Cslib.Polyhedra.IsPLOn.prodMk {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {G : Type u_3} [NormedAddCommGroup G] [NormedSpace ℝ G] {P : Set E} {f : E → F} {g : E → G} (hf : IsPLOn P f) (hg : IsPLOn P g) :
IsPLOn P fun (x : E) => (f x, g x)
theorem Cslib.Polyhedra.IsPLOn.pi {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {ι : Type u_3} [Fintype ι] {H : ι → Type u_4} [(i : ι) → NormedAddCommGroup (H i)] [(i : ι) → NormedSpace ℝ (H i)] {P : Set E} (hP : IsPolyhedron P) {f : (i : ι) → E → H i} (hf : ∀ (i : ι), IsPLOn P (f i)) :
IsPLOn P fun (x : E) (i : ι) => f i x
theorem Cslib.Polyhedra.IsPLOn.min {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {P : Set E} {f g : E → ℝ} (hf : IsPLOn P f) (hg : IsPLOn P g) :
IsPLOn P fun (x : E) => Min.min (f x) (g x)
theorem Cslib.Polyhedra.IsPLOn.max {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {P : Set E} {f g : E → ℝ} (hf : IsPLOn P f) (hg : IsPLOn P g) :
IsPLOn P fun (x : E) => Max.max (f x) (g x)
theorem Cslib.Polyhedra.IsPLOn.abs {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {P : Set E} {f : E → ℝ} (hf : IsPLOn P f) :
IsPLOn P fun (x : E) => |f x|
theorem Cslib.Polyhedra.IsPLOn.finset_sup' {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {ι : Type u_3} (s : Finset ι) (hs : s.Nonempty) {P : Set E} {f : ι → E → ℝ} (hf : ∀ i ∈ s, IsPLOn P (f i)) :
IsPLOn P fun (x : E) => s.sup' hs fun (i : ι) => f i x
theorem Cslib.Polyhedra.IsPLOn.finset_inf' {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {ι : Type u_3} (s : Finset ι) (hs : s.Nonempty) {P : Set E} {f : ι → E → ℝ} (hf : ∀ i ∈ s, IsPLOn P (f i)) :
IsPLOn P fun (x : E) => s.inf' hs fun (i : ι) => f i x
theorem Cslib.Polyhedra.IsPLOn.exists_preimage_complex {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {P : Set E} {f : E → F} (hf : IsPLOn P f) (CF : PolytopalComplex F) :
∃ (D : PolytopalComplex E), D.space = P ∩ f ⁻¹' CF.space ∧ ∀ S ∈ D.cells, IsAffineOn f S ∧ ∃ R ∈ CF.cells, f '' S ⊆ R

Pull back a finite polytopal complex CF covering a target region along a PL map f : E → F defined on P to get a finite polytopal complex covering P ∩ f ⁻¹' CF.space, on each cell of which f is affine and maps into a single cell of CF.

theorem Cslib.Polyhedra.IsPLOn.comp {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {G : Type u_3} [NormedAddCommGroup G] [NormedSpace ℝ G] {P : Set E} {T : Set F} {f : E → F} {g : F → G} (hf : IsPLOn P f) (hg : IsPLOn T g) (hmaps : Set.MapsTo f P T) :
IsPLOn P (g ∘ f)
theorem Cslib.Polyhedra.exists_triangulation_of_isPLOn_compatible {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {P : Set E} {f : E → F} (hf : IsPLOn P f) (CF : PolytopalComplex F) (hcov : f '' P ⊆ CF.space) :
∃ (KE : Geometry.SimplicialComplex ℝ E), KE.faces.Finite ∧ KE.space = P ∧ ∀ s ∈ KE.faces, IsAffineOn f ((convexHull ℝ) ↑s) ∧ ∃ R ∈ CF.cells, f '' (convexHull ℝ) ↑s ⊆ R

Given a PL map f : E → F on P and a finite polytopal complex CF covering f '' P, there is a finite triangulation KE of P on whose every simplex f is affine and maps into a single cell of CF. Cited in issue #4325 notes as STOC 1056 Lemma B.1(2) (unverified against the primary manuscript).