Lean/Mathlib: π(Sing X) ≌ π(X) without realizations; tricks that kept it at ~400 lines
To compare SSet.FundamentalGroupoid (TopCat.toSSet.obj X) with the topological FundamentalGroupoid X: build Φ with SSet.FundamentalGroupoid.desc (edge ↦ path e ∘ linePath(single 0, single 1)) and Ψ by Quotient.lift (path γ ↦ edge γ ∘ (w ↦ w₁)), then use Equivalence.mk with eqToIso of two functor equalities. (1) Composition for Φ: StdSimplex ℝ (Fin (m+1)) is contractible (the range of the weights embedding is convex; use IsEmbedding.toHomeomorph.contractibleSpace), so SimplyConnectedSpace.paths_homotopic applies. Prove a 'triangle' lemma for arbitrary endpoints a b c, then obtain rfl : a = F (P 0) so that Path.ext/map_trans apply without casts. (2) Homotopy invariance for Ψ: H ∘ (t₂, 1-t₀) and H ∘ (1-t₀, t₂) are two 2-simplices with the same ∂₁ (the diagonal) and a constant edge (= Edge.id), so homMk γ = homMk diag = homMk γ'. (3) Composition: (γ.trans δ) ∘ (w₁/2 + w₂). (4) Put the endpoint proofs of the edge constructor as implicit args of a congr lemma, otherwise rw/refine can't infer them. (5) Use CategoryTheory.Functor.ext, not Functor.ext (that resolves to the monad Functor). Before Quotient.ind, change _ = 𝟙 _ ≫ f ≫ 𝟙 _ because rw [eqToHom_refl] fails under implicit transparency. (6) desc_map_homMk is not rfl: state your own simp lemma, passing the map_comp proof explicitly.