The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V06. Rings, fields and ordered algebra

Mathlib.Algebra.QuadraticAlgebra.Basic

107 declarations and 6 deprecated aliases. Mathlib docs · Source

Quadratic algebras: involution, norm, trace, change of generator, etc.

Let R be a commutative ring. We define:

  • QuadraticAlgebra.star: the quadratic involution

  • QuadraticAlgebra.norm: the norm

  • QuadraticAlgebra.trace: the trace, as an R-linear map

  • QuadraticAlgebra.changeGenerator and QuadraticAlgebra.changeGeneratorEquiv: the R-algebra map, respectively isomorphism (when u is a unit), induced by the change of generator ω ↦ u • ω + k

  • QuadraticAlgebra.mapRingHom: the ring homomorphism induced by a ring homomorphism R →+* S

  • QuadraticAlgebra.baseChange: the R-algebra homomorphism induced by a base change R → S

We prove:

  • QuadraticAlgebra.isUnit_iff_norm_isUnit: w : QuadraticAlgebra R a b is a unit iff w.norm is a unit in R.

  • QuadraticAlgebra.norm_mem_nonZeroDivisors_iff: w : QuadraticAlgebra R a b isn't a zero divisor iff w.norm isn't a zero divisor in R.

  • If K is a field, and ∀ r, r ^ 2 ≠ a + b * r, then QuadraticAlgebra K a b is a field.

theorem QuadraticAlgebra.changeGenerator.congr_simp E1 #

∀ {R : Type u_2} [inst : CommRing R] (a b u u_1 : R) (e_u : u = u_1) (k k_1 : R) (e_k : k = k_1) {a' b' : R}
  (ha : a' = u ^ 2 * a - u * b * k - k ^ 2) (hb : b' = u * b + 2 * k),
  QuadraticAlgebra.changeGenerator a b u k ha hb = QuadraticAlgebra.changeGenerator a b u_1 k_1 ⋯ ⋯

def QuadraticAlgebra.omega E1 #

{R : Type u_2} → {a b : R} → [Zero R] → [One R] → QuadraticAlgebra R a b

The representative of the root in the quadratic algebra

def QuadraticAlgebra.termω E1 #

Lean.ParserDescr

the canonical element ⟨0, 1⟩ in a quadratic algebra QuadraticAlgebra R a b.

theorem QuadraticAlgebra.re_omega E0 #

∀ {R : Type u_2} {a b : R} [inst : Zero R] [inst_1 : One R], QuadraticAlgebra.omega.re = 0

theorem QuadraticAlgebra.im_omega E0 #

∀ {R : Type u_2} {a b : R} [inst : Zero R] [inst_1 : One R], QuadraticAlgebra.omega.im = 1

theorem QuadraticAlgebra.omega_mul_omega_eq_mk E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R],
  QuadraticAlgebra.omega * QuadraticAlgebra.omega = { re := a, im := b }

theorem QuadraticAlgebra.omega_mul_omega_eq_add E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R],
  QuadraticAlgebra.omega * QuadraticAlgebra.omega = a • 1 + b • QuadraticAlgebra.omega

theorem QuadraticAlgebra.omega_pow_two_eq_add E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R], QuadraticAlgebra.omega ^ 2 = a • 1 + b • QuadraticAlgebra.omega

theorem QuadraticAlgebra.omega_mul_omega_eq_algebraMap E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R],
  QuadraticAlgebra.omega * QuadraticAlgebra.omega =
    (algebraMap R (QuadraticAlgebra R a b)) a + (algebraMap R (QuadraticAlgebra R a b)) b * QuadraticAlgebra.omega

theorem QuadraticAlgebra.basis_apply_one E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R], (QuadraticAlgebra.basis a b) 1 = QuadraticAlgebra.omega

theorem QuadraticAlgebra.omega_mul_mk E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] (x y : R),
  QuadraticAlgebra.omega * { re := x, im := y } = { re := a * y, im := x + b * y }

theorem QuadraticAlgebra.omega_mul_algebraMap_mul_mk E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] (n x y : R),
  QuadraticAlgebra.omega * (algebraMap R (QuadraticAlgebra R a b)) n * { re := x, im := y } =
    { re := a * n * y, im := n * x + n * b * y }

