File: Mathlib/Algebra/Quaternion.lean

full_name: QuaternionAlgebra.imI
code: /-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `imI`, `imJ`, and `imK`. -/
@[ext]
structure QuaternionAlgebra (R : Type*) (a b : R) where
  /-- Real part of a quaternion. -/
  re : R
  imI : R
  imJ : R
  imK : R
goal: R

full_name: QuaternionAlgebra.imJ
code: /-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `imI`, `imJ`, and `imK`. -/
@[ext]
structure QuaternionAlgebra (R : Type*) (a b : R) where
  /-- Real part of a quaternion. -/
  re : R
  imI : R
  imJ : R
  imK : R
goal: R

full_name: QuaternionAlgebra.imK
code: /-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `imI`, `imJ`, and `imK`. -/
@[ext]
structure QuaternionAlgebra (R : Type*) (a b : R) where
  /-- Real part of a quaternion. -/
  re : R
  imI : R
  imJ : R
  imK : R
goal: R

full_name: QuaternionAlgebra
code: /-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `imI`, `imJ`, and `imK`. -/
@[ext]
structure QuaternionAlgebra (R : Type*) (a b : R) where
  /-- Real part of a quaternion. -/
  re : R
  imI : R
  imJ : R
  imK : R
goal: Type u_1

full_name: QuaternionAlgebra.re
code: /-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `imI`, `imJ`, and `imK`. -/
@[ext]
structure QuaternionAlgebra (R : Type*) (a b : R) where
  /-- Real part of a quaternion. -/
  re : R
  imI : R
  imJ : R
  imK : R
goal: R

full_name: Quaternion._aux_Mathlib_Algebra_Quaternion___unexpand_QuaternionAlgebra_1
code: @[inherit_doc]
scoped[Quaternion] notation "ℍ[" R "," a "," b "]" => QuaternionAlgebra R a b
goal: Lean.PrettyPrinter.Unexpander

full_name: Quaternion.«_aux_Mathlib_Algebra_Quaternion___macroRules_Quaternion_termℍ[_,_,_]_1»
code: @[inherit_doc]
scoped[Quaternion] notation "ℍ[" R "," a "," b "]" => QuaternionAlgebra R a b
goal: Lean.Macro

full_name: QuaternionAlgebra.equivProd
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: ℍ[R,c₁,c₂] ≃ R × R × R × R

full_name: QuaternionAlgebra.equivProd_symm_apply_imJ
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: ((QuaternionAlgebra.equivProd c₁ c₂).symm a).imJ = a.2.2.1

full_name: QuaternionAlgebra.equivProd_symm_apply_imK
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: ((QuaternionAlgebra.equivProd c₁ c₂).symm a).imK = a.2.2.2

full_name: QuaternionAlgebra.equivProd_apply
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: (QuaternionAlgebra.equivProd c₁ c₂) a = (a.re, a.imI, a.imJ, a.imK)

full_name: QuaternionAlgebra.equivProd_symm_apply_re
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: ((QuaternionAlgebra.equivProd c₁ c₂).symm a).re = a.1

full_name: QuaternionAlgebra.equivProd_symm_apply_imI
code: /-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R 
goal: ((QuaternionAlgebra.equivProd c₁ c₂).symm a).imI = a.2.1

