English
If coeff at n is nonzero, then valAux equals a p-power of preVal of that coeff and matches recursion.
Русский
Если коэффициент на позиции n не нулевой, то valAux равен степеням p на коэффициент и т.д.
LaTeX
$$If coeff ≠ 0 at n, then valAux = ModP.preVal(...)^{p^n}$$
Lean4
/-- The valuation `Perfection(O/(p)) → ℝ≥0` as a function.
Given `f ∈ Perfection(O/(p))`, if `f = 0` then output `0`;
otherwise output `preVal(f(n))^(p^n)` for any `n` such that `f(n) ≠ 0`. -/
noncomputable def valAux (f : PreTilt O p) : ℝ≥0 :=
if h : ∃ n, coeff _ _ n f ≠ 0 then ModP.preVal K v O p (coeff _ _ (Nat.find h) f) ^ p ^ Nat.find h else 0