theorem QuadraticAlgebra.mk_eq_add_smul_omega E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] (x y : R),
  { re := x, im := y } = (algebraMap R (QuadraticAlgebra R a b)) x + y • QuadraticAlgebra.omega

theorem QuadraticAlgebra.re_smul_add_im_smul E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] (x : QuadraticAlgebra R a b),
  x.re • 1 + x.im • QuadraticAlgebra.omega = x

Decomposition of an element of a quadratic algebra in the basis (1, ω).

theorem QuadraticAlgebra.algHom_ext E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A]
  {f g : QuadraticAlgebra R a b →ₐ[R] A}, f QuadraticAlgebra.omega = g QuadraticAlgebra.omega → f = g

theorem QuadraticAlgebra.algHom_ext_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A]
  {f g : QuadraticAlgebra R a b →ₐ[R] A}, f = g ↔ f QuadraticAlgebra.omega = g QuadraticAlgebra.omega

def QuadraticAlgebra.lift E1 #

{R : Type u_2} →
  {a b : R} →
    [inst : CommSemiring R] →
      {A : Type u_3} →
        [inst_1 : Ring A] → [inst_2 : Algebra R A] → { u // u * u = a • 1 + b • u } ≃ (QuadraticAlgebra R a b →ₐ[R] A)

The unique AlgHom from QuadraticAlgebra R a b to an R-algebra A, constructed by replacing ω with the provided root. Conversely, this associates to every algebra morphism QuadraticAlgebra R a b →ₐ[R] A a value of ω in A.

theorem QuadraticAlgebra.lift_apply_apply E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A]
  (u : { u // u * u = a • 1 + b • u }) (z : QuadraticAlgebra R a b), (QuadraticAlgebra.lift u) z = z.re • 1 + z.im • ↑u

theorem QuadraticAlgebra.lift_symm_apply_coe E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A]
  (f : QuadraticAlgebra R a b →ₐ[R] A), ↑(QuadraticAlgebra.lift.symm f) = f QuadraticAlgebra.omega

theorem QuadraticAlgebra.adjoin_omega_eq_top E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R], R[QuadraticAlgebra.omega] = ⊤

A quadratic algebra is generated by ω.

theorem QuadraticAlgebra.range_lift E1 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A] {u : A}
  (h : u * u = a • 1 + b • u), (QuadraticAlgebra.lift ⟨u, h⟩).range = R[u]

The range of lift ⟨u, h⟩ is the subalgebra of A generated by u.

theorem QuadraticAlgebra.lift_surjective_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A] {u : A}
  (h : u * u = a • 1 + b • u), Function.Surjective ⇑(QuadraticAlgebra.lift ⟨u, h⟩) ↔ R[u] = ⊤

lift ⟨u, h⟩ is surjective iff u generates A as an R-algebra.

theorem QuadraticAlgebra.lift_injective_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {A : Type u_3} [inst_1 : Ring A] [inst_2 : Algebra R A] {u : A}
  (h : u * u = a • 1 + b • u), Function.Injective ⇑(QuadraticAlgebra.lift ⟨u, h⟩) ↔ LinearIndependent R ![1, u]

lift ⟨u, h⟩ is injective iff 1 and u are R-linearly independent.

instance QuadraticAlgebra.instStar E0 #

{R : Type u_2} → {a b : R} → [CommRing R] → Star (QuadraticAlgebra R a b)

Conjugation in QuadraticAlgebra R a b. The conjugate of x + y ω is x + y ω' = (x + b * y) - y ω.

theorem QuadraticAlgebra.star_mk E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (x y : R), star { re := x, im := y } = { re := x + b * y, im := -y }

theorem QuadraticAlgebra.re_star E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b), (star z).re = z.re + b * z.im

theorem QuadraticAlgebra.im_star E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b), (star z).im = -z.im

theorem QuadraticAlgebra.mul_star E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (x y : R),
  { re := x, im := y } * star { re := x, im := y } =
    (algebraMap R (QuadraticAlgebra R a b)) x * (algebraMap R (QuadraticAlgebra R a b)) x +
        (algebraMap R (QuadraticAlgebra R a b)) b * (algebraMap R (QuadraticAlgebra R a b)) x *
          (algebraMap R (QuadraticAlgebra R a b)) y -
      (algebraMap R (QuadraticAlgebra R a b)) a * (algebraMap R (QuadraticAlgebra R a b)) y *
        (algebraMap R (QuadraticAlgebra R a b)) y