full_name: QuaternionAlgebra.equivTuple
code: /-- The equivalence between a quaternion algebra over `R` and `Fin 4 → R`. -/
@[simps symm_apply]
def equivTuple {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ (Fin 4 → R) 
goal: ℍ[R,c₁,c₂] ≃ (Fin 4 → R)

full_name: QuaternionAlgebra.equivTuple_symm_apply
code: /-- The equivalence between a quaternion algebra over `R` and `Fin 4 → R`. -/
@[simps symm_apply]
def equivTuple {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ (Fin 4 → R) 
goal: (QuaternionAlgebra.equivTuple c₁ c₂).symm a = { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }

full_name: QuaternionAlgebra.equivTuple_apply
code: @[simp]
theorem equivTuple_apply {R : Type*} (c₁ c₂ : R) (x : ℍ[R,c₁,c₂]) :
    equivTuple c₁ c₂ x = ![x.re, x.imI, x.imJ, x.imK] 
goal: (QuaternionAlgebra.equivTuple c₁ c₂) x = ![x.re, x.imI, x.imJ, x.imK]

full_name: QuaternionAlgebra.mk.eta
code: @[simp]
theorem mk.eta {R : Type*} {c₁ c₂} (a : ℍ[R,c₁,c₂]) : mk a.1 a.2 a.3 a.4 = a 
goal: { re := a.re, imI := a.imI, imJ := a.imJ, imK := a.imK } = a

full_name: QuaternionAlgebra.instSubsingleton
code: instance [Subsingleton R] : Subsingleton ℍ[R, c₁, c₂] 
goal: Subsingleton ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instNontrivial
code: instance [Nontrivial R] : Nontrivial ℍ[R, c₁, c₂] 
goal: Nontrivial ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.im
code: /-- The imaginary part of a quaternion. -/
def im (x : ℍ[R,c₁,c₂]) : ℍ[R,c₁,c₂] 
goal: ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.im_re
code: @[simp]
theorem im_re : a.im.re = 0 
goal: a.im.re = 0

full_name: QuaternionAlgebra.im_imI
code: @[simp]
theorem im_imI : a.im.imI = a.imI 
goal: a.im.imI = a.imI

full_name: QuaternionAlgebra.im_imJ
code: @[simp]
theorem im_imJ : a.im.imJ = a.imJ 
goal: a.im.imJ = a.imJ

full_name: QuaternionAlgebra.im_imK
code: @[simp]
theorem im_imK : a.im.imK = a.imK 
goal: a.im.imK = a.imK

full_name: QuaternionAlgebra.im_idem
code: @[simp]
theorem im_idem : a.im.im = a.im 
goal: a.im.im = a.im

full_name: QuaternionAlgebra.coe
code: /-- Coercion `R → ℍ[R,c₁,c₂]`. -/
@[coe] def coe (x : R) : ℍ[R,c₁,c₂] 
goal: ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instCoeTC
code: instance : CoeTC R ℍ[R,c₁,c₂] 
goal: CoeTC R ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.coe_re
code: @[simp, norm_cast]
theorem coe_re : (x : ℍ[R,c₁,c₂]).re = x 
goal: (↑x).re = x

full_name: QuaternionAlgebra.coe_imI
code: @[simp, norm_cast]
theorem coe_imI : (x : ℍ[R,c₁,c₂]).imI = 0 
goal: (↑x).imI = 0

full_name: QuaternionAlgebra.coe_imJ
code: @[simp, norm_cast]
theorem coe_imJ : (x : ℍ[R,c₁,c₂]).imJ = 0 
goal: (↑x).imJ = 0

full_name: QuaternionAlgebra.coe_imK
code: @[simp, norm_cast]
theorem coe_imK : (x : ℍ[R,c₁,c₂]).imK = 0 
goal: (↑x).imK = 0

full_name: QuaternionAlgebra.coe_injective
code: theorem coe_injective : Function.Injective (coe : R → ℍ[R,c₁,c₂]) 
goal: Function.Injective QuaternionAlgebra.coe

full_name: QuaternionAlgebra.coe_inj
code: @[simp]
theorem coe_inj {x y : R} : (x : ℍ[R,c₁,c₂]) = y ↔ x = y 
goal: ↑x = ↑y ↔ x = y

full_name: QuaternionAlgebra.instZero
code: instance : Zero ℍ[R,c₁,c₂] 
goal: Zero ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.zero_re
code: @[simp] theorem zero_re : (0 : ℍ[R,c₁,c₂]).re = 0 
goal: Quaternion.re 0 = 0

full_name: QuaternionAlgebra.zero_imI
code: @[simp] theorem zero_imI : (0 : ℍ[R,c₁,c₂]).imI = 0 
goal: Quaternion.imI 0 = 0

full_name: QuaternionAlgebra.zero_imJ
code: @[simp] theorem zero_imJ : (0 : ℍ[R,c₁,c₂]).imJ = 0 
goal: Quaternion.imJ 0 = 0

full_name: QuaternionAlgebra.zero_imK
code: @[simp] theorem zero_imK : (0 : ℍ[R,c₁,c₂]).imK = 0 
goal: Quaternion.imK 0 = 0

full_name: QuaternionAlgebra.zero_im
code: @[simp] theorem zero_im : (0 : ℍ[R,c₁,c₂]).im = 0 
goal: QuaternionAlgebra.im 0 = 0

full_name: QuaternionAlgebra.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ((0 : R) : ℍ[R,c₁,c₂]) = 0 
goal: ↑0 = 0

full_name: QuaternionAlgebra.instInhabited
code: instance : Inhabited ℍ[R,c₁,c₂] 
goal: Inhabited ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instOne
code: instance : One ℍ[R,c₁,c₂] 
goal: One ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.one_re
code: @[simp] theorem one_re : (1 : ℍ[R,c₁,c₂]).re = 1 
goal: Quaternion.re 1 = 1

full_name: QuaternionAlgebra.one_imI
code: @[simp] theorem one_imI : (1 : ℍ[R,c₁,c₂]).imI = 0 
goal: Quaternion.imI 1 = 0

full_name: QuaternionAlgebra.one_imJ
code: @[simp] theorem one_imJ : (1 : ℍ[R,c₁,c₂]).imJ = 0 
goal: Quaternion.imJ 1 = 0

full_name: QuaternionAlgebra.one_imK
code: @[simp] theorem one_imK : (1 : ℍ[R,c₁,c₂]).imK = 0 
goal: Quaternion.imK 1 = 0

full_name: QuaternionAlgebra.one_im
code: @[simp] theorem one_im : (1 : ℍ[R,c₁,c₂]).im = 0 
goal: QuaternionAlgebra.im 1 = 0

full_name: QuaternionAlgebra.coe_one
code: @[simp, norm_cast]
theorem coe_one : ((1 : R) : ℍ[R,c₁,c₂]) = 1 
goal: ↑1 = 1

full_name: QuaternionAlgebra.instAdd
code: instance : Add ℍ[R,c₁,c₂] 
goal: Add ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.add_re
code: @[simp] theorem add_re : (a + b).re = a.re + b.re 
goal: (a + b).re = a.re + b.re

full_name: QuaternionAlgebra.add_imI
code: @[simp] theorem add_imI : (a + b).imI = a.imI + b.imI 
goal: (a + b).imI = a.imI + b.imI

full_name: QuaternionAlgebra.add_imJ
code: @[simp] theorem add_imJ : (a + b).imJ = a.imJ + b.imJ 
goal: (a + b).imJ = a.imJ + b.imJ

full_name: QuaternionAlgebra.add_imK
code: @[simp] theorem add_imK : (a + b).imK = a.imK + b.imK 
goal: (a + b).imK = a.imK + b.imK

full_name: QuaternionAlgebra.add_im
code: @[simp] theorem add_im : (a + b).im = a.im + b.im 
goal: (a + b).im = a.im + b.im

full_name: QuaternionAlgebra.mk_add_mk
code: @[simp]
theorem mk_add_mk (a₁ a₂ a₃ a₄ b₁ b₂ b₃ b₄ : R) :
    (mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) + mk b₁ b₂ b₃ b₄ = mk (a₁ + b₁) (a₂ + b₂) (a₃ + b₃) (a₄ + b₄) 
goal: { re := a₁, imI := a₂, imJ := a₃, imK := a₄ } + { re := b₁, imI := b₂, imJ := b₃, imK := b₄ } =
  { re := a₁ + b₁, imI := a₂ + b₂, imJ := a₃ + b₃, imK := a₄ + b₄ }

full_name: QuaternionAlgebra.coe_add
code: @[simp, norm_cast]
theorem coe_add : ((x + y : R) : ℍ[R,c₁,c₂]) = x + y 
goal: ↑(x + y) = ↑x + ↑y

full_name: QuaternionAlgebra.instNeg
code: instance : Neg ℍ[R,c₁,c₂] 
goal: Neg ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.neg_re
code: @[simp] theorem neg_re : (-a).re = -a.re 
goal: (-a).re = -a.re

full_name: QuaternionAlgebra.neg_imI
code: @[simp] theorem neg_imI : (-a).imI = -a.imI 
goal: (-a).imI = -a.imI

full_name: QuaternionAlgebra.neg_imJ
code: @[simp] theorem neg_imJ : (-a).imJ = -a.imJ 
goal: (-a).imJ = -a.imJ

full_name: QuaternionAlgebra.neg_imK
code: @[simp] theorem neg_imK : (-a).imK = -a.imK 
goal: (-a).imK = -a.imK

full_name: QuaternionAlgebra.neg_im
code: @[simp] theorem neg_im : (-a).im = -a.im 
goal: (-a).im = -a.im

full_name: QuaternionAlgebra.neg_mk
code: @[simp]
theorem neg_mk (a₁ a₂ a₃ a₄ : R) : -(mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) = ⟨-a₁, -a₂, -a₃, -a₄⟩ 
goal: -{ re := a₁, imI := a₂, imJ := a₃, imK := a₄ } = { re := -a₁, imI := -a₂, imJ := -a₃, imK := -a₄ }

full_name: QuaternionAlgebra.coe_neg
code: @[simp, norm_cast]
theorem coe_neg : ((-x : R) : ℍ[R,c₁,c₂]) = -x 
goal: ↑(-x) = -↑x

full_name: QuaternionAlgebra.instSub
code: instance : Sub ℍ[R,c₁,c₂] 
goal: Sub ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.sub_re
code: @[simp] theorem sub_re : (a - b).re = a.re - b.re 
goal: (a - b).re = a.re - b.re

full_name: QuaternionAlgebra.sub_imI
code: @[simp] theorem sub_imI : (a - b).imI = a.imI - b.imI 
goal: (a - b).imI = a.imI - b.imI

full_name: QuaternionAlgebra.sub_imJ
code: @[simp] theorem sub_imJ : (a - b).imJ = a.imJ - b.imJ 
goal: (a - b).imJ = a.imJ - b.imJ

full_name: QuaternionAlgebra.sub_imK
code: @[simp] theorem sub_imK : (a - b).imK = a.imK - b.imK 
goal: (a - b).imK = a.imK - b.imK

full_name: QuaternionAlgebra.sub_im
code: @[simp] theorem sub_im : (a - b).im = a.im - b.im 
goal: (a - b).im = a.im - b.im

full_name: QuaternionAlgebra.mk_sub_mk
code: @[simp]
theorem mk_sub_mk (a₁ a₂ a₃ a₄ b₁ b₂ b₃ b₄ : R) :
    (mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) - mk b₁ b₂ b₃ b₄ = mk (a₁ - b₁) (a₂ - b₂) (a₃ - b₃) (a₄ - b₄) 
goal: { re := a₁, imI := a₂, imJ := a₃, imK := a₄ } - { re := b₁, imI := b₂, imJ := b₃, imK := b₄ } =
  { re := a₁ - b₁, imI := a₂ - b₂, imJ := a₃ - b₃, imK := a₄ - b₄ }

full_name: QuaternionAlgebra.coe_im
code: @[simp, norm_cast]
theorem coe_im : (x : ℍ[R,c₁,c₂]).im = 0 
goal: (↑x).im = 0

full_name: QuaternionAlgebra.re_add_im
code: @[simp]
theorem re_add_im : ↑a.re + a.im = a 
goal: ↑a.re + a.im = a

full_name: QuaternionAlgebra.sub_self_im
code: @[simp]
theorem sub_self_im : a - a.im = a.re 
goal: a - a.im = ↑a.re

full_name: QuaternionAlgebra.sub_self_re
code: @[simp]
theorem sub_self_re : a - a.re = a.im 
goal: a - ↑a.re = a.im

full_name: QuaternionAlgebra.instMul
code: /-- Multiplication is given by

* `1 * x = x * 1 = x`;
* `i * i = c₁`;
* `j * j = c₂`;
* `i * j = k`, `j * i = -k`;
* `k * k = -c₁ * c₂`;
* `i * k = c₁ * j`, `k * i = -c₁ * j`;
* `j * k = -c₂ * i`, `k * j = c₂ * i`.  -/
instance : Mul ℍ[R,c₁,c₂] 
goal: Mul ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.mul_re
code: @[simp]
theorem mul_re : (a * b).re = a.1 * b.1 + c₁ * a.2 * b.2 + c₂ * a.3 * b.3 - c₁ * c₂ * a.4 * b.4 
goal: (a * b).re = a.re * b.re + c₁ * a.imI * b.imI + c₂ * a.imJ * b.imJ - c₁ * c₂ * a.imK * b.imK

full_name: QuaternionAlgebra.mul_imI
code: @[simp]
theorem mul_imI : (a * b).imI = a.1 * b.2 + a.2 * b.1 - c₂ * a.3 * b.4 + c₂ * a.4 * b.3 
goal: (a * b).imI = a.re * b.imI + a.imI * b.re - c₂ * a.imJ * b.imK + c₂ * a.imK * b.imJ

full_name: QuaternionAlgebra.mul_imJ
code: @[simp]
theorem mul_imJ : (a * b).imJ = a.1 * b.3 + c₁ * a.2 * b.4 + a.3 * b.1 - c₁ * a.4 * b.2 
goal: (a * b).imJ = a.re * b.imJ + c₁ * a.imI * b.imK + a.imJ * b.re - c₁ * a.imK * b.imI

full_name: QuaternionAlgebra.mul_imK
code: @[simp] theorem mul_imK : (a * b).imK = a.1 * b.4 + a.2 * b.3 - a.3 * b.2 + a.4 * b.1 
goal: (a * b).imK = a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re

full_name: QuaternionAlgebra.mk_mul_mk
code: @[simp]
theorem mk_mul_mk (a₁ a₂ a₃ a₄ b₁ b₂ b₃ b₄ : R) :
    (mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) * mk b₁ b₂ b₃ b₄ =
      ⟨a₁ * b₁ + c₁ * a₂ * b₂ + c₂ * a₃ * b₃ - c₁ * c₂ * a₄ * b₄,
        a₁ * b₂ + a₂ * b₁ - c₂ * a₃ * b₄ + c₂ * a₄ * b₃,
        a₁ * b₃ + c₁ * a₂ * b₄ + a₃ * b₁ - c₁ * a₄ * b₂, a₁ * b₄ + a₂ * b₃ - a₃ * b₂ + a₄ * b₁⟩ 
goal: { re := a₁, imI := a₂, imJ := a₃, imK := a₄ } * { re := b₁, imI := b₂, imJ := b₃, imK := b₄ } =
  { re := a₁ * b₁ + c₁ * a₂ * b₂ + c₂ * a₃ * b₃ - c₁ * c₂ * a₄ * b₄,
    imI := a₁ * b₂ + a₂ * b₁ - c₂ * a₃ * b₄ + c₂ * a₄ * b₃, imJ := a₁ * b₃ + c₁ * a₂ * b₄ + a₃ * b₁ - c₁ * a₄ * b₂,
    imK := a₁ * b₄ + a₂ * b₃ - a₃ * b₂ + a₄ * b₁ }

full_name: QuaternionAlgebra.instSMul
code: instance : SMul S ℍ[R,c₁,c₂] 
goal: SMul S ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instIsScalarTower
code: instance [SMul S T] [IsScalarTower S T R] : IsScalarTower S T ℍ[R,c₁,c₂] 
goal: IsScalarTower S T ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instSMulCommClass
code: instance [SMulCommClass S T R] : SMulCommClass S T ℍ[R,c₁,c₂] 
goal: SMulCommClass S T ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.smul_re
code: @[simp] theorem smul_re : (s • a).re = s • a.re 
goal: (s • a).re = s • a.re

full_name: QuaternionAlgebra.smul_imI
code: @[simp] theorem smul_imI : (s • a).imI = s • a.imI 
goal: (s • a).imI = s • a.imI

full_name: QuaternionAlgebra.smul_imJ
code: @[simp] theorem smul_imJ : (s • a).imJ = s • a.imJ 
goal: (s • a).imJ = s • a.imJ

full_name: QuaternionAlgebra.smul_imK
code: @[simp] theorem smul_imK : (s • a).imK = s • a.imK 
goal: (s • a).imK = s • a.imK

full_name: QuaternionAlgebra.smul_im
code: @[simp] theorem smul_im {S} [SMulZeroClass S R] (s : S) : (s • a).im = s • a.im 
goal: (s • a).im = s • a.im

full_name: QuaternionAlgebra.smul_mk
code: @[simp]
theorem smul_mk (re im_i im_j im_k : R) :
    s • (⟨re, im_i, im_j, im_k⟩ : ℍ[R,c₁,c₂]) = ⟨s • re, s • im_i, s • im_j, s • im_k⟩ 
goal: s • { re := re, imI := im_i, imJ := im_j, imK := im_k } =
  { re := s • re, imI := s • im_i, imJ := s • im_j, imK := s • im_k }

full_name: QuaternionAlgebra.coe_smul
code: @[simp, norm_cast]
theorem coe_smul [SMulZeroClass S R] (s : S) (r : R) :
    (↑(s • r) : ℍ[R,c₁,c₂]) = s • (r : ℍ[R,c₁,c₂]) 
goal: ↑(s • r) = s • ↑r

full_name: QuaternionAlgebra.instAddCommGroup
code: instance : AddCommGroup ℍ[R,c₁,c₂] 
goal: AddCommGroup ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instAddCommGroupWithOne
code: instance : AddCommGroupWithOne ℍ[R,c₁,c₂] 
goal: AddCommGroupWithOne ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.natCast_re
code: @[simp, norm_cast]
theorem natCast_re (n : ℕ) : (n : ℍ[R,c₁,c₂]).re = n 
goal: (↑n).re = ↑n

full_name: QuaternionAlgebra.natCast_imI
code: @[simp, norm_cast]
theorem natCast_imI (n : ℕ) : (n : ℍ[R,c₁,c₂]).imI = 0 
goal: (↑n).imI = 0

full_name: QuaternionAlgebra.natCast_imJ
code: @[simp, norm_cast]
theorem natCast_imJ (n : ℕ) : (n : ℍ[R,c₁,c₂]).imJ = 0 
goal: (↑n).imJ = 0

full_name: QuaternionAlgebra.natCast_imK
code: @[simp, norm_cast]
theorem natCast_imK (n : ℕ) : (n : ℍ[R,c₁,c₂]).imK = 0 
goal: (↑n).imK = 0

full_name: QuaternionAlgebra.natCast_im
code: @[simp, norm_cast]
theorem natCast_im (n : ℕ) : (n : ℍ[R,c₁,c₂]).im = 0 
goal: (↑n).im = 0

full_name: QuaternionAlgebra.coe_natCast
code: @[norm_cast]
theorem coe_natCast (n : ℕ) : ↑(n : R) = (n : ℍ[R,c₁,c₂]) 
goal: ↑↑n = ↑n

full_name: QuaternionAlgebra.intCast_re
code: @[simp, norm_cast]
theorem intCast_re (z : ℤ) : (z : ℍ[R,c₁,c₂]).re = z 
goal: (↑z).re = ↑z

full_name: QuaternionAlgebra.intCast_imI
code: @[simp, norm_cast]
theorem intCast_imI (z : ℤ) : (z : ℍ[R,c₁,c₂]).imI = 0 
goal: (↑z).imI = 0

full_name: QuaternionAlgebra.intCast_imJ
code: @[simp, norm_cast]
theorem intCast_imJ (z : ℤ) : (z : ℍ[R,c₁,c₂]).imJ = 0 
goal: (↑z).imJ = 0

full_name: QuaternionAlgebra.intCast_imK
code: @[simp, norm_cast]
theorem intCast_imK (z : ℤ) : (z : ℍ[R,c₁,c₂]).imK = 0 
goal: (↑z).imK = 0

full_name: QuaternionAlgebra.intCast_im
code: @[simp, norm_cast]
theorem intCast_im (z : ℤ) : (z : ℍ[R,c₁,c₂]).im = 0 
goal: (↑z).im = 0

full_name: QuaternionAlgebra.coe_intCast
code: @[norm_cast]
theorem coe_intCast (z : ℤ) : ↑(z : R) = (z : ℍ[R,c₁,c₂]) 
goal: ↑↑z = ↑z

full_name: QuaternionAlgebra.instRing
code: instance instRing : Ring ℍ[R,c₁,c₂] 
goal: Ring ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.coe_mul
code: @[norm_cast, simp]
theorem coe_mul : ((x * y : R) : ℍ[R,c₁,c₂]) = x * y 
goal: ↑(x * y) = ↑x * ↑y

full_name: QuaternionAlgebra.instAlgebra
code: instance [CommSemiring S] [Algebra S R] : Algebra S ℍ[R,c₁,c₂] 
goal: Algebra S ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.algebraMap_eq
code: theorem algebraMap_eq (r : R) : algebraMap R ℍ[R,c₁,c₂] r = ⟨r, 0, 0, 0⟩ 
goal: (algebraMap R ℍ[R,c₁,c₂]) r = { re := r, imI := 0, imJ := 0, imK := 0 }

full_name: QuaternionAlgebra.algebraMap_injective
code: theorem algebraMap_injective : (algebraMap R ℍ[R,c₁,c₂] : _ → _).Injective 
goal: Function.Injective ⇑(algebraMap R ℍ[R,c₁,c₂])

full_name: QuaternionAlgebra.instNoZeroSMulDivisorsOfNoZeroDivisors
code: instance [NoZeroDivisors R] : NoZeroSMulDivisors R ℍ[R,c₁,c₂] 
goal: NoZeroSMulDivisors R ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.reₗ_apply
code: /-- `QuaternionAlgebra.re` as a `LinearMap`-/
@[simps]
def reₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: (QuaternionAlgebra.reₗ c₁ c₂) self = self.re

full_name: QuaternionAlgebra.reₗ
code: /-- `QuaternionAlgebra.re` as a `LinearMap`-/
@[simps]
def reₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: ℍ[R,c₁,c₂] →ₗ[R] R

full_name: QuaternionAlgebra.imIₗ
code: /-- `QuaternionAlgebra.imI` as a `LinearMap`-/
@[simps]
def imIₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: ℍ[R,c₁,c₂] →ₗ[R] R

full_name: QuaternionAlgebra.imIₗ_apply
code: /-- `QuaternionAlgebra.imI` as a `LinearMap`-/
@[simps]
def imIₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: (QuaternionAlgebra.imIₗ c₁ c₂) self = self.imI

full_name: QuaternionAlgebra.imJₗ
code: /-- `QuaternionAlgebra.imJ` as a `LinearMap`-/
@[simps]
def imJₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: ℍ[R,c₁,c₂] →ₗ[R] R

full_name: QuaternionAlgebra.imJₗ_apply
code: /-- `QuaternionAlgebra.imJ` as a `LinearMap`-/
@[simps]
def imJₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: (QuaternionAlgebra.imJₗ c₁ c₂) self = self.imJ

full_name: QuaternionAlgebra.imKₗ_apply
code: /-- `QuaternionAlgebra.imK` as a `LinearMap`-/
@[simps]
def imKₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: (QuaternionAlgebra.imKₗ c₁ c₂) self = self.imK

full_name: QuaternionAlgebra.imKₗ
code: /-- `QuaternionAlgebra.imK` as a `LinearMap`-/
@[simps]
def imKₗ : ℍ[R,c₁,c₂] →ₗ[R] R 
goal: ℍ[R,c₁,c₂] →ₗ[R] R

full_name: QuaternionAlgebra.linearEquivTuple
code: /-- `QuaternionAlgebra.equivTuple` as a linear equivalence. -/
def linearEquivTuple : ℍ[R,c₁,c₂] ≃ₗ[R] Fin 4 → R 
goal: ℍ[R,c₁,c₂] ≃ₗ[R] Fin 4 → R

full_name: QuaternionAlgebra.coe_linearEquivTuple
code: @[simp]
theorem coe_linearEquivTuple : ⇑(linearEquivTuple c₁ c₂) = equivTuple c₁ c₂ 
goal: ⇑(QuaternionAlgebra.linearEquivTuple c₁ c₂) = ⇑(QuaternionAlgebra.equivTuple c₁ c₂)

full_name: QuaternionAlgebra.coe_linearEquivTuple_symm
code: @[simp]
theorem coe_linearEquivTuple_symm : ⇑(linearEquivTuple c₁ c₂).symm = (equivTuple c₁ c₂).symm 
goal: ⇑(QuaternionAlgebra.linearEquivTuple c₁ c₂).symm = ⇑(QuaternionAlgebra.equivTuple c₁ c₂).symm

full_name: QuaternionAlgebra.basisOneIJK
code: /-- `ℍ[R, c₁, c₂]` has a basis over `R` given by `1`, `i`, `j`, and `k`. -/
noncomputable def basisOneIJK : Basis (Fin 4) R ℍ[R,c₁,c₂] 
goal: Basis (Fin 4) R ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.coe_basisOneIJK_repr
code: @[simp]
theorem coe_basisOneIJK_repr (q : ℍ[R,c₁,c₂]) :
    ⇑((basisOneIJK c₁ c₂).repr q) = ![q.re, q.imI, q.imJ, q.imK] 
goal: ⇑((QuaternionAlgebra.basisOneIJK c₁ c₂).repr q) = ![q.re, q.imI, q.imJ, q.imK]

full_name: QuaternionAlgebra.instFinite
code: instance : Module.Finite R ℍ[R,c₁,c₂] 
goal: Module.Finite R ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.instFree
code: instance : Module.Free R ℍ[R,c₁,c₂] 
goal: Module.Free R ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.rank_eq_four
code: theorem rank_eq_four [StrongRankCondition R] : Module.rank R ℍ[R,c₁,c₂] = 4 
goal: Module.rank R ℍ[R,c₁,c₂] = 4

full_name: QuaternionAlgebra.finrank_eq_four
code: theorem finrank_eq_four [StrongRankCondition R] : FiniteDimensional.finrank R ℍ[R,c₁,c₂] = 4 
goal: FiniteDimensional.finrank R ℍ[R,c₁,c₂] = 4

full_name: QuaternionAlgebra.swapEquiv_symm_apply_imJ
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂).symm t).imJ = t.imI

