Proofs of Properties of Finite-Dimensional Vector Spaces Using Isabelle/HOL
Total Page:16
File Type:pdf, Size:1020Kb
FACULTAD DE CIENCIAS, ESTUDIOS AGROALIMENTARIOS E INFORMÁTICA TITULACIÓN: Ingeniería Técnica en Informática de Gestión TÍTULO DEL PROYECTO O TRABAJO FIN DE CARRERA: Demostración de propiedades de espacios vectoriales finito- dimensionales en Isabelle/HOL DIRECTOR/ES DEL PROYECTO O TRABAJO: D. Jesús María Aransay Azofra DEPARTAMENTO: Matemáticas y Computación ALUMNO/S: Jose Divasón Mallagaray CURSO ACADÉMICO: 2011 / 2012 2 Degree's Thesis Proofs of properties of finite-dimensional vector spaces using Isabelle/HOL Jose Divas´onMallagaray Supervised by Jes´usMar´ıaAransay Azofra Universidad de La Rioja 2011/2012 ii To my friend Claudia. Now that you have started the degree in mathematics, I hope you have the same luck than I have had. You deserve the best, keep it up! iv Abstract In this work we deal with finite-dimensional vector spaces over a generic field K. First we will state properties of vector spaces independently of their di- mension. Then, we will introduce the conditions to obtain finite-dimensional vector spaces. The notions of linear dependence and independence, as well as linear combinations, and hence the notion of basis will be presented. Some results about the dimension of the different basis of a vector space will be necessary, as well as on the isomorphism among vector spaces. Once we have introduced the notion of basis, and with the additional condition of it being finite, we will introduce the notion of finite-dimensional vector space. Next step is to introduce vector subspaces. We will pay attention to vector susb- paces generated by a given set of vectors and prove some of their properties. The notion of linear maps will be also required to define isomorphisms of vector spaces. Finally, we will prove that a vector space (over a field K) of (finite) dimension n is isomorphic to Kn. The previous results will be presented following the book by Halmos on vector spaces [1]. Its formalization will be carried out in Isabelle/HOL [25]. vi Acknowledgements I must say that this work, due to its difficulty and complexity, has been de- veloped in close colaboration with the advisor of the project, Jes´usAransay. From here I want to say that I am very grateful to Jes´usfor his patience, specially in my first moments with Isabelle/HOL. It took me a lot of hard work to overcome the initial difficulties and at that moments he helped with my learning of the system, much more than I expected at first. Whenever I was stuck, I visited the office and he looked for a while to solve my doubts. I am sure that with other person as advisor, the development of this project wouldn't have been possible or at least we wouldn't have achieved the for- malization of the results that we have obtained. Thanks Jes´us. There are another two persons who deserve to be named in this gratitudes: Oscar´ Ciaurri and Julio Rubio. It can be said that Oscar´ is the first person responsible for this project to get started, since he began a chain: Oscar´ knew that I like this topics about logic and mathematical reasoning, and he got in touch with Julio to comment it (without my knowledge). After that, Julio went to look for me at the end of an exam to offer me the possibility of this degree's dissertation with Jes´us.I'm grateful to them. Both are the persons responsible for giving me the opportunity of this project and I have tried to make the most of it. viii Contents 1 Introduction 1 2 Management 5 3 Mathematical Definitions 17 4 Theorem proving: Isabelle 21 4.1 Some ideas on theorem proving . 21 4.2 Isabelle introduction by example . 23 4.3 Locales and Abstract Algebra . 28 5 Fields 35 6 Vector spaces 43 7 Examples 47 8 Comments 49 9 Linear dependence 61 10 Linear combinations 77 10.1 Sets indexation . 77 10.2 Linear combinations . 94 x CONTENTS 11 Bases 115 11.1 Definitions . 115 11.2 Theorems . 125 12 Dimension 141 12.1 Theorems . 141 12.2 Definition and other dimension theorems . 156 13 Isomorphism 165 13.1 Definition of Kn .......................... 167 13.2 Canonical basis . 171 13.3 Bijection between basis . 180 13.4 Properties of Canonical Basis . 185 13.5 Linear maps . 193 13.6 Defining the isomorphism between Kn and V .......... 196 14 Subspaces 207 15 Future Work 213 16 Conclusions 215 16.1 Management conclusions . 218 Chapter 1 Introduction First of all we have to say that this is not a common degree's dissertation of \Ingenier´ıaT´ecnicaen Inform´atica de Gesti´on"in which an application or a database is developed following a methodology with an analysis, design, implementation and verification processes. We are going to develop in this project something more focused on the mathematical field: we are going to formalize in Isabelle/HOL results of linear algebra, specifically, results about finite dimensional vector spaces. This project is in some sense a research project, in which we will have a learning period of the Isabelle/HOL language and after that we will try to formalize the proofs, and in which some degree of uncertainty about the feasibility of the tasks to be accomplished exists. The first question arises is: why did I choose this kind of project? The main reason is due to the own interest in this kind of matters about formal verification of algorithms, mechanized reasoning, formal proofs. Another reason is to go out of standard projects, hence I can make use of the mathe- matical knowledge that I have attained in the degree. Still another motivation exists in the study and the improvement of our knowledge on mathematical proofs and its inherent nature. Traditionally, \pencil and paper" proofs are carried out in a loose way and without an absolute rigour in some of their details. There exist mathematical results which proofs have contained mistakes for long periods, even in the light of being publicly available and widely accepted (for instance, there were some erroneus proofs of the Four Colour Theorem which were accepted for long periods, see [22] for details). The detailed implementation of proofs has gained attention since the end of the XIX century (with the foundation of 2 Introduction logical systems, following the influence of Frege, Hilbert...). The mechaniza- tion obtained through computers has then give place to the formalization of mathematical proofs, starting from the computer implementation of a logical system and building mathematical knowledge through the computer-assisted application of logical rules. These computer-assisted proofs are consequently full of minor details, but also formally verified, hence somehow more trustable than traditional proofs, and even available for being reproduced in any com- puter by external agents. The process of creating or \translating" textbook proofs and results to formalized proofs requires a deep study and insight of that proofs which is very often a challenging task. Another reason is to check the capacities of a given logic (HOL) to im- plement a mathematical formalization from a practical point of view. If we are capable of implementing a proof in a given logic, this demonstrates that the proof and its reasoning techniques can be carrried out in such a logical setting. In addition, the \Universidad de La Rioja" is involved in a European project about formalization of mathematics: ForMath [13] (the objective of this project is to develop libraries of formalized mathematics concerning algebra, linear algebra, real number computation and algebraic topology). Thus, our project will share some goals with the ForMath project. Once we have decided that we will make a project about formal proofs, why we choose Isabelle/HOL? Isabelle is an environment for computer- assisted formal proofs. It has libraries with the development of several theories about algebra, analysis. and its capacities are well-known. Some examples of theorems proved with Isabelle are the Fundamental Theorem of Algebra and the Prime Number Theorem (some other relevant theorems proved in Isabelle can be found here: [14]). In addition, Isabelle is a system which permits declarative and procedural proofs. A declarative system is one in which one writes a proof in the normal way, although in a highly stylized language and with very small steps. In a procedural system one does not write proofs at all: the computer presents the user with proof obligations or goals, and the user then executes tactics which reduce a goal to zero or more new, and hopefully simpler, subgoals. Another proof assistants only allow one of this proof styles (for example, HOL-Light and Coq are procedural sys- tems and Mizar is declarative). Proofs with a procedural system are easier for a beginner (as me) because they are more interactive. Finally, we already know what we are going to do and what environment 3 we are going to use. Why do we focused on vector spaces? Despite they are something quite basic in the field of linear algebra, vec- tor spaces aren't developed in Isabelle/HOL (really there is only a result about real vector spaces: the Hanh-Banach theorem formalized by Gertrud Bauer[12]). Hence another point to do this project is to increase the amount of mathematical results that have been implemented, in order to create a cor- pus of mathematical results that permits further developments in the field of finite dimensional vector spaces. In order to formalize the main results on vector space we will follow a Halmos' book: Finite-dimensional vector spaces[1]. This book summarizes and presents the main results of finite-dimensional vector spaces and their proofs. At first, our objective was to manage to formalize the first 16 sections, i.e., up to prove that a vector space is isomorphic to the dual of its dual.