instance QuadraticAlgebra.instStarRing E0 #

{R : Type u_2} → {a b : R} → [inst : CommRing R] → StarRing (QuadraticAlgebra R a b)

theorem QuadraticAlgebra.sub_star E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  z - star z = z.im • (QuadraticAlgebra.omega - star QuadraticAlgebra.omega)

z - star z is a multiple of the difference ω - star ω.

def QuadraticAlgebra.starAlgEquiv E1 #

{R : Type u_2} → {a b : R} → [inst : CommRing R] → QuadraticAlgebra R a b ≃ₐ[R] QuadraticAlgebra R a b

Conjugation as an R-algebra automorphism of QuadraticAlgebra R a b.

theorem QuadraticAlgebra.starAlgEquiv_apply E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b), QuadraticAlgebra.starAlgEquiv z = star z

theorem QuadraticAlgebra.starAlgEquiv_symm_apply E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  QuadraticAlgebra.starAlgEquiv.symm z = star z

def QuadraticAlgebra.norm E1 #

{R : Type u_2} → {a b : R} → [inst : CommRing R] → QuadraticAlgebra R a b →* R

the norm in a quadratic algebra, as a MonoidHom.

theorem QuadraticAlgebra.norm_def E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  QuadraticAlgebra.norm z = z.re * z.re + b * z.re * z.im - a * z.im * z.im

theorem QuadraticAlgebra.norm_zero E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R], QuadraticAlgebra.norm 0 = 0

theorem QuadraticAlgebra.norm_one E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R], QuadraticAlgebra.norm 1 = 1

theorem QuadraticAlgebra.norm_algebraMap E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (r : R),
  QuadraticAlgebra.norm ((algebraMap R (QuadraticAlgebra R a b)) r) = r ^ 2

theorem QuadraticAlgebra.norm_smul E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {S : Type u_3} [inst_1 : Monoid S] [inst_2 : DistribMulAction S R]
  [IsScalarTower S R R] (s : S) (z : QuadraticAlgebra R a b),
  QuadraticAlgebra.norm (s • z) = s ^ 2 • QuadraticAlgebra.norm z

theorem QuadraticAlgebra.norm_natCast E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (n : ℕ), QuadraticAlgebra.norm ↑n = ↑n ^ 2

theorem QuadraticAlgebra.norm_intCast E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (n : ℤ), QuadraticAlgebra.norm ↑n = ↑n ^ 2

theorem QuadraticAlgebra.algebraMap_norm_eq_mul_star E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  (algebraMap R (QuadraticAlgebra R a b)) (QuadraticAlgebra.norm z) = z * star z

theorem QuadraticAlgebra.norm_neg E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (x : QuadraticAlgebra R a b),
  QuadraticAlgebra.norm (-x) = QuadraticAlgebra.norm x

theorem QuadraticAlgebra.norm_star E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (x : QuadraticAlgebra R a b),
  QuadraticAlgebra.norm (star x) = QuadraticAlgebra.norm x

theorem QuadraticAlgebra.isUnit_iff_norm_isUnit E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {x : QuadraticAlgebra R a b}, IsUnit x ↔ IsUnit (QuadraticAlgebra.norm x)

theorem QuadraticAlgebra.norm_eq_one_iff_mem_unitary E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  QuadraticAlgebra.norm z = 1 ↔ z ∈ unitary (QuadraticAlgebra R a b)

An element of QuadraticAlgebra R a b has norm equal to 1 if and only if it is contained in the submonoid of unitary elements.

theorem QuadraticAlgebra.norm_eq_one E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  z ∈ unitary (QuadraticAlgebra R a b) → QuadraticAlgebra.norm z = 1

Alias of the reverse direction of QuadraticAlgebra.norm_eq_one_iff_mem_unitary.


An element of QuadraticAlgebra R a b has norm equal to 1 if and only if it is contained in the submonoid of unitary elements.

theorem QuadraticAlgebra.mem_unitary E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  QuadraticAlgebra.norm z = 1 → z ∈ unitary (QuadraticAlgebra R a b)

Alias of the forward direction of QuadraticAlgebra.norm_eq_one_iff_mem_unitary.