full_name: QuaternionAlgebra.swapEquiv_apply_imI
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂) t).imI = t.imJ

full_name: QuaternionAlgebra.swapEquiv_apply_imK
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂) t).imK = -t.imK

full_name: QuaternionAlgebra.swapEquiv_apply_re
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂) t).re = t.re

full_name: QuaternionAlgebra.swapEquiv_symm_apply_imI
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂).symm t).imI = t.imJ

full_name: QuaternionAlgebra.swapEquiv_apply_imJ
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂) t).imJ = t.imI

full_name: QuaternionAlgebra.swapEquiv
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R,c₂,c₁]

full_name: QuaternionAlgebra.swapEquiv_symm_apply_re
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂).symm t).re = t.re

full_name: QuaternionAlgebra.swapEquiv_symm_apply_imK
code: /-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁] 
goal: ((QuaternionAlgebra.swapEquiv c₁ c₂).symm t).imK = -t.imK

full_name: QuaternionAlgebra.coe_sub
code: @[norm_cast, simp]
theorem coe_sub : ((x - y : R) : ℍ[R,c₁,c₂]) = x - y 
goal: ↑(x - y) = ↑x - ↑y

full_name: QuaternionAlgebra.coe_pow
code: @[norm_cast, simp]
theorem coe_pow (n : ℕ) : (↑(x ^ n) : ℍ[R,c₁,c₂]) = (x : ℍ[R,c₁,c₂]) ^ n 
goal: ↑(x ^ n) = ↑x ^ n

