A capped unary program for maximal prime-power divisors #
@[reducible, inline]
Target integer, candidate prime, and current prime power, all unary.
Equations
Instances For
Advance a dividing prime power, capping every replacement by the target input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MIPRE.LowDegree.DegreeArithmetic.primePowerStep_shape
(s : PrimePowerState)
:
(primePowerStep s).1 = s.1 ∧ (primePowerStep s).2.1 = s.2.1 ∧ List.length (primePowerStep s).2.2 ≤ max (List.length s.2.2) (List.length s.1)
theorem
MIPRE.LowDegree.DegreeArithmetic.fold_primePowerStep_shape
(u : Cost.Unary)
(s : PrimePowerState)
:
(List.foldl (fun (s : PrimePowerState) (x : Unit) => primePowerStep s) s u).1 = s.1 ∧ (List.foldl (fun (s : PrimePowerState) (x : Unit) => primePowerStep s) s u).2.1 = s.2.1 ∧ List.length (List.foldl (fun (s : PrimePowerState) (x : Unit) => primePowerStep s) s u).2.2 ≤ max (List.length s.2.2) (List.length s.1)
The capped maximum-power search.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Uniform polynomial-time implementation of the capped maximum-power search.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
MIPRE.LowDegree.DegreeArithmetic.primePowerStep_progress
(n q j : ℕ)
(hn : 0 < n)
(hq : Nat.Prime q)
(hj : j < n.factorization q)
:
primePowerStep (Cost.unary n, Cost.unary q, Cost.unary (q ^ j)) = (Cost.unary n, Cost.unary q, Cost.unary (q ^ (j + 1)))
theorem
MIPRE.LowDegree.DegreeArithmetic.primePowerStep_fixed
(n q : ℕ)
(hn : 0 < n)
(hq : Nat.Prime q)
:
primePowerStep (Cost.unary n, Cost.unary q, Cost.unary (q ^ n.factorization q)) = (Cost.unary n, Cost.unary q, Cost.unary (q ^ n.factorization q))
theorem
MIPRE.LowDegree.DegreeArithmetic.iterate_primePowerStep
(n q t : ℕ)
(hn : 0 < n)
(hq : Nat.Prime q)
:
primePowerStep^[t] (Cost.unary n, Cost.unary q, [()]) = (Cost.unary n, Cost.unary q, Cost.unary (q ^ min t (n.factorization q)))
theorem
MIPRE.LowDegree.DegreeArithmetic.fold_primePowerStep
(u : Cost.Unary)
(s : PrimePowerState)
:
List.foldl (fun (s : PrimePowerState) (x : Unit) => primePowerStep s) s u = primePowerStep^[List.length u] s
Unary input length supplies enough iterations to reach the maximal prime-power divisor.
Nonprime candidates contribute the neutral degree one.
Equations
Instances For
One total polynomial-time program for each prime's contribution to a unary degree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
The output is exactly the canonical prime-power component of the target degree.