set c := t + 1 - b
case inr.inr
t n : ℕ
t1 : t + 1 - 1 = t
a : ℕ := n / (t + 1)
b : ℕ := n % (t + 1)
n2 : b < t + 1
n3 : t + 1 - b + b = t + 1
n1 : (t + 1 - b) * a + b * (a + 1) = n
hb : b = n % (t + 1)
hn : n > 0
hb' : b > 0
⊢ a ^ 2 * (t + 1 - b) + b * (a + 1) ^ 2 +
      (a ^ 2 * ((t + 1 - b) * (t + 1 - b - 1)) + 2 * (a * (a + 1) * b * (t + 1 - b)) + (a + 1) ^ 2 * (b * (b - 1))) =
    ((t + 1 - b) * a) ^ 2 + 2 * ((t + 1 - b) * a) * (b * (a + 1)) + (b * (a + 1)) ^ 2
case inr.inr
t n : ℕ
t1 : t + 1 - 1 = t
a : ℕ := n / (t + 1)
b : ℕ := n % (t + 1)
n2 : b < t + 1
hb : b = n % (t + 1)
hn : n > 0
hb' : b > 0
c : ℕ := t + 1 - b
n3 : c + b = t + 1
n1 : c * a + b * (a + 1) = n
⊢ a ^ 2 * c + b * (a + 1) ^ 2 + (a ^ 2 * (c * (c - 1)) + 2 * (a * (a + 1) * b * c) + (a + 1) ^ 2 * (b * (b - 1))) =
    (c * a) ^ 2 + 2 * (c * a) * (b * (a + 1)) + (b * (a + 1)) ^ 2