full_name: QuaternionAlgebra.coe_commutes
code: theorem coe_commutes : ↑r * a = a * r 
goal: ↑r * a = a * ↑r

full_name: QuaternionAlgebra.coe_commute
code: theorem coe_commute : Commute (↑r) a 
goal: Commute (↑r) a

full_name: QuaternionAlgebra.coe_mul_eq_smul
code: theorem coe_mul_eq_smul : ↑r * a = r • a 
goal: ↑r * a = r • a

full_name: QuaternionAlgebra.mul_coe_eq_smul
code: theorem mul_coe_eq_smul : a * r = r • a 
goal: a * ↑r = r • a

full_name: QuaternionAlgebra.coe_algebraMap
code: @[norm_cast, simp]
theorem coe_algebraMap : ⇑(algebraMap R ℍ[R,c₁,c₂]) = coe 
goal: ⇑(algebraMap R ℍ[R,c₁,c₂]) = QuaternionAlgebra.coe

full_name: QuaternionAlgebra.smul_coe
code: theorem smul_coe : x • (y : ℍ[R,c₁,c₂]) = ↑(x * y) 
goal: x • ↑y = ↑(x * y)

full_name: QuaternionAlgebra.instStarQuaternionAlgebra
code: /-- Quaternion conjugate. -/
instance instStarQuaternionAlgebra : Star ℍ[R,c₁,c₂] 
goal: Star ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.re_star
code: @[simp] theorem re_star : (star a).re = a.re 
goal: (star a).re = a.re

full_name: QuaternionAlgebra.imI_star
code: @[simp]
theorem imI_star : (star a).imI = -a.imI 
goal: (star a).imI = -a.imI

full_name: QuaternionAlgebra.imJ_star
code: @[simp]
theorem imJ_star : (star a).imJ = -a.imJ 
goal: (star a).imJ = -a.imJ

full_name: QuaternionAlgebra.imK_star
code: @[simp]
theorem imK_star : (star a).imK = -a.imK 
goal: (star a).imK = -a.imK

full_name: QuaternionAlgebra.im_star
code: @[simp]
theorem im_star : (star a).im = -a.im 
goal: (star a).im = -a.im

full_name: QuaternionAlgebra.star_mk
code: @[simp]
theorem star_mk (a₁ a₂ a₃ a₄ : R) : star (mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) = ⟨a₁, -a₂, -a₃, -a₄⟩ 
goal: star { re := a₁, imI := a₂, imJ := a₃, imK := a₄ } = { re := a₁, imI := -a₂, imJ := -a₃, imK := -a₄ }

full_name: QuaternionAlgebra.instStarRing
code: instance instStarRing : StarRing ℍ[R,c₁,c₂] 
goal: StarRing ℍ[R,c₁,c₂]

full_name: QuaternionAlgebra.self_add_star'
code: theorem self_add_star' : a + star a = ↑(2 * a.re) 
goal: a + star a = ↑(2 * a.re)

full_name: QuaternionAlgebra.self_add_star
code: theorem self_add_star : a + star a = 2 * a.re 
goal: a + star a = 2 * ↑a.re

full_name: QuaternionAlgebra.star_add_self'
code: theorem star_add_self' : star a + a = ↑(2 * a.re) 
goal: star a + a = ↑(2 * a.re)

full_name: QuaternionAlgebra.star_add_self
code: theorem star_add_self : star a + a = 2 * a.re 
goal: star a + a = 2 * ↑a.re

full_name: QuaternionAlgebra.star_eq_two_re_sub
code: theorem star_eq_two_re_sub : star a = ↑(2 * a.re) - a 
goal: star a = ↑(2 * a.re) - a

full_name: QuaternionAlgebra.instIsStarNormal
code: instance : IsStarNormal a 
goal: IsStarNormal a

full_name: QuaternionAlgebra.star_coe
code: @[simp, norm_cast]
theorem star_coe : star (x : ℍ[R,c₁,c₂]) = x 
goal: star ↑x = ↑x

full_name: QuaternionAlgebra.star_im
code: @[simp] theorem star_im : star a.im = -a.im 
goal: star a.im = -a.im

full_name: QuaternionAlgebra.star_smul
code: @[simp]
theorem star_smul [Monoid S] [DistribMulAction S R] (s : S) (a : ℍ[R,c₁,c₂]) :
    star (s • a) = s • star a 
goal: star (s • a) = s • star a

full_name: QuaternionAlgebra.eq_re_of_eq_coe
code: theorem eq_re_of_eq_coe {a : ℍ[R,c₁,c₂]} {x : R} (h : a = x) : a = a.re 
goal: a = ↑a.re

full_name: QuaternionAlgebra.eq_re_iff_mem_range_coe
code: theorem eq_re_iff_mem_range_coe {a : ℍ[R,c₁,c₂]} :
    a = a.re ↔ a ∈ Set.range (coe : R → ℍ[R,c₁,c₂]) 
goal: a = ↑a.re ↔ a ∈ Set.range QuaternionAlgebra.coe

full_name: QuaternionAlgebra.star_eq_self
code: @[simp]
theorem star_eq_self {c₁ c₂ : R} {a : ℍ[R,c₁,c₂]} : star a = a ↔ a = a.re 
goal: star a = a ↔ a = ↑a.re

full_name: QuaternionAlgebra.star_eq_neg
code: theorem star_eq_neg {c₁ c₂ : R} {a : ℍ[R,c₁,c₂]} : star a = -a ↔ a.re = 0 
goal: star a = -a ↔ a.re = 0

full_name: QuaternionAlgebra.star_mul_eq_coe
code: theorem star_mul_eq_coe : star a * a = (star a * a).re 
goal: star a * a = ↑(star a * a).re

