Documentation

FLT.Data.Hurwitz

structure Hurwitz :
Instances For
    theorem Hurwitz.ext {x y : π“ž} (re : x.re = y.re) (im_o : x.im_o = y.im_o) (im_i : x.im_i = y.im_i) (im_oi : x.im_oi = y.im_oi) :
    x = y
    Equations
      Instances For
        Equations
          Instances For
            theorem Hurwitz.leftInvOn_toQuaternion_fromQuaternion :
            Set.LeftInvOn toQuaternion fromQuaternion {q : Quaternion ℝ | βˆƒ (a : β„€) (b : β„€) (c : β„€) (d : β„€), q = { re := ↑a, imI := ↑b, imJ := ↑c, imK := ↑d } ∨ q = { re := ↑a + 2⁻¹, imI := ↑b + 2⁻¹, imJ := ↑c + 2⁻¹, imK := ↑d + 2⁻¹ }}
            theorem Hurwitz.fromQuaternion_injOn :
            Set.InjOn fromQuaternion {q : Quaternion ℝ | βˆƒ (a : β„€) (b : β„€) (c : β„€) (d : β„€), q = { re := ↑a, imI := ↑b, imJ := ↑c, imK := ↑d } ∨ q = { re := ↑a + 2⁻¹, imI := ↑b + 2⁻¹, imJ := ↑c + 2⁻¹, imK := ↑d + 2⁻¹ }}

            zero (0) #

            The Hurwitz number 0

            Equations
              Instances For

                notation 0 for zero

                Equations

                  one (1) #

                  Equations
                    Instances For

                      Notation 1 for one

                      Equations

                        Neg (-) #

                        The negation -z of a Hurwitz number

                        Equations
                          Instances For

                            Notation - for negation

                            Equations
                              @[simp]
                              theorem Hurwitz.neg_re (z : π“ž) :
                              (-z).re = -z.re

                              add (+) #

                              addition z+w of complex numbers

                              Equations
                                Instances For

                                  Notation + for addition

                                  Equations
                                    @[simp]
                                    theorem Hurwitz.add_re (z w : π“ž) :
                                    (z + w).re = z.re + w.re
                                    @[simp]
                                    theorem Hurwitz.add_im_o (z w : π“ž) :
                                    (z + w).im_o = z.im_o + w.im_o
                                    @[simp]
                                    theorem Hurwitz.add_im_i (z w : π“ž) :
                                    (z + w).im_i = z.im_i + w.im_i
                                    @[simp]
                                    theorem Hurwitz.add_im_oi (z w : π“ž) :
                                    (z + w).im_oi = z.im_oi + w.im_oi

                                    Notation + for addition

                                    Equations
                                      theorem Hurwitz.preserves_nsmulRec {M : Type u_1} {N : Type u_2} [Zero M] [Add M] [AddMonoid N] (f : M β†’ N) (zero : f 0 = 0) (add : βˆ€ (x y : M), f (x + y) = f x + f y) (n : β„•) (x : M) :
                                      f (nsmulRec n x) = n β€’ f x
                                      theorem Hurwitz.preserves_zsmul {G : Type u_1} {H : Type u_2} [Zero G] [Add G] [Neg G] [SMul β„• G] [SubNegMonoid H] (f : G β†’ H) (nsmul : βˆ€ (g : G) (n : β„•), f (n β€’ g) = n β€’ f g) (neg : βˆ€ (x : G), f (-x) = -f x) (z : β„€) (g : G) :
                                      f (zsmulRec (fun (x1 : β„•) (x2 : G) => x1 β€’ x2) z g) = z β€’ f g

                                      mul (*) #

                                      Multiplication z*w of two Hurwitz numbers

                                      Equations
                                        Instances For

                                          Notation * for multiplication

                                          Equations
                                            @[simp]
                                            theorem Hurwitz.mul_re (z w : π“ž) :
                                            (z * w).re = z.re * w.re - z.im_o * w.im_o - z.im_i * w.im_o - z.im_i * w.im_i + z.im_i * w.im_oi - z.im_oi * w.im_oi
                                            @[simp]
                                            theorem Hurwitz.mul_im_o (z w : π“ž) :
                                            (z * w).im_o = z.im_o * w.re + z.re * w.im_o - z.im_o * w.im_o - z.im_oi * w.im_o - z.im_oi * w.im_i + z.im_i * w.im_oi
                                            @[simp]
                                            theorem Hurwitz.mul_im_i (z w : π“ž) :
                                            (z * w).im_i = z.im_i * w.re - z.im_i * w.im_o + z.im_oi * w.im_o + z.re * w.im_i - z.im_o * w.im_oi - z.im_i * w.im_oi
                                            @[simp]
                                            theorem Hurwitz.mul_im_oi (z w : π“ž) :
                                            (z * w).im_oi = z.im_oi * w.re - z.im_i * w.im_o + z.im_o * w.im_i + z.re * w.im_oi - z.im_o * w.im_oi - z.im_oi * w.im_oi
                                            theorem Hurwitz.o_mul_i :
                                            { re := 0, im_o := 1, im_i := 0, im_oi := 0 } * { re := 0, im_o := 0, im_i := 1, im_oi := 0 } = { re := 0, im_o := 0, im_i := 0, im_oi := 1 }
                                            theorem Hurwitz.preserves_npowRec {M : Type u_1} {N : Type u_2} [One M] [Mul M] [Monoid N] (f : M β†’ N) (one : f 1 = 1) (mul : βˆ€ (x y : M), f (x * y) = f x * f y) (z : M) (n : β„•) :
                                            f (npowRec n z) = f z ^ n
                                            theorem Hurwitz.preserves_unaryCast {R : Type u_1} {S : Type u_2} [One R] [Zero R] [Add R] [AddMonoidWithOne S] (f : R β†’ S) (zero : f 0 = 0) (one : f 1 = 1) (add : βˆ€ (x y : R), f (x + y) = f x + f y) (n : β„•) :
                                            f n.unaryCast = ↑n
                                            theorem Hurwitz.Int.castDef_ofNat {R : Type u_1} [NatCast R] [Neg R] (n : β„•) :
                                            (Int.ofNat n).castDef = ↑n
                                            theorem Hurwitz.Int.castDef_negSucc {R : Type u_1} [NatCast R] [Neg R] (n : β„•) :
                                            (Int.negSucc n).castDef = -↑(n + 1)
                                            theorem Hurwitz.preserves_castDef {R : Type u_1} {S : Type u_2} [NatCast R] [Neg R] [AddGroupWithOne S] (f : R β†’ S) (natCast : βˆ€ (n : β„•), f ↑n = ↑n) (neg : βˆ€ (x : R), f (-x) = -f x) (n : β„€) :
                                            f n.castDef = ↑n
                                            noncomputable instance Hurwitz.ring :
                                            Equations
                                              @[simp]
                                              theorem Hurwitz.natCast_re (n : β„•) :
                                              (↑n).re = ↑n
                                              @[simp]
                                              theorem Hurwitz.natCast_im_o (n : β„•) :
                                              (↑n).im_o = 0
                                              @[simp]
                                              theorem Hurwitz.natCast_im_i (n : β„•) :
                                              (↑n).im_i = 0
                                              @[simp]
                                              theorem Hurwitz.natCast_im_oi (n : β„•) :
                                              (↑n).im_oi = 0
                                              @[simp]
                                              theorem Hurwitz.intCast_re (n : β„€) :
                                              (↑n).re = n
                                              @[simp]
                                              theorem Hurwitz.intCast_im_o (n : β„€) :
                                              (↑n).im_o = 0
                                              @[simp]
                                              theorem Hurwitz.intCast_im_i (n : β„€) :
                                              (↑n).im_i = 0
                                              @[simp]
                                              theorem Hurwitz.intCast_im_oi (n : β„€) :
                                              (↑n).im_oi = 0

                                              Conjugate; sends $a+bi+cj+dk$ to $a-bi-cj-dk$.

                                              Equations
                                                @[simp]
                                                theorem Hurwitz.star_re (z : π“ž) :
                                                (star z).re = z.re - z.im_o - z.im_oi
                                                Equations
                                                  Instances For
                                                    theorem Hurwitz.coe_norm (z : π“ž) :
                                                    ↑z.norm = (↑z.re - 2⁻¹ * ↑z.im_o - 2⁻¹ * ↑z.im_oi) ^ 2 + (↑z.im_i + 2⁻¹ * ↑z.im_o - 2⁻¹ * ↑z.im_oi) ^ 2 + (2⁻¹ * ↑z.im_o + 2⁻¹ * ↑z.im_oi) ^ 2 + (2⁻¹ * ↑z.im_o - 2⁻¹ * ↑z.im_oi) ^ 2
                                                    theorem Hurwitz.quot_rem (a b : π“ž) (hb : b β‰  0) :
                                                    βˆƒ (q : π“ž) (r : π“ž), a = q * b + r ∧ r.norm < b.norm