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

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

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

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

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

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

State before:
case a.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
a b : R
x : R[X]
s : FormalSum R X
x₀ : X
⊢ coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀
Tactic:
let l := act_sum a b s
State after:
case a.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
a b : R
x : R[X]
s : FormalSum R X
x₀ : X
l : scmul a s ++ scmul b s ≈ scmul (a + b) s := act_sum a b s
⊢ coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀

State before:
case a.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
a b : R
x : R[X]
s : FormalSum R X
x₀ : X
l : scmul a s ++ scmul b s ≈ scmul (a + b) s := act_sum a b s
⊢ coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀
Tactic:
let l'' := congrFun l x₀
State after:
case a.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
a b : R
x : R[X]
s : FormalSum R X
x₀ : X
l : scmul a s ++ scmul b s ≈ scmul (a + b) s := act_sum a b s
l'' : coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀ := congrFun l x₀
⊢ coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀

State before:
case a.a.h
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
a b : R
x : R[X]
s : FormalSum R X
x₀ : X
l : scmul a s ++ scmul b s ≈ scmul (a + b) s := act_sum a b s
l'' : coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀ := congrFun l x₀
⊢ coords (scmul a s ++ scmul b s) x₀ = coords (scmul (a + b) s) x₀
Tactic:
exact l''
State after:
no goals