full_name: QuaternionAlgebra.mul_star_eq_coe
code: theorem mul_star_eq_coe : a * star a = (a * star a).re 
goal: a * star a = ↑(a * star a).re

full_name: QuaternionAlgebra.starAe
code: /-- Quaternion conjugate as an `AlgEquiv` to the opposite ring. -/
def starAe : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R,c₁,c₂]ᵐᵒᵖ 
goal: ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R,c₁,c₂]ᵐᵒᵖ

full_name: QuaternionAlgebra.coe_starAe
code: @[simp]
theorem coe_starAe : ⇑(starAe : ℍ[R,c₁,c₂] ≃ₐ[R] _) = op ∘ star 
goal: ⇑QuaternionAlgebra.starAe = MulOpposite.op ∘ star

full_name: Quaternion
code: /-- Space of quaternions over a type. Implemented as a structure with four fields:
`re`, `im_i`, `im_j`, and `im_k`. -/
def Quaternion (R : Type*) [One R] [Neg R] 
goal: Type u_1

full_name: Quaternion.«_aux_Mathlib_Algebra_Quaternion___macroRules_Quaternion_termℍ[_]_1»
code: scoped[Quaternion] notation "ℍ[" R "]" => Quaternion R
goal: Lean.Macro

full_name: Quaternion._aux_Mathlib_Algebra_Quaternion___unexpand_Quaternion_1
code: scoped[Quaternion] notation "ℍ[" R "]" => Quaternion R
goal: Lean.PrettyPrinter.Unexpander

full_name: Quaternion.equivProd_symm_apply_imI
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: ((Quaternion.equivProd R).symm a).imI = a.2.1

full_name: Quaternion.equivProd_symm_apply_imJ
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: ((Quaternion.equivProd R).symm a).imJ = a.2.2.1

full_name: Quaternion.equivProd_symm_apply_re
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: ((Quaternion.equivProd R).symm a).re = a.1

full_name: Quaternion.equivProd
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: ℍ[R] ≃ R × R × R × R

full_name: Quaternion.equivProd_symm_apply_imK
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: ((Quaternion.equivProd R).symm a).imK = a.2.2.2

full_name: Quaternion.equivProd_apply
code: /-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R 
goal: (Quaternion.equivProd R) a = (a.re, a.imI, a.imJ, a.imK)

full_name: Quaternion.equivTuple_symm_apply
code: /-- The equivalence between the quaternions over `R` and `Fin 4 → R`. -/
@[simps! symm_apply]
def Quaternion.equivTuple (R : Type*) [One R] [Neg R] : ℍ[R] ≃ (Fin 4 → R) 
goal: (Quaternion.equivTuple R).symm a = { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }

full_name: Quaternion.equivTuple
code: /-- The equivalence between the quaternions over `R` and `Fin 4 → R`. -/
@[simps! symm_apply]
def Quaternion.equivTuple (R : Type*) [One R] [Neg R] : ℍ[R] ≃ (Fin 4 → R) 
goal: ℍ[R] ≃ (Fin 4 → R)

full_name: Quaternion.equivTuple_apply
code: @[simp]
theorem Quaternion.equivTuple_apply (R : Type*) [One R] [Neg R] (x : ℍ[R]) :
    Quaternion.equivTuple R x = ![x.re, x.imI, x.imJ, x.imK] 
goal: (Quaternion.equivTuple R) x = ![x.re, x.imI, x.imJ, x.imK]

full_name: instSubsingletonQuaternion
code: instance {R : Type*} [One R] [Neg R] [Subsingleton R] : Subsingleton ℍ[R] 
goal: Subsingleton ℍ[R]

full_name: instNontrivialQuaternion
code: instance {R : Type*} [One R] [Neg R] [Nontrivial R] : Nontrivial ℍ[R] 
goal: Nontrivial ℍ[R]

full_name: Quaternion.coe
code: /-- Coercion `R → ℍ[R]`. -/
@[coe] def coe : R → ℍ[R] 
goal: R → ℍ[R]

full_name: Quaternion.instCoeTC
code: instance : CoeTC R ℍ[R] 
goal: CoeTC R ℍ[R]

full_name: Quaternion.instRing
code: instance instRing : Ring ℍ[R] 
goal: Ring ℍ[R]

full_name: Quaternion.instInhabited
code: instance : Inhabited ℍ[R] 
goal: Inhabited ℍ[R]

full_name: Quaternion.instSMul
code: instance [SMul S R] : SMul S ℍ[R] 
goal: SMul S ℍ[R]

full_name: Quaternion.instIsScalarTower
code: instance [SMul S T] [SMul S R] [SMul T R] [IsScalarTower S T R] : IsScalarTower S T ℍ[R] 
goal: IsScalarTower S T ℍ[R]

full_name: Quaternion.instSMulCommClass
code: instance [SMul S R] [SMul T R] [SMulCommClass S T R] : SMulCommClass S T ℍ[R] 
goal: SMulCommClass S T ℍ[R]

full_name: Quaternion.algebra
code: protected instance algebra [CommSemiring S] [Algebra S R] : Algebra S ℍ[R] 
goal: Algebra S ℍ[R]

full_name: Quaternion.instStar
code: instance : Star ℍ[R] 
goal: Star ℍ[R]

full_name: Quaternion.instStarRing
code: instance : StarRing ℍ[R] 
goal: StarRing ℍ[R]

full_name: Quaternion.instIsStarNormal
code: instance : IsStarNormal a 
goal: IsStarNormal a

full_name: Quaternion.ext
code: @[ext]
theorem ext : a.re = b.re → a.imI = b.imI → a.imJ = b.imJ → a.imK = b.imK → a = b 
goal: a.re = b.re → a.imI = b.imI → a.imJ = b.imJ → a.imK = b.imK → a = b

full_name: Quaternion.ext_iff
code: theorem ext_iff {a b : ℍ[R]} :
    a = b ↔ a.re = b.re ∧ a.imI = b.imI ∧ a.imJ = b.imJ ∧ a.imK = b.imK 
goal: a = b ↔ a.re = b.re ∧ a.imI = b.imI ∧ a.imJ = b.imJ ∧ a.imK = b.imK

full_name: Quaternion.im
code: /-- The imaginary part of a quaternion. -/
nonrec def im (x : ℍ[R]) : ℍ[R] 
goal: ℍ[R]

full_name: Quaternion.im_re
code: @[simp] theorem im_re : a.im.re = 0 
goal: a.im.re = 0

full_name: Quaternion.im_imI
code: @[simp] theorem im_imI : a.im.imI = a.imI 
goal: a.im.imI = a.imI

full_name: Quaternion.im_imJ
code: @[simp] theorem im_imJ : a.im.imJ = a.imJ 
goal: a.im.imJ = a.imJ

full_name: Quaternion.im_imK
code: @[simp] theorem im_imK : a.im.imK = a.imK 
goal: a.im.imK = a.imK

full_name: Quaternion.im_idem
code: @[simp] theorem im_idem : a.im.im = a.im 
goal: a.im.im = a.im

full_name: Quaternion.re_add_im
code: @[simp] nonrec theorem re_add_im : ↑a.re + a.im = a 
goal: ↑a.re + a.im = a

full_name: Quaternion.sub_self_im
code: @[simp] nonrec theorem sub_self_im : a - a.im = a.re 
goal: a - a.im = ↑a.re

full_name: Quaternion.sub_self_re
code: @[simp] nonrec theorem sub_self_re : a - ↑a.re = a.im 
goal: a - ↑a.re = a.im

full_name: Quaternion.coe_re
code: @[simp, norm_cast]
theorem coe_re : (x : ℍ[R]).re = x 
goal: (↑x).re = x

full_name: Quaternion.coe_imI
code: @[simp, norm_cast]
theorem coe_imI : (x : ℍ[R]).imI = 0 
goal: (↑x).imI = 0

full_name: Quaternion.coe_imJ
code: @[simp, norm_cast]
theorem coe_imJ : (x : ℍ[R]).imJ = 0 
goal: (↑x).imJ = 0

full_name: Quaternion.coe_imK
code: @[simp, norm_cast]
theorem coe_imK : (x : ℍ[R]).imK = 0 
goal: (↑x).imK = 0

full_name: Quaternion.coe_im
code: @[simp, norm_cast]
theorem coe_im : (x : ℍ[R]).im = 0 
goal: (↑x).im = 0

full_name: Quaternion.zero_re
code: @[simp] theorem zero_re : (0 : ℍ[R]).re = 0 
goal: Quaternion.re 0 = 0

full_name: Quaternion.zero_imI
code: @[simp] theorem zero_imI : (0 : ℍ[R]).imI = 0 
goal: Quaternion.imI 0 = 0

full_name: Quaternion.zero_imJ
code: @[simp] theorem zero_imJ : (0 : ℍ[R]).imJ = 0 
goal: Quaternion.imJ 0 = 0

full_name: Quaternion.zero_imK
code: @[simp] theorem zero_imK : (0 : ℍ[R]).imK = 0 
goal: Quaternion.imK 0 = 0

full_name: Quaternion.zero_im
code: @[simp] theorem zero_im : (0 : ℍ[R]).im = 0 
goal: Quaternion.im 0 = 0

full_name: Quaternion.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ((0 : R) : ℍ[R]) = 0 
goal: ↑0 = 0

full_name: Quaternion.one_re
code: @[simp] theorem one_re : (1 : ℍ[R]).re = 1 
goal: Quaternion.re 1 = 1

