%------------------------------------------------------------------------------ % Every Prime p with mod(p,4)=1 is a Sum of Two Squares % Author: Anthony Narkawicz % Date: March 2012 %------------------------------------------------------------------------------- BEGIN
% The lemmas below are part of Euler's proof of this result % As noted below, the proof using this method is not completed. % Instead, Zagier's simpler proof of the result is finally used below
n,m,i,j,a,b: VAR nat
pa,pb: VAR posnat
ai,bi: VAR int
p: VAR (prime?)
sots_div_quot_factor: LEMMA sum_of_two_squares?(ns) AND divides(m,ns) AND (NOT sum_of_two_squares?(m)) IMPLIES
(EXISTS (b): divides(b,ns/m) AND (NOT sum_of_two_squares?(b)))
rel_prime_sos_factor: LEMMA rel_prime(pa,pb) AND divides(n,pa^2+pb^2) IMPLIES sum_of_two_squares?(n)
% This ends the work on Euler's proof % As it turns out, Zagier's "one line proof" works much better in this context, % and it is given below.
fermat_prime_sos_set(p)(x,y,z:nat): bool = x^2 + 4*y*z = p
involution_fermat_set_one_fp_invol: LEMMA LET invol:[[nat,nat,nat]->[nat,nat,nat]] =
(LAMBDA (x,y,z:nat): IF x<y-z THEN (x+2*z,z,y-x-z) ELSIF y-z <= x AND x <= 2*y THEN (2*y-x,y,x-y+z) ELSE (x-2*y,x-y+z,y) ENDIF) IN (FORALL (x,y,z:nat): fermat_prime_sos_set(p)(x,y,z) IMPLIES
invol(invol(x,y,z)) = (x,y,z) AND
fermat_prime_sos_set(p)(invol(x,y,z)))
invol_fermat(p)(xyz: (fermat_prime_sos_set(p))): (fermat_prime_sos_set(p)) = LET (x,y,z) = xyz IN IF x<y-z THEN (x+2*z,z,y-x-z) ELSIF y-z <= x AND x <= 2*y THEN (2*y-x,y,x-y+z) ELSE (x-2*y,x-y+z,y) ENDIF
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.