File: Mathlib/Algebra/QuaternionBasis.lean

full_name: QuaternionAlgebra.Basis.i_mul_j
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: self.i * self.j = self.k

full_name: QuaternionAlgebra.Basis.i_mul_i
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: self.i * self.i = c₁ • 1

full_name: QuaternionAlgebra.Basis.j
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: A

full_name: QuaternionAlgebra.Basis.j_mul_j
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: self.j * self.j = c₂ • 1

full_name: QuaternionAlgebra.Basis.j_mul_i
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: self.j * self.i = -self.k

full_name: QuaternionAlgebra.Basis.k
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: A

full_name: QuaternionAlgebra.Basis
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: Type u_2

full_name: QuaternionAlgebra.Basis.i
code: /-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k
goal: A

full_name: QuaternionAlgebra.Basis.ext
code: /-- Since `k` is redundant, it is not necessary to show `q₁.k = q₂.k` when showing `q₁ = q₂`. -/
@[ext]
protected theorem ext ⦃q₁ q₂ : Basis A c₁ c₂⦄ (hi : q₁.i = q₂.i) (hj : q₁.j = q₂.j) : q₁ = q₂ 
goal: q₁ = q₂

full_name: QuaternionAlgebra.Basis.self_i
code: /-- There is a natural quaternionic basis for the `QuaternionAlgebra`. -/
@[simps i j k]
protected def self : Basis ℍ[R,c₁,c₂] c₁ c₂ 
goal: (QuaternionAlgebra.Basis.self R).i = { re := 0, imI := 1, imJ := 0, imK := 0 }

full_name: QuaternionAlgebra.Basis.self
code: /-- There is a natural quaternionic basis for the `QuaternionAlgebra`. -/
@[simps i j k]
protected def self : Basis ℍ[R,c₁,c₂] c₁ c₂ 
goal: QuaternionAlgebra.Basis ℍ[R,c₁,c₂] c₁ c₂

full_name: QuaternionAlgebra.Basis.self_j
code: /-- There is a natural quaternionic basis for the `QuaternionAlgebra`. -/
@[simps i j k]
protected def self : Basis ℍ[R,c₁,c₂] c₁ c₂ 
goal: (QuaternionAlgebra.Basis.self R).j = { re := 0, imI := 0, imJ := 1, imK := 0 }

full_name: QuaternionAlgebra.Basis.self_k
code: /-- There is a natural quaternionic basis for the `QuaternionAlgebra`. -/
@[simps i j k]
protected def self : Basis ℍ[R,c₁,c₂] c₁ c₂ 
goal: (QuaternionAlgebra.Basis.self R).k = { re := 0, imI := 0, imJ := 0, imK := 1 }

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

full_name: QuaternionAlgebra.Basis.i_mul_k
code: @[simp]
theorem i_mul_k : q.i * q.k = c₁ • q.j 
goal: q.i * q.k = c₁ • q.j

full_name: QuaternionAlgebra.Basis.k_mul_i
code: @[simp]
theorem k_mul_i : q.k * q.i = -c₁ • q.j 
goal: q.k * q.i = -c₁ • q.j

full_name: QuaternionAlgebra.Basis.k_mul_j
code: @[simp]
theorem k_mul_j : q.k * q.j = c₂ • q.i 
goal: q.k * q.j = c₂ • q.i

full_name: QuaternionAlgebra.Basis.j_mul_k
code: @[simp]
theorem j_mul_k : q.j * q.k = -c₂ • q.i 
goal: q.j * q.k = -c₂ • q.i

full_name: QuaternionAlgebra.Basis.k_mul_k
code: @[simp]
theorem k_mul_k : q.k * q.k = -((c₁ * c₂) • (1 : A)) 
goal: q.k * q.k = -((c₁ * c₂) • 1)

full_name: QuaternionAlgebra.Basis.lift
code: /-- Intermediate result used to define `QuaternionAlgebra.Basis.liftHom`. -/
def lift (x : ℍ[R,c₁,c₂]) : A 
goal: A

