Theorem: ℤθ.my_right_distrib (Mordell4/CubicRing.lean)

State before:
a b c : ℤθ
⊢ mul (add a b) c = add (mul a c) (mul b c)
Tactic:
cases a
State after:
case mk
b c : ℤθ
f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝, g := g✝, h := h✝ } b) c = add (mul { f := f✝, g := g✝, h := h✝ } c) (mul b c)

State before:
case mk
b c : ℤθ
f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝, g := g✝, h := h✝ } b) c = add (mul { f := f✝, g := g✝, h := h✝ } c) (mul b c)
Tactic:
cases b
State after:
case mk.mk
c : ℤθ
f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝¹, g := g✝¹, h := h✝¹ } { f := f✝, g := g✝, h := h✝ }) c =
    add (mul { f := f✝¹, g := g✝¹, h := h✝¹ } c) (mul { f := f✝, g := g✝, h := h✝ } c)

State before:
case mk.mk
c : ℤθ
f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝¹, g := g✝¹, h := h✝¹ } { f := f✝, g := g✝, h := h✝ }) c =
    add (mul { f := f✝¹, g := g✝¹, h := h✝¹ } c) (mul { f := f✝, g := g✝, h := h✝ } c)
Tactic:
cases c
State after:
case mk.mk.mk
f✝² g✝² h✝² f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝², g := g✝², h := h✝² } { f := f✝¹, g := g✝¹, h := h✝¹ }) { f := f✝, g := g✝, h := h✝ } =
    add (mul { f := f✝², g := g✝², h := h✝² } { f := f✝, g := g✝, h := h✝ })
      (mul { f := f✝¹, g := g✝¹, h := h✝¹ } { f := f✝, g := g✝, h := h✝ })

State before:
case mk.mk.mk
f✝² g✝² h✝² f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ mul (add { f := f✝², g := g✝², h := h✝² } { f := f✝¹, g := g✝¹, h := h✝¹ }) { f := f✝, g := g✝, h := h✝ } =
    add (mul { f := f✝², g := g✝², h := h✝² } { f := f✝, g := g✝, h := h✝ })
      (mul { f := f✝¹, g := g✝¹, h := h✝¹ } { f := f✝, g := g✝, h := h✝ })
Tactic:
simp only [mul, add]
State after:
case mk.mk.mk
f✝² g✝² h✝² f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ { f := (f✝² + f✝¹) * f✝ + 6 * (h✝² + h✝¹) * h✝ - 2 * (g✝² + g✝¹) * h✝ - 2 * (h✝² + h✝¹) * g✝,
      g := (f✝² + f✝¹) * g✝ + (g✝² + g✝¹) * f✝ + 16 * (h✝² + h✝¹) * h✝ - 6 * (g✝² + g✝¹) * h✝ - 6 * (h✝² + h✝¹) * g✝,
      h :=
        (f✝² + f✝¹) * h✝ + (h✝² + h✝¹) * f✝ + (g✝² + g✝¹) * g✝ + 3 * (h✝² + h✝¹) * h✝ - 3 * (g✝² + g✝¹) * h✝ -
          3 * (h✝² + h✝¹) * g✝ } =
    {
      f :=
        f✝² * f✝ + 6 * h✝² * h✝ - 2 * g✝² * h✝ - 2 * h✝² * g✝ + (f✝¹ * f✝ + 6 * h✝¹ * h✝ - 2 * g✝¹ * h✝ - 2 * h✝¹ * g✝),
      g :=
        f✝² * g✝ + g✝² * f✝ + 16 * h✝² * h✝ - 6 * g✝² * h✝ - 6 * h✝² * g✝ +
          (f✝¹ * g✝ + g✝¹ * f✝ + 16 * h✝¹ * h✝ - 6 * g✝¹ * h✝ - 6 * h✝¹ * g✝),
      h :=
        f✝² * h✝ + h✝² * f✝ + g✝² * g✝ + 3 * h✝² * h✝ - 3 * g✝² * h✝ - 3 * h✝² * g✝ +
          (f✝¹ * h✝ + h✝¹ * f✝ + g✝¹ * g✝ + 3 * h✝¹ * h✝ - 3 * g✝¹ * h✝ - 3 * h✝¹ * g✝) }

State before:
case mk.mk.mk
f✝² g✝² h✝² f✝¹ g✝¹ h✝¹ f✝ g✝ h✝ : ℤ
⊢ { f := (f✝² + f✝¹) * f✝ + 6 * (h✝² + h✝¹) * h✝ - 2 * (g✝² + g✝¹) * h✝ - 2 * (h✝² + h✝¹) * g✝,
      g := (f✝² + f✝¹) * g✝ + (g✝² + g✝¹) * f✝ + 16 * (h✝² + h✝¹) * h✝ - 6 * (g✝² + g✝¹) * h✝ - 6 * (h✝² + h✝¹) * g✝,
      h :=
        (f✝² + f✝¹) * h✝ + (h✝² + h✝¹) * f✝ + (g✝² + g✝¹) * g✝ + 3 * (h✝² + h✝¹) * h✝ - 3 * (g✝² + g✝¹) * h✝ -
          3 * (h✝² + h✝¹) * g✝ } =
    {
      f :=
        f✝² * f✝ + 6 * h✝² * h✝ - 2 * g✝² * h✝ - 2 * h✝² * g✝ + (f✝¹ * f✝ + 6 * h✝¹ * h✝ - 2 * g✝¹ * h✝ - 2 * h✝¹ * g✝),
      g :=
        f✝² * g✝ + g✝² * f✝ + 16 * h✝² * h✝ - 6 * g✝² * h✝ - 6 * h✝² * g✝ +
          (f✝¹ * g✝ + g✝¹ * f✝ + 16 * h✝¹ * h✝ - 6 * g✝¹ * h✝ - 6 * h✝¹ * g✝),
      h :=
        f✝² * h✝ + h✝² * f✝ + g✝² * g✝ + 3 * h✝² * h✝ - 3 * g✝² * h✝ - 3 * h✝² * g✝ +
          (f✝¹ * h✝ + h✝¹ * f✝ + g✝¹ * g✝ + 3 * h✝¹ * h✝ - 3 * g✝¹ * h✝ - 3 * h✝¹ * g✝) }
Tactic:
ring
State after:
no goals