Theorem: QuaternionAlgebra.Basis.lift_mul
File: Mathlib/Algebra/QuaternionBasis.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ q.lift (x * y) = q.lift x * q.lift y
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re • 1 + x.imI • q.i + x.imJ • q.j + x.imK • q.k) * (y.re • 1 + y.imI • q.i + y.imJ • q.j + y.imK • q.k)
tactic: simp only [lift, Algebra.algebraMap_eq_smul_one]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re • 1 + x.imI • q.i + x.imJ • q.j + x.imK • q.k) * (y.re • 1 + y.imI • q.i + y.imJ • q.j + y.imK • q.k)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +
          ((x.imI * y.re) • q.i + (x.imI * y.imI) • (q.i * q.i) + (x.imI * y.imJ) • (q.i * q.j) +
            (x.imI * y.imK) • (q.i * q.k)) +
        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • (q.j * q.i) + (x.imJ * y.imJ) • (q.j * q.j) +
          (x.imJ * y.imK) • (q.j * q.k)) +
      ((x.imK * y.re) • q.k + (x.imK * y.imI) • (q.k * q.i) + (x.imK * y.imJ) • (q.k * q.j) +
        (x.imK * y.imK) • (q.k * q.k))
tactic: simp_rw [add_mul, mul_add, smul_mul_assoc, mul_smul_comm, one_mul, mul_one, smul_smul]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +
          ((x.imI * y.re) • q.i + (x.imI * y.imI) • (q.i * q.i) + (x.imI * y.imJ) • (q.i * q.j) +
            (x.imI * y.imK) • (q.i * q.k)) +
        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • (q.j * q.i) + (x.imJ * y.imJ) • (q.j * q.j) +
          (x.imJ * y.imK) • (q.j * q.k)) +
      ((x.imK * y.re) • q.k + (x.imK * y.imI) • (q.k * q.i) + (x.imK * y.imJ) • (q.k * q.j) +
        (x.imK * y.imK) • (q.k * q.k))
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +
          ((x.imI * y.re) • q.i + (x.imI * y.imI) • c₁ • 1 + (x.imI * y.imJ) • q.k + (x.imI * y.imK) • c₁ • q.j) +
        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • -q.k + (x.imJ * y.imJ) • c₂ • 1 + (x.imJ * y.imK) • -c₂ • q.i) +
      ((x.imK * y.re) • q.k + (x.imK * y.imI) • -c₁ • q.j + (x.imK * y.imJ) • c₂ • q.i +
        (x.imK * y.imK) • -((c₁ * c₂) • 1))
tactic: simp only [i_mul_i, j_mul_j, i_mul_j, j_mul_i, i_mul_k, k_mul_i, k_mul_j, j_mul_k, k_mul_k]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +
          ((x.imI * y.re) • q.i + (x.imI * y.imI) • c₁ • 1 + (x.imI * y.imJ) • q.k + (x.imI * y.imK) • c₁ • q.j) +
        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • -q.k + (x.imJ * y.imJ) • c₂ • 1 + (x.imJ * y.imK) • -c₂ • q.i) +
      ((x.imK * y.re) • q.k + (x.imK * y.imI) • -c₁ • q.j + (x.imK * y.imJ) • c₂ • q.i +
        (x.imK * y.imK) • -((c₁ * c₂) • 1))
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (x.imI * y.imI * c₁) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (x.imI * y.imK * c₁) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((x.imK * y.imI * c₁) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((x.imK * y.imK * (c₁ * c₂)) • 1)
tactic: simp only [smul_smul, smul_neg, sub_eq_add_neg, add_smul, ← add_assoc, mul_neg, neg_smul]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (x.imI * y.imI * c₁) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (x.imI * y.imK * c₁) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((x.imK * y.imI * c₁) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((x.imK * y.imK * (c₁ * c₂)) • 1)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (x.imI * y.imI * c₁) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (x.imI * y.imK * c₁) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((x.imK * y.imI * c₁) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
tactic: simp only [mul_right_comm _ _ (c₁ * c₂), mul_comm _ (c₁ * c₂)]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (x.imI * y.imI * c₁) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (x.imI * y.imK * c₁) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((x.imK * y.imI * c₁) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * (x.imI * y.imI)) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * (x.imI * y.imK)) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * (x.imK * y.imI)) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
tactic: simp only [mul_comm _ c₁, mul_right_comm _ _ c₁]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * (x.imI * y.imI)) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * (x.imI * y.imK)) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (x.imJ * y.imJ * c₂) • 1 +
              -((x.imJ * y.imK * c₂) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * (x.imK * y.imI)) • q.j) +
        (x.imK * y.imJ * c₂) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * (x.imI * y.imI)) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * (x.imI * y.imK)) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * (x.imJ * y.imJ)) • 1 +
              -((c₂ * (x.imJ * y.imK)) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * (x.imK * y.imI)) • q.j) +
        (c₂ * (x.imK * y.imJ)) • q.i +
      -((c₂ * c₁ * x.imK * y.imK) • 1)
