rw [Nat.add_succ, Nat.succ_add, Nat.succ_eq_add_one]
case zero.succ.refine'_1
n : ℕ
stmt : Variable → Variable → ℕ → LoopProgram
h_stmt : stmt = add ∨ stmt = sub
y' : ℕ
⊢ stmt { index := 0 } { index := y' } n ∈ ofLen (Nat.zero + Nat.succ y' + n)

case zero.succ.refine'_2
n : ℕ
stmt : Variable → Variable → ℕ → LoopProgram
h_stmt : stmt = add ∨ stmt = sub
y' : ℕ
⊢ stmt { index := Nat.zero } { index := Nat.succ y' } n ∈ extendLenOne (stmt { index := 0 } { index := y' } n)
case zero.succ.refine'_1
n : ℕ
stmt : Variable → Variable → ℕ → LoopProgram
h_stmt : stmt = add ∨ stmt = sub
y' : ℕ
⊢ stmt { index := 0 } { index := y' } n ∈ ofLen (Nat.zero + y' + n + 1)

case zero.succ.refine'_2
n : ℕ
stmt : Variable → Variable → ℕ → LoopProgram
h_stmt : stmt = add ∨ stmt = sub
y' : ℕ
⊢ stmt { index := Nat.zero } { index := Nat.succ y' } n ∈ extendLenOne (stmt { index := 0 } { index := y' } n)