Actual Euclidean history · first stopping point · proved representation

Cornacchia’s sum-of-two-squares algorithm

Construct the square root of −1, run a genuine finite quotient/remainder trace, and prove that its first square-bounded stopping state represents every prime congruent to one modulo four.

30 kernel- and Lean-verified Alpha-closed theorems · 14 conservative definitions · 17 notation dependencies

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.

44 items
CN0001 cornacchia_prime_not_square

No natural square equals a prime, constructively and without factorization search.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0003 cornacchia_prime_square_comparison

The square-root stopping test has exactly two constructive branches at a prime: strictly below or strictly above.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0005 cornacchia_coprime_euclidean_step

Euclidean remainder transport preserves the exact common-divisor coprimality invariant.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0007 cornacchia_coefficient_step_nonzero

The absolute coefficient recurrence preserves positivity without signed natural subtraction.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0008 cornacchia_coefficient_step_exists

The next absolute coefficient is an actual natural witness of the multiplication-and-addition recurrence.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0009 cornacchia_cross_identity_step

The actual remainder and coefficient recurrences preserve p=a*t+r*u exactly.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN000A cornacchia_coefficient_square_below_prime

The cross identity and the previous remainder's square bound force the current positive coefficient's square below p.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN000B cornacchia_mod_subtraction_transport

Balanced congruence transports an actual natural difference without introducing integer subtraction.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN000C cornacchia_signed_step_direct

One Euclidean step turns a positive/negative root-coefficient pair into the next positive coefficient congruence.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN000D cornacchia_signed_step_opposite

The other alternating sign branch yields the next opposite coefficient congruence with actual natural witnesses.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN000E cornacchia_alternating_congruences_step

Successive actual Euclidean states toggle the two explicit root-coefficient sign patterns.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0010 cornacchia_stopping_state_represents_prime

At the first positive remainder below sqrt(p), the actual Euclidean coefficient completes an exact two-square representation of p.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0011 cornacchia_root_nonzero

A genuine root of minus one modulo a prime is nonzero.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0012 cornacchia_root_coprime

The bounded nonzero root is coprime to its prime, with the bounded-divisibility contradiction checked explicitly.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0013 cornacchia_root_exists

Every prime one modulo four constructively supplies an actual positive bounded root of minus one for the algorithm.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0015 cornacchia_initial_invariant

A constructed root initializes all arithmetic, coprimality, sign, and threshold invariants of Cornacchia's actual state.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0016 cornacchia_invariant_euclidean_step

Every actual Euclidean/coefficient transition above the stopping threshold preserves the full rooted invariant and keeps the next remainder positive.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0017 cornacchia_invariant_stop_correct

A halted state of the rooted Cornacchia invariant is an exact two-square representation, not just a divisible norm.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0018 cornacchia_stopped_trace

A below-threshold positive state is a complete zero-transition Cornacchia run with stored terminal quotient zero.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN0019 cornacchia_stopped_trace_exists

The actual stopped state can always be encoded in the established beta history without an external coding oracle.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN001A cornacchia_trace_extend

A genuine above-threshold Euclidean division prepends its full remainder/coefficient/quotient state to the same stopped history, preserving every earlier encoded state and transition.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN001B cornacchia_complete_from_invariant_up_to

Bounded natural induction on the positive current remainder constructs the entire first-stop history with actual quotients and coefficients and proves its final exact two-square norm.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN001C cornacchia_complete_from_invariant

Every rooted valid Cornacchia state terminates constructively at its first square-root crossing and returns its actual two-square coordinates.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN001D cornacchia_from_any_bounded_negative_one_root

Every positive bounded root of minus one at a prime produces a genuine complete Cornacchia execution and its returned exact representation; no successful trace is supplied.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
CN001E cornacchia_prime_two_squares_complete

Full G107: every prime one modulo four yields an actual root of minus one, a complete first-stop Euclidean/coefficient/quotient history from (p,root,0,1), and exactly the two-square representation returned by that history.

Alpha v34 checked-use · first admitted v27 · independently kernel and Lean verified; not Stable
PD0004 Prime(p)

p is nonunit and every factorization of p has a unit factor.

Conservative definition · notation layer 0
PD0002 Lt(a,b)

Witness-defined strict order on natural numbers.

Conservative definition · notation layer 0
PD0003 Dvd(d,n)

The natural number d divides n.

Conservative definition · notation layer 0
ND0097 CornacchiaRoot(p,z)

A prime p and an actual nonzero root z<p of z²+1 divisible by p.

Conservative definition · notation layer 1
PD0008 ModEq(m,a,b)

Balanced-natural congruence modulo m.

Conservative definition · notation layer 0
PD0005 Coprime(a,b)

Every common divisor of a and b is one.

Conservative definition · notation layer 1
ND0099 CornacchiaStateInvariant(p,z,a,r,u,t)

A genuine rooted Euclidean state: positive decreasing remainder, positive coefficient, p=a*t+r*u, coprime adjacent remainders, and the alternating congruences.

Conservative definition · notation layer 2
PD0013 BetaAt(b,c,i,x)

x is the bounded beta-decoded value at index i.

Conservative definition · notation layer 0
ND0101 CornacchiaTransitionAt(p,h,e,i)

One actual quotient/remainder and coefficient update, with strict decrease and the pre-stopping square guard.

Conservative definition · notation layer 2
ND0102 CornacchiaEuclideanRun(p,a,r,u,t,R,T,h,e,l)

A complete finite reverse-chronological Euclidean history from the supplied state to its first positive remainder with square below p; terminal quotient zero.

Conservative definition · notation layer 3
ND0103 CornacchiaTrace(p,z,R,T,h,e,l)

A root of −1 and the actual complete Cornacchia execution from (p,z,0,1); the representation equation p=R²+T² is a proved conclusion, not a trace-definition premise.

Conservative definition · notation layer 4
PD0001 Le(a,b)

Witness-defined non-strict order on natural numbers.

Conservative definition · notation layer 0

Only proof arrows are theorem dependencies. Definition arrows are hygienic abbreviations of exact first-order formulas and introduce no axiom or kernel symbol.