full_name: Quaternion.one_imI
code: @[simp] theorem one_imI : (1 : ℍ[R]).imI = 0 
goal: Quaternion.imI 1 = 0

full_name: Quaternion.one_imJ
code: @[simp] theorem one_imJ : (1 : ℍ[R]).imJ = 0 
goal: Quaternion.imJ 1 = 0

full_name: Quaternion.one_imK
code: @[simp] theorem one_imK : (1 : ℍ[R]).imK = 0 
goal: Quaternion.imK 1 = 0

full_name: Quaternion.one_im
code: @[simp] theorem one_im : (1 : ℍ[R]).im = 0 
goal: Quaternion.im 1 = 0

full_name: Quaternion.coe_one
code: @[simp, norm_cast]
theorem coe_one : ((1 : R) : ℍ[R]) = 1 
goal: ↑1 = 1

full_name: Quaternion.add_re
code: @[simp] theorem add_re : (a + b).re = a.re + b.re 
goal: (a + b).re = a.re + b.re

full_name: Quaternion.add_imI
code: @[simp] theorem add_imI : (a + b).imI = a.imI + b.imI 
goal: (a + b).imI = a.imI + b.imI

full_name: Quaternion.add_imJ
code: @[simp] theorem add_imJ : (a + b).imJ = a.imJ + b.imJ 
goal: (a + b).imJ = a.imJ + b.imJ

full_name: Quaternion.add_imK
code: @[simp] theorem add_imK : (a + b).imK = a.imK + b.imK 
goal: (a + b).imK = a.imK + b.imK

full_name: Quaternion.add_im
code: @[simp] nonrec theorem add_im : (a + b).im = a.im + b.im 
goal: (a + b).im = a.im + b.im

full_name: Quaternion.coe_add
code: @[simp, norm_cast]
theorem coe_add : ((x + y : R) : ℍ[R]) = x + y 
goal: ↑(x + y) = ↑x + ↑y

full_name: Quaternion.neg_re
code: @[simp] theorem neg_re : (-a).re = -a.re 
goal: (-a).re = -a.re

full_name: Quaternion.neg_imI
code: @[simp] theorem neg_imI : (-a).imI = -a.imI 
goal: (-a).imI = -a.imI

full_name: Quaternion.neg_imJ
code: @[simp] theorem neg_imJ : (-a).imJ = -a.imJ 
goal: (-a).imJ = -a.imJ

full_name: Quaternion.neg_imK
code: @[simp] theorem neg_imK : (-a).imK = -a.imK 
goal: (-a).imK = -a.imK

full_name: Quaternion.neg_im
code: @[simp] nonrec theorem neg_im : (-a).im = -a.im 
goal: (-a).im = -a.im

full_name: Quaternion.coe_neg
code: @[simp, norm_cast]
theorem coe_neg : ((-x : R) : ℍ[R]) = -x 
goal: ↑(-x) = -↑x

full_name: Quaternion.sub_re
code: @[simp] theorem sub_re : (a - b).re = a.re - b.re 
goal: (a - b).re = a.re - b.re

full_name: Quaternion.sub_imI
code: @[simp] theorem sub_imI : (a - b).imI = a.imI - b.imI 
goal: (a - b).imI = a.imI - b.imI

full_name: Quaternion.sub_imJ
code: @[simp] theorem sub_imJ : (a - b).imJ = a.imJ - b.imJ 
goal: (a - b).imJ = a.imJ - b.imJ

full_name: Quaternion.sub_imK
code: @[simp] theorem sub_imK : (a - b).imK = a.imK - b.imK 
goal: (a - b).imK = a.imK - b.imK

full_name: Quaternion.sub_im
code: @[simp] nonrec theorem sub_im : (a - b).im = a.im - b.im 
goal: (a - b).im = a.im - b.im

full_name: Quaternion.coe_sub
code: @[simp, norm_cast]
theorem coe_sub : ((x - y : R) : ℍ[R]) = x - y 
goal: ↑(x - y) = ↑x - ↑y

full_name: Quaternion.mul_re
code: @[simp]
theorem mul_re : (a * b).re = a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK 
goal: (a * b).re = a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK

full_name: Quaternion.mul_imI
code: @[simp]
theorem mul_imI : (a * b).imI = a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ 
goal: (a * b).imI = a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ

full_name: Quaternion.mul_imJ
code: @[simp]
theorem mul_imJ : (a * b).imJ = a.re * b.imJ - a.imI * b.imK + a.imJ * b.re + a.imK * b.imI 
goal: (a * b).imJ = a.re * b.imJ - a.imI * b.imK + a.imJ * b.re + a.imK * b.imI

full_name: Quaternion.mul_imK
code: @[simp]
theorem mul_imK : (a * b).imK = a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re 
goal: (a * b).imK = a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re

full_name: Quaternion.coe_mul
code: @[simp, norm_cast]
theorem coe_mul : ((x * y : R) : ℍ[R]) = x * y 
goal: ↑(x * y) = ↑x * ↑y

full_name: Quaternion.coe_pow
code: @[norm_cast, simp]
theorem coe_pow (n : ℕ) : (↑(x ^ n) : ℍ[R]) = (x : ℍ[R]) ^ n 
goal: ↑(x ^ n) = ↑x ^ n

full_name: Quaternion.natCast_re
code: @[simp, norm_cast]
theorem natCast_re (n : ℕ) : (n : ℍ[R]).re = n 
goal: (↑n).re = ↑n

full_name: Quaternion.natCast_imI
code: @[simp, norm_cast]
theorem natCast_imI (n : ℕ) : (n : ℍ[R]).imI = 0 
goal: (↑n).imI = 0

full_name: Quaternion.natCast_imJ
code: @[simp, norm_cast]
theorem natCast_imJ (n : ℕ) : (n : ℍ[R]).imJ = 0 
goal: (↑n).imJ = 0

full_name: Quaternion.natCast_imK
code: @[simp, norm_cast]
theorem natCast_imK (n : ℕ) : (n : ℍ[R]).imK = 0 
goal: (↑n).imK = 0

full_name: Quaternion.natCast_im
code: @[simp, norm_cast]
theorem natCast_im (n : ℕ) : (n : ℍ[R]).im = 0 
goal: (↑n).im = 0

full_name: Quaternion.coe_natCast
code: @[norm_cast]
theorem coe_natCast (n : ℕ) : ↑(n : R) = (n : ℍ[R]) 
goal: ↑↑n = ↑n

full_name: Quaternion.intCast_re
code: @[simp, norm_cast]
theorem intCast_re (z : ℤ) : (z : ℍ[R]).re = z 
goal: (↑z).re = ↑z

full_name: Quaternion.intCast_imI
code: @[simp, norm_cast]
theorem intCast_imI (z : ℤ) : (z : ℍ[R]).imI = 0 
goal: (↑z).imI = 0

full_name: Quaternion.intCast_imJ
code: @[simp, norm_cast]
theorem intCast_imJ (z : ℤ) : (z : ℍ[R]).imJ = 0 
goal: (↑z).imJ = 0

full_name: Quaternion.intCast_imK
code: @[simp, norm_cast]
theorem intCast_imK (z : ℤ) : (z : ℍ[R]).imK = 0 
goal: (↑z).imK = 0

full_name: Quaternion.intCast_im
code: @[simp, norm_cast]
theorem intCast_im (z : ℤ) : (z : ℍ[R]).im = 0 
goal: (↑z).im = 0

full_name: Quaternion.coe_intCast
code: @[norm_cast]
theorem coe_intCast (z : ℤ) : ↑(z : R) = (z : ℍ[R]) 
goal: ↑↑z = ↑z

full_name: Quaternion.coe_injective
code: theorem coe_injective : Function.Injective (coe : R → ℍ[R]) 
goal: Function.Injective Quaternion.coe

full_name: Quaternion.coe_inj
code: @[simp]
theorem coe_inj {x y : R} : (x : ℍ[R]) = y ↔ x = y 
goal: ↑x = ↑y ↔ x = y

full_name: Quaternion.smul_re
code: @[simp]
theorem smul_re [SMul S R] (s : S) : (s • a).re = s • a.re 
goal: (s • a).re = s • a.re

full_name: Quaternion.smul_imI
code: @[simp] theorem smul_imI [SMul S R] (s : S) : (s • a).imI = s • a.imI 
goal: (s • a).imI = s • a.imI

full_name: Quaternion.smul_imJ
code: @[simp] theorem smul_imJ [SMul S R] (s : S) : (s • a).imJ = s • a.imJ 
goal: (s • a).imJ = s • a.imJ

full_name: Quaternion.smul_imK
code: @[simp] theorem smul_imK [SMul S R] (s : S) : (s • a).imK = s • a.imK 
goal: (s • a).imK = s • a.imK

full_name: Quaternion.smul_im
code: @[simp]
nonrec theorem smul_im [SMulZeroClass S R] (s : S) : (s • a).im = s • a.im 
goal: (s • a).im = s • a.im

full_name: Quaternion.coe_smul
code: @[simp, norm_cast]
theorem coe_smul [SMulZeroClass S R] (s : S) (r : R) : (↑(s • r) : ℍ[R]) = s • (r : ℍ[R]) 
goal: ↑(s • r) = s • ↑r

full_name: Quaternion.coe_commutes
code: theorem coe_commutes : ↑r * a = a * r 
goal: ↑r * a = a * ↑r