An element of QuadraticAlgebra R a b has norm equal to 1 if and only if it is contained in the submonoid of unitary elements.

theorem QuadraticAlgebra.mker_norm_eq_unitary E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R], MonoidHom.mker QuadraticAlgebra.norm = unitary (QuadraticAlgebra R a b)

The kernel of the norm map on QuadraticAlgebra R a b equals the submonoid of unitary elements.

theorem QuadraticAlgebra.algebraMap_mem_nonZeroDivisors_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {r : R},
  (algebraMap R (QuadraticAlgebra R a b)) r ∈ nonZeroDivisors (QuadraticAlgebra R a b) ↔ r ∈ nonZeroDivisors R

theorem QuadraticAlgebra.star_mem_nonZeroDivisors E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  z ∈ nonZeroDivisors (QuadraticAlgebra R a b) → star z ∈ nonZeroDivisors (QuadraticAlgebra R a b)

theorem QuadraticAlgebra.star_mem_nonZeroDivisors_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  star z ∈ nonZeroDivisors (QuadraticAlgebra R a b) ↔ z ∈ nonZeroDivisors (QuadraticAlgebra R a b)

theorem QuadraticAlgebra.norm_mem_nonZeroDivisors_iff E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] {z : QuadraticAlgebra R a b},
  QuadraticAlgebra.norm z ∈ nonZeroDivisors R ↔ z ∈ nonZeroDivisors (QuadraticAlgebra R a b)

def QuadraticAlgebra.trace E1 #

{R : Type u_2} → {a b : R} → [inst : CommRing R] → QuadraticAlgebra R a b →ₗ[R] R

The trace in a quadratic algebra, as an R-linear map.

theorem QuadraticAlgebra.trace_def E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  QuadraticAlgebra.trace z = 2 * z.re + b * z.im

theorem QuadraticAlgebra.trace_algebraMap E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (r : R),
  QuadraticAlgebra.trace ((algebraMap R (QuadraticAlgebra R a b)) r) = 2 * r

theorem QuadraticAlgebra.trace_natCast E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (n : ℕ), QuadraticAlgebra.trace ↑n = 2 * ↑n

theorem QuadraticAlgebra.trace_intCast E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (n : ℤ), QuadraticAlgebra.trace ↑n = 2 * ↑n

theorem QuadraticAlgebra.trace_omega E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R], QuadraticAlgebra.trace QuadraticAlgebra.omega = b

theorem QuadraticAlgebra.trace_one E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R], QuadraticAlgebra.trace 1 = 2

theorem QuadraticAlgebra.trace_star E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  QuadraticAlgebra.trace (star z) = QuadraticAlgebra.trace z

theorem QuadraticAlgebra.algebraMap_trace_eq_add_star E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  (algebraMap R (QuadraticAlgebra R a b)) (QuadraticAlgebra.trace z) = z + star z

z + star z is the trace of z.

theorem QuadraticAlgebra.star_eq E0 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  star z = (algebraMap R (QuadraticAlgebra R a b)) (QuadraticAlgebra.trace z) - z

The conjugate of z is trace z - z.

theorem QuadraticAlgebra.sq_sub_trace_smul_add_norm_eq_zero E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  z ^ 2 - QuadraticAlgebra.trace z • z + (algebraMap R (QuadraticAlgebra R a b)) (QuadraticAlgebra.norm z) = 0

Every element of a quadratic algebra satisfies its characteristic equation.

theorem QuadraticAlgebra.sq_eq_trace_smul_sub_norm E1 #

∀ {R : Type u_2} {a b : R} [inst : CommRing R] (z : QuadraticAlgebra R a b),
  z ^ 2 = QuadraticAlgebra.trace z • z - (algebraMap R (QuadraticAlgebra R a b)) (QuadraticAlgebra.norm z)

def QuadraticAlgebra.changeGenerator E1 #

{R : Type u_2} →
  [inst : CommRing R] →
    (a b u k : R) →
      {a' b' : R} →
        a' = u ^ 2 * a - u * b * k - k ^ 2 → b' = u * b + 2 * k → QuadraticAlgebra R a' b' →ₐ[R] QuadraticAlgebra R a b

The R-algebra map induced by the change of generator ω ↦ u • ω + k, see changeGenerator_omega.

theorem QuadraticAlgebra.im_changeGenerator_apply E0 #

