by_cases hjk : j = k <;>
  simp only [hjk, (Nat.eq_zero_of_le_zero (le_of_le_of_eq (trunc_lec w k) hk)),
    zero_le', if_false]
case intro.refine_2
n d : ℕ
inst✝ : NeZero d
w : Weight n d
hE : E (trunc w) = E w
k : Fin (Nat.succ n)
hk : w k = 0
w' : Weight n d := Function.update (trunc w) k 1
j✝ : Fin (Nat.succ n)
hj : E w < w j✝
hsum' : Weight.sum w' = Weight.sum (trunc w) + 1
hE' : E w' = E (trunc w)
j : Fin (Nat.succ n)
⊢ trunc w j ≤ if j = k then 1 else trunc w j
case neg
n d : ℕ
inst✝ : NeZero d
w : Weight n d
hE : E (trunc w) = E w
k : Fin (Nat.succ n)
hk : w k = 0
w' : Weight n d := Function.update (trunc w) k 1
j✝ : Fin (Nat.succ n)
hj : E w < w j✝
hsum' : Weight.sum w' = Weight.sum (trunc w) + 1
hE' : E w' = E (trunc w)
j : Fin (Nat.succ n)
hjk : ¬j = k
⊢ trunc w j ≤ trunc w j