tactic: simp only [mul_comm _ c₂, mul_right_comm _ _ c₂]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * (x.imI * y.imI)) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * (x.imI * y.imK)) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * (x.imJ * y.imJ)) • 1 +
              -((c₂ * (x.imJ * y.imK)) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * (x.imK * y.imI)) • q.j) +
        (c₂ * (x.imK * y.imJ)) • q.i +
      -((c₂ * c₁ * x.imK * y.imK) • 1)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * x.imI * y.imI) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * x.imI * y.imK) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * x.imJ * y.imJ) • 1 +
              -((c₂ * x.imJ * y.imK) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * x.imK * y.imI) • q.j) +
        (c₂ * x.imK * y.imJ) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
tactic: simp only [← mul_comm c₁ c₂, ← mul_assoc]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * x.imI * y.imI) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * x.imI * y.imK) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * x.imJ * y.imJ) • 1 +
              -((c₂ * x.imJ * y.imK) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * x.imK * y.imI) • q.j) +
        (c₂ * x.imK * y.imJ) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
state_after: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x.re * y.re) • 1 + (c₁ * x.imI * y.imI) • 1 + (c₂ * x.imJ * y.imJ) • 1 + -((c₁ * c₂ * x.imK * y.imK) • 1) +
                            (x.re * y.imI) • q.i +
                          (x.imI * y.re) • q.i +
                        -((c₂ * x.imJ * y.imK) • q.i) +
                      (c₂ * x.imK * y.imJ) • q.i +
                    (x.re * y.imJ) • q.j +
                  (c₁ * x.imI * y.imK) • q.j +
                (x.imJ * y.re) • q.j +
              -((c₁ * x.imK * y.imI) • q.j) +
            (x.re * y.imK) • q.k +
          (x.imI * y.imJ) • q.k +
        -((x.imJ * y.imI) • q.k) +
      (x.imK * y.re) • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * x.imI * y.imI) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * x.imI * y.imK) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * x.imJ * y.imJ) • 1 +
              -((c₂ * x.imJ * y.imK) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * x.imK * y.imI) • q.j) +
        (c₂ * x.imK * y.imJ) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
tactic: simp only [mul_re, sub_eq_add_neg, add_smul, neg_smul, mul_imI, ← add_assoc, mul_imJ, mul_imK]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
x y : ℍ[R,c₁,c₂]
⊢ (x.re * y.re) • 1 + (c₁ * x.imI * y.imI) • 1 + (c₂ * x.imJ * y.imJ) • 1 + -((c₁ * c₂ * x.imK * y.imK) • 1) +
                            (x.re * y.imI) • q.i +
                          (x.imI * y.re) • q.i +
                        -((c₂ * x.imJ * y.imK) • q.i) +
                      (c₂ * x.imK * y.imJ) • q.i +
                    (x.re * y.imJ) • q.j +
                  (c₁ * x.imI * y.imK) • q.j +
                (x.imJ * y.re) • q.j +
              -((c₁ * x.imK * y.imI) • q.j) +
            (x.re * y.imK) • q.k +
          (x.imI * y.imJ) • q.k +
        -((x.imJ * y.imI) • q.k) +
      (x.imK * y.re) • q.k =
    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +
                          (c₁ * x.imI * y.imI) • 1 +
                        (x.imI * y.imJ) • q.k +
                      (c₁ * x.imI * y.imK) • q.j +
                    (x.imJ * y.re) • q.j +
                  -((x.imJ * y.imI) • q.k) +
                (c₂ * x.imJ * y.imJ) • 1 +
              -((c₂ * x.imJ * y.imK) • q.i) +
            (x.imK * y.re) • q.k +
          -((c₁ * x.imK * y.imI) • q.j) +
        (c₂ * x.imK * y.imJ) • q.i +
      -((c₁ * c₂ * x.imK * y.imK) • 1)
state_after: no goals
tactic: abel