∀ {R : Type u_2} [inst : CommRing R] (a b u k : R) {a' b' : R} (ha : a' = u ^ 2 * a - u * b * k - k ^ 2)
  (hb : b' = u * b + 2 * k) (z : QuadraticAlgebra R a' b'),
  ((QuadraticAlgebra.changeGenerator a b u k ha hb) z).im = z.im * u

theorem QuadraticAlgebra.re_changeGenerator_apply E0 #

∀ {R : Type u_2} [inst : CommRing R] (a b u k : R) {a' b' : R} (ha : a' = u ^ 2 * a - u * b * k - k ^ 2)
  (hb : b' = u * b + 2 * k) (z : QuadraticAlgebra R a' b'),
  ((QuadraticAlgebra.changeGenerator a b u k ha hb) z).re = z.re + z.im * k

theorem QuadraticAlgebra.changeGenerator_omega E0 #

∀ {R : Type u_2} [inst : CommRing R] (a b u k : R) {a' b' : R} (ha : a' = u ^ 2 * a - u * b * k - k ^ 2)
  (hb : b' = u * b + 2 * k),
  (QuadraticAlgebra.changeGenerator a b u k ha hb) QuadraticAlgebra.omega =
    u • QuadraticAlgebra.omega + (algebraMap R (QuadraticAlgebra R a b)) k

theorem QuadraticAlgebra.changeGenerator_injective E1 #

∀ {R : Type u_2} [inst : CommRing R] (a b u k : R) {a' b' : R} (ha : a' = u ^ 2 * a - u * b * k - k ^ 2)
  (hb : b' = u * b + 2 * k), IsRegular u → Function.Injective ⇑(QuadraticAlgebra.changeGenerator a b u k ha hb)

def QuadraticAlgebra.changeGeneratorEquiv E1 #

{R : Type u_2} →
  [inst : CommRing R] →
    (a b : R) →
      (u : Rˣ) →
        (k : R) →
          {a' b' : R} →
            a' = ↑u ^ 2 * a - ↑u * b * k - k ^ 2 →
              b' = ↑u * b + 2 * k → QuadraticAlgebra R a' b' ≃ₐ[R] QuadraticAlgebra R a b

changeGenerator along a unit u, as an isomorphism.

theorem QuadraticAlgebra.changeGeneratorEquiv_apply E0 #

∀ {R : Type u_2} [inst : CommRing R] (a b : R) (u : Rˣ) (k : R) {a' b' : R} (ha : a' = ↑u ^ 2 * a - ↑u * b * k - k ^ 2)
  (hb : b' = ↑u * b + 2 * k) (a_1 : QuadraticAlgebra R a' b'),
  (QuadraticAlgebra.changeGeneratorEquiv a b u k ha hb) a_1 = (QuadraticAlgebra.changeGenerator a b (↑u) k ha hb) a_1

theorem QuadraticAlgebra.changeGeneratorEquiv_symm_apply E0 #

∀ {R : Type u_2} [inst : CommRing R] (a b : R) (u : Rˣ) (k : R) {a' b' : R} (ha : a' = ↑u ^ 2 * a - ↑u * b * k - k ^ 2)
  (hb : b' = ↑u * b + 2 * k) (a_1 : QuadraticAlgebra R a b),
  (QuadraticAlgebra.changeGeneratorEquiv a b u k ha hb).symm a_1 =
    (QuadraticAlgebra.changeGenerator a' b' (↑u⁻¹) (-(↑u⁻¹ * k)) ⋯ ⋯) a_1

def QuadraticAlgebra.mapRingHom E1 #

{R : Type u_3} →
  {S : Type u_4} →
    [inst : CommSemiring R] →
      [inst_1 : CommSemiring S] → (f : R →+* S) → (a b : R) → QuadraticAlgebra R a b →+* QuadraticAlgebra S (f a) (f b)

The ring homomorphism between quadratic algebras induced by a ring homomorphism f : R →+* S, sending ω to ω.

theorem QuadraticAlgebra.re_mapRingHom_apply E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R)
  (z : QuadraticAlgebra R a b), ((QuadraticAlgebra.mapRingHom f a b) z).re = f z.re

theorem QuadraticAlgebra.im_mapRingHom_apply E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R)
  (z : QuadraticAlgebra R a b), ((QuadraticAlgebra.mapRingHom f a b) z).im = f z.im

theorem QuadraticAlgebra.mapRingHom_omega E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R),
  (QuadraticAlgebra.mapRingHom f a b) QuadraticAlgebra.omega = QuadraticAlgebra.omega

theorem QuadraticAlgebra.mapRingHom_injective E1 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R),
  Function.Injective ⇑f → Function.Injective ⇑(QuadraticAlgebra.mapRingHom f a b)

theorem QuadraticAlgebra.mapRingHom_surjective E1 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R),
  Function.Surjective ⇑f → Function.Surjective ⇑(QuadraticAlgebra.mapRingHom f a b)

theorem QuadraticAlgebra.mapRingHom_id E0 #

∀ {R : Type u_3} [inst : CommSemiring R] (a b : R),
  QuadraticAlgebra.mapRingHom (RingHom.id R) a b = RingHom.id (QuadraticAlgebra R a b)

theorem QuadraticAlgebra.mapRingHom_comp E1 #

∀ {R : Type u_3} {S : Type u_4} {T : Type u_5} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (a b : R)
  [inst_2 : CommSemiring T] (g : S →+* T),
  (QuadraticAlgebra.mapRingHom g (f a) (f b)).comp (QuadraticAlgebra.mapRingHom f a b) =
    QuadraticAlgebra.mapRingHom (g.comp f) a b

theorem QuadraticAlgebra.norm_mapRingHom E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (a b : R)
  (x : QuadraticAlgebra R a b),
  QuadraticAlgebra.norm ((QuadraticAlgebra.mapRingHom f a b) x) = f (QuadraticAlgebra.norm x)

theorem QuadraticAlgebra.trace_mapRingHom E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (a b : R)
  (x : QuadraticAlgebra R a b),
  QuadraticAlgebra.trace ((QuadraticAlgebra.mapRingHom f a b) x) = f (QuadraticAlgebra.trace x)

theorem QuadraticAlgebra.mapRingHom_star E0 #

∀ {R : Type u_3} {S : Type u_4} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (a b : R)
  (x : QuadraticAlgebra R a b),
  (QuadraticAlgebra.mapRingHom f a b) (star x) = star ((QuadraticAlgebra.mapRingHom f a b) x)

def QuadraticAlgebra.baseChange E1 #

{R : Type u_3} →
  (S : Type u_4) →
    [inst : CommSemiring R] →
      [inst_1 : CommSemiring S] →
        [inst_2 : Algebra R S] →
          (a b : R) → QuadraticAlgebra R a b →ₐ[R] QuadraticAlgebra S ((algebraMap R S) a) ((algebraMap R S) b)

The R-algebra homomorphism between quadratic algebras induced by the base change R → S, sending ω to ω.

theorem QuadraticAlgebra.coe_baseChange E0 #

∀ {R : Type u_3} (S : Type u_4) [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Algebra R S] (a b : R),
  ↑(QuadraticAlgebra.baseChange S a b) = QuadraticAlgebra.mapRingHom (algebraMap R S) a b

def QuadraticAlgebra.algebra E1 #

{R : Type u_3} →
  (S : Type u_4) →
    [inst : CommSemiring R] →
      [inst_1 : CommSemiring S] →
        [inst_2 : Algebra R S] →
          (a b : R) → Algebra (QuadraticAlgebra R a b) (QuadraticAlgebra S ((algebraMap R S) a) ((algebraMap R S) b))

The QuadraticAlgebra R a b-algebra structure on the base change of QuadraticAlgebra R a b along R → S. This is not an instance, since for R = S it clashes with Algebra.id.

theorem QuadraticAlgebra.baseChange_injective E1 #

∀ {R : Type u_3} (S : Type u_4) [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Algebra R S] (a b : R)
  [FaithfulSMul R S], Function.Injective ⇑(QuadraticAlgebra.baseChange S a b)

theorem QuadraticAlgebra.norm_eq_zero_iff_eq_zero E1 #

∀ {K : Type u_1} [inst : Field K] {a b : K} [Hab : Fact (∀ (r : K), r ^ 2 ≠ a + b * r)] {z : QuadraticAlgebra K a b},
  QuadraticAlgebra.norm z = 0 ↔ z = 0

instance QuadraticAlgebra.instNNRatCast E0 #

{K : Type u_1} → [Field K] → {a b : K} → NNRatCast (QuadraticAlgebra K a b)

theorem QuadraticAlgebra.nnratCast_def E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ≥0), NNRatCast.nnratCast q = QuadraticAlgebra.C ↑q

theorem QuadraticAlgebra.im_nnratCast E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ≥0), (NNRatCast.nnratCast q).im = 0

theorem QuadraticAlgebra.re_nnratCast E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ≥0), (NNRatCast.nnratCast q).re = ↑q

theorem QuadraticAlgebra.im_ratCast E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ), (RatCast.ratCast q).im = 0

theorem QuadraticAlgebra.ratCast_def E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ), RatCast.ratCast q = QuadraticAlgebra.C ↑q

instance QuadraticAlgebra.instRatCast E0 #

{K : Type u_1} → [Field K] → {a b : K} → RatCast (QuadraticAlgebra K a b)

theorem QuadraticAlgebra.re_ratCast E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (q : ℚ), (RatCast.ratCast q).re = ↑q

theorem QuadraticAlgebra.im_inv E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (z : QuadraticAlgebra K a b), z⁻¹.im = -((QuadraticAlgebra.norm z)⁻¹ * z.im)

instance QuadraticAlgebra.instInv E0 #

{K : Type u_1} → [Field K] → {a b : K} → Inv (QuadraticAlgebra K a b)

theorem QuadraticAlgebra.inv_def E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (z : QuadraticAlgebra K a b), z⁻¹ = (QuadraticAlgebra.norm z)⁻¹ • star z

theorem QuadraticAlgebra.re_inv E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (z : QuadraticAlgebra K a b),
  z⁻¹.re = (QuadraticAlgebra.norm z)⁻¹ * (z.re + b * z.im)

instance QuadraticAlgebra.instDiv E0 #

{K : Type u_1} → [Field K] → {a b : K} → Div (QuadraticAlgebra K a b)

theorem QuadraticAlgebra.div_def E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (w z : QuadraticAlgebra K a b), w / z = w * z⁻¹

theorem QuadraticAlgebra.im_div E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (w z : QuadraticAlgebra K a b),
  (w / z).im =
    -(w.re * ((QuadraticAlgebra.norm z)⁻¹ * z.im)) + w.im * ((QuadraticAlgebra.norm z)⁻¹ * (z.re + b * z.im)) +
      -(b * w.im * ((QuadraticAlgebra.norm z)⁻¹ * z.im))

theorem QuadraticAlgebra.re_div E0 #

∀ {K : Type u_1} [inst : Field K] {a b : K} (w z : QuadraticAlgebra K a b),
  (w / z).re =
    w.re * ((QuadraticAlgebra.norm z)⁻¹ * (z.re + b * z.im)) + -(a * w.im * ((QuadraticAlgebra.norm z)⁻¹ * z.im))

instance QuadraticAlgebra.instField E0 #

{K : Type u_1} →
  [inst : Field K] → {a b : K} → [Hab : Fact (∀ (r : K), r ^ 2 ≠ a + b * r)] → Field (QuadraticAlgebra K a b)

If K is a field and there is no r : K such that r ^ 2 = a + b * r, then QuadraticAlgebra K a b is a field.

instance QuadraticAlgebra.instFactForallNeHPowOfNatHAddHMul E0 #

∀ {K : Type u_1} [inst : Field K] {a : K} [Fact ¬IsSquare a], Fact (∀ (r : K), r ^ 2 ≠ a + 0 * r)

When b = 0, the Field instance is inferable from ¬ IsSquare a alone: it provides the no-root condition ∀ r, r ^ 2 ≠ a + 0 * r.

Deprecated aliases

NameNew nameSince
QuadraticAlgebra.mapQuadraticAlgebra.changeGenerator2026-08-14
QuadraticAlgebra.mapEquivQuadraticAlgebra.changeGeneratorEquiv2026-08-14
QuadraticAlgebra.map_injectiveQuadraticAlgebra.changeGenerator_injective2026-08-14
QuadraticAlgebra.map_omegaQuadraticAlgebra.changeGenerator_omega2026-08-14
QuadraticAlgebra.omega_imQuadraticAlgebra.im_omega2026-08-13
QuadraticAlgebra.omega_reQuadraticAlgebra.re_omega2026-08-13