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

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

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

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

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

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

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

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

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

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

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

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