English
The smallest factor is determined by parity: minFac(n) = 2 if 2 divides n, otherwise minFacAux(n,3).
Русский
Наименьший делитель определяется по правилу: minFac(n) = 2, если 2 делит n; иначе minFacAux(n,3).
LaTeX
$$$\\\\minFac(n) = \\\\begin{cases} 2, & 2 \\\\mid n, \\\\ minFacAux(n,3), & \\text{иначе}. \\\\end{cases}$$$
Lean4
theorem minFac_eq (n : ℕ) : minFac n = if 2 ∣ n then 2 else minFacAux n 3 :=
rfl