# The Nielsen-Schreier theorem #

This file proves that a subgroup of a free group is itself free.

## Main result #

• subgroupIsFreeOfIsFree H: an instance saying that a subgroup of a free group is free.

## Proof overview #

The proof is analogous to the proof using covering spaces and fundamental groups of graphs, but we work directly with groupoids instead of topological spaces. Under this analogy,

• IsFreeGroupoid G corresponds to saying that a space is a graph.
• endMulEquivSubgroup H plays the role of replacing 'subgroup of fundamental group' with 'fundamental group of covering space'.
• actionGroupoidIsFree G A corresponds to the fact that a covering of a (single-vertex) graph is a graph.
• endIsFree T corresponds to the fact that, given a spanning tree T of a graph, its fundamental group is free (generated by loops from the complement of the tree).

## Implementation notes #

Our definition of IsFreeGroupoid is nonstandard. Normally one would require that functors G ⥤ X to any groupoid X are given by graph homomorphisms from the generators, but we only consider groups X. This simplifies the argument since functor equality is complicated in general, but simple for functors to single object categories.

## References #

https://ncatlab.org/nlab/show/Nielsen-Schreier+theorem

## Tags #

free group, free groupoid, Nielsen-Schreier

IsFreeGroupoid.Generators G is a type synonym for G. We think of this as the vertices of the generating quiver of G when G is free. We can't use G directly, since G already has a quiver instance from being a groupoid.

Equations
Instances For
class IsFreeGroupoid (G : Type u_1) :
Type (max u_1 (v + 1))

A groupoid G is free when we have the following data:

• a quiver on IsFreeGroupoid.Generators G (a type synonym for G)

• a function of taking a generating arrow to a morphism in G

• such that a functor from G to any group X is uniquely determined by assigning labels in X to the generating arrows.

This definition is nonstandard. Normally one would require that functors G ⥤ X to any groupoid X are given by graph homomorphisms from generators.

• quiverGenerators :
• of : {a b : } → (a b)((let_fun this := a; this) b)
• unique_lift : ∀ {X : Type v} [inst : ] (f : ), ∃! F : , ∀ (a b : ) (g : a b), F.map = f g
Instances
theorem IsFreeGroupoid.unique_lift {G : Type u_1} [self : ] {X : Type v} [] (f : ) :
∃! F : , ∀ (a b : ) (g : a b), F.map = f g
theorem IsFreeGroupoid.ext_functor {G : Type u_1} [] {X : Type v} [] (f : ) (g : ) (h : ∀ (a b : ) (e : a b), f.map = g.map ) :
f = g

Two functors from a free groupoid to a group are equal when they agree on the generating quiver.

instance IsFreeGroupoid.actionGroupoidIsFree {G : Type u} {A : Type u} [] [] [] :

An action groupoid over a free group is free. More generally, one could show that the groupoid of elements over a free groupoid is free, but this version is easier to prove and suffices for our purposes.

Analogous to the fact that a covering space of a graph is a graph. (A free groupoid is like a graph, and a groupoid of elements is like a covering space.)

Equations
• One or more equations did not get rendered due to their size.

A path in the tree gives a hom, by composition.

Equations
• One or more equations did not get rendered due to their size.
Instances For

For every vertex a, there is a canonical hom from the root, given by the path in the tree.

Equations
Instances For
theorem IsFreeGroupoid.SpanningTree.treeHom_eq {G : Type u} [] {a : G} (p : ) :

Any path to a gives treeHom T a, since paths in the tree are unique.

def IsFreeGroupoid.SpanningTree.loopOfHom {G : Type u} [] {a : G} {b : G} (p : a b) :

Any hom in G can be made into a loop, by conjugating with treeHoms.

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem IsFreeGroupoid.SpanningTree.loopOfHom_eq_id {G : Type u} [] {a : } {b : } (e : a b) (H : ) :

Turning an edge in the spanning tree into a loop gives the identity loop.

@[simp]
theorem IsFreeGroupoid.SpanningTree.functorOfMonoidHom_map {G : Type u} [] {X : Type u_1} [] :
∀ {X_1 Y : G} (p : X_1 Y),
@[simp]
theorem IsFreeGroupoid.SpanningTree.functorOfMonoidHom_obj {G : Type u} [] {X : Type u_1} [] :
∀ (x : G),

Since a hom gives a loop, any homomorphism from the vertex group at the root extends to a functor on the whole groupoid.

Equations
• One or more equations did not get rendered due to their size.
Instances For

Given a free groupoid and an arborescence of its generating quiver, the vertex group at the root is freely generated by loops coming from generating arrows in the complement of the tree.

theorem IsFreeGroupoid.path_nonempty_of_hom {G : Type u} [] {a : G} {b : G} :
Nonempty (a b)

If there exists a morphism a → b in a free groupoid, then there also exists a zigzag from a to b in the generating quiver.

instance IsFreeGroupoid.generators_connected (G : Type u) [] (r : G) :

Given a connected free groupoid, its generating quiver is rooted-connected.

Equations
• =
instance IsFreeGroupoid.endIsFreeOfConnectedFree {G : Type u} [] (r : G) :

A vertex group in a free connected groupoid is free. With some work one could drop the connectedness assumption, by looking at connected components.

Equations
• =
instance subgroupIsFreeOfIsFree {G : Type u} [] [] (H : ) :

The Nielsen-Schreier theorem: a subgroup of a free group is free.

Equations
• =