The three semantically distinct stage-1 gcd outcomes.
- noFactor : PMinusOneResult
- factor (value : Nat) : PMinusOneResult
- whole : PMinusOneResult
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.noFactor Hex.Nat.PMinusOneResult.noFactor = isTrue ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.noFactor (Hex.Nat.PMinusOneResult.factor value) = isFalse ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.noFactor Hex.Nat.PMinusOneResult.whole = isFalse Hex.Nat.instDecidableEqPMinusOneResult.decEq._proof_2✝
- Hex.Nat.instDecidableEqPMinusOneResult.decEq (Hex.Nat.PMinusOneResult.factor value) Hex.Nat.PMinusOneResult.noFactor = isFalse ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq (Hex.Nat.PMinusOneResult.factor a) (Hex.Nat.PMinusOneResult.factor b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq (Hex.Nat.PMinusOneResult.factor value) Hex.Nat.PMinusOneResult.whole = isFalse ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.whole Hex.Nat.PMinusOneResult.noFactor = isFalse Hex.Nat.instDecidableEqPMinusOneResult.decEq._proof_7✝
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.whole (Hex.Nat.PMinusOneResult.factor value) = isFalse ⋯
- Hex.Nat.instDecidableEqPMinusOneResult.decEq Hex.Nat.PMinusOneResult.whole Hex.Nat.PMinusOneResult.whole = isTrue ⋯
Instances For
The result of one counted deterministic stage-1 call. A call is one
attempt on every terminal gcd outcome. Pollard p - 1 draws no randomness,
so the returned generator is exactly the supplied state; carrying it here
lets randomized callers resume through the same boundary as rho.
- result : PMinusOneResult
The terminal gcd outcome.
- attempts : Nat
Semantic stage-1 calls executed; always one at this boundary.
- rand : Rand
The unchanged generator state.
Instances For
Equations
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
Accepted stage-1 smoothness cap. It remains inside the complete table range, but is independent of later table-policy growth so search cost and retry-ladder coverage do not change as a side effect of a larger certification table.
Equations
- Hex.Nat.smoothBoundCap = 9999
Instances For
Clamp a requested stage-1 bound to the complete committed-table range.
Equations
- Hex.Nat.smoothBound bound = min bound Hex.Nat.smoothBoundCap
Instances For
One deterministic Pollard p - 1 stage-1 attempt. Invalid bases or
moduli return noFactor; a gcd equal to the modulus is reported separately
as whole. The effective smoothness bound is smoothBound bound, never an
incomplete extension beyond the committed prime table.
Equations
- Hex.Nat.pMinusOneStage1 n base bound = Hex.Nat.pMinusOneStage1Core✝ n base (Hex.Nat.smoothBound bound)
Instances For
One counted, resumable Pollard p - 1 stage-1 attempt. The deterministic
primitive consumes no generator words, but every call costs exactly one search
attempt whether it returns noFactor, a proper factor, or whole.
Equations
- Hex.Nat.pMinusOneStage1Counted n base bound r = { result := Hex.Nat.pMinusOneStage1 n base bound, attempts := 1, rand := r }
Instances For
Requests beyond the complete prime-table range are exactly capped.
Every reported factor is a dynamically checked proper divisor.
A proper factor returned through the counted boundary satisfies the same dynamically checked contract as the compatibility result.