Documentation

Lightlike.PonzanoRegge.SphereHomology

Mod-2 homology of a triangulated 2-sphere #

For a 2-complex L (a finite set of triangles) the chains with coefficients in a field K of characteristic 2 (for example ℤ/2) are the functions on its triangles, edges and vertices. bd2 K L sends a 2-chain to its boundary (each triangle to its three edges) and bd1 K L a 1-chain to its boundary (each edge to its two vertices). Characteristic 2 makes orientations unnecessary.

The coefficient field is a variable rather than ZMod 2 itself: with the concrete ZMod 2, Mathlib's dimension lemmas (already finrank_span_singleton) run out of time unifying the ring structure of ZMod 2 with the one derived from its field structure.

noncomputable def Lightlike.PR.bd2 {V : Type u_1} [DecidableEq V] (K : Type u_2) [Field K] (L : Finset (Finset V)) :
(↥L → K) →ₗ[K] ↥(edges2 L) → K

The boundary of a 2-chain: the sum, over the triangles containing an edge, of their coefficients.

Equations
Instances For
    noncomputable def Lightlike.PR.bd1 {V : Type u_1} [DecidableEq V] (K : Type u_2) [Field K] (L : Finset (Finset V)) :
    (↥(edges2 L) → K) →ₗ[K] ↥(verts2 L) → K

    The boundary of a 1-chain: the sum, over the edges containing a vertex, of their coefficients.

    Equations
    Instances For
      theorem Lightlike.PR.bd2_apply {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} (σ : ↥L → K) (e : ↥(edges2 L)) :
      (bd2 K L) σ e = ∑ τ : ↥L with ↑e ⊆ ↑τ, σ τ
      theorem Lightlike.PR.bd1_apply {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} (c : ↥(edges2 L) → K) (v : ↥(verts2 L)) :
      (bd1 K L) c v = ∑ e : ↥(edges2 L) with ↑v ∈ ↑e, c e

      Sums over subtypes #

      noncomputable def Lightlike.PR.extFn {K : Type u_2} [Field K] {α : Type u_3} [DecidableEq α] {S : Finset α} (f : ↥S → K) :
      α → K

      Extend a function on the elements of S by 0.

      Equations
      Instances For
        theorem Lightlike.PR.extFn_coe {K : Type u_2} [Field K] {α : Type u_3} [DecidableEq α] {S : Finset α} (f : ↥S → K) (x : ↥S) :
        extFn f ↑x = f x
        theorem Lightlike.PR.sum_filter_univ_coe {K : Type u_2} [Field K] {α : Type u_3} [DecidableEq α] {S : Finset α} (P : α → Prop) [DecidablePred P] (f : ↥S → K) :
        ∑ x : ↥S with P ↑x, f x = ∑ x ∈ S with P x, extFn f x

        A sum over the elements of S satisfying P is the sum over S.filter P.

        theorem Lightlike.PR.card_filter_univ_coe {α : Type u_3} [DecidableEq α] {S : Finset α} (P : α → Prop) [DecidablePred P] :
        {x : ↥S | P ↑x}.card = (Finset.filter P S).card

        Edges with two triangles #

        theorem Lightlike.PR.char2_add_eq_zero {K : Type u_2} [Field K] [CharP K 2] (a b : K) :
        a + b = 0 ↔ a = b
        theorem Lightlike.PR.two_tris {V : Type u_1} [DecidableEq V] {L : Finset (Finset V)} (hc : IsClosed2 L) {e : Finset V} (he : e ∈ edges2 L) :
        ∃ t₁ ∈ L, ∃ t₂ ∈ L, t₁ ≠ t₂ ∧ {x ∈ L | e ⊆ x} = {t₁, t₂}

        In a closed 2-complex an edge lies in exactly two triangles.

        theorem Lightlike.PR.eq_of_bd2_eq_zero {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hc : IsClosed2 L) {σ : ↥L → K} {e : ↥(edges2 L)} (h0 : (bd2 K L) σ e = 0) {τ τ' : ↥L} (hτ : ↑e ⊆ ↑τ) (hτ' : ↑e ⊆ ↑τ') :
        σ τ = σ τ'

        If the boundary of a 2-chain vanishes on an edge, its two triangles have the same coefficient.

        theorem Lightlike.PR.pair_subset_of_mem {V : Type u_1} [DecidableEq V] {τ : Finset V} {u w : V} (hu : u ∈ τ) (hw : w ∈ τ) :
        {u, w} ⊆ τ
        theorem Lightlike.PR.exists_other {V : Type u_1} [DecidableEq V] {τ : Finset V} (hc : τ.card = 3) (u : V) :
        ∃ w ∈ τ, w ≠ u

        A vertex of a 3-element set has another vertex next to it.

        theorem Lightlike.PR.const_around {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) {σ : ↥L → K} {u : V} (h0 : ∀ (e : ↥(edges2 L)), u ∈ ↑e → (bd2 K L) σ e = 0) {τ τ' : ↥L} (hτ : u ∈ ↑τ) (hτ' : u ∈ ↑τ') :
        σ τ = σ τ'

        A 2-chain whose boundary vanishes on every edge through u is constant on the triangles around u: the link of u is connected, and the two triangles at each edge through u have the same coefficient.

        theorem Lightlike.PR.const_of_bd2_eq_zero {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) {σ : ↥L → K} (h0 : (bd2 K L) σ = 0) (τ τ' : ↥L) :
        σ τ = σ τ'

        The 2-cycles of a triangulated 2-sphere are constant.

        The 2-cycles #

        theorem Lightlike.PR.IsSurfaceSphere.ker_bd2 {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) :
        (bd2 K L).ker = K ∙ fun (x : ↥L) => 1

        The 2-cycles of a triangulated 2-sphere are 0 and the sum of all triangles.

        theorem Lightlike.PR.IsSurfaceSphere.finrank_ker_bd2 {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) (hL : L.Nonempty) :
        Module.finrank K ↥(bd2 K L).ker = 1

        The boundary of a boundary #

        theorem Lightlike.PR.powersetCard_two_three {V : Type u_1} [DecidableEq V] {x y z : V} (hxy : x ≠ y) (hxz : x ≠ z) (hyz : y ≠ z) :

        The 2-element subsets of a 3-element set {x, y, z}.

        theorem Lightlike.PR.filter_powersetCard_two {V : Type u_1} [DecidableEq V] {τ : Finset V} {v : V} (hv : v ∈ τ) :
        {x ∈ Finset.powersetCard 2 τ | v ∈ x} = Finset.image (fun (w : V) => {v, w}) (τ.erase v)

        The edges of a set τ through a vertex v of τ are the pairs {v, w}, w ∈ τ, w ≠ v.

        theorem Lightlike.PR.card_edges_through {V : Type u_1} [DecidableEq V] {τ : Finset V} (hc : τ.card = 3) (v : V) :
        {x ∈ Finset.powersetCard 2 τ | v ∈ x}.card = if v ∈ τ then 2 else 0

        In a triangle, a vertex lies in exactly two of the three edges (or in none).

        theorem Lightlike.PR.filter_edges2_through {V : Type u_1} [DecidableEq V] {L : Finset (Finset V)} {τ : Finset V} (hτ : τ ∈ L) (v : V) :
        {e ∈ edges2 L | v ∈ e ∧ e ⊆ τ} = {x ∈ Finset.powersetCard 2 τ | v ∈ x}

        The edges of L through v inside a triangle τ of L are the 2-element subsets of τ that contain v.

        theorem Lightlike.PR.bd1_bd2_apply {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} (σ : ↥L → K) (v : ↥(verts2 L)) :
        (bd1 K L) ((bd2 K L) σ) v = ∑ τ : ↥L, ↑{e : ↥(edges2 L) | ↑v ∈ ↑e ∧ ↑e ⊆ ↑τ}.card * σ τ

        bd1 ∘ bd2 at a vertex v: each triangle is counted once for every edge through v in it.

        theorem Lightlike.PR.bd1_bd2 {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hcard : ∀ τ ∈ L, τ.card = 3) :
        bd1 K L ∘ₗ bd2 K L = 0

        The boundary of a boundary is 0: in a complex of triangles, a vertex of a triangle lies in two of its edges, and 2 = 0 in characteristic 2.

        The 0-boundaries #

        theorem Lightlike.PR.bd1_single {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} (e : ↥(edges2 L)) (v : ↥(verts2 L)) :
        (bd1 K L) (Pi.single e 1) v = if ↑v ∈ ↑e then 1 else 0

        The boundary of a single edge e is 1 on the vertices of e.

        theorem Lightlike.PR.single_add_self {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (u : ↥(verts2 L)) :
        theorem Lightlike.PR.bd1_single_pair {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} {p q : V} (hpq : p ≠ q) (he : {p, q} ∈ edges2 L) (hp : p ∈ verts2 L) (hq : q ∈ verts2 L) :
        (bd1 K L) (Pi.single ⟨{p, q}, he⟩ 1) = Pi.single ⟨p, hp⟩ 1 + Pi.single ⟨q, hq⟩ 1

        The boundary of the edge {p, q} is δ_p + δ_q.

        theorem Lightlike.PR.single_add_mem_range {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) (u₀ u : ↥(verts2 L)) :
        Pi.single u 1 + Pi.single u₀ 1 ∈ (bd1 K L).range

        Every 0-chain δ_u + δ_{u₀} is a boundary: join u₀ to u by a path of edges.

        theorem Lightlike.PR.mem_range_bd1_of_sum_eq_zero {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) (u₀ : ↥(verts2 L)) {f : ↥(verts2 L) → K} (hf : ∑ v : ↥(verts2 L), f v = 0) :
        f ∈ (bd1 K L).range

        The 0-chains with coefficient sum 0 are boundaries.

        The first homology vanishes #

        theorem Lightlike.PR.IsSurfaceSphere.range_bd2 {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) :
        (bd2 K L).range = (bd1 K L).ker

        The 1-cycles of a triangulated 2-sphere are exactly the boundaries. The boundaries of 2-chains have dimension F - 1 (the 2-cycles are 0 and the sum of all triangles), the 1-cycles have dimension at most E - (V - 1) (every 0-chain with coefficient sum 0 is a boundary), and V - E + F = 2.

        theorem Lightlike.PR.IsSurfaceSphere.exists_bd2_eq {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) {c : ↥(edges2 L) → K} (hc : (bd1 K L) c = 0) :
        ∃ (σ : ↥L → K), (bd2 K L) σ = c

        Every 1-cycle of a triangulated 2-sphere is the boundary of a 2-chain (H₁(L; K) = 0 for a field K of characteristic 2).

        The crossing lemma #

        theorem Lightlike.PR.add_eq_one_of_bd2_eq_one {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] {L : Finset (Finset V)} (hc : IsClosed2 L) {σ : ↥L → K} {e : ↥(edges2 L)} (h1 : (bd2 K L) σ e = 1) {τ τ' : ↥L} (hne : τ ≠ τ') (hτ : ↑e ⊆ ↑τ) (hτ' : ↑e ⊆ ↑τ') :
        σ τ + σ τ' = 1

        If a 2-chain has boundary 1 on an edge e, the coefficients of the two triangles at e add up to 1.

        theorem Lightlike.PR.tri_ne {V : Type u_1} {a b c : V} [DecidableEq V] (h : {a, b, c}.card = 3) :
        a ≠ b ∧ a ≠ c ∧ b ≠ c
        theorem Lightlike.PR.ne_of_mem_edges2 {V : Type u_1} [DecidableEq V] {L : Finset (Finset V)} {a b : V} (h : {a, b} ∈ edges2 L) :
        a ≠ b
        theorem Lightlike.PR.edge_ne {V : Type u_1} [DecidableEq V] {L : Finset (Finset V)} {e : ↥(edges2 L)} {u a b : V} (hu : u ∈ ↑e) (hab : {a, b} ∈ edges2 L) (ha : u ≠ a) (hb : u ≠ b) :
        e ≠ ⟨{a, b}, hab⟩

        An edge containing u differs from an edge {a, b} with u ∉ {a, b}.

        theorem Lightlike.PR.IsSurfaceSphere.not_crossing_of {V : Type u_1} [DecidableEq V] {K : Type u_2} [Field K] [CharP K 2] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) {v v₁ v₂ v₃ v₄ : V} (h12 : {v, v₁, v₂} ∈ L) (h23 : {v, v₂, v₃} ∈ L) (h34 : {v, v₃, v₄} ∈ L) (h14 : v₁ ≠ v₄) (e13 : {v₁, v₃} ∈ edges2 L) (e24 : {v₂, v₄} ∈ edges2 L) :

        The crossing lemma, over any field K of characteristic 2. Around a vertex v with consecutive link vertices v₁, v₂, v₃, v₄ (triangles v v₁ v₂, v v₂ v₃, v v₃ v₄, v₁ ≠ v₄), the diagonals v₁v₃ and v₂v₄ are not both edges. The cycle v v₁ v₃ bounds a 2-chain (H₁ = 0), which is constant around v₂ and around v₄ because no edge of the cycle passes through them; but its two triangles v v₂ v₃ and v v₃ v₄ at the cycle edge v v₃ differ, and a triangle through v₂ v₄ would have to equal both.

        theorem Lightlike.PR.IsSurfaceSphere.not_crossing {V : Type u_1} [DecidableEq V] {L : Finset (Finset V)} (hS : IsSurfaceSphere L) {v v₁ v₂ v₃ v₄ : V} (h12 : {v, v₁, v₂} ∈ L) (h23 : {v, v₂, v₃} ∈ L) (h34 : {v, v₃, v₄} ∈ L) (h14 : v₁ ≠ v₄) (e13 : {v₁, v₃} ∈ edges2 L) (e24 : {v₂, v₄} ∈ edges2 L) :

        The crossing lemma (coefficients ℤ/2): around a vertex of a triangulated 2-sphere, two interleaved diagonals of its link are not both edges.