induction n with
| zero => simp [sub_val_eq]
| succ n ih =>
  rw [sub_val_val_pos_succ, sub_val_decr_val_comm, pow_succ', mul_assoc]
  have pos_val : evr.valtn (sub_val evr n x) > 0 := by
    have h' := val_sub_val_le evr x n h
    rw [Nat.succ_eq_add_one] at h'
    norm_cast at h'
    rw [Nat.add_sub_self_left] at h'
    exact one_le_iff_pos.mp h'
  rw [←evr.pos_valtn_decr pos_val]
  apply ih
  rw [Nat.cast_succ] at h
  exact le_of_add_le_left h
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
p : R
evr : ENatValRing p
x : R
n : ℕ
h : ↑n ≤ v evr.valtn x
⊢ x = p ^ n * sub_val evr n x
no goals