# mathlibdocumentation

group_theory.nielsen_schreier

# The Nielsen-Schreier theorem #

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

## Main result #

• subgroup_is_free_of_is_free 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,

• is_free_groupoid G corresponds to saying that a space is a graph.
• End_mul_equiv_subgroup H plays the role of replacing 'subgroup of fundamental group' with 'fundamental group of covering space'.
• action_groupoid_is_free G A corresponds to the fact that a covering of a (single-vertex) graph is a graph.
• End_is_free 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 is_free_groupoid 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

@[nolint]
def is_free_groupoid.generators (G : Type u_1)  :
Type u_1

is_free_groupoid.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 is_free_groupoid.generators
@[class]
structure is_free_groupoid (G : Type u_1)  :
Type (max u_1 (v+1))
• quiver_generators :
• of : Π {a b : , (a b)((show G, from a) b)
• unique_lift : ∀ {X : Type ?} [_inst_1_1 : group X] (f : , ∃! (F : , ∀ (a b : (g : a b), F.map = f g

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

• a quiver on is_free_groupoid.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.

Instances of this typeclass
Instances of other typeclasses for is_free_groupoid
• is_free_groupoid.has_sizeof_inst
@[ext]
theorem is_free_groupoid.ext_functor {G : Type u_1} {X : Type v} [group X] (f g : 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.

@[protected, instance]
def is_free_groupoid.action_groupoid_is_free {G A : Type u} [group G] [ A] :

An action groupoid over a free froup 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
noncomputable def is_free_groupoid.spanning_tree.hom_of_path {G : Type u} {a : G} :
a(root' T a)

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

Equations
• = sum.rec_on f.val (λ (e : a_6 a), (λ (e : a a_6),
noncomputable def is_free_groupoid.spanning_tree.tree_hom {G : Type u} (a : G) :
root' T a

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

Equations
theorem is_free_groupoid.spanning_tree.tree_hom_eq {G : Type u} {a : G} (p : a) :

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

@[simp]
theorem is_free_groupoid.spanning_tree.tree_hom_root {G : Type u}  :
(root' T) = 𝟙 (root' T)
noncomputable def is_free_groupoid.spanning_tree.loop_of_hom {G : Type u} {a b : G} (p : a b) :

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

Equations
theorem is_free_groupoid.spanning_tree.loop_of_hom_eq_id {G : Type u} {a b : is_free_groupoid.generators G} (e : a b) (H : e ) :
= 𝟙 (root' T)

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

noncomputable def is_free_groupoid.spanning_tree.functor_of_monoid_hom {G : Type u} {X : Type u_1} [monoid X] (f : category_theory.End (root' T) →* X) :

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

Equations
@[simp]
theorem is_free_groupoid.spanning_tree.functor_of_monoid_hom_map {G : Type u} {X : Type u_1} [monoid X] (f : category_theory.End (root' T) →* X) (a b : G) (p : a b) :
@[simp]
theorem is_free_groupoid.spanning_tree.functor_of_monoid_hom_obj {G : Type u} {X : Type u_1} [monoid X] (f : category_theory.End (root' T) →* X) (_x : G) :
noncomputable def is_free_groupoid.spanning_tree.End_is_free {G : Type u}  :

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.

Equations
theorem is_free_groupoid.path_nonempty_of_hom {G : Type u} {a b : G} :
nonempty (a b)nonempty (quiver.path (symgen a) (symgen 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.

@[protected, instance]
def is_free_groupoid.generators_connected (G : Type u) (r : G) :

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

@[protected, instance]
noncomputable def is_free_groupoid.End_is_free_of_connected_free {G : Type u_1} (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
@[protected, instance]
noncomputable def subgroup_is_free_of_is_free {G : Type u} [group G] (H : subgroup G) :

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

Equations