Documentation

Project

Equations
Instances For
    def primes (n : ) :
    Equations
    Instances For
      def primes_inv_exists (n : ) (n_prime : Nat.Prime n) :
      ∃ (i : ), primes i = n
      Equations
      • =
      Instances For
        def primes_inv (n : ) (n_prime : Nat.Prime n) :
        Equations
        Instances For
          def primes_inv_def (n : ) (n_prime : Nat.Prime n) :
          primes (primes_inv n n_prime) = n
          Equations
          • =
          Instances For
            theorem primes_inv_pos (n : ) (n_prime : Nat.Prime n) :
            0 < primes_inv n n_prime
            theorem primes_prime {n : } (hn : n > 0) :
            def cayley_table (row : ) (col : ) :
            Equations
            Instances For
              structure Ds :

              Structure Ds holds the variable data.

              Instances For
                theorem Ds.y_pos (self : Ds) :
                self.y > 0
                structure Beta :

                Structure Beta holds the variable & static data.

                • d : Ds
                • P :
                • three_lt_P : 3 < self.P
                • prime_P : Nat.Prime self.P
                • primeIndex :
                • k :
                • k_pos : self.k > 0
                • k_x_y : self.k = self.d.x + self.d.y
                • A :
                • h1_A : self.A = self.P - 3
                • h2_A : self.A = 6 * self.d.x + 6 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 4 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 2 else 0
                • h1_B : self.d.B = cayley_table 2 (self.primeIndex + self.d.width)
                • h2_B : self.d.B = 6 * self.d.x + 12 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 8 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 4 else 0
                • h1_L : self.d.L = cayley_table (2 + self.d.height) self.primeIndex
                • h2_L : self.d.L = 6 * self.d.x
                • E :
                • h1_E : self.E = self.A
                • h2_E : self.E = 6 * self.d.x + 6 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 4 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 2 else 0
                Instances For
                  theorem Beta.three_lt_P (self : Beta) :
                  3 < self.P
                  theorem Beta.prime_P (self : Beta) :
                  Nat.Prime self.P
                  theorem Beta.k_pos (self : Beta) :
                  self.k > 0
                  theorem Beta.k_x_y (self : Beta) :
                  self.k = self.d.x + self.d.y
                  theorem Beta.h1_A (self : Beta) :
                  self.A = self.P - 3
                  theorem Beta.h2_A (self : Beta) :
                  self.A = 6 * self.d.x + 6 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 4 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 2 else 0
                  theorem Beta.h1_B (self : Beta) :
                  self.d.B = cayley_table 2 (self.primeIndex + self.d.width)
                  theorem Beta.h2_B (self : Beta) :
                  self.d.B = 6 * self.d.x + 12 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 8 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 4 else 0
                  theorem Beta.h1_L (self : Beta) :
                  self.d.L = cayley_table (2 + self.d.height) self.primeIndex
                  theorem Beta.h2_L (self : Beta) :
                  self.d.L = 6 * self.d.x
                  theorem Beta.h1_E (self : Beta) :
                  self.E = self.A
                  theorem Beta.h2_E (self : Beta) :
                  self.E = 6 * self.d.x + 6 * self.d.y - if self.P = 6 * (self.d.x + self.d.y) - 1 then 4 else if self.P = 6 * (self.d.x + self.d.y) + 1 then 2 else 0
                  noncomputable def beta_fixed (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (d : Ds) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) :

                  We now define a function beta_fixed that builds a Beta from a Ds instance by fixing P, k, and the corresponding proofs.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def beta_fixed' (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : ∀ (d : Ds), hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : ∀ (d : Ds), A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : ∀ (d : Ds), d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : ∀ (d : Ds), d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : ∀ (d : Ds), d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : ∀ (d : Ds), d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : ∀ (d : Ds), E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) :
                    DsBeta

                    Define a wrapper beta_fixed' that fixes all parameters except the variable data d.

                    Equations
                    • beta_fixed' P₀ hP₀ hp₀ hk₀ hkpos₀ hkxy₀ primeIndex₀ A_val h1A h2A h1B h2B h1L h2L E_val h1E h2E d = beta_fixed P₀ hP₀ hp₀ d hk₀ hkpos₀ primeIndex₀ A_val h1A E_val h1E
                    Instances For
                      theorem beta_fixed'_injective (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : ∀ (d : Ds), hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : ∀ (d : Ds), A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : ∀ (d : Ds), d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : ∀ (d : Ds), d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : ∀ (d : Ds), d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : ∀ (d : Ds), d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : ∀ (d : Ds), E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) :
                      Function.Injective (beta_fixed' P₀ hP₀ hp₀ hk₀ hkpos₀ hkxy₀ primeIndex₀ A_val h1A h2A h1B h2B h1L h2L E_val h1E h2E)

                      Prove that beta_fixed' is injective; that is, if two Beta values built by beta_fixed' are equal, then the underlying Ds instances are equal.

                      noncomputable def beta_sub_inj (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : ∀ (d : Ds), hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : ∀ (d : Ds), A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : ∀ (d : Ds), d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : ∀ (d : Ds), d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : ∀ (d : Ds), d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : ∀ (d : Ds), d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : ∀ (d : Ds), E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (d : Ds) :
                      { b : Beta // b.P = P₀ }

                      Define an injection from Ds into the subtype { b : Beta // b.P = P₀ } by mapping d to ⟨beta_fixed' P₀ ... d, rfl⟩.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem beta_sub_inj_injective (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : ∀ (d : Ds), hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : ∀ (d : Ds), A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : ∀ (d : Ds), d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : ∀ (d : Ds), d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : ∀ (d : Ds), d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : ∀ (d : Ds), d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : ∀ (d : Ds), E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) :
                        Function.Injective (beta_sub_inj P₀ hP₀ hp₀ hk₀ hkpos₀ hkxy₀ primeIndex₀ A_val h1A h2A h1B h2B h1L h2L E_val h1E h2E)

                        Prove that beta_sub_inj is injective.

                        noncomputable def ds_inj (n : ) :

                        An injection from ℕ into Ds is given by mapping n to the Ds instance with all fields set to n+1 (or n+1 for x, width, height).

                        Equations
                        • ds_inj n = { y := n + 1, y_pos := , x := n + 1, width := n + 1, height := n + 1, B := n + 1, L := n + 1 }
                        Instances For
                          theorem Beta_fixed_infinite (P₀ : ) (hP₀ : 3 < P₀) (hp₀ : Nat.Prime P₀) (hk₀ : ) (hkpos₀ : hk₀ > 0) (hkxy₀ : ∀ (d : Ds), hk₀ = d.x + d.y) (primeIndex₀ : ) (A_val : ) (h1A : A_val = P₀ - 3) (h2A : ∀ (d : Ds), A_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) (h1B : ∀ (d : Ds), d.B = cayley_table 2 (primeIndex₀ + d.width)) (h2B : ∀ (d : Ds), d.B = 6 * d.x + 12 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 8 else if P₀ = 6 * (d.x + d.y) + 1 then 4 else 0) (h1L : ∀ (d : Ds), d.L = cayley_table (2 + d.height) primeIndex₀) (h2L : ∀ (d : Ds), d.L = 6 * d.x) (E_val : ) (h1E : E_val = A_val) (h2E : ∀ (d : Ds), E_val = 6 * d.x + 6 * d.y - if P₀ = 6 * (d.x + d.y) - 1 then 4 else if P₀ = 6 * (d.x + d.y) + 1 then 2 else 0) :
                          Infinite { b : Beta // b.P = P₀ }

                          Since Ds is infinite and beta_sub_inj is injective, the subtype { b : Beta // b.P = P₀ } is infinite.