Theorem: FreeModule.add_assoc_aux (UnitConjecture/FreeModule.lean)

State before:
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂ x₃ : R[X]
⊢ Quotient.mk (formalSumSetoid R X) s₁ + x₂ + x₃ = Quotient.mk (formalSumSetoid R X) s₁ + (x₂ + x₃)
Tactic:
apply @Quotient.ind₂ (motive := fun x₂ x₃ : R[X] => (⟦s₁⟧ + x₂) + x₃ = ⟦s₁⟧ + (x₂ + x₃))
State after:
case h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂ x₃ : R[X]
⊢ ∀ (a b : FormalSum R X),
    Quotient.mk (formalSumSetoid R X) s₁ + Quotient.mk (formalSumSetoid R X) a + Quotient.mk (formalSumSetoid R X) b =
      Quotient.mk (formalSumSetoid R X) s₁ + (Quotient.mk (formalSumSetoid R X) a + Quotient.mk (formalSumSetoid R X) b)

State before:
case h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂ x₃ : R[X]
⊢ ∀ (a b : FormalSum R X),
    Quotient.mk (formalSumSetoid R X) s₁ + Quotient.mk (formalSumSetoid R X) a + Quotient.mk (formalSumSetoid R X) b =
      Quotient.mk (formalSumSetoid R X) s₁ + (Quotient.mk (formalSumSetoid R X) a + Quotient.mk (formalSumSetoid R X) b)
Tactic:
intro x₂ x₃
State after:
case h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ Quotient.mk (formalSumSetoid R X) s₁ + Quotient.mk (formalSumSetoid R X) x₂ + Quotient.mk (formalSumSetoid R X) x₃ =
    Quotient.mk (formalSumSetoid R X) s₁ + (Quotient.mk (formalSumSetoid R X) x₂ + Quotient.mk (formalSumSetoid R X) x₃)

State before:
case h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ Quotient.mk (formalSumSetoid R X) s₁ + Quotient.mk (formalSumSetoid R X) x₂ + Quotient.mk (formalSumSetoid R X) x₃ =
    Quotient.mk (formalSumSetoid R X) s₁ + (Quotient.mk (formalSumSetoid R X) x₂ + Quotient.mk (formalSumSetoid R X) x₃)
Tactic:
apply Quotient.sound
State after:
case h.a
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ s₁ ++ x₂ ++ x₃ ≈ s₁ ++ (x₂ ++ x₃)

State before:
case h.a
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ s₁ ++ x₂ ++ x₃ ≈ s₁ ++ (x₂ ++ x₃)
Tactic:
apply funext
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ ∀ (x : X), coords (s₁ ++ x₂ ++ x₃) x = coords (s₁ ++ (x₂ ++ x₃)) x

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
⊢ ∀ (x : X), coords (s₁ ++ x₂ ++ x₃) x = coords (s₁ ++ (x₂ ++ x₃)) x
Tactic:
intro x₀
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords (s₁ ++ x₂ ++ x₃) x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords (s₁ ++ x₂ ++ x₃) x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀
Tactic:
rw [← append_coords]
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords (s₁ ++ x₂) x₀ + coords x₃ x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords (s₁ ++ x₂) x₀ + coords x₃ x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀
Tactic:
rw [← append_coords]
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords (s₁ ++ (x₂ ++ x₃)) x₀
Tactic:
rw [← append_coords]
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords s₁ x₀ + coords (x₂ ++ x₃) x₀

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords s₁ x₀ + coords (x₂ ++ x₃) x₀
Tactic:
rw [← append_coords]
State after:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords s₁ x₀ + (coords x₂ x₀ + coords x₃ x₀)

State before:
case h.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
s₁ : FormalSum R X
x₂✝ x₃✝ : R[X]
x₂ x₃ : FormalSum R X
x₀ : X
⊢ coords s₁ x₀ + coords x₂ x₀ + coords x₃ x₀ = coords s₁ x₀ + (coords x₂ x₀ + coords x₃ x₀)
Tactic:
simp [add_assoc]
State after:
no goals