Alphabeta Math
Pipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Shor’s Factoring Algorithm — Examples

1 · Prerequisites

2 · Summary

The first example follows an accepted order sample for N=15 and computes both proper factors. The second checks the even and perfect-power prechecks, a nonunit gcd, an odd-order retry, and a half-power equal to the global sign −1 that produces no proper gcd. Every arithmetic claim is verified directly.

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

A Shor order sample for factoring fifteen

Example

Take N=15 and suppose the sampler returns the unit a=2. A valid order-finding result is q=4. Then z=2q/2=4(mod15), and the two gcds are gcd⁡(3,15)=3 and gcd⁡(5,15)=5.

Facts & Assumptions

Given: The Shor factoring instructions on N=15, a sample a=2, and the candidate q=4.

[F1]

A candidate is accepted for the reduction only when 2≤q≤N, q is even, and aq≡1(modN); the algorithm then computes the two gcds and returns only a verified proper divisor (Shor factoring with verified output and bounded outer retries).

[F3]
[F4]

In an odd modulus, an accepted even exponent gives a square root of one; a non-global sign gives both gcds as proper factors (Order-to-factor output correctness).

Verification

1.1givenF1F2algebra

Direct multiplication gives 21≡2, 22≡4, 23≡8, and 24≡1(mod15). Since none of the first three powers is 1, the true order is 4. Thus q=4 satisfies 2≤q≤15, is even, and passes the power check in [F1].

2.1givenstep 1.1F2F3F4algebra

The half-power is z=22≡4(mod15), which is neither 1 nor −1≡14. The computed values are gcd⁡(z−1,15)=gcd⁡(3,15)=3 and gcd⁡(z+1,15)=gcd⁡(5,15)=5.

3.1givenstep 2.1F1F3F4∎

Both candidates divide 15 and satisfy 1<3,5<15. Since the algorithm checks d− first, it returns 3 on this execution; both factors are certified by [F3] and [F4].

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

Shor factoring preprocessing and retry branches

Example

The following exact inputs exercise the early return and retry branches of Shor factoring with verified output and bounded outer retries: the even input 14, the perfect power 81=34, the nonunit choice a=5 for N=15, and the unit samples (N,a)=(35,11) and (15,14). For these two retry executions, take the order-finding subroutine to return candidate q=3 for (35,11) and candidate q=2 for (15,14).

Facts & Assumptions

Given: The stated Shor algorithm, the displayed residue samples, and the chosen order-finding candidate outputs q=3 for (N,a)=(35,11) and q=2 for (N,a)=(15,14).

[F1]

The even precheck returns 2 for even composite N≥4. When the root-search branch is reached on a perfect-power input, it detects an exact representation N=ce with c≥2 and e≥2, and returns that representation's base c as a proper factor (Shor factoring with verified output and bounded outer retries, Even and perfect-power preprocessing returns a proper factor).

[F2]

A nonunit sample in {1,…,N−1} gives a proper gcd factor; conditional on gcd one, it is a unit (Random residue gcd branch for factoring, For n≥1, [a]n is a unit if and only if gcd⁡(a,n)=1).

[F3]

A period candidate is continued only when it is even, between 2 and N, and passes aq≡1(modN); the half-power gcds are returned only after the strict divisor checks (Shor factoring with verified output and bounded outer retries, Order-to-factor output correctness).

Verification

1.1givenF1algebra

For N=14, the even branch checks 1<2<14 and 14 mod 2=0, so it returns the proper factor 2 before sampling. For N=81, the root search starts at e=2 and finds 92=81; since 1<9<81, that branch returns 9. The alternative representation 81=34 is not reached after this earlier return.

1.2givenF2F4algebra

For N=15 and sample a=5, gcd⁡(5,15)=5, which is strictly between 1 and 15 and divides 15; the nonunit branch returns 5 without order finding.

1.3givenF3F4algebra

For N=35 and a=11, gcd⁡(11,35)=1. The powers satisfy 111≡11, 112≡16, and 113≡1(mod35), so the true order is 3, agreeing with the chosen candidate q=3. This candidate is odd and therefore fails the algorithm's even-period check; this attempt continues.

2.1givenF3F4algebra∎

For N=15 and a=14, gcd⁡(14,15)=1 and 142≡1(mod15) while 14≢1, so the true order is 2, agreeing with the chosen candidate q=2. The half-power is z=14≡−1(mod15), giving gcd⁡(z−1,15)=gcd⁡(13,15)=1 and gcd⁡(z+1,15)=gcd⁡(15,15)=15. Neither passes the strict check, so the algorithm continues.

Sources