The reduced fundamental group of a graph
DefinitionAT260939824_ReducedWalksLet be a simple graph on a set and . Quotient the closed walks at by reduced homotopy, generated by cancellation of an edge followed by its reverse, deletion of a closed four-edge walk, and equivalence and concatenation closure. Define
Concatenation defines multiplication, the empty walk defines the identity, and reversal defines inversion. A walk followed by its reversal, in either order, reduces to the empty walk; reversal preserves reduced homotopy. These identities make the quotient a group and define the class of a based walk. This bundle extends the reused core relation rather than redefining it. The selected representative laws give , , and . Reduced homotopy preserves length parity, so defines a group homomorphism to (written multiplicatively in the formal construction). For every graph homomorphism , the map defines a homomorphism . Walk powers commute with graph maps and have length .
import Definitions.Def_AbelianTargets260939824ReducedWalks
import Init
import Lean.Elab.Tactic.Omega
import Mathlib.Algebra.Ring.Parity
import Mathlib.Combinatorics.SimpleGraph.Walk.Maps
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
set_option autoImplicit false
/-!
# Reduced graph-walk homotopy and parity
This file formalizes the walk presentation in §2.2 of arXiv:2609.39824.
`ReducedHomotopic` is the smallest equivalence compatible with concatenation
which deletes spurs and closed walks of length four. Its restriction to closed
walks is the reduced homotopy relation used by the paper.
The statements `HasOddInvolution` and `HasOddTorsion` express the hypotheses
of Theorem 1.4 and Proposition 7.1 directly in this walk presentation.
The geometric construction of continuous graph homomorphisms is separate.
-/
namespace AbelianTargets
universe u
variable {V : Type u} (H : SimpleGraph V)
namespace ReducedHomotopic
variable {H}
/-- Every generating relation preserves the parity of the walk length. -/
theorem length_mod_two {a b : V} {p q : H.Walk a b}
(h : ReducedHomotopic H p q) : p.length % 2 = q.length % 2 := by
induction h with
| refl => rfl
| symm _ ih => exact ih.symm
| trans _ _ ih₁ ih₂ => exact ih₁.trans ih₂
| append _ _ ih₁ ih₂ =>
simp only [SimpleGraph.Walk.length_append]
omega
| spur => simp
| four p hp => simp [hp]
/-- A walk followed by its reversal cancels by spur moves alone. -/
theorem append_reverse {a b : V} (p : H.Walk a b) :
ReducedHomotopic H (p.append p.reverse) .nil := by
induction p with
| nil => exact .refl _
| @cons a b c h p ih =>
have hc := ReducedHomotopic.append (ReducedHomotopic.refl h.toWalk)
(ReducedHomotopic.append ih (ReducedHomotopic.refl h.symm.toWalk))
simp only [SimpleGraph.Walk.nil_append,
SimpleGraph.Walk.cons_nil_append, SimpleGraph.Walk.append_assoc,
SimpleGraph.Walk.reverse_cons] at hc ⊢
exact hc.trans (.spur h)
/-- Reversing a walk and then following it also cancels. -/
theorem reverse_append {a b : V} (p : H.Walk a b) :
ReducedHomotopic H (p.reverse.append p) .nil := by
simpa only [SimpleGraph.Walk.reverse_reverse] using append_reverse p.reverse
/-- Graph homomorphisms preserve every generating reduced homotopy move. -/
theorem map {W : Type*} {J : SimpleGraph W} (f : H →g J)
{a b : V} {p q : H.Walk a b} (h : ReducedHomotopic H p q) :
ReducedHomotopic J (p.map f) (q.map f) := by
induction h with
| refl => exact .refl _
| symm _ ih => exact .symm ih
| trans _ _ ih₁ ih₂ => exact .trans ih₁ ih₂
| append _ _ ih₁ ih₂ =>
simpa only [SimpleGraph.Walk.map_append] using ReducedHomotopic.append ih₁ ih₂
| spur h => exact .spur (f.map_adj h)
| four p hp => exact .four (p.map f) (by simpa using hp)
/-- Reversal preserves the reduced homotopy relation. -/
theorem reverse {a b : V} {p q : H.Walk a b}
(h : ReducedHomotopic H p q) : ReducedHomotopic H p.reverse q.reverse := by
induction h with
| refl => exact .refl _
| symm _ ih => exact .symm ih
| trans _ _ ih₁ ih₂ => exact .trans ih₁ ih₂
| append _ _ ih₁ ih₂ =>
simpa only [SimpleGraph.Walk.reverse_append] using ReducedHomotopic.append ih₂ ih₁
| spur h => simpa using ReducedHomotopic.spur h
| four p hp => exact .four p.reverse (by simpa using hp)
end ReducedHomotopic
variable {H}
@[simp] theorem loopPower_zero {b : V} (γ : H.Walk b b) :
loopPower H γ 0 = .nil := rfl
@[simp] theorem loopPower_succ {b : V} (γ : H.Walk b b) (n : ℕ) :
loopPower H γ (n + 1) = γ.append (loopPower H γ n) := rfl
@[simp] theorem loopPower_one {b : V} (γ : H.Walk b b) :
loopPower H γ 1 = γ := by simp
/-- The length of the concatenation power has the expected exact value. -/
@[simp] theorem loopPower_length {b : V} (γ : H.Walk b b) (n : ℕ) :
(loopPower H γ n).length = n * γ.length := by
induction n with
| zero => simp
| succ n ih => simp [ih, Nat.add_mul, Nat.add_comm]
/-- Applying a graph homomorphism commutes with concatenation powers. -/
@[simp] theorem loopPower_map {W : Type*} {J : SimpleGraph W} (f : H →g J)
{b : V} (γ : H.Walk b b) (n : ℕ) :
(loopPower H γ n).map f = loopPower J (γ.map f) n := by
induction n with
| zero => rfl
| succ n ih => simp only [loopPower_succ, SimpleGraph.Walk.map_append, ih]
/-- The reduced homotopy relation on closed walks at a fixed basepoint. -/
def reducedWalkSetoid (H : SimpleGraph V) (b : V) : Setoid (H.Walk b b) where
r := ReducedHomotopic H
iseqv := ⟨ReducedHomotopic.refl, ReducedHomotopic.symm, ReducedHomotopic.trans⟩
/-- The group `Π₁*(H,b)`: based closed walks modulo spur and four-walk relations. -/
def ReducedFundamentalGroup (H : SimpleGraph V) (b : V) :=
Quotient (reducedWalkSetoid H b)
namespace ReducedFundamentalGroup
variable (H) (b : V)
/-- The class represented by a based closed walk. -/
def ofWalk (γ : H.Walk b b) : ReducedFundamentalGroup H b :=
Quotient.mk (reducedWalkSetoid H b) γ
instance : Group (ReducedFundamentalGroup H b) where
one := ofWalk H b .nil
mul := Quotient.map₂ SimpleGraph.Walk.append
(fun _ _ h₁ _ _ h₂ => ReducedHomotopic.append h₁ h₂)
inv := Quotient.map SimpleGraph.Walk.reverse
(fun _ _ h => ReducedHomotopic.reverse h)
mul_assoc := by
intro x y z
refine Quotient.inductionOn₃ x y z ?_
intro p q r
change ofWalk H b ((p.append q).append r) = ofWalk H b (p.append (q.append r))
exact congrArg (ofWalk H b) (SimpleGraph.Walk.append_assoc p q r).symm
one_mul := by
intro x
refine Quotient.inductionOn x ?_
intro p
rfl
mul_one := by
intro x
refine Quotient.inductionOn x ?_
intro p
change ofWalk H b (p.append .nil) = ofWalk H b p
rw [SimpleGraph.Walk.append_nil]
inv_mul_cancel := by
intro x
refine Quotient.inductionOn x ?_
intro p
exact Quotient.sound (ReducedHomotopic.reverse_append p)
variable {H b}
@[simp] theorem ofWalk_nil : ofWalk H b .nil = 1 := rfl
@[simp] theorem ofWalk_append (γ δ : H.Walk b b) :
ofWalk H b (γ.append δ) = ofWalk H b γ * ofWalk H b δ := rfl
@[simp] theorem ofWalk_reverse (γ : H.Walk b b) :
ofWalk H b γ.reverse = (ofWalk H b γ)⁻¹ := rfl
@[simp] theorem ofWalk_loopPower (γ : H.Walk b b) (n : ℕ) :
ofWalk H b (loopPower H γ n) = (ofWalk H b γ) ^ n := by
induction n with
| zero => rfl
| succ n ih => simp only [loopPower_succ, ofWalk_append, ih, pow_succ']
/-- Length parity is a group homomorphism from the reduced fundamental group
to `ℤ/2ℤ`, written multiplicatively to match the source group. -/
def parity : ReducedFundamentalGroup H b →* Multiplicative (ZMod 2) where
toFun := Quotient.lift (fun γ : H.Walk b b => Multiplicative.ofAdd (γ.length : ZMod 2))
(fun γ δ h => congrArg Multiplicative.ofAdd
((ZMod.natCast_eq_natCast_iff' γ.length δ.length 2).mpr h.length_mod_two))
map_one' := rfl
map_mul' := by
intro x y
refine Quotient.inductionOn₂ x y ?_
intro γ δ
change Multiplicative.ofAdd ((γ.append δ).length : ZMod 2) =
Multiplicative.ofAdd (γ.length : ZMod 2) * Multiplicative.ofAdd (δ.length : ZMod 2)
rw [SimpleGraph.Walk.length_append, Nat.cast_add]
rfl
@[simp] theorem parity_ofWalk (γ : H.Walk b b) :
parity (ofWalk H b γ) = Multiplicative.ofAdd (γ.length : ZMod 2) := rfl
/-- A graph homomorphism induces a homomorphism of the reduced groups. -/
def map {W : Type*} {J : SimpleGraph W} (f : H →g J) :
ReducedFundamentalGroup H b →* ReducedFundamentalGroup J (f b) where
toFun := Quotient.map (SimpleGraph.Walk.map f) (fun _ _ h => h.map f)
map_one' := rfl
map_mul' := by
intro x y
refine Quotient.inductionOn₂ x y ?_
intro γ δ
change ofWalk J (f b) ((γ.append δ).map f) =
ofWalk J (f b) ((γ.map f).append (δ.map f))
rw [SimpleGraph.Walk.map_append]
@[simp] theorem map_ofWalk {W : Type*} {J : SimpleGraph W} (f : H →g J)
(γ : H.Walk b b) : map f (ofWalk H b γ) = ofWalk J (f b) (γ.map f) := rfl
end ReducedFundamentalGroup
end AbelianTargets