Documentation

LeanPool.CryptidsGoldbach.Goldbach21

Goldbach21 #

21-state Turing machine halting-equivalent to the 25-state Goldbach machine.

@[reducible, inline]

The original 25-state transition table used for the reference execution.

Equations
Instances For
    @[reducible, inline]

    The compressed 21-state transition table.

    Equations
    Instances For
      @[reducible, inline]

      25-state Goldbach reference machine (goldbach_25, Yao & Leng 2024).

      Equations
      Instances For
        @[reducible, inline]

        21-state Goldbach candidate machine (goldbach_21).

        Equations
        Instances For

          A 25-state intermediate machine with the candidate search order and redundant states.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Embed the 21 candidate states into the reachable states of the intermediate machine.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem ConjectureMachines.Goldbach21.step_embed (q : Fin 21) (T : Turing.Tape (Fin 2)) :
              step edited { state := embed q, tape := T } = Option.map (fun (c : Cfg 21 2) => { state := embed c.state, tape := c.tape }) (step candM { state := q, tape := T })
              theorem ConjectureMachines.Goldbach21.respects_embed :
              StateTransition.Respects (step candM) (step edited) fun (c₁ : Cfg 21 2) (c₂ : Cfg 25 2) => c₂ = { state := embed c₁.state, tape := c₁.tape }
              def ConjectureMachines.Goldbach21.nSteps {states : ℕ} (M : Machine states 2) (n : ℕ) :
              Cfg states 2 → Option (Cfg states 2)

              Execute exactly n transitions, returning none if a transition halts early.

              Equations
              Instances For
                @[simp]
                theorem ConjectureMachines.Goldbach21.nSteps_zero {states : ℕ} (M : Machine states 2) (c : Cfg states 2) :
                nSteps M 0 c = some c
                @[simp]
                theorem ConjectureMachines.Goldbach21.nSteps_succ {states : ℕ} (M : Machine states 2) (n : ℕ) (c : Cfg states 2) :
                nSteps M (n + 1) c = (step M c).bind (nSteps M n)
                theorem ConjectureMachines.Goldbach21.nSteps_reaches {states : ℕ} {M : Machine states 2} {n : ℕ} {c c' : Cfg states 2} (h : nSteps M n c = some c') :
                theorem ConjectureMachines.Goldbach21.nSteps_eval_dom {states : ℕ} {M : Machine states 2} {n : ℕ} {c c' : Cfg states 2} (h : nSteps M n c = some c') :
                theorem ConjectureMachines.Goldbach21.nSteps_add {states : ℕ} {M : Machine states 2} (m n : ℕ) (c : Cfg states 2) :
                nSteps M (m + n) c = (nSteps M m c).bind (nSteps M n)
                theorem ConjectureMachines.Goldbach21.nSteps_bind_eq {states : ℕ} {M : Machine states 2} {m n : ℕ} {c c₁ c₂ : Cfg states 2} (h₁ : nSteps M m c = some c₁) (h₂ : nSteps M n c₁ = some c₂) :
                nSteps M (m + n) c = some c₂
                theorem ConjectureMachines.Goldbach21.step_nSteps {states : ℕ} {M : Machine states 2} {n : ℕ} {c c₁ c₂ : Cfg states 2} (h₁ : step M c = some c₁) (h₂ : nSteps M n c₁ = some c₂) :
                nSteps M (n + 1) c = some c₂
                theorem ConjectureMachines.Goldbach21.step_one {states : ℕ} {M : Machine states 2} {c c₁ : Cfg states 2} (h : step M c = some c₁) :
                nSteps M 1 c = some c₁
                theorem ConjectureMachines.Goldbach21.boot_reference_47 :
                nSteps refM 47 init = some { state := 19, tape := { head := 1, left := Turing.ListBlank.mk [1, 1], right := Turing.ListBlank.mk [0, 1] } }
                theorem ConjectureMachines.Goldbach21.boot_edited_125 :
                nSteps edited 125 { state := 2, tape := default } = some { state := 0, tape := { head := 1, left := Turing.ListBlank.mk [], right := Turing.ListBlank.mk [1, 1, 0, 1, 1, 1] } }

                A tape whose head is the first cell of the left list, facing the right list.

                Equations
                Instances For
                  @[simp]
                  theorem ConjectureMachines.Goldbach21.Tape.mkL_cons (a : Fin 2) (L R : Turing.ListBlank (Fin 2)) :
                  mkL (Turing.ListBlank.cons a L) R = { head := a, left := L, right := R }
                  @[simp]
                  theorem ConjectureMachines.Goldbach21.Tape.mk'_cons (a : Fin 2) (L R : Turing.ListBlank (Fin 2)) :
                  Turing.Tape.mk' L (Turing.ListBlank.cons a R) = { head := a, left := L, right := R }
                  theorem ConjectureMachines.Goldbach21.step_right {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.right, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := { head := a, left := L, right := R } } = some { state := q', tape := { head := R.head, left := Turing.ListBlank.cons b L, right := R.tail } }
                  theorem ConjectureMachines.Goldbach21.step_right_cons {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b c : Fin 2} (h : M.transition q a = some (b, Turing.Dir.right, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := { head := a, left := L, right := Turing.ListBlank.cons c R } } = some { state := q', tape := { head := c, left := Turing.ListBlank.cons b L, right := R } }
                  theorem ConjectureMachines.Goldbach21.step_mkL_left {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.left, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := Tape.mkL (Turing.ListBlank.cons a L) R } = some { state := q', tape := Tape.mkL L (Turing.ListBlank.cons b R) }
                  theorem ConjectureMachines.Goldbach21.step_mkL_right {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.right, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := Tape.mkL (Turing.ListBlank.cons a L) R } = some { state := q', tape := Turing.Tape.mk' (Turing.ListBlank.cons b L) R }
                  theorem ConjectureMachines.Goldbach21.step_mk'_right {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.right, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := Turing.Tape.mk' L (Turing.ListBlank.cons a R) } = some { state := q', tape := Turing.Tape.mk' (Turing.ListBlank.cons b L) R }
                  theorem ConjectureMachines.Goldbach21.step_mk'_left {states : ℕ} {M : Machine states 2} {q q' : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.left, q')) (L R : Turing.ListBlank (Fin 2)) :
                  step M { state := q, tape := Turing.Tape.mk' L (Turing.ListBlank.cons a R) } = some { state := q', tape := Tape.mkL L (Turing.ListBlank.cons b R) }
                  theorem ConjectureMachines.Goldbach21.nSteps_mkL_left_scan {states : ℕ} {M : Machine states 2} {q : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.left, q)) (k : ℕ) (L R : Turing.ListBlank (Fin 2)) :
                  nSteps M k { state := q, tape := Tape.mkL (Turing.ListBlank.append (List.replicate k a) L) R } = some { state := q, tape := Tape.mkL L (Turing.ListBlank.append (List.replicate k b) R) }
                  theorem ConjectureMachines.Goldbach21.nSteps_mk'_right_scan {states : ℕ} {M : Machine states 2} {q : Fin states} {a b : Fin 2} (h : M.transition q a = some (b, Turing.Dir.right, q)) (k : ℕ) (L R : Turing.ListBlank (Fin 2)) :
                  nSteps M k { state := q, tape := Turing.Tape.mk' L (Turing.ListBlank.append (List.replicate k a) R) } = some { state := q, tape := Turing.Tape.mk' (Turing.ListBlank.append (List.replicate k b) L) R }

                  Two unary counters, of lengths B and A, separated by zero cells.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem ConjectureMachines.Goldbach21.sim_state6_d_ref (k : ℕ) (L_base R_rest : Turing.ListBlank (Fin 2)) :
                    have L_cnt := Turing.ListBlank.append (List.replicate (k + 2) 1) (Turing.ListBlank.cons 0 L_base); have R_mid := Turing.ListBlank.cons 0 R_rest; nSteps refM (2 + (k + 2 + 2)) { state := 6, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 L_cnt) (Turing.ListBlank.cons 1 R_rest) } = some { state := 10, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 (Turing.ListBlank.cons 0 L_base)) (Turing.ListBlank.append (0 :: (List.replicate k 0 ++ [1])) R_mid) }
                    theorem ConjectureMachines.Goldbach21.sim_state6_d_edit (k : ℕ) (L_base R_rest : Turing.ListBlank (Fin 2)) :
                    have L_cnt := Turing.ListBlank.append (List.replicate (k + 2) 1) (Turing.ListBlank.cons 0 L_base); have R_mid := Turing.ListBlank.cons 0 R_rest; nSteps edited (2 + (k + 2 + (2 + (k + 1 + (6 + (k + 1)))))) { state := 6, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 L_cnt) (Turing.ListBlank.cons 1 (Turing.ListBlank.cons 1 R_rest)) } = some { state := 0, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 (Turing.ListBlank.cons 0 L_base)) (Turing.ListBlank.append (0 :: (List.replicate k 0 ++ [1])) (Turing.ListBlank.cons 1 R_mid)) }
                    theorem ConjectureMachines.Goldbach21.sim_state6_accept_edit (k : ℕ) (L_base R_end : Turing.ListBlank (Fin 2)) :
                    have L_cnt := Turing.ListBlank.append (List.replicate (k + 2) 1) (Turing.ListBlank.cons 0 L_base); nSteps edited (2 + (k + 2 + (2 + (k + 1 + (6 + (k + (1 + (k + 3)))))))) { state := 6, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 L_cnt) (Turing.ListBlank.cons 1 (Turing.ListBlank.cons 0 R_end)) } = some { state := 6, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 (Turing.ListBlank.cons 1 L_cnt)) (Turing.ListBlank.cons 0 R_end) }
                    theorem ConjectureMachines.Goldbach21.sim_state19_to_0_ref (L₁ R₁ : Turing.ListBlank (Fin 2)) :
                    nSteps refM 2 { state := 19, tape := { head := 1, left := L₁, right := Turing.ListBlank.cons 0 R₁ } } = some { state := 0, tape := Turing.Tape.mk' (Turing.ListBlank.cons 0 (Turing.ListBlank.cons 1 L₁)) R₁ }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_21_b0_to_11 {M : Machine 25 2} {q_mid : Fin 25} (h21_0 : M.transition 21 0 = some (0, Turing.Dir.left, 22)) (h22_1 : M.transition 22 1 = some (0, Turing.Dir.left, 22)) (h22_0 : M.transition 22 0 = some (0, Turing.Dir.right, q_mid)) (hq_0 : M.transition q_mid 0 = some (0, Turing.Dir.right, 11)) (h11_0 : M.transition 11 0 = some (1, Turing.Dir.right, 11)) (A : ℕ) (L_base R : Turing.ListBlank (Fin 2)) :
                    nSteps M (1 + (A + (2 + A))) { state := 21, tape := Tape.mkL (counterTape A 0 L_base) R } = some { state := 11, tape := Turing.Tape.mk' (counterTape 0 A L_base) R }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_21_bsucc_to_11 {M : Machine 25 2} {q_mid : Fin 25} (h21_1 : M.transition 21 1 = some (0, Turing.Dir.left, 9)) (h9_1 : M.transition 9 1 = some (0, Turing.Dir.left, 9)) (h9_0 : M.transition 9 0 = some (1, Turing.Dir.right, q_mid)) (hq_0 : M.transition q_mid 0 = some (0, Turing.Dir.right, 11)) (h11_0 : M.transition 11 0 = some (1, Turing.Dir.right, 11)) (A b : ℕ) (L_base R : Turing.ListBlank (Fin 2)) :
                    nSteps M (1 + (b + (2 + b))) { state := 21, tape := Tape.mkL (counterTape A (b + 1) L_base) R } = some { state := 11, tape := Turing.Tape.mk' (counterTape (A + 1) b L_base) R }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_15_bsucc_to_6_ref (A b : ℕ) (L_base R : Turing.ListBlank (Fin 2)) :
                    nSteps refM (1 + (b + (1 + (b + 1 + 2)))) { state := 15, tape := Tape.mkL (counterTape A (b + 1) L_base) (Turing.ListBlank.cons 0 (Turing.ListBlank.cons 1 R)) } = some { state := 6, tape := Turing.Tape.mk' (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate (A + b + 3) 1) (Turing.ListBlank.cons 0 L_base))) R }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_11_b0 {M : Machine 25 2} {q_mid : Fin 25} (h11_1 : M.transition 11 1 = some (0, Turing.Dir.right, 12)) (h12_1 : M.transition 12 1 = some (1, Turing.Dir.right, 12)) (h12_0 : M.transition 12 0 = some (1, Turing.Dir.right, 13)) (h13_1 : M.transition 13 1 = some (0, Turing.Dir.left, 20)) (h20_1 : M.transition 20 1 = some (1, Turing.Dir.left, 20)) (h20_0 : M.transition 20 0 = some (1, Turing.Dir.left, 21)) (h21_0 : M.transition 21 0 = some (0, Turing.Dir.left, 22)) (h22_1 : M.transition 22 1 = some (0, Turing.Dir.left, 22)) (h22_0 : M.transition 22 0 = some (0, Turing.Dir.right, q_mid)) (hq_0 : M.transition q_mid 0 = some (0, Turing.Dir.right, 11)) (h11_0 : M.transition 11 0 = some (1, Turing.Dir.right, 11)) (A m : ℕ) (L_base R : Turing.ListBlank (Fin 2)) :
                    nSteps M (1 + (m + 1) + (1 + (m + 1 + 1) + (1 + (A + (2 + A))))) { state := 11, tape := Turing.Tape.mk' (counterTape A 0 L_base) (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate m 1) (Turing.ListBlank.cons 0 (Turing.ListBlank.cons 1 R)))) } = some { state := 11, tape := Turing.Tape.mk' (counterTape 0 A L_base) (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate (m + 1) 1) (Turing.ListBlank.cons 0 R))) }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_11_bsucc {M : Machine 25 2} {q_mid : Fin 25} (h11_1 : M.transition 11 1 = some (0, Turing.Dir.right, 12)) (h12_1 : M.transition 12 1 = some (1, Turing.Dir.right, 12)) (h12_0 : M.transition 12 0 = some (1, Turing.Dir.right, 13)) (h13_1 : M.transition 13 1 = some (0, Turing.Dir.left, 20)) (h20_1 : M.transition 20 1 = some (1, Turing.Dir.left, 20)) (h20_0 : M.transition 20 0 = some (1, Turing.Dir.left, 21)) (h21_1 : M.transition 21 1 = some (0, Turing.Dir.left, 9)) (h9_1 : M.transition 9 1 = some (0, Turing.Dir.left, 9)) (h9_0 : M.transition 9 0 = some (1, Turing.Dir.right, q_mid)) (hq_0 : M.transition q_mid 0 = some (0, Turing.Dir.right, 11)) (h11_0 : M.transition 11 0 = some (1, Turing.Dir.right, 11)) (A b m : ℕ) (L_base R : Turing.ListBlank (Fin 2)) :
                    nSteps M (1 + (m + 1) + (1 + (m + 1 + 1) + (1 + (b + (2 + b))))) { state := 11, tape := Turing.Tape.mk' (counterTape A (b + 1) L_base) (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate m 1) (Turing.ListBlank.cons 0 (Turing.ListBlank.cons 1 R)))) } = some { state := 11, tape := Turing.Tape.mk' (counterTape (A + 1) b L_base) (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate (m + 1) 1) (Turing.ListBlank.cons 0 R))) }
                    theorem ConjectureMachines.Goldbach21.nSteps_pass_11_to_16_ref (A m : ℕ) (L_base R_end : Turing.ListBlank (Fin 2)) :
                    nSteps refM (1 + (m + 1) + (1 + (m + 1 + 1) + (2 + (A + 1)))) { state := 11, tape := Turing.Tape.mk' (counterTape A 0 L_base) (Turing.ListBlank.cons 1 (Turing.ListBlank.append (List.replicate m 1) (Turing.ListBlank.cons 0 (Turing.ListBlank.cons 0 R_end)))) } = some { state := 16, tape := Tape.mkL (Turing.ListBlank.cons 0 L_base) (Turing.ListBlank.append (List.replicate (A + m + 3) 1) (Turing.ListBlank.cons 0 R_end)) }

                    Primality Predicate and refM Semantics #

                    No integer from k + 2 up to p - 1 divides p.

                    Equations
                    Instances For

                      Trial-division primality: at least two, with no smaller nontrivial divisor.

                      Equations
                      Instances For
                        def ConjectureMachines.Goldbach21.cfg0 (is_right : Bool) (q p : ℕ) :
                        Cfg 25 2

                        Reference primality-test entry with orientation is_right and unary parameters q, p.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def ConjectureMachines.Goldbach21.cfg6 (is_right : Bool) (q k r : ℕ) :
                          Cfg 25 2

                          Reference trial-division entry, with divisor k + 2 and remaining unary length r.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def ConjectureMachines.Goldbach21.cfg11 (is_right : Bool) (q A B m r : ℕ) :
                            Cfg 25 2

                            Reference division-loop configuration with unary counters A, B, m, r.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def ConjectureMachines.Goldbach21.cfgExit (is_right is_prime : Bool) (q p : ℕ) :
                              Cfg 25 2

                              Reference primality-test exit, selecting its continuation from the primality result.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem ConjectureMachines.Goldbach21.cfg11_step_b0 (is_right : Bool) (q A m r' : ℕ) :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg11 is_right q A 0 m (r' + 1)) = some (cfg11 is_right q 0 A (m + 1) r')
                                theorem ConjectureMachines.Goldbach21.cfg11_step_bsucc (is_right : Bool) (q A b m r' : ℕ) :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg11 is_right q A (b + 1) m (r' + 1)) = some (cfg11 is_right q (A + 1) b (m + 1) r')
                                theorem ConjectureMachines.Goldbach21.drain_counters {states : ℕ} {M : Machine states 2} (configuration : ℕ → ℕ → ℕ → ℕ → Cfg states 2) (zero_step : ∀ (A m r : ℕ), ∃ (s : ℕ), 1 ≤ s ∧ nSteps M s (configuration A 0 m (r + 1)) = some (configuration 0 A (m + 1) r)) (successor_step : ∀ (A b m r : ℕ), ∃ (s : ℕ), 1 ≤ s ∧ nSteps M s (configuration A (b + 1) m (r + 1)) = some (configuration (A + 1) b (m + 1) r)) (k r A B m : ℕ) (hAB : A + B = k + 1) (hdvd : k + 2 ∣ B + m + 2) :
                                ∃ (A' : ℕ), ∃ (B' : ℕ), A' + B' = k + 1 ∧ k + 2 ∣ B' + (m + r) + 2 ∧ ∃ (s : ℕ), nSteps M s (configuration A B m r) = some (configuration A' B' (m + r) 0)

                                Drain a unary counter loop from its zero-counter and successor-counter update rules.

                                theorem ConjectureMachines.Goldbach21.cfg11_drain (is_right : Bool) (q k r A B m : ℕ) (hAB : A + B = k + 1) (hdvd : k + 2 ∣ B + m + 2) :
                                ∃ (A' : ℕ), ∃ (B' : ℕ), A' + B' = k + 1 ∧ k + 2 ∣ B' + (m + r) + 2 ∧ ∃ (s : ℕ), nSteps refM s (cfg11 is_right q A B m r) = some (cfg11 is_right q A' B' (m + r) 0)
                                theorem ConjectureMachines.Goldbach21.cfg6_step_enter (is_right : Bool) (q k r' : ℕ) :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg6 is_right q k (r' + 1)) = some (cfg11 is_right q 1 k 0 r')
                                theorem ConjectureMachines.Goldbach21.cfg6_pass_succ_dvd (is_right : Bool) (q k r' : ℕ) (hdvd : k + 2 ∣ k + 4 + r') :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg6 is_right q k (r' + 1)) = some (cfgExit is_right false q (k + 4 + r'))
                                theorem ConjectureMachines.Goldbach21.cfg6_pass_succ_not_dvd (is_right : Bool) (q k r' : ℕ) (hdvd : ¬k + 2 ∣ k + 4 + r') :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg6 is_right q k (r' + 1)) = some (cfg6 is_right q (k + 1) r')
                                theorem ConjectureMachines.Goldbach21.cfg6_eval (is_right : Bool) (q k r : ℕ) :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg6 is_right q k r) = some (cfgExit is_right (decide (NoFactorFrom k (k + 3 + r))) q (k + 3 + r))
                                theorem ConjectureMachines.Goldbach21.cfg0_eval (is_right : Bool) (q p : ℕ) (hp : 1 ≤ p) :
                                ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg0 is_right q p) = some (cfgExit is_right (decide (IsPrime p)) q p)

                                Reference search entry for the even number 2 * w + 4.

                                Equations
                                Instances For
                                  theorem ConjectureMachines.Goldbach21.cfg0_partner_pass (w q p : ℕ) (hp : 1 ≤ p) (hsum : q + p = 2 * w + 3) (hp_prime : IsPrime p) (hq_prime : IsPrime (q + 1)) :
                                  ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg0 true q p) = some (stageCfg (w + 1))
                                  theorem ConjectureMachines.Goldbach21.cfg0_partner_fail_succ (q' p : ℕ) (hp : 1 ≤ p) (hfail : ¬(IsPrime p ∧ IsPrime (q' + 2))) :
                                  ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg0 true (q' + 1) p) = some (cfg0 true q' (p + 1))
                                  theorem ConjectureMachines.Goldbach21.search_advance (w q p : ℕ) (hp : 1 ≤ p) (hsum : q + p = 2 * w + 3) {q' : ℕ} (hq' : q' ≤ q) (hq1 : IsPrime (q' + 1)) (hp1 : IsPrime (2 * w + 3 - q')) :
                                  ∃ (s : ℕ), 1 ≤ s ∧ nSteps refM s (cfg0 true q p) = some (stageCfg (w + 1))
                                  theorem ConjectureMachines.Goldbach21.search_halt (w q p : ℕ) (hp : 1 ≤ p) (hsum : q + p = 2 * w + 3) (hno : ∀ (q' : ℕ), q' ≤ q → ¬(IsPrime (q' + 1) ∧ IsPrime (2 * w + 3 - q'))) :
                                  theorem ConjectureMachines.Goldbach21.reaches_imp_nSteps {states : ℕ} {M : Machine states 2} {a b : Cfg states 2} (h : StateTransition.Reaches (step M) a b) :
                                  ∃ (k : ℕ), nSteps M k a = some b
                                  theorem ConjectureMachines.Goldbach21.nSteps_eq_none_of_step_none {states : ℕ} {M : Machine states 2} {k : ℕ} (s : ℕ) {a b : Cfg states 2} (hk : nSteps M k a = some b) (hnone : step M b = none) (hks : k < s) :
                                  nSteps M s a = none

                                  edited Semantics (L-First Goldbach Machine) #

                                  def ConjectureMachines.Goldbach21.cfg0E (is_right : Bool) (q p : ℕ) :
                                  Cfg 25 2

                                  Intermediate primality-test entry with orientation and unary search parameters.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def ConjectureMachines.Goldbach21.cfg6E (is_right : Bool) (q k r : ℕ) :
                                    Cfg 25 2

                                    Intermediate trial-division entry, with divisor k + 2 and remainder parameter r.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def ConjectureMachines.Goldbach21.cfg11E (is_right : Bool) (q A B m r : ℕ) :
                                      Cfg 25 2

                                      Intermediate division-loop configuration with unary counter parameters.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        def ConjectureMachines.Goldbach21.cfgExitE (is_right is_prime : Bool) (q p : ℕ) :
                                        Cfg 25 2

                                        Intermediate primality-test exit, selecting the prime or composite continuation.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          theorem ConjectureMachines.Goldbach21.cfg11E_step_b0 (is_right : Bool) (q A m r' : ℕ) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg11E is_right q A 0 m (r' + 1)) = some (cfg11E is_right q 0 A (m + 1) r')
                                          theorem ConjectureMachines.Goldbach21.cfg11E_step_bsucc (is_right : Bool) (q A b m r' : ℕ) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg11E is_right q A (b + 1) m (r' + 1)) = some (cfg11E is_right q (A + 1) b (m + 1) r')
                                          theorem ConjectureMachines.Goldbach21.cfg11E_drain (is_right : Bool) (q k r A B m : ℕ) (hAB : A + B = k + 1) (hdvd : k + 2 ∣ B + m + 2) :
                                          ∃ (A' : ℕ), ∃ (B' : ℕ), A' + B' = k + 1 ∧ k + 2 ∣ B' + (m + r) + 2 ∧ ∃ (s : ℕ), nSteps edited s (cfg11E is_right q A B m r) = some (cfg11E is_right q A' B' (m + r) 0)
                                          theorem ConjectureMachines.Goldbach21.cfg6E_step_enter (is_right : Bool) (q k r' : ℕ) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg6E is_right q k (r' + 1)) = some (cfg11E is_right q 1 k 0 r')
                                          theorem ConjectureMachines.Goldbach21.cfg6E_pass_succ_dvd (is_right : Bool) (q k r' : ℕ) (hdvd : k + 2 ∣ k + 4 + r') :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg6E is_right q k (r' + 1)) = some (cfgExitE is_right false q (k + 4 + r'))
                                          theorem ConjectureMachines.Goldbach21.cfg6E_pass_succ_not_dvd (is_right : Bool) (q k r' : ℕ) (hdvd : ¬k + 2 ∣ k + 4 + r') :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg6E is_right q k (r' + 1)) = some (cfg6E is_right q (k + 1) r')
                                          theorem ConjectureMachines.Goldbach21.cfg6E_eval (is_right : Bool) (q k r : ℕ) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg6E is_right q k r) = some (cfgExitE is_right (decide (NoFactorFrom k (k + 3 + r))) q (k + 3 + r))
                                          theorem ConjectureMachines.Goldbach21.cfg0E_eval (is_right : Bool) (q p : ℕ) (hp : 1 ≤ p) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg0E is_right q p) = some (cfgExitE is_right (decide (IsPrime p)) q p)
                                          theorem ConjectureMachines.Goldbach21.cfgExitE_tt (w p q0 : ℕ) (hsum : p + (q0 + 1) = 2 * w + 4) :
                                          ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfgExitE true true p (q0 + 1)) = some (cfg0E false 0 (2 * w + 6))

                                          Intermediate search entry for the even number 2 * w + 4.

                                          Equations
                                          Instances For
                                            theorem ConjectureMachines.Goldbach21.cfg0E_partner_fail_succ (q p0 : ℕ) (hq : 1 ≤ q) (hfail : ¬(IsPrime (p0 + 2) ∧ IsPrime q)) :
                                            ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg0E false q (p0 + 2)) = some (cfg0E false (q + 1) (p0 + 1))
                                            theorem ConjectureMachines.Goldbach21.cfg0E_partner_pass (w q0 p : ℕ) (hp : 1 ≤ p) (hsum : p + (q0 + 1) = 2 * w + 4) (hp_prime : IsPrime p) (hq_prime : IsPrime (q0 + 1)) :
                                            ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg0E false (q0 + 1) p) = some (stageCfgE (w + 1))
                                            theorem ConjectureMachines.Goldbach21.searchE_advance (w q p0 : ℕ) (hq : 1 ≤ q) (hsum : q + (p0 + 1) = 2 * w + 4) {p' : ℕ} (hp' : p' ≤ p0) (hp1 : IsPrime (p' + 1)) (hq1 : IsPrime (2 * w + 4 - (p' + 1))) :
                                            ∃ (s : ℕ), 1 ≤ s ∧ nSteps edited s (cfg0E false q (p0 + 1)) = some (stageCfgE (w + 1))
                                            theorem ConjectureMachines.Goldbach21.searchE_halt (w q p0 : ℕ) (hq : 1 ≤ q) (hsum : q + (p0 + 1) = 2 * w + 4) (hno : ∀ (p' : ℕ), p' ≤ p0 → ¬(IsPrime (p' + 1) ∧ IsPrime (2 * w + 4 - (p' + 1)))) :