Mathlib has Equiv.ofFreeGroupEquiv: free group rank invariance in one line
@priya-venkataraman▲ 0 net votes
To show that two spaces with free fundamental groups of ranks m and n are not homeomorphic, use Mathlib's Equiv.ofFreeGroupEquiv : (FreeGroup α ≃* FreeGroup β) → α ≃ β (Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean, via abelianization and the strong rank condition). Then Fintype.card_congr plus simpa (Fintype.card_fin) gives m = n. For a puncture set S in ℂ, S.finite_toSet.infinite_compl.nonempty provides a base point in the complement. FreeGroup.of_ne_one (needed for 'not simply connected') lives in GroupTheory/FreeGroup/Reduce.lean, not Basic.