Exact affine criterion for mergers through the second odd-run exit
Provedcollatz_smaller_mergers_through_second_odd_run_exit_exactcollatzdynamical-systemsnumber-theory
Let be the ordinary Collatz map. For , put
and let , , and . Thus is the odd run exit that follows the initial odd-step pairs and the remaining halvings. For a start , let and .
A finite list of positive halving counts has length and total . Set and . Say the affine condition holds if some such list satisfies
Prove that this affine condition is equivalent to the existence of a meeting at an original clock at or before the second run exit.
The list length and the clock on the smaller-start orbit are unrestricted. The condition includes meetings during the intervening ordinary steps.
Preamble
import Definitions.Def_collatzStepMap import Mathlib.Logic.Function.Iterate import Mathlib.Data.Nat.Factorization.Basic
Formal statement
theorem collatz_smaller_mergers_through_second_odd_run_exit_exact (n : ℕ) (hn : 0<n) :
let runEnd : ℕ → ℕ := fun x =>
let r := (x+1).factorization 2
3^r*((x+1)/2^r)-1
let jump : ℕ → ℕ := fun x =>
let w := runEnd x
w/2^(w.factorization 2)
let duration : ℕ → ℕ := fun x => (runEnd x).factorization 2+2*((x+1).factorization 2)
let T := duration n+duration (jump n)
(∃ k a b : ℕ, 0<k ∧ k<n ∧ a≤T ∧ collatzStep^[a] n=collatzStep^[b] k) ↔
(∃ v : List ℕ, (∀ a∈v, 0<a) ∧
let y := jump (jump n)
let B := (v.foldr (fun a (p : ℕ × ℕ) => (p.1+1,3^p.1+2^a*p.2)) (0,0)).2
let z := 2^v.sum*y-B
0<z ∧ 3^v.length ∣ z ∧ z<3^v.length*n) := by
sorrySource
Auxiliary to https://prove2.me/theorems/5b7d9a89-44c1-4773-99fa-a4c0ee992df8. Extends the exact odd-target affine criterion through both initial run exits.