full_name: Quaternion.coe_commute
code: theorem coe_commute : Commute (↑r) a 
goal: Commute (↑r) a

full_name: Quaternion.coe_mul_eq_smul
code: theorem coe_mul_eq_smul : ↑r * a = r • a 
goal: ↑r * a = r • a

full_name: Quaternion.mul_coe_eq_smul
code: theorem mul_coe_eq_smul : a * r = r • a 
goal: a * ↑r = r • a

full_name: Quaternion.algebraMap_def
code: @[simp]
theorem algebraMap_def : ⇑(algebraMap R ℍ[R]) = coe 
goal: ⇑(algebraMap R ℍ[R]) = Quaternion.coe

full_name: Quaternion.algebraMap_injective
code: theorem algebraMap_injective : (algebraMap R ℍ[R] : _ → _).Injective 
goal: Function.Injective ⇑(algebraMap R ℍ[R])

full_name: Quaternion.smul_coe
code: theorem smul_coe : x • (y : ℍ[R]) = ↑(x * y) 
goal: x • ↑y = ↑(x * y)

full_name: Quaternion.instFinite
code: instance : Module.Finite R ℍ[R] 
goal: Module.Finite R ℍ[R]

full_name: Quaternion.instFree
code: instance : Module.Free R ℍ[R] 
goal: Module.Free R ℍ[R]

full_name: Quaternion.rank_eq_four
code: theorem rank_eq_four [StrongRankCondition R] : Module.rank R ℍ[R] = 4 
goal: Module.rank R ℍ[R] = 4

full_name: Quaternion.finrank_eq_four
code: theorem finrank_eq_four [StrongRankCondition R] : FiniteDimensional.finrank R ℍ[R] = 4 
goal: FiniteDimensional.finrank R ℍ[R] = 4

full_name: Quaternion.star_re
code: @[simp] theorem star_re : (star a).re = a.re 
goal: (star a).re = a.re

full_name: Quaternion.star_imI
code: @[simp] theorem star_imI : (star a).imI = -a.imI 
goal: (star a).imI = -a.imI

full_name: Quaternion.star_imJ
code: @[simp] theorem star_imJ : (star a).imJ = -a.imJ 
goal: (star a).imJ = -a.imJ

full_name: Quaternion.star_imK
code: @[simp] theorem star_imK : (star a).imK = -a.imK 
goal: (star a).imK = -a.imK

full_name: Quaternion.star_im
code: @[simp] theorem star_im : (star a).im = -a.im 
goal: (star a).im = -a.im

full_name: Quaternion.self_add_star'
code: nonrec theorem self_add_star' : a + star a = ↑(2 * a.re) 
goal: a + star a = ↑(2 * a.re)

full_name: Quaternion.self_add_star
code: nonrec theorem self_add_star : a + star a = 2 * a.re 
goal: a + star a = 2 * ↑a.re

full_name: Quaternion.star_add_self'
code: nonrec theorem star_add_self' : star a + a = ↑(2 * a.re) 
goal: star a + a = ↑(2 * a.re)

full_name: Quaternion.star_add_self
code: nonrec theorem star_add_self : star a + a = 2 * a.re 
goal: star a + a = 2 * ↑a.re

full_name: Quaternion.star_eq_two_re_sub
code: nonrec theorem star_eq_two_re_sub : star a = ↑(2 * a.re) - a 
goal: star a = ↑(2 * a.re) - a

full_name: Quaternion.star_coe
code: @[simp, norm_cast]
theorem star_coe : star (x : ℍ[R]) = x 
goal: star ↑x = ↑x

full_name: Quaternion.im_star
code: @[simp]
theorem im_star : star a.im = -a.im 
goal: star a.im = -a.im

full_name: Quaternion.star_smul
code: @[simp]
theorem star_smul [Monoid S] [DistribMulAction S R] (s : S) (a : ℍ[R]) :
    star (s • a) = s • star a 
goal: star (s • a) = s • star a

full_name: Quaternion.eq_re_of_eq_coe
code: theorem eq_re_of_eq_coe {a : ℍ[R]} {x : R} (h : a = x) : a = a.re 
goal: a = ↑a.re

full_name: Quaternion.eq_re_iff_mem_range_coe
code: theorem eq_re_iff_mem_range_coe {a : ℍ[R]} : a = a.re ↔ a ∈ Set.range (coe : R → ℍ[R]) 
goal: a = ↑a.re ↔ a ∈ Set.range Quaternion.coe

full_name: Quaternion.star_eq_self
code: @[simp]
theorem star_eq_self {a : ℍ[R]} : star a = a ↔ a = a.re 
goal: star a = a ↔ a = ↑a.re

full_name: Quaternion.star_eq_neg
code: @[simp]
theorem star_eq_neg {a : ℍ[R]} : star a = -a ↔ a.re = 0 
goal: star a = -a ↔ a.re = 0

full_name: Quaternion.star_mul_eq_coe
code: nonrec theorem star_mul_eq_coe : star a * a = (star a * a).re 
goal: star a * a = ↑(star a * a).re

full_name: Quaternion.mul_star_eq_coe
code: nonrec theorem mul_star_eq_coe : a * star a = (a * star a).re 
goal: a * star a = ↑(a * star a).re

full_name: Quaternion.starAe
code: /-- Quaternion conjugate as an `AlgEquiv` to the opposite ring. -/
def starAe : ℍ[R] ≃ₐ[R] ℍ[R]ᵐᵒᵖ 
goal: ℍ[R] ≃ₐ[R] ℍ[R]ᵐᵒᵖ

full_name: Quaternion.coe_starAe
code: @[simp]
theorem coe_starAe : ⇑(starAe : ℍ[R] ≃ₐ[R] ℍ[R]ᵐᵒᵖ) = op ∘ star 
goal: ⇑Quaternion.starAe = MulOpposite.op ∘ star

full_name: Quaternion.normSq
code: /-- Square of the norm. -/
def normSq : ℍ[R] →*₀ R 
goal: ℍ[R] →*₀ R

full_name: Quaternion.normSq_def
code: theorem normSq_def : normSq a = (a * star a).re 
goal: Quaternion.normSq a = (a * star a).re

full_name: Quaternion.normSq_def'
code: theorem normSq_def' : normSq a = a.1 ^ 2 + a.2 ^ 2 + a.3 ^ 2 + a.4 ^ 2 
goal: Quaternion.normSq a = a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2

full_name: Quaternion.normSq_coe
code: theorem normSq_coe : normSq (x : ℍ[R]) = x ^ 2 
goal: Quaternion.normSq ↑x = x ^ 2

full_name: Quaternion.normSq_star
code: @[simp]
theorem normSq_star : normSq (star a) = normSq a 
goal: Quaternion.normSq (star a) = Quaternion.normSq a

full_name: Quaternion.normSq_natCast
code: @[norm_cast]
theorem normSq_natCast (n : ℕ) : normSq (n : ℍ[R]) = (n : R) ^ 2 
goal: Quaternion.normSq ↑n = ↑n ^ 2

full_name: Quaternion.normSq_intCast
code: @[norm_cast]
theorem normSq_intCast (z : ℤ) : normSq (z : ℍ[R]) = (z : R) ^ 2 
goal: Quaternion.normSq ↑z = ↑z ^ 2

full_name: Quaternion.normSq_neg
code: @[simp]
theorem normSq_neg : normSq (-a) = normSq a 
goal: Quaternion.normSq (-a) = Quaternion.normSq a

full_name: Quaternion.self_mul_star
code: theorem self_mul_star : a * star a = normSq a 
goal: a * star a = ↑(Quaternion.normSq a)

full_name: Quaternion.star_mul_self
code: theorem star_mul_self : star a * a = normSq a 
goal: star a * a = ↑(Quaternion.normSq a)

full_name: Quaternion.im_sq
code: theorem im_sq : a.im ^ 2 = -normSq a.im 
goal: a.im ^ 2 = -↑(Quaternion.normSq a.im)

full_name: Quaternion.coe_normSq_add
code: theorem coe_normSq_add : normSq (a + b) = normSq a + a * star b + b * star a + normSq b 
goal: ↑(Quaternion.normSq (a + b)) = ↑(Quaternion.normSq a) + a * star b + b * star a + ↑(Quaternion.normSq b)

full_name: Quaternion.normSq_smul
code: theorem normSq_smul (r : R) (q : ℍ[R]) : normSq (r • q) = r ^ 2 * normSq q 
goal: Quaternion.normSq (r • q) = r ^ 2 * Quaternion.normSq q

full_name: Quaternion.normSq_add
code: theorem normSq_add (a b : ℍ[R]) : normSq (a + b) = normSq a + normSq b + 2 * (a * star b).re 
goal: Quaternion.normSq (a + b) = Quaternion.normSq a + Quaternion.normSq b + 2 * (a * star b).re

full_name: Quaternion.normSq_eq_zero
code: @[simp]
theorem normSq_eq_zero : normSq a = 0 ↔ a = 0 
goal: Quaternion.normSq a = 0 ↔ a = 0

full_name: Quaternion.normSq_ne_zero
code: theorem normSq_ne_zero : normSq a ≠ 0 ↔ a ≠ 0 
goal: Quaternion.normSq a ≠ 0 ↔ a ≠ 0

full_name: Quaternion.normSq_nonneg
code: @[simp]
theorem normSq_nonneg : 0 ≤ normSq a 
goal: 0 ≤ Quaternion.normSq a