full_name: QuaternionAlgebra.Basis.lift_zero
code: theorem lift_zero : q.lift (0 : ℍ[R,c₁,c₂]) = 0 
goal: q.lift 0 = 0

full_name: QuaternionAlgebra.Basis.lift_one
code: theorem lift_one : q.lift (1 : ℍ[R,c₁,c₂]) = 1 
goal: q.lift 1 = 1

full_name: QuaternionAlgebra.Basis.lift_add
code: theorem lift_add (x y : ℍ[R,c₁,c₂]) : q.lift (x + y) = q.lift x + q.lift y 
goal: q.lift (x + y) = q.lift x + q.lift y

full_name: QuaternionAlgebra.Basis.lift_mul
code: theorem lift_mul (x y : ℍ[R,c₁,c₂]) : q.lift (x * y) = q.lift x * q.lift y 
goal: q.lift (x * y) = q.lift x * q.lift y

full_name: QuaternionAlgebra.Basis.lift_smul
code: theorem lift_smul (r : R) (x : ℍ[R,c₁,c₂]) : q.lift (r • x) = r • q.lift x 
goal: q.lift (r • x) = r • q.lift x

full_name: QuaternionAlgebra.Basis.liftHom_apply
code: /-- A `QuaternionAlgebra.Basis` implies an `AlgHom` from the quaternions. -/
@[simps!]
def liftHom : ℍ[R,c₁,c₂] →ₐ[R] A 
goal: q.liftHom a = q.lift a

full_name: QuaternionAlgebra.Basis.liftHom
code: /-- A `QuaternionAlgebra.Basis` implies an `AlgHom` from the quaternions. -/
@[simps!]
def liftHom : ℍ[R,c₁,c₂] →ₐ[R] A 
goal: ℍ[R,c₁,c₂] →ₐ[R] A

full_name: QuaternionAlgebra.Basis.compHom_i
code: /-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂ 
goal: (q.compHom F).i = F q.i

full_name: QuaternionAlgebra.Basis.compHom_j
code: /-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂ 
goal: (q.compHom F).j = F q.j

full_name: QuaternionAlgebra.Basis.compHom
code: /-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂ 
goal: QuaternionAlgebra.Basis B c₁ c₂

full_name: QuaternionAlgebra.Basis.compHom_k
code: /-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂ 
goal: (q.compHom F).k = F q.k

full_name: QuaternionAlgebra.lift_apply
code: /-- A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`. -/
@[simps]
def lift : Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A) 
goal: QuaternionAlgebra.lift q = q.liftHom

full_name: QuaternionAlgebra.lift_symm_apply
code: /-- A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`. -/
@[simps]
def lift : Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A) 
goal: QuaternionAlgebra.lift.symm F = (QuaternionAlgebra.Basis.self R).compHom F

full_name: QuaternionAlgebra.lift
code: /-- A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`. -/
@[simps]
def lift : Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A) 
goal: QuaternionAlgebra.Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A)

full_name: QuaternionAlgebra.hom_ext
code: /-- Two `R`-algebra morphisms from a quaternion algebra are equal if they agree on `i` and `j`. -/
@[ext]
theorem hom_ext ⦃f g : ℍ[R,c₁,c₂] →ₐ[R] A⦄
    (hi : f (Basis.self R).i = g (Basis.self R).i) (hj : f (Basis.self R).j = g (Basis.self R).j) :
    f = g 
goal: f = g

full_name: Quaternion.hom_ext
code: /-- Two `R`-algebra morphisms from the quaternions are equal if they agree on `i` and `j`. -/
@[ext]
theorem hom_ext ⦃f g : ℍ[R] →ₐ[R] A⦄
    (hi : f (Basis.self R).i = g (Basis.self R).i) (hj : f (Basis.self R).j = g (Basis.self R).j) :
    f = g 
goal: f = g