From Theoretical Foundations to Practical Applications
Total Page:16
File Type:pdf, Size:1020Kb
Numbers: from Theoretical Foundations to Practical Applications AM30MP Mathematics Project Calum Horrobin Aston University 6th May 2014 i Abstract The rewards of forming a well-established mathematical theory are unbounded. This provides a limitless source of philosophical knowledge and practical under- standing about how our universe works. Furthermore, any practical application of mathematics cannot be appreciated in isolation and solely by its real-world implications, but rather as a consequence of forming a well-established theory. In this project we have analysed the theoretical foundations of numbers and demonstrated their value to a practical application of cryptography. A coherent theory of numbers is valuable to mathematics since numbers are a key compo- nent in many pure areas such as analysis, topology, number theory and geometry. We have demonstrated how to establish a theory of numbers based on set theory, specifically using John Von Neumann's inductive sets to model the nat- ural numbers. We first prove that this construction of the natural numbers is valid under the Zermelo-Fraenkel axioms. We also prove that various properties which are essential to the natural numbers are satisfied, namely Peano's postu- lates and the principles of induction and well-ordering. Ultimately, establishing the foundations of mathematics relies on being satisfied with an initial object or premise which is based on metamathematical grounds. The philosophy of using set theory as the foundations of mathematics is based on the acceptance of metamathematical concepts relating to the existence and nature of sets in the first place. Logical issues about the completeness and consistency of our set the- ory axiom system have implications to the completeness and consistency of our theory of numbers. We address the relevant philosophical and logical matters as appropriate. A rigorous treatment of the foundations gives way to an effective and well- rounded mathematical theory. We broaden the theoretical foundations to analyse and prove some results in number theory which give way to a practical application of cryptography. Thus, we appreciate the value of establishing the foundations of numbers and recognise how further developments in theoretical components would improve the results in applied areas. ii Preface This project is a continuation of my Mathematics Report [1]. The Zermelo-Fraenkel axioms will be the starting point of my mathematical analysis, for completeness and reference a list of these axioms is given below: Axiom of Extensionality: If two sets, X and Y , have the same elements then they are equal, X = Y . 8x(x 2 X , x 2 Y ) ) (X = Y ): Axiom of Empty Set: For any set, X, there exists a set, E, such that X is not a member of E. 8X9E : X2 = E: Axiom of Pairs: For any pair of sets, X and Y , there exists a set, Z, which either just contains X or just contains Y . 8X8Y (9Z : 8z(z 2 Z , (z = X _ z = Y ))): Axiom of Union: For any set, X, there exists a set, Y , which is the `union' of all elements of X. 8X9Y : 8y(y 2 Y , 9z :(z 2 X ^ y 2 z)): Axiom of Power Set: For any set, X, there exists a set, Y , which is the set of all subsets of X. 8X9Y : 8y(y 2 Y , y ⊆ X): Axiom of Foundation: For all non-empty sets, X, there is an element within X, w, such that X and w have no common elements. 8X(X 6= ? ) (9w 2 X :(6 9y :(y 2 X ^ y 2 w)))): Axiom of Infinity: There exists a set, X, such that ? 2 X, also such that if y 2 X then fyg 2 X. 9X : ((? 2 X) ^ 8y(y 2 X ) fyg 2 X)): Axiom of Subsets: Let X be a set and let L(w) be a logical property of sets which depends on the variable w, then there exists a set, Y , which is the set of all the elements, w, in X which satisfy L(w). 9Y : 8w(w 2 Y , (w 2 X ^ L(w))): The following fundamental theorems were proved in my previous report and will be needed for my work concerning set theory: Theorem 0.1. There is no set x such that it is an element of itself: 8x(x2 = x). Cantor's Theorem. Let S be a set. The cardinality of the power set of S, P (S), is strictly greater than the cardinality of S: card(S) < card(P (S)). iii Contents 1 Introduction and Context 1 2 The Foundations: from Set Theory to Number Theory 3 2.1 The Natural Numbers . 3 2.1.1 John Von Neumann's Ordinals . 4 2.1.2 Philosophical and Logical Implications . 8 2.1.3 Induction and Ordering of the Natural Numbers . 9 2.1.4 Reflections and the Infinitude of the Natural Numbers . 12 2.2 Extending the Natural Numbers . 14 2.2.1 Arithmetic . 14 2.2.2 The Sets of Integer and Rational Numbers . 17 2.3 The Real Numbers . 19 2.3.1 Analysis of Dedekind Cuts and Cauchy Sequences . 20 2.3.2 Decimal Representation . 22 3 Broadening the Theory of Numbers 25 3.1 Fundamental Results . 25 3.1.1 Factoring Natural Numbers . 25 3.1.2 Analytic Study of Primes . 27 3.1.3 Theorems with Applicable Results to RSA Cryptography . 31 3.2 Relevant Issues . 34 3.2.1 Computing with Number Theory . 35 3.2.2 Integer Factorisation Difficulties . 35 3.3 Primality Testing . 35 3.3.1 Fermat's Test . 37 3.3.2 Miller's Test . 37 4 Applying our Theoretical Results 40 4.1 The RSA Cryptosystem . 40 4.1.1 How Encryption and Decryption Works . 40 4.1.2 Security of the RSA Method . 41 4.2 Implementing Fermat's and Miller's tests . 42 4.3 Generating Random Large Primes . 44 4.3.1 Theory and Method . 44 4.3.2 Analysis of Results . 45 5 Conclusion 47 Appendix: Transcript of Codes 49 References 52 iv 1 Introduction and Context 1 Introduction and Context My previous report [1] demonstrated the importance of setting a sensible basis to un- derlie our mathematical theory, which consists of logic, undefined terms and axioms. Logically and philosophically speaking, practical applications of mathematics rely on these foundations as they form a consistent and effective theory. The objective of this work is to gain a deeper understanding of the foundations of mathematics and to demonstrate their fundamental importance to practical situations. To achieve this we first rigorously establish the foundations of numbers by using set theory. Building on this, we then develop the theory of numbers further to give way to a practical applica- tion of cryptography. As motivation for studying the foundations of the natural numbers, it is in fact logi- cally impossible to define the set of natural numbers in such a way that every natural number is a member of that set. This is contrary to what we might expect. The reason is because a `set' has to be well-defined, as analysed in my previous report, it must satisfy one of the Zermelo-Fraenkel axioms of set theory. In Section 2.1 we discuss how Georg Cantor was aware of the contradictions caused by the set of all ordinal numbers and in Section 2.1.1 we examine this further using John Von Neumann's definition of an ordinal number. It is of fundamental importance that the definition of an ordinal number must be in such a way as to deal with the problem of there being infinitely many natural numbers. Also, a valid definition should preserve the ordering properties of trichotomy and well-ordering, we will analyse order in section 2.1.3. As given in my previous conclusion, an example of how an unsophisticated treatment of the natural numbers can lead to awkward problems is thus, `does the set N = f0; 1; 2;:::g have more elements than the set Nnf1g = f0; 2; 3;:::g?' The nature of our work for this project has a strong theoretical component. In order to show its value to an applied area we have focussed on its application to RSA (Rivest, Shamir and Adleman) cryptography. Cryptography is fundamental to the safety of electronic communication and is heavily relied upon in today's world. In Section 3.1.3 we prove various results with direct applications to RSA cryptography and in Section 4 we show how the mathematical theory can be implemented in order to ensure the security of encryption. Page 1 of 53 1 Introduction and Context Statement of Contributions 1. Through rigorous analysis of set theory, I have demonstrated how to establish a coherent theory of numbers based on the Zermelo-Fraenkel axioms; 2. I have made original reflections which delve deeper into the subject; 3. I have illustrated the application of fundamental results by programming a rea- sonably functional random prime generator; 4. This project is the result of much research and reflection, it is oriented to enhance the connection between purely theoretical foundations and practical applications; 5. This project has been written to invite the reader to reflect on the value of studying abstract foundations of mathematical theories. Page 2 of 53 2 The Foundations: from Set Theory to Number Theory 2 The Foundations: from Set Theory to Number Theory Our objective here is to establish the foundations upon which we can base a theory of numbers using set theory. We first study how various properties which determine the nature of numbers can be understood and derived, beginning with the natural numbers. Extending this, we then reflect on techniques of constructing the real numbers from the natural numbers and discuss some interesting observations of how we are able to represent numbers.