full_name: Quaternion.normSq_le_zero
code: @[simp]
theorem normSq_le_zero : normSq a ≤ 0 ↔ a = 0 
goal: Quaternion.normSq a ≤ 0 ↔ a = 0

full_name: Quaternion.instNontrivial
code: instance instNontrivial : Nontrivial ℍ[R] 
goal: Nontrivial ℍ[R]

full_name: Quaternion.instNoZeroDivisors
code: instance : NoZeroDivisors ℍ[R] 
goal: NoZeroDivisors ℍ[R]

full_name: Quaternion.instIsDomain
code: instance : IsDomain ℍ[R] 
goal: IsDomain ℍ[R]

full_name: Quaternion.sq_eq_normSq
code: theorem sq_eq_normSq : a ^ 2 = normSq a ↔ a = a.re 
goal: a ^ 2 = ↑(Quaternion.normSq a) ↔ a = ↑a.re

full_name: Quaternion.sq_eq_neg_normSq
code: theorem sq_eq_neg_normSq : a ^ 2 = -normSq a ↔ a.re = 0 
goal: a ^ 2 = -↑(Quaternion.normSq a) ↔ a.re = 0

full_name: Quaternion.instInv
code: @[simps (config := .lemmasOnly)]
instance instInv : Inv ℍ[R] 
goal: Inv ℍ[R]

full_name: Quaternion.instInv_inv
code: @[simps (config := .lemmasOnly)]
instance instInv : Inv ℍ[R] 
goal: a⁻¹ = (Quaternion.normSq a)⁻¹ • star a

full_name: Quaternion.instGroupWithZero
code: instance instGroupWithZero : GroupWithZero ℍ[R] 
goal: GroupWithZero ℍ[R]

full_name: Quaternion.coe_inv
code: @[norm_cast, simp]
theorem coe_inv (x : R) : ((x⁻¹ : R) : ℍ[R]) = (↑x)⁻¹ 
goal: ↑x⁻¹ = (↑x)⁻¹

full_name: Quaternion.coe_div
code: @[norm_cast, simp]
theorem coe_div (x y : R) : ((x / y : R) : ℍ[R]) = x / y 
goal: ↑(x / y) = ↑x / ↑y

full_name: Quaternion.coe_zpow
code: @[norm_cast, simp]
theorem coe_zpow (x : R) (z : ℤ) : ((x ^ z : R) : ℍ[R]) = (x : ℍ[R]) ^ z 
goal: ↑(x ^ z) = ↑x ^ z

full_name: Quaternion.instNNRatCast
code: instance instNNRatCast : NNRatCast ℍ[R] 
goal: NNRatCast ℍ[R]

full_name: Quaternion.instRatCast
code: instance instRatCast : RatCast ℍ[R] 
goal: RatCast ℍ[R]

full_name: Quaternion.re_nnratCast
code: @[simp, norm_cast] lemma re_nnratCast (q : ℚ≥0) : (q : ℍ[R]).re = q 
goal: (↑q).re = ↑q

full_name: Quaternion.im_nnratCast
code: @[simp, norm_cast] lemma im_nnratCast (q : ℚ≥0) : (q : ℍ[R]).im = 0 
goal: (↑q).im = 0

full_name: Quaternion.imI_nnratCast
code: @[simp, norm_cast] lemma imI_nnratCast (q : ℚ≥0) : (q : ℍ[R]).imI = 0 
goal: (↑q).imI = 0

full_name: Quaternion.imJ_nnratCast
code: @[simp, norm_cast] lemma imJ_nnratCast (q : ℚ≥0) : (q : ℍ[R]).imJ = 0 
goal: (↑q).imJ = 0

full_name: Quaternion.imK_nnratCast
code: @[simp, norm_cast] lemma imK_nnratCast (q : ℚ≥0) : (q : ℍ[R]).imK = 0 
goal: (↑q).imK = 0

full_name: Quaternion.ratCast_re
code: @[simp, norm_cast] lemma ratCast_re (q : ℚ) : (q : ℍ[R]).re = q 
goal: (↑q).re = ↑q

full_name: Quaternion.ratCast_im
code: @[simp, norm_cast] lemma ratCast_im (q : ℚ) : (q : ℍ[R]).im = 0 
goal: (↑q).im = 0

full_name: Quaternion.ratCast_imI
code: @[simp, norm_cast] lemma ratCast_imI (q : ℚ) : (q : ℍ[R]).imI = 0 
goal: (↑q).imI = 0

full_name: Quaternion.ratCast_imJ
code: @[simp, norm_cast] lemma ratCast_imJ (q : ℚ) : (q : ℍ[R]).imJ = 0 
goal: (↑q).imJ = 0

full_name: Quaternion.ratCast_imK
code: @[simp, norm_cast] lemma ratCast_imK (q : ℚ) : (q : ℍ[R]).imK = 0 
goal: (↑q).imK = 0

full_name: Quaternion.coe_nnratCast
code: @[norm_cast] lemma coe_nnratCast (q : ℚ≥0) : ↑(q : R) = (q : ℍ[R]) 
goal: ↑↑q = ↑q

full_name: Quaternion.coe_ratCast
code: @[norm_cast] lemma coe_ratCast (q : ℚ) : ↑(q : R) = (q : ℍ[R]) 
goal: ↑↑q = ↑q

full_name: Quaternion.instDivisionRing
code: instance instDivisionRing : DivisionRing ℍ[R] 
goal: DivisionRing ℍ[R]

full_name: Quaternion.normSq_inv
code: theorem normSq_inv : normSq a⁻¹ = (normSq a)⁻¹ 
goal: Quaternion.normSq a⁻¹ = (Quaternion.normSq a)⁻¹

full_name: Quaternion.normSq_div
code: theorem normSq_div : normSq (a / b) = normSq a / normSq b 
goal: Quaternion.normSq (a / b) = Quaternion.normSq a / Quaternion.normSq b

full_name: Quaternion.normSq_zpow
code: theorem normSq_zpow (z : ℤ) : normSq (a ^ z) = normSq a ^ z 
goal: Quaternion.normSq (a ^ z) = Quaternion.normSq a ^ z

full_name: Quaternion.normSq_ratCast
code: @[norm_cast]
theorem normSq_ratCast (q : ℚ) : normSq (q : ℍ[R]) = (q : ℍ[R]) ^ 2 
goal: ↑(Quaternion.normSq ↑q) = ↑q ^ 2

full_name: _private.Mathlib.Algebra.Quaternion.0.Cardinal.pow_four
code: private theorem pow_four [Infinite R] : #R ^ 4 = #R 
goal: Cardinal.mk R ^ 4 = Cardinal.mk R

full_name: Cardinal.mk_quaternionAlgebra
code: /-- The cardinality of a quaternion algebra, as a type. -/
theorem mk_quaternionAlgebra : #(ℍ[R,c₁,c₂]) = #R ^ 4 
goal: Cardinal.mk ℍ[R,c₁,c₂] = Cardinal.mk R ^ 4

full_name: Cardinal.mk_quaternionAlgebra_of_infinite
code: @[simp]
theorem mk_quaternionAlgebra_of_infinite [Infinite R] : #(ℍ[R,c₁,c₂]) = #R 
goal: Cardinal.mk ℍ[R,c₁,c₂] = Cardinal.mk R

full_name: Cardinal.mk_univ_quaternionAlgebra
code: /-- The cardinality of a quaternion algebra, as a set. -/
theorem mk_univ_quaternionAlgebra : #(Set.univ : Set ℍ[R,c₁,c₂]) = #R ^ 4 
goal: Cardinal.mk ↑Set.univ = Cardinal.mk R ^ 4

full_name: Cardinal.mk_univ_quaternionAlgebra_of_infinite
code: theorem mk_univ_quaternionAlgebra_of_infinite [Infinite R] :
    #(Set.univ : Set ℍ[R,c₁,c₂]) = #R 
goal: Cardinal.mk ↑Set.univ = Cardinal.mk R

full_name: Cardinal.instReprQuaternionAlgebra
code: /-- Show the quaternion ⟨w, x, y, z⟩ as a string "{ re := w, imI := x, imJ := y, imK := z }".

For the typical case of quaternions over ℝ, each component will show as a Cauchy sequence due to
the way Real numbers are represented.
-/
instance [Repr R] {a b : R} : Repr ℍ[R, a, b] 
goal: Repr ℍ[R,a,b]

full_name: Cardinal.mk_quaternion
code: /-- The cardinality of the quaternions, as a type. -/
@[simp]
theorem mk_quaternion : #(ℍ[R]) = #R ^ 4 
goal: Cardinal.mk ℍ[R] = Cardinal.mk R ^ 4

full_name: Cardinal.mk_quaternion_of_infinite
code: theorem mk_quaternion_of_infinite [Infinite R] : #(ℍ[R]) = #R 
goal: Cardinal.mk ℍ[R] = Cardinal.mk R

full_name: Cardinal.mk_univ_quaternion
code: /-- The cardinality of the quaternions, as a set. -/
--@[simp] Porting note (#10618): `simp` can prove it
theorem mk_univ_quaternion : #(Set.univ : Set ℍ[R]) = #R ^ 4 
goal: Cardinal.mk ↑Set.univ = Cardinal.mk R ^ 4

full_name: Cardinal.mk_univ_quaternion_of_infinite
code: theorem mk_univ_quaternion_of_infinite [Infinite R] : #(Set.univ : Set ℍ[R]) = #R 
goal: Cardinal.mk ↑Set.univ = Cardinal.mk R