Algebra for Computer Scientists – A Formal Development of Modern Algebra in PowerEpsilon Ming-Yuan Zhu CoreTek Systems, Inc. 1107B CEC Building 6 South Zhongguancun Street Beijing 100086 People’s Republic of China E-Mail:
[email protected]
This book is dedicated to my family – my parent and my wife, and my daughter Hua-Yuan who has a very difficult time for struggling with her first year mathematical course in the elementary school. It is also dedicated to the hope that all who use it will do so for the benefit of mankind.
1
Contents I
An Introduction to PowerEpsilon
2
1 Introduction 3 1.1 What is a Proof? . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 What is a Correct and Perfect Proof? . . . . . . . . . . . . . . . 5 1.3 Mathematics and Mathematical Logic . . . . . . . . . . . . . . . 5 1.3.1 Mathematical Theorem Proving as Computer Programming 5 1.4 About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 About Algebra 2.1 History of Algebra and Time-Line of Algebra . . 2.2 Classification . . . . . . . . . . . . . . . . . . . . 2.2.1 Elementary Algebra . . . . . . . . . . . . 2.2.2 Abstract Algebra and Algebraic Structure 2.2.3 Groups . . . . . . . . . . . . . . . . . . . 2.2.4 Rings and Fields . . . . . . . . . . . . . . 2.2.5 Polynomials . . . . . . . . . . . . . . . . . 2.2.6 Objects Called Algebras . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
9 9 11 13 13 14 15 16 16
3 Type Theory and PowerEpsilon 17 3.1 Type Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.1 Types in Computer Science . . . . . . . . . . . . . . . . . 17 3.1.2 Intuitionistic Logic . . . . . . . . . . . . . . . . . . . . . . 18 3.1.2.1 Nonconstructive Mathematics . . . . . . . . . . 18 3.1.2.2 Constructive Mathematics . . . . . . . . . . . . 19 3.1.2.3 Deductions as Computations and Computations as Deductions . . . . . . . . . . . . . . . . . . . 19 3.1.2.4 Mechanization of Higher-Order Logic . . . . . . 21 3.1.3 Martin-L¨of’s Type Theory . . . . . . . . . . . . . . . . . . 21 3.1.4 Natural Deduction Systems . . . . . . . . . . . . . . . . . 22 3.1.4.1 Deduction System . . . . . . . . . . . . . . . . . 22 3.1.4.2 Natural Deduction System . . . . . . . . . . . . 22 3.1.5 Should Types be Modeled by Calculi or Algebra? . . . . . 22
2
3.1.6
3.2 3.3
3.4
3.5
3.6 3.7
Philosophical View of Types . . . . . . . . . . . . . . . . . 3.1.6.1 Realist View . . . . . . . . . . . . . . . . . . . . 3.1.6.2 Intuitionist View . . . . . . . . . . . . . . . . . . 3.1.7 Polymorphic Functional Languages . . . . . . . . . . . . . 3.1.7.1 Edinburgh ML . . . . . . . . . . . . . . . . . . . 3.1.7.2 HOPE . . . . . . . . . . . . . . . . . . . . . . . . 3.1.7.3 SASL, KRC, Miranda . . . . . . . . . . . . . . . What is PowerEpsilon . . . . . . . . . . . . . . . . . . . . . . . . Syntax of PowerEpsilon . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Lexicon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 Currying and Higher-Order Terms . . . . . . . . . . . . . 3.3.5 Abstract Syntax . . . . . . . . . . . . . . . . . . . . . . . Type Inference Rules of PowerEpsilon . . . . . . . . . . . . . . . 3.4.1 Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Judgements . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 Inference Rules . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 Derivations . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.5 Γ-Terms, Γ-Types and Γ-Propositions . . . . . . . . . . . 3.4.6 Type Conversion Rules . . . . . . . . . . . . . . . . . . . 3.4.7 Cumulativity Relation . . . . . . . . . . . . . . . . . . . . 3.4.8 Curry-Howard Isomorphism . . . . . . . . . . . . . . . . . 3.4.8.1 From Types to Programs: The Constructive Mathematics . . . . . . . . . . . . . . . . . . . . . . 3.4.8.2 From Programs to Types: The Type Inferences . 3.4.9 Applications of PowerEpsilon . . . . . . . . . . . . . . . . Formal Logic in PowerEpsilon . . . . . . . . . . . . . . . . . . . . 3.5.1 Logical Operators Defined by PowerEpsilon . . . . . . . . 3.5.1.1 Logical Implication . . . . . . . . . . . . . . . . 3.5.1.2 Free and Bound Variables . . . . . . . . . . . . . 3.5.1.3 Universal Quantified Formula . . . . . . . . . . . 3.5.1.4 Existential Quantified Formula . . . . . . . . . . 3.5.2 Logical Operators Derived from PowerEpsilon . . . . . . . 3.5.2.1 Logical Negation . . . . . . . . . . . . . . . . . . 3.5.2.2 Logical Conjunction . . . . . . . . . . . . . . . . 3.5.2.3 Logical Disjunction . . . . . . . . . . . . . . . . 3.5.2.4 Equivalence Relation . . . . . . . . . . . . . . . 3.5.3 Proof by Contradiction . . . . . . . . . . . . . . . . . . . 3.5.4 Informal and Formal Theorem Proving . . . . . . . . . . . General Schema of Investigating Algebraic Structures . . . . . . Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.1 Injection, Surjection and Bijection . . . . . . . . . . . . . 3.7.2 Binary Operations . . . . . . . . . . . . . . . . . . . . . . 3
23 23 24 24 24 24 25 25 26 26 26 26 28 30 31 31 31 31 34 34 34 34 36 38 38 38 41 41 41 41 41 41 41 41 42 42 44 44 45 45 45 46 47
3.8
II
Sets and Operations . . . . . . . . . . . . . . . . . . . . . . . . .
Semi-Groups, Monoids and Groups
50
4 Semi-Groups 4.1 Definition of Semi-Groups . . . . . . . . . . . . . 4.2 Examples of Semi-Group . . . . . . . . . . . . . . 4.2.1 Semi-Group of Natural Number . . . . . . 4.2.1.1 Natural Numbers . . . . . . . . 4.2.1.2 Definition of Nat . . . . . . . . . 4.2.1.3 Function Definitions for Nat . . 4.2.1.4 Constructors . . . . . . . . . . . 4.2.1.5 Canonical Functions . . . . . . . 4.2.1.6 Properties of Nat . . . . . . . . . 4.2.1.7 Semi-Group: Nat SG . . . . . . . 4.2.2 Semi-Groups of Transformations . . . . . 4.2.2.1 Transformations . . . . . . . . . 4.2.2.2 Semi-Groups of Transformations 4.3 Finite Semi-Groups . . . . . . . . . . . . . . . . . 4.4 Isomorphism . . . . . . . . . . . . . . . . . . . . 4.5 Sub-Semigroups . . . . . . . . . . . . . . . . . . . 4.6 Homomorphism . . . . . . . . . . . . . . . . . . . 4.7 Endomorphism and Automorphism . . . . . . . . 4.7.1 Endomorphisms . . . . . . . . . . . . . . 4.7.2 Automorphisms . . . . . . . . . . . . . . . 5 Monoid 5.1 Definition of Monoid . . . . . . . . . . . . . 5.2 Examples . . . . . . . . . . . . . . . . . . . 5.2.1 Monoid of Natural Number . . . . . 5.2.1.1 Basic Properties of Natural 5.2.1.2 Proof of Identity . . . . . . 5.2.1.3 Proof of Nat as a Monoid . 5.3 Finite Monoid . . . . . . . . . . . . . . . . . 5.4 Isomorphism . . . . . . . . . . . . . . . . . 5.5 Sub-Monoid . . . . . . . . . . . . . . . . . . 5.6 Homomorphism . . . . . . . . . . . . . . . . 5.6.1 Kernel of Monoids . . . . . . . . . . 5.7 Endomorphism and Automorphism . . . . . 5.7.1 Endomorphisms . . . . . . . . . . . 5.7.2 Automorphisms . . . . . . . . . . . . 5.8 Commutative Monoid . . . . . . . . . . . . 5.8.1 Definition of Commutative Monoid .
4
47
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
51 51 53 53 53 53 54 54 54 56 57 57 57 58 58 59 69 70 71 71 72
. . . . . . . . . . . . . . . . . . Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
80 80 82 82 82 82 82 82 83 84 87 91 92 92 92 93 93
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
5.8.2
Commutative Monoid of Natural Number . . . . 5.8.2.1 Basic Properties of Natural Numbers . 5.8.2.2 Proof of Associativity . . . . . . . . . . 5.8.2.3 Proof of Commutativity . . . . . . . . . 5.8.2.4 Proof of Identity . . . . . . . . . . . . . 5.8.2.5 Proof of Nat as a Commutative Monoid
6 Groups 6.1 Symmetries of the Square . . . . . . . . . . . . . . . . 6.2 Groups of Transformations . . . . . . . . . . . . . . . 6.3 Definition of Groups . . . . . . . . . . . . . . . . . . . 6.3.1 Operators on Groups . . . . . . . . . . . . . . . 6.3.2 Postulates . . . . . . . . . . . . . . . . . . . . . 6.3.3 Equivalence Relation on Groups . . . . . . . . 6.3.4 Basic Properties of Groups . . . . . . . . . . . 6.3.4.1 Basic Properties of Inverse Operation 6.3.4.2 Basic Properties of Associativity . . . 6.3.4.3 Basic Properties of Identity . . . . . . 6.3.4.4 Cancellation Laws . . . . . . . . . . . 6.3.4.5 Uniqueness of Identity . . . . . . . . . 6.3.4.6 Other Postulates for Groups . . . . . 6.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1 Integers . . . . . . . . . . . . . . . . . . . . . . 6.4.1.1 Definition of Integers . . . . . . . . . 6.4.1.2 Function Definitions for Int . . . . . 6.4.1.3 Constructors of Int . . . . . . . . . . 6.4.1.4 Canonical Functions of Int . . . . . . 6.4.2 Group of Integers . . . . . . . . . . . . . . . . . 6.4.3 Group of Nat with Modulo Additive Operation 6.4.4 Group of Transformations . . . . . . . . . . . . 6.4.5 Further Examples . . . . . . . . . . . . . . . . 6.5 Isomorphism . . . . . . . . . . . . . . . . . . . . . . . 6.5.1 Isomorphism of Groups . . . . . . . . . . . . . 6.5.2 Isomorphism of Sub-Groups . . . . . . . . . . . 6.5.3 Properties of Isomorphism of Groups . . . . . . 6.6 Cyclic and Finite Groups . . . . . . . . . . . . . . . . 6.6.1 Cyclic Groups . . . . . . . . . . . . . . . . . . . 6.6.1.1 Proof of FiniteIsomThm . . . . . . . 6.6.1.2 Proof of InfIsomThm . . . . . . . . . 6.6.1.3 Proof of CyclThm1 . . . . . . . . . . . 6.6.1.4 Proof of CyclThm2 . . . . . . . . . . . 6.6.2 Finite Groups . . . . . . . . . . . . . . . . . . . 6.6.2.1 Finite Cyclic Groups . . . . . . . . . 6.6.2.2 Finite Groups . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
93 93 94 94 94 94
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95 95 96 100 102 103 105 106 106 106 107 107 113 114 122 122 122 123 123 123 124 124 125 125 126 126 128 129 135 135 139 139 140 140 141 141 141
6.7 6.8
6.9 6.10
6.11
6.12 6.13 6.14 6.15
6.6.2.3 Finite Subgroups . . . . . . . 6.6.3 Properties of Cyclic and Finite Groups Sub-Groups . . . . . . . . . . . . . . . . . . . 6.7.0.1 Center of Group . . . . . . . Cosets . . . . . . . . . . . . . . . . . . . . . . 6.8.0.2 Draft of Proof: . . . . . . . . 6.8.0.3 Draft of Proof: . . . . . . . . 6.8.1 Finiteness Conditions for Subsets . . . 6.8.2 Lagrange’s Theorem . . . . . . . . . . Permutation . . . . . . . . . . . . . . . . . . . 6.9.0.1 Draft of Proof: . . . . . . . . Homomorphism . . . . . . . . . . . . . . . . . 6.10.1 Homomorphism of Groups . . . . . . . 6.10.2 Kernel . . . . . . . . . . . . . . . . . . 6.10.3 Direct Products of Groups . . . . . . . Endomorphism and Automorphism . . . . . . 6.11.1 Endomorphism . . . . . . . . . . . . . 6.11.2 Automorphism . . . . . . . . . . . . . 6.11.3 Group of Automorphism . . . . . . . . 6.11.4 Conjugate . . . . . . . . . . . . . . . . 6.11.5 Galois . . . . . . . . . . . . . . . . . . Commutative Group . . . . . . . . . . . . . . Commutative Group of Integers . . . . . . . . Quotient Groups . . . . . . . . . . . . . . . . Equivalence and Congruence Relations . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
142 143 143 153 159 161 164 164 166 170 172 175 175 187 188 191 191 192 192 194 203 206 207 208 212
III Rings, Integral Domains, Fields and Complete Ordered Fields 235 7 Rings 7.1 Definition of Rings . . . . . . . . . . . . . . . . . . . 7.1.1 Operators on Rings . . . . . . . . . . . . . . 7.1.2 Postulates . . . . . . . . . . . . . . . . . . . . 7.1.3 Examples of Rings . . . . . . . . . . . . . . . 7.2 Commutative Rings . . . . . . . . . . . . . . . . . . 7.2.1 Definition of Commutative Rings . . . . . . . 7.2.2 Examples of Commutative Rings . . . . . . . 7.2.3 Elementary Properties of Commutative Rings 7.3 Division Rings . . . . . . . . . . . . . . . . . . . . . 7.4 Sub-Rings . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Isomorphisms . . . . . . . . . . . . . . . . . . . . . . 7.5.1 Isomorphism of Rings . . . . . . . . . . . . . 7.5.2 Anti-Isomorphism of Rings . . . . . . . . . . 6
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
236 236 238 240 245 246 246 248 248 258 260 261 261 263
7.6
Homomorphisms . . . . . . . . . . . . 7.6.1 Homomorphism of Rings . . . . 7.6.2 Anti-Homomorphisms of Rings 7.6.3 Epimorphisms of Rings . . . . 7.7 Endomorphism and Automorphism . . 7.7.1 Endomorphism . . . . . . . . . 7.7.2 Automorphism . . . . . . . . . 7.8 Ideals . . . . . . . . . . . . . . . . . . 7.8.1 Kernel . . . . . . . . . . . . . . 7.8.2 Epimorphism Image . . . . . . 7.8.3 Improper Ideals . . . . . . . . . 7.8.4 Proper Ideals . . . . . . . . . . 7.8.5 Improper Division Ideals . . . . 7.8.6 Proper Division Ideals . . . . . 7.8.7 Maximal Ideals . . . . . . . . . 7.8.8 Prime Ideals . . . . . . . . . . 7.8.9 Principal Ideals . . . . . . . . . 7.9 Cosets . . . . . . . . . . . . . . . . . . 7.10 Quotient Rings . . . . . . . . . . . . . 7.11 Algebra of Ideals . . . . . . . . . . . . 7.12 Characteristics of a Ring . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
264 264 270 271 273 273 273 274 283 284 286 293 294 294 296 296 297 303 305 318 322
8 Integral Domains 8.1 Definition of Integral Domains . . . . . . . . . 8.2 Examples . . . . . . . . . . . . . . . . . . . . . 8.3 Subdomains . . . . . . . . . . . . . . . . . . . . 8.4 Isomorphisms . . . . . . . . . . . . . . . . . . . 8.5 Homomorphisms . . . . . . . . . . . . . . . . . 8.6 Endomorphism and Automorphism . . . . . . . 8.6.1 Endomorphism . . . . . . . . . . . . . . 8.7 Ideals . . . . . . . . . . . . . . . . . . . . . . . 8.7.0.1 Kernel . . . . . . . . . . . . . . 8.8 Cosets . . . . . . . . . . . . . . . . . . . . . . . 8.9 Ordered Integral Domains . . . . . . . . . . . . 8.9.1 Definition of Ordered Integral Domains 8.9.2 Properties of Ordered Domains . . . . . 8.10 Well-Ordering Principle . . . . . . . . . . . . . 8.11 Quotient Integral Domains . . . . . . . . . . . . 8.12 Characteristics of an Integral Domains . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
342 342 344 345 345 347 349 349 350 350 351 352 352 354 354 355 357
7
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
9 Fields 9.1 Definition of Fields . . . . . . . . . 9.1.1 Operators on Fields . . . . 9.1.2 Postulates of Fields . . . . 9.2 Examples . . . . . . . . . . . . . . 9.2.1 Constructors of Rat . . . . 9.2.2 Canonical Functions of Rat 9.3 Subfields . . . . . . . . . . . . . . . 9.4 Abstract Construction of Rationals 9.5 Isomorphisms . . . . . . . . . . . . 9.6 Homomorphisms . . . . . . . . . . 9.7 Ordered Fields . . . . . . . . . . . 9.8 Ideals . . . . . . . . . . . . . . . . 9.8.1 Kernel . . . . . . . . . . . . 9.9 Cosets . . . . . . . . . . . . . . . . 9.10 Quotient Fields . . . . . . . . . . . 9.11 Characteristics of a Field . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
359 359 360 361 367 368 368 377 379 385 386 388 390 390 391 392 393
10 Complete Ordered Fields 394 10.1 Dilemma of Pythagoras . . . . . . . . . . . . . . . . . . . . . . . 394 10.2 Upper and Lower Bounds . . . . . . . . . . . . . . . . . . . . . . 395 10.3 Definition of Complete Ordered Fields . . . . . . . . . . . . . . . 397 10.4 Real Number Systems . . . . . . . . . . . . . . . . . . . . . . . . 399 10.4.1 Dedekind’s Cuts . . . . . . . . . . . . . . . . . . . . . . . 400 10.4.1.1 Properties of Dedekind’s Cuts . . . . . . . . . . 407 10.4.1.2 Ordering of Real . . . . . . . . . . . . . . . . . . 419 10.4.1.3 Addition of Real . . . . . . . . . . . . . . . . . . 419 10.4.1.4 Zero of Real . . . . . . . . . . . . . . . . . . . . 420 10.4.1.5 One of Real . . . . . . . . . . . . . . . . . . . . 421 10.4.1.6 Negation of Real . . . . . . . . . . . . . . . . . . 421 10.4.1.7 Absolute Value of Real . . . . . . . . . . . . . . 422 10.4.1.8 Multiplication of Real . . . . . . . . . . . . . . . 422 10.4.1.9 Embedding Function of Real . . . . . . . . . . . 424 10.4.1.10 Set of Real Numbers . . . . . . . . . . . . . . . . 425 10.4.1.11 Big Union of Real Number Set . . . . . . . . . . 425 10.4.1.12 Big Intersection of Real Number Set . . . . . . . 426 10.4.1.13 Least Upper Bound of Real Number Sets . . . . 426 10.4.1.14 Greatest Lower Bound of Real Number Sets . . 427 10.4.1.15 Least Upper Bound Theorem of Real Number Sets428 10.4.1.16 Greatest Lower Bound Theorem of Real Number Set . . . . . . . . . . . . . . . . . . . . . . . . . 430 10.4.1.17 Commutativity of Addition . . . . . . . . . . . . 434 10.4.1.18 Associativity of Addition . . . . . . . . . . . . . 434 10.4.1.19 Zero Unit of Addition . . . . . . . . . . . . . . . 434 8
10.5
10.6 10.7 10.8 10.9
10.4.1.20 Negation and Addition . . . . . . . . . . . . . . 435 10.4.1.21 Cancellation for Addition . . . . . . . . . . . . . 435 10.4.1.22 Ordering Preservation . . . . . . . . . . . . . . . 435 10.4.1.23 Commutative of Multiplication . . . . . . . . . . 435 10.4.1.24 Associativity of Multiplication . . . . . . . . . . 436 10.4.1.25 Distributivity of Multiplication over Addition . . 436 10.4.1.26 RROO ̸= RRONE . . . . . . . . . . . . . . . . . . . 436 10.4.1.27 Unit for Multiplication . . . . . . . . . . . . . . 436 10.4.1.28 Inverse for Multiplication . . . . . . . . . . . . . 437 10.4.1.29 Ordering Preservation for Multiplication . . . . 437 10.4.1.30 Property of RREE . . . . . . . . . . . . . . . . . . 437 10.4.1.31 Real - A Complete Ordered Field . . . . . . . . 438 10.4.2 Cauchy’s Sequences . . . . . . . . . . . . . . . . . . . . . 439 10.4.2.1 Equality . . . . . . . . . . . . . . . . . . . . . . 439 10.4.2.2 Addition . . . . . . . . . . . . . . . . . . . . . . 440 10.4.2.3 Negation . . . . . . . . . . . . . . . . . . . . . . 440 10.4.2.4 Multiplication . . . . . . . . . . . . . . . . . . . 441 10.4.2.5 Invertion . . . . . . . . . . . . . . . . . . . . . . 441 10.4.2.6 Absolute Value . . . . . . . . . . . . . . . . . . . 442 10.4.2.7 Embedded Function . . . . . . . . . . . . . . . . 442 Abstract Construction of Real Numbers . . . . . . . . . . . . . . 443 10.5.1 Ordering of AFReal . . . . . . . . . . . . . . . . . . . . . . 446 10.5.2 Addition of AFReal . . . . . . . . . . . . . . . . . . . . . . 446 10.5.3 Zero of AFReal . . . . . . . . . . . . . . . . . . . . . . . . 447 10.5.4 One of AFReal . . . . . . . . . . . . . . . . . . . . . . . . 448 10.5.5 Negation of AFReal . . . . . . . . . . . . . . . . . . . . . . 449 10.5.6 Absolute Value of AFReal . . . . . . . . . . . . . . . . . . 450 10.5.7 Multiplication of AFReal . . . . . . . . . . . . . . . . . . . 451 10.5.8 Embedding Function of AFReal . . . . . . . . . . . . . . . 455 10.5.9 Set of Abstract Real Numbers . . . . . . . . . . . . . . . 456 10.5.10 Big Union of Abstract Real Number Set . . . . . . . . . . 456 10.5.11 Least Upper Bound of Abstract Real Number Set . . . . 457 10.5.12 Big Intersection of Abstract Real Number Set . . . . . . . 458 10.5.13 Greatest Lower Bound of Abstract Real Number Set . . . 459 10.5.14 Least Upper Bound Theorem of Abstract Real Number Set460 10.5.15 Greatest Lower Bound Theorem of Abstract Real Number Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 10.5.16 An Abstract Complete Ordered Field . . . . . . . . . . . 463 Complete Ordered Subfields . . . . . . . . . . . . . . . . . . . . . 463 Isomorphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Homomorphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Endomorphisms and Automorphisms . . . . . . . . . . . . . . . . 469 10.9.1 Endomorphism . . . . . . . . . . . . . . . . . . . . . . . . 469 10.9.2 Automorphism . . . . . . . . . . . . . . . . . . . . . . . . 470 9
IV
Polynomials, Lattices and Categories
11 Polynomials 11.1 Polynomial Forms . . . . . . . . . . . . . 11.2 Polynomial Functions . . . . . . . . . . . 11.3 The Division Algorithm . . . . . . . . . . 11.4 Units and Associates . . . . . . . . . . . . 11.5 Irreducible Polynomials . . . . . . . . . . 11.6 Unique Factorization Theorem . . . . . . 11.7 Other Domain with Unique Factorization 11.8 Eisenstein’s Irreducibility Criterion . . . . 11.9 Partial Fraction . . . . . . . . . . . . . . .
471
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
472 472 481 485 486 489 491 495 498 499
12 Boolean Algebras and Lattices 12.1 Basic Definition . . . . . . . . . . . . . . . . . 12.2 Laws: Analogy with Arithmetic . . . . . . . . 12.3 Lattices . . . . . . . . . . . . . . . . . . . . . 12.3.1 Definition . . . . . . . . . . . . . . . . 12.3.2 Postulates of Lattice . . . . . . . . . . 12.3.2.1 Idempotent Law for ∨ . . . . 12.3.2.2 Idempotent Law for ∧ . . . . 12.3.2.3 Commutative Law for ∨ . . . 12.3.2.4 Commutative Law for ∧ . . . 12.3.2.5 Associative Law for ∨ . . . . 12.3.2.6 Associative Law for ∧ . . . . 12.3.2.7 Absorption Law for ∨ over ∧ 12.3.2.8 Absorption Law for ∧ over ∨ 12.4 Distributive Lattices . . . . . . . . . . . . . . 12.4.1 Definition . . . . . . . . . . . . . . . . 12.5 Boolean Algebra . . . . . . . . . . . . . . . . 12.5.1 Definition . . . . . . . . . . . . . . . . 12.5.1.1 Postulates . . . . . . . . . . 12.5.2 Operators . . . . . . . . . . . . . . . . 12.6 Upper and Lower Bounds . . . . . . . . . . . 12.7 Partial Orderings . . . . . . . . . . . . . . . . 12.8 Deduction of Other Basic Laws . . . . . . . . 12.9 Sublattice and Boolean Subalgebra . . . . . . 12.9.1 Sublattice . . . . . . . . . . . . . . . . 12.9.2 Boolean Subalgebra . . . . . . . . . . 12.10Isomorphism . . . . . . . . . . . . . . . . . . 12.10.1 Isomorphism of Lattices . . . . . . . . 12.10.2 Isomorphism of Boolean Algebra . . . 12.11Finite Lattice . . . . . . . . . . . . . . . . . . 12.12Homomorphisms . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
503 503 504 506 506 507 507 507 508 508 508 509 509 509 510 510 511 511 511 513 514 517 519 532 532 532 534 534 535 540 541
10
. . . . . . . . .
12.13Representation by Sets . . . . . . . . . . . . . . . . . . . . . . . . 543 13 Category Theory 13.1 Categories . . . . . . . . . . . . . . . . . . . . 13.1.1 Definition of Category . . . . . . . . . 13.1.2 Basic Properties of Categories . . . . . 13.1.3 Examples . . . . . . . . . . . . . . . . 13.1.3.1 Category of Groups . . . . . 13.1.3.2 Category of Sets . . . . . . . 13.1.3.3 Category of Rings . . . . . . 13.1.3.4 Category of Categories . . . 13.1.3.5 Products of Categories . . . 13.2 Initial, Terminal and Zero Objects . . . . . . 13.2.1 Initial Objects . . . . . . . . . . . . . 13.2.2 Terminal Objects . . . . . . . . . . . . 13.2.3 Zero Objects . . . . . . . . . . . . . . 13.2.4 Examples . . . . . . . . . . . . . . . . 13.3 Subcategories . . . . . . . . . . . . . . . . . . 13.4 Functors . . . . . . . . . . . . . . . . . . . . . 13.4.1 Functors (Covariants) . . . . . . . . . 13.4.2 Forgetful Functors . . . . . . . . . . . 13.4.3 Isomorphism of Categories . . . . . . . 13.4.4 Full Functors . . . . . . . . . . . . . . 13.4.5 Faithful Functors . . . . . . . . . . . . 13.5 Natural Transformation . . . . . . . . . . . . 13.5.1 Definition of Natural Transformations 13.5.2 Inverse of Natural Transformations . . 13.5.3 Natural Equivalence . . . . . . . . . . 13.5.4 Functor Categories . . . . . . . . . . . 13.6 Duality, Contravariance and Opposites . . . . 13.6.1 Contravariants . . . . . . . . . . . . . 13.7 Monics, Epis and Zeros . . . . . . . . . . . . 13.7.1 Monic and Epic Morphisms . . . . . . 13.7.2 Zero Morphism . . . . . . . . . . . . . 13.7.3 Left and Right Inverse Morphisms . . 13.7.4 Idemponent Morphism . . . . . . . . . 13.8 Universal and Couniversal Arrows . . . . . . 13.8.1 Universal Arrows . . . . . . . . . . . . 13.8.2 Couniversal Arrows . . . . . . . . . . 13.9 Products and Limits . . . . . . . . . . . . . . 13.9.1 Product of Objects . . . . . . . . . . . 13.9.2 Infinite Product of Objects . . . . . . 13.9.3 Powers . . . . . . . . . . . . . . . . . . 13.9.4 Equalizers . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
552 552 552 558 562 562 563 563 563 564 569 569 569 570 570 571 572 572 578 578 584 585 586 586 587 589 590 591 592 594 594 599 601 602 602 603 607 607 608 612 614 614
13.9.5 Pushbacks . . . . . 13.9.6 Kernels . . . . . . 13.9.7 Limits . . . . . . . 13.10Coproducts and Colimits 13.10.1 Sum of Objects . . 13.10.2 Copowers . . . . . 13.10.3 Coequalizers . . . 13.10.4 Pushouts . . . . . 13.10.5 Cokernels . . . . . 13.10.6 Colimits . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
615 616 619 620 620 624 624 625 626 627
14 Conclusions 14.1 Mathematical Theorem Proving as Computer Programming 14.2 Abstract Reasoning . . . . . . . . . . . . . . . . . . . . . . . 14.3 Structured Reasoning . . . . . . . . . . . . . . . . . . . . . 14.4 Algorithm and Proof Complexity . . . . . . . . . . . . . . . 14.5 Subproofs and Subroutines . . . . . . . . . . . . . . . . . . 14.6 The Rules of Writing Proofs in PowerEpsilon . . . . . . . . 14.7 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . 14.7.1 Overloading of Predicates and Functions . . . . . . . 14.7.2 Separation of Theories and Theory Bodies . . . . . . 14.7.3 Cross-Reference Generator . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
629 629 630 631 631 631 632 632 632 632 632
12
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
List of Figures 3.1 3.2 3.3
Type Inference Rules for PowerEpsilon . . . . . . . . . . . . . . More on Type Inference Rules for PowerEpsilon . . . . . . . . Type Conversion Rules for PowerEpsilon . . . . . . . . . . . .
13
32 33 35
List of Tables 3.1
Interpretation of Logical Connectives . . . . . . . . . . . . . . . .
1
21
Part I
An Introduction to PowerEpsilon
2
Chapter 1
Introduction The purpose of this book is to give an introduction to the basic algebraic systems: groups, rings, fields, and categories, in terms of a computer language and mathematical theorem proof development system PowerEpsilon. The study of these system encompasses a major portion of classical algebra. Thus, in a sense our subject matter is old. However, the formal development which we have adopted here is comparatively new. A beginner may find our account at times uncomfortably abstract since we have tied ourselves up to a computer system. In order to read this book, we first have to try getting familiar with PowerEpsilon - a language with many features in common with LISP. However, you will find that PowerEpsilon is very easy to learn. Even since the birth of the first modern computer, computer technology has developed at a fantastic speed. Today we see computers being used not only to solve computationally difficult problems, such as carrying out a fast Fourier transform or inverting a matrix of high dimensionality, but also being asked to perform tasks that would be called intelligent if done by human beings. Some such tasks are writing programs, answering questions, and proving mathematical theorems.
1.1
What is a Proof ?
The Oxford Advanced Learner’s Dictionary of Current English contains the following sentence concerning the term proof: 1. evidence (in general), or a particular piece of evidence, that is sufficient to show, or help to show, that something is a fact. 2. demonstrating, testing of whether something is true, a fact, etc. 3. test, trial, examination. ... The Webster’s New Collegiate Dictionary contains the following sentence concerning the term proof: 3
Introduction
4
1. That degree of cogency, arising from evidence, which convinces the mind of any truth or fact and produces belief; also, that which proves or tends to prove. Properly speaking, proof is the effect or result of evidence; evidence is the medium of proof. 2. a Any effort, process, or operation designed to establish or discover a fact or truth; test; trial. b A test applied to substances to determine if they are of satisfactory quality, etc. 3. Quality or state of having been proved or tried; as armor of proof. 4. Proof strength, that is, the minimum strength of proof spirit; sometimes, short for PROOF SPIRIT. Also, strength with reference to the standard for proof spirit. 5. Engineering and Etching. A Proof impression. 6. Law. Evidence operating to determine the judgment of a tribunal. 7. Math. An operation for testing the accuracy of a previous operation; a check. 8. Photo. A test print made from a negative. 9. Print. A trial impression, as from type, taken for correcting or examination; – called also proof sheet. Conjecture and proof are the twin pillars of mathematics. Conjecture stands at the cutting edge, in the wild region separating the known from the unknown. Proof stands at the center of mathematics, a solid tower about which an elaborate scaffolding of mathematical theorems is built. The task of mathematicians is to develop conjectures – guesses or hypotheses about mathematical behavior – which they can then attempt to prove. On this basis, mathematics grows, stretching into new fields and revealing hitherto unseen connections between well-established domains. Like other sciences, mathematics has an experimental component. In the trial-and-error process of developing and proving conjectures, mathematicians collect data and look for patterns and trends. They construct novel forms, seek logical arguments to strengthen a case, and search for counterexamples to destroy an argument or expose an error. In these and other ways, mathematicians act as experimentalists, constantly testing their ideas and methods. The concept of proof, however, brings something to mathematics that is missing from other sciences. Once the experimental work is done, mathematicians have ways to build a logical argument that pins the label “true” or “false” on practically any conjecture. Physicists can get away with overwhelming evidence to support a theory. In mathematics, a single counterexample is enough to sink a beautiful conjecture. For this reason, too, no set of pretty pictures, collected during countless computer experiments, is complete enough to substitute for a mathematical proof. The word “proof” has been frequently used by mathematicians in their daily work. • A proof is an evidence to show something is true under certain assumptions.
Introduction
5
• In terms of PowerEpsilon, a proof is a program whose type being corresponding to the theorem to be proved.
1.2
What is a Correct and Perfect Proof ?
A perfect proof means that the proof is precisely and completely stated without missing any arguments.
1.3
Mathematics and Mathematical Logic
A theory of deduction utilizes various ideas of logic that may appear strange, even foreign, to mathematics students with little background in logic. The main concern of this book is to develop the important theory of deduction known as the predicate calculus. In an effort to overcome the strangeness of the logical ideas and methods involved, we shall first present the theory of deduction based on the connectives “not” and “or”. This theory, known as the propositional calculus, characterizes the conclusions, or consequences, of a given set of assumptions, and so provides us with the formal side of arguments. The question of the validity of a given argument of this sort is easy to solve by the truth-table method, and so is really trivial. Therefore, in studying the accompanying theory of deduction we are able to concentrate on the formal apparatus and methods of a theory of deduction, without the complications owing to the subject matter under investigation. In short, the propositional calculus is a convenient device for making clear the nature of a theory of deduction. Mathematical logic is the study of logic as a mathematical theory. Following the usual procedure of applied mathematics, we construct a mathematical model of the system to be studied, and then conduct what is essentially a pure mathematical investigation of the properties of our model. In rough outline, the steps in setting up a theory of deduction are as follows: 1. First, the propositions (statements) of a language are characterized. This is achieved by actually creating a specific formal language possessing its own alphabet and rules of grammar; in fact, the sentences of the formal language are effectively spelled out by suitably chosen rules of grammar. 2. Finally, the notion of truth within this specialized and highly artificial language is characterized in terms of the concept of a “proof”.
1.3.1
Mathematical Theorem Proving as Computer Programming
All the characteristics of computer programming apply to mathematical theorem proving such as modularity and reusability. A proof is more efficient if it can
Introduction
6
run faster than others. More technical terminology will be used in mathematical theorem proving such as debugging a mathematical theorem proof or running a mathematical theorem proof. A proof can be executed distributively and concurrently. Finding Good Presentation of Problems Choosing a good presentation is a key step towards a successful solution of the problem in computer programming. It will be the same in mathematics. A good presentation of a mathematical structure means that the problem is half-solved. For example, a real number can be represented as a Dedekind cut or a Cauchy sequence. Both have their advantages and disadvantages. The Dedekind cut construction of real numbers has an initial advantage of simplicity, in that it provides a simple definition of real numbers and its ordering. But multiplication of Dedekind cuts is awkward, and verification of the properties of multiplication is a tedious business. The Cauchy sequence construction of real numbers also has the advantage of generality, since it can be used with an arbitrary metric space in place of rational numbers. Therefore, the two definitions are often used for different purposes. Information Hiding Principle In computer programming practice, we often try to separate program specifications from its implementations. This will be able to isolate the implementation details from the input/output behaviours of the programs. On the other hand, with its abstract nature, a mathematical theorem (specification) and its proof (implementation) are always separated from each other. Therefore, a good computer program always captured some elegant mathematical properties. Stepwise Refinement ‘Structured programming’ is the formulation of programs as hierarchical, nested structures of statements and objects of computation. Structured programming is considered by many programmers as synonym for modular or top-down programming. Structured programming can be visualized as the application of basic problem decomposition methods to establish a manageable, hierarchical problem structure. These problem decomposition methods are common to all engineering disciplines as well as the physical, chemical, and biological sciences. Breaks the problem’s solutions down into progressively more detailed levels (decomposition). In computer programming we often break a problem being solved down into several small subproblems so that the solutions to the subproblems can be composed into the solution to the original problem. It is similar in mathematical theorem proving practices, mathematicians often break a proof of a theorem to be proved into several small lemmas, the theorem will be proved once these lemmas being proved.
Introduction
1.4
7
About This Book
This book presents a practical work of formally developing mathematical logic theory in framework of constructive type theory supported by a mathematical theorem proof development system PowerEpsilon. It has been intended to give a close look at the relationship between mathematics and computer science. It is rather technical. It looks more like a computer programming text book rather than a mathematical one. You should not, as the first step, try to read this book. There are no computer programmers like to read a program unless he is going to write a similar program. You do not need to read the proofs given in the book which is written completely in terms of PowerEpsilon unless you need to write a similar proof or you are going to modify them. Instead, you should execute the proofs in the PowerEpsilon environment. Don’t be too upset when you find it is quite difficult to write down a proof in PowerEpsilon. Think about how difficult it is when you write down a C or Pascal. You will be getting familiar with the language, the system and the mathematical theorem proving style very soon. Programming is fun because it’s challenging to make the best design decisions. One especially neat feature of programming is that it’s very clear when you do it well. There is a big universe out there; a hundred years from now the people won’t know what the programs we have written today were. However, the mathematics will be there still. I believe very strongly in using what I have written. Not that I am the best user of my own programs, but I use them constantly so I am aware of their shortcomings and can change them if I find something stupid. A program, you have created, is useful if it is useful for yourself first. We don’t intend to cover all of aspects of Algebraic Theory. Instead, we are going to provide a outline of development of Algebraic Theory in PowerEpsilon. I did not try to put all of the theorems and proofs into the book since this will destroy the whole structure of the book, instead, we only list which we think it is most important. This book is divided into four parts: • Part I – An Introduction to PowerEpsilon introduces the basic features of PowerEpsilon organized as follows: Chapter 1. Introduction Provides a brief introduction of PowerEpsilon system. Chapter 3. Typed λ-Calculus Describes the fundamental concepts of typed λ-calculus and the lexicon, syntax and semantics of PowerEpsilon. • Part II – Semi-Groups, Monoids and Groups Chapter 4. Semi-Groups Gives an introduction to the theory of semigroups and develop its basic algebraic properties.
Introduction
8
Chapter 5. Monoids By adding more algebraic properties to semi-groups, we form another interesting algebraic structure – monoids. Chapter 6. Groups Provides a rather complete development of an important algebraic structure – groups. • Part III – Rings, Integral Domains, Fields and Complete Ordered Fields Chapter 7. Rings A more complex algebraic system – rings and many of its variants are introduced. Chapter 8. Integral Domains By adding more algebraic properties to rings, we form another interesting algebraic system – integral domains. Chapter 9. Fields Presents an abstract representation of the rational numbers. Chapter 10. Complete Ordered Fields The real number system is characterized as an complete ordered field. • Part IV – Polynomials, Lattices and Categories Chapter 11. Polynomials A special algebraic domain – polynomials are developed. Chapter 12. Boolean Algebras and Lattices Includes a complete introduction to Boolean algebras and lattice theory. Chapter 13. Categories Provides an introduction to category theory. Finally, Chapter 14 concludes the book with a brief summary and listing some future work.
Chapter 2
About Algebra Algebra is the branch of mathematics concerning the study of the rules of operations and relations, and the constructions and concepts arising from them, including terms, polynomials, equations and algebraic structures. Together with geometry, analysis, topology, combinatorics, and number theory, algebra is one of the main branches of pure mathematics. Elementary algebra, often part of the curriculum in secondary education, introduces the concept of variables representing numbers. Statements based on these variables are manipulated using the rules of operations that apply to numbers, such as addition. This can be done for a variety of reasons, including equation solving. Algebra is much broader than elementary algebra and studies what happens when different rules of operations are used and when operations are devised for things other than numbers. Addition and multiplication can be generalized and their precise definitions lead to structures such as groups, rings and fields, studied in the area of mathematics called abstract algebra.
2.1
History of Algebra and Time-Line of Algebra
By the time of Plato, Greek mathematics had undergone a drastic change. The Greeks created a geometric algebra where terms were represented by sides of geometric objects, usually lines, that had letters associated with them. Diophantus (3rd century AD), sometimes called “the father of algebra”, was an Alexandrian Greek mathematician and the author of a series of books called Arithmetica. These texts deal with solving algebraic equations. While the word algebra comes from the Arabic language (al-jabr “restoration”) and much of its methods from Arabic/Islamic mathematics, its roots can be traced to earlier traditions, which had a direct influence on Muhammad ibn M¯ us¯ a al-Khw¯ arizm¯ı (c. 780-850). He later wrote The Compendious Book 9
About Algebra
10
on Calculation by Completion and Balancing, which established algebra as a mathematical discipline that is independent of geometry and arithmetic. The roots of algebra can be traced to the ancient Babylonians, who developed an advanced arithmetical system with which they were able to do calculations in an algorithmic fashion. The Babylonians developed formulas to calculate solutions for problems typically solved today by using linear equations, quadratic equations, and indeterminate linear equations. By contrast, most Egyptians of this era, as well as Greek and Chinese mathematicians in the 1st millennium BC, usually solved such equations by geometric methods, such as those described in the Rhind Mathematical Papyrus, Euclid’s Elements, and The Nine Chapters on the Mathematical Art. The geometric work of the Greeks, typified in the Elements, provided the framework for generalizing formulae beyond the solution of particular problems into more general systems of stating and solving equations, though this would not be realized until the medieval Muslim mathematicians. The Hellenistic mathematicians Hero of Alexandria and Diophantus as well as Indian mathematicians such as Brahmagupta continued the traditions of Egypt and Babylon, though Diophantus’ Arithmetica and Brahmagupta’s Brahmasphutasiddhanta are on a higher level. For example, the first complete arithmetic solution (including zero and negative solutions) to quadratic equations was described by Brahmagupta in his book Brahmasphutasiddhanta. Later, Arabic and Muslim mathematicians developed algebraic methods to a much higher degree of sophistication. Although Diophantus and the Babylonians used mostly special ad hoc methods to solve equations, Al-Khwarizmi was the first to solve equations using general methods. He solved the linear indeterminate equations, quadratic equations, second order indeterminate equations and equations with multiple variables. In 1545, the Italian mathematician Girolamo Cardano published Ars magna - The great art, a 40-chapter masterpiece in which he gave for the first time a method for solving the general quartic equation. The Greek mathematician Diophantus has traditionally been known as the “father of algebra” but in more recent times there is much debate over whether al-Khwarizmi, who founded the discipline of al-jabr, deserves that title instead. Those who support Diophantus point to the fact that the algebra found in AlJabr is slightly more elementary than the algebra found in Arithmetica and that Arithmetica is syncopated while Al-Jabr is fully rhetorical. Those who support Al-Khwarizmi point to the fact that he introduced the methods of “reduction” and “balancing” (the transposition of subtracted terms to the other side of an equation, that is, the cancellation of like terms on opposite sides of the equation) which the term al-jabr originally referred to, and that he gave an exhaustive explanation of solving quadratic equations, supported by geometric proofs, while treating algebra as an independent discipline in its own right. His algebra was also no longer concerned “with a series of problems to be resolved, but an exposition which starts with primitive terms in which the combinations must give all possible prototypes for equations, which henceforward explicitly
About Algebra
11
constitute the true object of study.” He also studied an equation for its own sake and “in a generic manner, insofar as it does not simply emerge in the course of solving a problem, but is specifically called on to define an infinite class of problems.” The Persian mathematician Omar Khayyam is credited with identifying the foundations of algebraic geometry and found the general geometric solution of the cubic equation. Another Persian mathematician, Sharaf al-D¯ın al-T¯ us¯ı, found algebraic and numerical solutions to various cases of cubic equations. He also developed the concept of a function. The Indian mathematicians Mahavira and Bhaskara II, the Persian mathematician Al-Karaji, and the Chinese mathematician Zhu Shijie, solved various cases of cubic, quartic, quintic and higherorder polynomial equations using numerical methods. In the 13th century, the solution of a cubic equation by Fibonacci is representative of the beginning of a revival in European algebra. As the Islamic world was declining, the European world was ascending. And it is here that algebra was further developed. Fran¸cois Vi`ete’s work at the close of the 16th century marks the start of the classical discipline of algebra. In 1637, Ren´e Descartes published La Gomtrie, inventing analytic geometry and introducing modern algebraic notation. Another key event in the further development of algebra was the general algebraic solution of the cubic and quartic equations, developed in the mid-16th century. The idea of a determinant was developed by Japanese mathematician Kowa Seki in the 17th century, followed independently by Gottfried Leibniz ten years later, for the purpose of solving systems of simultaneous linear equations using matrices. Gabriel Cramer also did some work on matrices and determinants in the 18th century. Permutations were studied by Joseph Lagrange in his 1770 paper “R´eflexions sur la r´esolution alg´ebrique des ´equations” devoted to solutions of algebraic equations, in which he introduced Lagrange resolvents. Paolo Ruffini was the first person to develop the theory of permutation groups, and like his predecessors, also in the context of solving algebraic equations. Abstract algebra was developed in the 19th century, initially focusing on what is now called Galois theory, and on constructibility issues. The “modern algebra” has deep nineteenth-century roots in the work, for example, of Richard Dedekind and Leopold Kronecker and profound interconnections with other branches of mathematics such as algebraic number theory and algebraic geometry. George Peacock was the founder of axiomatic thinking in arithmetic and algebra. Augustus De Morgan discovered relation algebra in his Syllabus of a Proposed System of Logic. Josiah Willard Gibbs developed an algebra of vectors in three-dimensional space, and Arthur Cayley developed an algebra of matrices (this is a noncommutative algebra).
2.2
Classification
Algebra may be divided roughly into the following categories:
About Algebra
12
• Elementary algebra, in which the properties of operations on the real number system are recorded using symbols as “place holders” to denote constants and variables, and the rules governing mathematical expressions and equations involving these symbols are studied. This is usually taught at school under the title algebra (or intermediate algebra and college algebra in subsequent years). University-level courses in group theory may also be called elementary algebra. • Abstract algebra, sometimes also called modern algebra, in which algebraic structures such as groups, rings and fields are axiomatically defined and investigated. • Linear algebra, in which the specific properties of vector spaces are studied (including matrices); • Universal algebra, in which properties common to all algebraic structures are studied. • Algebraic number theory, in which the properties of numbers are studied through algebraic systems. Number theory inspired much of the original abstraction in algebra. • Algebraic geometry applies abstract algebra to the problems of geometry. • Algebraic combinatorics, in which abstract algebraic methods are used to study combinatorial questions. In some directions of advanced study, axiomatic algebraic systems such as groups, rings, fields, and algebras over a field are investigated in the presence of a geometric structure (a metric or a topology) which is compatible with the algebraic structure. The list includes a number of areas of functional analysis: • Normed linear spaces • Banach spaces • Hilbert spaces • Banach algebras • Normed algebras • Topological algebras • Topological groups
About Algebra
2.2.1
13
Elementary Algebra
Elementary algebra is the most basic form of algebra. It is taught to students who are presumed to have no knowledge of mathematics beyond the basic principles of arithmetic. In arithmetic, only numbers and their arithmetical operations (such as +, -, ×, ÷) occur. In algebra, numbers are often denoted by symbols (such as a, x, or y). This is useful because: • It allows the general formulation of arithmetical laws (such as a + b = b + a for all a and b), and thus is the first step to a systematic exploration of the properties of the real number system. • It allows the reference to “unknown” numbers, the formulation of equations and the study of how to solve these. (For instance, “Find a number x such that 3x + 1 = 10” or going a bit further “Find a number x such that ax + b = c”. This step leads to the conclusion that it is not the nature of the specific numbers that allows us to solve it, but that of the operations involved.) • It allows the formulation of functional relationships. (For instance, “If you sell x tickets, then your profit will be 3x - 10 dollars, or f(x) = 3x - 10, where f is the function, and x is the number to which the function is applied.”)
2.2.2
Abstract Algebra and Algebraic Structure
Abstract algebra extends the familiar concepts found in elementary algebra and arithmetic of numbers to more general concepts. • Sets: Rather than just considering the different types of numbers, abstract algebra deals with the more general concept of sets: a collection of all objects (called elements) selected by property, specific for the set. All collections of the familiar types of numbers are sets. Other examples of sets include the set of all two-by-two matrices, the set of all second-degree polynomials (ax2 + bx + c), the set of all two dimensional vectors in the plane, and the various finite groups such as the cyclic groups which are the group of integers modulo n. Set theory is a branch of logic and not technically a branch of algebra. • Binary operations: The notion of addition (+) is abstracted to give a binary operation, * say. The notion of binary operation is meaningless without the set on which the operation is defined. For two elements a and b in a set S, a * b is another element in the set; this condition is called closure. Addition (+), subtraction (-), multiplication (×), and division (÷) can be binary operations when defined on different sets, as is addition and multiplication of matrices, vectors, and polynomials.
About Algebra
14
• Identity elements: The numbers zero and one are abstracted to give the notion of an identity element for an operation. Zero is the identity element for addition and one is the identity element for multiplication. For a general binary operator * the identity element e must satisfy a * e = a and e * a = a. This holds for addition as a + 0 = a and 0 + a = a and multiplication a × 1 = a and 1 × a = a. Not all set and operator combinations have an identity element; for example, the positive natural numbers (1, 2, 3, . . .) have no identity element for addition. • Inverse elements: The negative numbers give rise to the concept of inverse elements. For addition, the inverse of a is -a, and for multiplication the inverse is 1/a. A general inverse element a−1 must satisfy the property that a ∗ a−1 = e and a−1 ∗ a = e. • Associativity: Addition of integers has a property called associativity. That is, the grouping of the numbers to be added does not affect the sum. For example: (2 + 3) + 4 = 2 + (3 + 4). In general, this becomes (a * b) * c = a * (b * c). This property is shared by most binary operations, but not subtraction or division or octonion multiplication. • Commutativity: Addition and multiplication of real numbers are both commutative. That is, the order of the numbers does not affect the result. For example: 2 + 3 = 3 + 2. In general, this becomes a * b = b * a. This property does not hold for all binary operations. For example, matrix multiplication and quaternion multiplication are both non-commutative.
2.2.3
Groups
Combining the above concepts gives one of the most important structures in mathematics: a group. A group is a combination of a set S and a single binary operation *, defined in any way you choose, but with the following properties: • An identity element e exists, such that for every member a of S, e * a and a * e are both identical to a. • Every element has an inverse: for every member a of S, there exists a member a−1 such that a∗a−1 and a−1 ∗a are both identical to the identity element. • The operation is associative: if a, b and c are members of S, then (a * b) * c is identical to a * (b * c). • If a group is also commutative - that is, for any two members a and b of S, a * b is identical to b * a - then the group is said to be abelian. For example, the set of integers under the operation of addition is a group. In this group, the identity element is 0 and the inverse of any element a is its
About Algebra
15
negation, -a. The associativity requirement is met, because for any integers a, b and c, (a + b) + c = a + (b + c). The nonzero rational numbers form a group under multiplication. Here, the identity element is 1, since 1 × a = a × 1 = a for any rational number a. The inverse of a is 1/a, since a × 1/a = 1. The integers under the multiplication operation, however, do not form a group. This is because, in general, the multiplicative inverse of an integer is not an integer. For example, 4 is an integer, but its multiplicative inverse is 1/4, which is not an integer. The theory of groups is studied in group theory. A major result in this theory is the classification of finite simple groups, mostly published between about 1955 and 1983, which is thought to classify all of the finite simple groups into roughly 30 basic types. Semigroups, quasigroups, and monoids are structures similar to groups, but more general. They comprise a set and a closed binary operation, but do not necessarily satisfy the other conditions. • A semigroup has an associative binary operation, but might not have an identity element. • A monoid is a semigroup which does have an identity but might not have an inverse for every element. • A quasigroup satisfies a requirement that any element can be turned into any other by a unique pre- or post-operation; however the binary operation might not be associative. All groups are monoids, and all monoids are semigroups.
2.2.4
Rings and Fields
Groups just have one binary operation. To fully explain the behaviour of the different types of numbers, structures with two operators need to be studied. The most important of these are rings, and fields. A ring has two binary operations (+) and (×), with × distributive over +. Under the first operator (+) it forms an abelian group. Under the second operator (×) it is associative, but it does not need to have identity, or inverse, so division is not required. The additive (+) identity element is written as 0 and the additive inverse of a is written as -a. Distributivity generalizes the distributive law for numbers, and specifies the order in which the operators should be applied, (called the precedence). For the integers (a + b) × c = a × c + b × c and c × (a + b) = c × a + c × b, and × is said to be distributive over +. The integers are an example of a ring. The integers have additional properties which make it an integral domain. A field is a ring with the additional
About Algebra
16
property that all the elements excluding 0 form an abelian group under ×. The multiplicative (×) identity is written as 1 and the multiplicative inverse of a is written as a−1 . The rational numbers, the real numbers and the complex numbers are all examples of fields.
2.2.5
Polynomials
A polynomial is an expression that is constructed from one or more variables and constants, using only the operations of addition, subtraction, and multiplication (where repeated multiplication of the same variable is standardly denoted as exponentiation with a constant nonnegative integer exponent). For example, x2 + 2x − 3 is a polynomial in the single variable x. An important class of problems in algebra is factorization of polynomials, that is, expressing a given polynomial as a product of other polynomials. The example polynomial above can be factored as (x - 1)(x + 3). A related class of problems is finding algebraic expressions for the roots of a polynomial in a single variable.
2.2.6
Objects Called Algebras
The word algebra is also used for various algebraic structures: • Algebra over a field or more generally algebra over a ring • Algebra over a set • Boolean algebra • Heyting algebra • F-algebra and F-coalgebra in category theory • Relational algebra • Sigma-algebra • T-Algebras of monads.
Chapter 3
Type Theory and PowerEpsilon 3.1
Type Theory
3.1.1
Types in Computer Science
In the Webster’s New Collegiate Dictionary, the following sentences were found concerning the word “type”: . . . a: qualities common to a number of individuals that distinguish them as an identifiable class: as (1): the morphological, physiological, or ecological characters by which relationship between organisms may be recognized (2): the form common to all instances of a word b: a typical and often superior specimen c: a member of an indicated class or variety of people d: a particular kind, class, or group: as (1): a texonomic category essentially equivalent to a division or phylum (2): a group distinguishable on physiologic or zero logical bases (3): one of a hierarchy of mutually exclusive classes in logic suggested to avoid paradoxes e: something distinguishable as a variety. . . . Type is one of most important concepts in the theory of programming languages. The research progress of the type theory has a profound impact on the development of computer science during the past two decades. Wegner [21] has given a detailed discussion on this question which is quoted as follows: This is a difficult question to answer because a complete answer must characterize aggregate properties of the type system as a whole as well as properties of individual types. We were tempted to replace the question by “What is a
17
Type Theory and PowerEpsilon
18
type system?”. Instead of such rephrasing we choose to interpret the original question as an abbreviation for the longer question: “What properties must types have both individually and collectively to constitute an acceptable type system for an object-oriented language?”. The following collection of partial answers illustrates the variety of levels at which an answer may be formulated. 1. Applicative programmer’s view: Types partition values into equivalent classes with common attributes and operations. Polymorphism allows type to have overlapping value sets so the partition (equivalence relation) becomes a covering (compatibility relation) of the universal value set. 2. System evolution (object-oriented) view: Types are behaviour specifications (predicates) that may be composed and incrementally modified to form new behaviour specifications. Inheritance is an important mechanism for incrementally modifying behaviour that supports system evolution. 3. Type checking view: Types impose syntactic constraints on expressions so that operators and operands of composite expressions are compatible. A type system is a set of rules for associating a type with every semantically meaningful subexpression of a programming language. 4. Verification view: Types determine behaviour invariants that instances of the type are required to satisfy. 5. System programming and security view: Types are a suit of clothes (armor) that protects raw information (bit strings) from unintended interpretations. 6. Implementer’s view: Types specify a storage mapping for values.
3.1.2
Intuitionistic Logic
In mathematical logic, formal languages in which we can express substantial parts of mathematics have long history, going back to Frege’s formulation in 1872 of the predicate logic. So, if we want a programming language in which it should be possible not just to write down programs but also to reason about them, an obvious attempt is to see whether any of the formalization used for mathematics could also be used for programming. 3.1.2.1
Nonconstructive Mathematics
Today, the standard formalization of classical, i.e. nonconstructive mathematics is the axiomatization of set theory given by Zermelo in 1908 (and later extended by Fraenkel). However, ZF is not intended to be a language in which we are supposed to actually do mathematics in, but rather a language in which we
Type Theory and PowerEpsilon
19
exhibit the basic principles of set theory. For instance, in ZF there are only two nonlogical symbols, = and ∈, expressing equality and membership respectively. So in ZF we can not write any program at all. Even if we extend ZF to a syntactically richer language, there remains the problem of how to represent programs; the notion of function can not be used because functions in classical set theory are in general not computable. 3.1.2.2
Constructive Mathematics
Out of the foundational crisis of mathematics in the first decades of this century, constructive mathematics arose as an independent branch of mathematics, mainly developed by Brouwer under the name intuitionism. Constructive mathematics did not get much support because of the general belief that important parts of mathematics were impossible to develop constructively. By the work of Bishop, however, this belief has been shown to be totally wrong. In the book “Foundations of Constructive Analysis”, Bishop rebuilds constructively central parts of classical analysis; and he does it in a way that demonstrates that constructive mathematics can be as simple and elegant as classical mathematics. Bishop has also envisaged the possibility of using a formalization of constructive mathematics for programming, starting from G¨odel’s theory of computable functions of finite type. Constable has also used constructive mathematics as a foundation of programming. 3.1.2.3
Deductions as Computations and Computations as Deductions
The following are some general examples of “deductions as computations”: • A first example of “deduction as computation” is backward chaining. An algorithm for searching for a deduction of A from B1 , ..., Bn may start with a desired conclusion A, and then apply all rules of deduction in reverse systematically at intermediate stages to see if each statement could arise as intermediate conclusion from intermediate premises. The algorithm then terminates when A has been traced back through various stages to the assumptions B1 , ..., Bn , and does not terminate if it never succeeds in constructing a deduction of A from B1 , ..., Bn . A typical example of this kind of systems is logic programming language Prolog. • A second example of “deduction as computation” is forward chaining. An algorithm for searching a deduction of A from B1 , . . . , Bn may start with B1 , . . . , Bn as data, applying all rules of deduction systematically at intermediate stages to intermediate premises to obtain intermediate conclusions. The program then terminates when A is obtained as a conclusion, and therefore when a deduction of A from B1 , . . . , Bn has been obtained.
Type Theory and PowerEpsilon
20
An idealization of classical expert system language OPS5 is an example of this kind of systems. The following are some general examples of “computation as deduction”: • Think of a computation as proceedings in stages, and as having a unique state at each stage and a unique input history. Each successive state is one of the possible successor of the previous state of the processor and input history. The possible finite sequences of states compatible with machine operation rules are the possible finite execution sequences. A sequential machine is one with only one execution sequence. A translation from execution sequences to deductions can be described as follows: given the input history H and the current state S and one possible successor state S ′ (there may be many), associate one rule of inference I(H, S, S ′ ) with H and S as premises, and S ′ as conclusion. This is an operational view of computations. There are many other view on computation, and each admits a corresponding deduction system. From another point of view, each execution sequence is a model of a theory, rather than a deduction in the theory. • Every system in which program correctness (i.e., that programs meet their specification) can be proved can be constructed as a logical system. There is an enormous quantity of ongoing work concerning sequential programs on program specification, program development, and program verification. From intuitionistic point of view, proposition and judgment are different concepts. A proposition is a description of certain fact, we can use logical operators such as ⇒, ∧, ∨, ¬, ∀ and ∃ to construct complex proposition from simple ones. On other hand, when we say that a proposition hold, we have make a judgment. For example, if A stands for “points x and y are on a line”, then A is only a proposition. But if we say that A is true, that is, we have a proof to show that points x and y are on a line, then we have made a judgment. In classical logic, a proposition is a Boolean-valued function with value of true or false. Intuitionistic logic, however, a proposition is determined by the contents of its proof. If we can give a proof of this proposition, then the proposition holds. Therefore, the provability is the true value of the proposition. The meaning of logical connectives and the intuitionistic interpretation of propositions can be related as Table 3.1: That is, the proposition F alse has no proof. The proof of proposition A ∧ B consists of a proof of A and a proof of B. The proof of proposition A ∨ B consists of a proof of A or a proof of B. The proof of proposition A ⇒ B is a method, given a proof of A, a proof of B can be obtained. The proof of proposition ∀(x)B(x) is a method too, given any proof a for A, a proof of B(x) can be obtained. The proof of proposition ∃(x)B(x) consists of a proof a of A and a proof of B(a).
Type Theory and PowerEpsilon
P roposition F alse A∧B A∨B A⇒B ∀(x)B(x) ∃(x)B(x)
21
Proof of Proposition no a proof of A and a proof of B a proof of A or a proof of B giving a proof of A can produce a proof of B giving any objects can produce a proof of B(a) there exists an object and a proof of B(a)
Table 3.1: Interpretation of Logical Connectives
3.1.2.4
Mechanization of Higher-Order Logic
Mechanization of higher-order logic is an important problem. It was pointed out that there are many problems which can be conveniently and compactly represented by higher than first-order logic [16].
3.1.3
Martin-L¨ of ’s Type Theory
Martin-L¨of’s type theory [10, 11, 12] has been developed with the aim of being a formalization of constructive mathematics. Its rules are formulated in the style of Gentzen’s natural deduction system for predicate logic; a formal system which Gentzen set up in 1936 with the intention that it should be as close as possible to actual reasoning. Martin-L¨of has suggested that type theory also could be viewed as a programming language. As such it is a typed functional language without assignments or other imperative features. Compared with other programming languages, it has a very rich type structure in that a type of a program can be used to describe what the program should do without describing how the program performs its task. The language differs from other programming languages in that all programs terminate. General recursion is not available, but primitive recursion together with functions of higher-order makes it possible to express all provably total recursive functions. In order to express the task of the program in the type system, it is necessary to be able to express properties of programs. Properties can be expressed as propositions (formulae), using predicate logic. In recent years, a number of new type theories has been proposed such as the Calculus of Constructions (CC) by Coquand and Huet [5]. These theories make it possible for us to formally treat some “higher-order” concepts such as “proposition”, “axiom”, “rule”, “transformation”, “problem”, and “proof strategy” etc. in one uniform framework. Normally, a software development environment only describe a special kind of “proposition” or “rule”, but can not treat them in a more abstract way. Based on these theories, a number of new approaches for software development have been proposed [4].
Type Theory and PowerEpsilon
22
In this report we describe the core of a strongly-typed polymorphic functional programming language called PowerEpsilon. Our original motivation came from the problem of finding a strongly-typed language suitable for use as a metalanguage for manipulating programs, proofs, and other similar symbolic data. PowerEpsilon can be used as both a programming language with a very rich set of data structures and a system for formalizing constructive mathematics. In type theory, the concept of types are more basic than sets. We say that A is a type, if we know what is its objects and whether two objects of A are equal. Moreover the equality defined for the objects of a given type A is the equivalent relation, and the equivalent relations are decidable.
3.1.4
Natural Deduction Systems
3.1.4.1
Deduction System
A deduction system for the predicate calculus consists of a (possibly infinite) recursive set of valid well-formed formulas (wffs), called axioms, and a finite set of mappings, called rules of inferences; each rule of inference maps one or more valid wffs into a valid wff. A wff B is said to be deducible (provable) in such a system if there exists a finite sequence of wffs such that B is the last wff in the sequence and each wff in the sequence is either an axiom or derived from previous wffs in the sequence by one of the rules of inference. Such a sequence of wffs is called a proof of B. Thus, since each axiom is a valid wff and each rule of inference maps valid wffs into a valid wff, it follows that every deducible wff is valid. 3.1.4.2
Natural Deduction System
A natural deduction system is a deduction system invented by Gentzen in which the set of axioms and inference rules is rich enough to enable valid wffs to be deduced in a very “natural” way. We now use the Greek letter Γ to indicate any sequence of zero or more wffs and use notation Γ ⊢ B standing for wff B is the consequence of Γ.
3.1.5
Should Types be Modeled by Calculi or Algebra?
Wegner [21] has also discussed this question. His discussion can be summarized as the following: • A calculus is a syntactic system of transformation rules. A “calculus” may be a formal system such as the predicate calculus where computation consists of applying rules of inference to prove theorems. It may be a reduction system such as the λ-calculus where computation consists of reducing expressions to a normal form in which no further reductions are applicable. The notion of calculus that emerges from these examples
Type Theory and PowerEpsilon
23
is that of a syntactically defined set of computation or inference rules are applicable (in reduction systems). • An algebra is a semantic system whose behaviour can be realized by a variety of syntactic calculi. An algebra is semantic system whose behaviour can be realized by a variety of syntactic calculi. For example the algebra of integers can be realized by decimal or binary number systems or even by λ-calculus representation. An algebra may be thought of as an equivalence class of calculi with common behaviour or as an abstraction from a specific syntactic realization of a calculus to a semantic specification of an underlying behaviour. • Specifying a computation as an algebra or a calculus. In some contexts a choice can be made on between specifying a computation as an algebra or a calculus. • Relation between calculi and algebra. Calculi are concrete (syntactic) algebra while algebra are abstract (semantic) calculi. Viewed as a mathematical statement we can simply say that an algebra is model of a calculus in the model theoretical sense, and conversely that a calculus is a concrete realization of some behaviour it is trying to model. Moreover, a given calculus generally has many semantic models and conversely a given algebra can generally be realized by many calculi. • Modelling types with calculi and algebra. Algebra can be used to specify behaviour while calculi can used to specify rules for computation. Since individual types are forms of behaviour they are appropriately specified by algebra. However, relationship among types are forms of behaviour they are appropriately specified by algebra. Multisorted algebra provide a basis for modeling properties of individual types while the second-order λ-calculus provides a basis for modelling properties of the type system as a whole, such as polymorphism. As the theory of power domains has been used to study the semantics of concurrent system, the theory of super types can be used to study the formal logic frameworks.
3.1.6
Philosophical View of Types
3.1.6.1
Realist View
The realist view of types is that we live in a world populated by values and that types are an explanatory mechanism introduced for the purpose of classifying and managing values. Thus the realist postulates that a global universe exists prior to the things. So the objects of sense perception or sometimes of cognition in general are real in their own right and exist independently of their being
Type Theory and PowerEpsilon
24
known or related. The philosophical position is that “observability depends on existence”. 3.1.6.2
Intuitionist View
The intuitionist view of types is that types are the basic conceptual entities of the domain of discourse and that values exist only in so far as they are constructable from some type. Thus the intuitionist requires existence to be demonstrated by observability or constructibility and believes that natural phenomena as well as artificial mathematics and computational entities exist only when they are observed, constructed, or interpreted. The philosophical position is that “existence depends on observability”. From the mathematical point of view, the following corresponding may be observed in the proof theory: Realism Intuitionism
←→ Existence P roof ←→ Constructive P roof
3.1.7
Polymorphic Functional Languages
3.1.7.1
Edinburgh ML
A typical polymorphic functional programming language is perhaps the Edinburgh ML defined in LCF (Logic for Computable Functions) system [8]. ML is a polymorphic functional language. Its main features are: • It is fully higher-order, i.e. functions are first-order values and may be passed as arguments, returned as results, or embedded in data structures. • It has a simple, but flexible, mechanism for raising and handling exceptions. • ML has an extensible and completely secure polymorphic type discipline – implicit polymorphism [13]. ML may be written in an essential type-free way and their consistency with respect to typing is automatically checked. 3.1.7.2
HOPE
HOPE [2] is a polymorphically typed higher order recursion equation based functional language. It is a successor to an early first order recursion equation based language NPL [1], that itself grew from the work of program transformation. The first implementation of HOPE was at Edinburgh University. There are now implementations at Bell Laboratories and at Imperial College, London, where it was the initial language behind the design of the parallel graph reduction machine, ALICE [7].
Type Theory and PowerEpsilon
3.1.7.3
25
SASL, KRC, Miranda
Turner [20] has been responsible for a series of higher order functional languages, culminating in Miranda which is a polymorphically typed, higher order, recursion equation based functional language. The basic idea are taken from the earlier languages SASL [18, 15] and KRC [19], with the addition of a type discipline essentially same as that of ML. The Miranda has been implemented on a variety of computers, running under the Unix operating system. • The Miranda programming language is purely functional – there are no side-effects or imperative features of any kind. A program is a collection of equations defining various functions and data structures which are interested in computing. • An equation can have several alternative right-hand sides distinguished by ‘guards’ (a guard is a Boolean expression). • Miranda is a higher-order language – functions are first class citizens and can be both passed as parameters and returned as results. • Miranda’s evaluation mechanism is ‘lazy’, in the sense that no subexpression is evaluated until its value is known to be required. One consequence of this is that it is possible to define functions which are non-strict (meaning that they are capable of returning an answer even if one of their arguments is undefined). • The ZF-expressions (also called list comprehensions) in Miranda give a concise syntax for a rather general class of iterations over lists. The notation is adapted from Zermelo-Frankel set theory. • Miranda is strongly typed. That is, every expression and every subexpression has a type, which can be deduced at compile-time, and any inconsistency in the type structure of a program results in compile-time error message. Types in Miranda can be polymorphic as in ML. User can define their own types using equations and the user-defined types can also be polymorphic.
3.2
What is PowerEpsilon
The languages used by mathematicians for describing mathematics are rarely said to be formal. It is an usual case that different persons use the different notations to denote the same thing or use the same notations to denote the different thing. All mathematical books were written in very ambiguous natural languages and have used different terminology. The students moving from one school to another are often shocked by the fact that the classes are taught in a completely different way as they used to be. What we need is a formal language
Type Theory and PowerEpsilon
26
for describing mathematical notations, concepts and proofs so that the students can be educated and the mathematicians can communicated with each others in a unique and rigorous way. The PowerEpsilon [25, 26, 27, 28, 23, 24], was introduced as a system for formalizing constructive mathematics. The system may be viewed as the λ-calculus associated with natural deduction proofs in an extension of Church’s higher-order logic [3]. PowerEpsilon is a strongly-typed polymorphic functional programming language based on Martin-L¨of’s type theory [12] and the Calculus of Constructions (CC) [5, 6]. The system can be used as both a programming language with a very rich set of data structures and a metalanguage for formalizing constructive mathematics. The system has been implemented using the software development system AUTOSTAR constructed by author [22]. PowerEpsilon is a proof checker much similar to other mechanical proof checkers, such as LCF [8] and Nuprl [4], which are completely formal usercontrolled systems. However, PowerEpsilon is more powerful than LCF and Nuprl, in which the equality and induction rules for arbitrary inductive types are definable.
3.3
Syntax of PowerEpsilon
3.3.1
Notations
For technical reasons the following notations are used in PowerEpsilon: • ! : for the universal quantifier ∀. • ? : for the existential quantifier ∃. • \ : for the λ-abstraction quantifier λ.
3.3.2
Lexicon
Since the limited usage of computer character set (ASCII codes only), we can use a variety of letters, both lowercase (a, b, . . . ), uppercase (A, B, . . . ), and even digits (0, 1, 2, . . . ). However, subscript and superscript letters, and Greek letters usually used in mathematics are not allowed. Comments are enclosed in between % and %.
3.3.3
Syntax
A program written in PowerEpsilon is a theory with an optional query part: program ::= theory {query} theory ::=
Type Theory and PowerEpsilon
27
theory identifier is {import} term decl list end; query ::= query import term list end; A theory is a syntactic unit in PowerEpsilon, which has no semantic meaning at all; the only role played is to syntactically wrap a set of closely related terms (propositions and proofs) into one package. The purpose of introduction of ‘theory’ is to make it easy to manage the proof environment for PowerEpsilon. For instance, Nat is a theory that wraps all the propositions and functions for specifying properties of natural numbers. The query part describes the expressions to be evaluated. Terms in a theory or query may be dependent on other theories. This dependency is specified by a import clause. import ::= import ident list ident list ::= identifier {, identifier}∗ The main part of a theory is a sequence of term declarations. A term declaration is either a term specification or a term definition. A term specification specifies the type of a term. The specification of a term is optional. In the absence of such a specification, the term definition acts as the specification. There is a type inference system which can derive the specification of a term from its definition. If both a specification and a definition for a term are given, the term definition must conform to the term specification. term term term term
decl list ::= term decl {; term decl}∗ decl ::= term dec | term def dec ::= dec identifier : term def ::= def identifier = term
The basic expressions of PowerEpsilon, called terms, are defined as follows:
Type Theory and PowerEpsilon
28
term ::= identifier | Prop | Type(natural) | Kind | (term) | ! (identifier : term {, identifier : term}∗ ) term | ?(identifier : term {, identifier : term}∗ ) term | \(identifier : term {, identifier : term}∗ ) term | [term -¿ term {-¿ term}∗ ] | @(term, term {, term}∗ ) | | let identifier = term in term | lec identifier : term in term
3.3.4
Currying and Higher-Order Terms
PowerEpsilon is a higher-order language – functions types are first class citizens and can be both passed as parameters and return as results. Function application is left-associative, so when we write @(f, x, y) it is passed as @(@(f, x), y), meaning that the result of applying f to x is a function, which is then applied to y. Functions of more than one argument which take them “one at a time” like f are called currying. The currying form of λ-expressions provides some flexibility which is important for writing easily understood programs. For example, \(x1 : A1 ) (\(x2 : A2 ) · · · (\(xn : An )M ) · · ·) can be written \(x1 : A1 ) \(x2 : A2 ) · · · \(xn : An )M, or further simplified to \(x1 : A1 , x2 : A2 , · · · , xn : An )M. !-terms and ?-terms are treated similarly. In addition, the following terms [A1 −> A2 −> · · · −> An−1 −> An ] @(A1 , A2 , A3 , ; · · · , An ) < A1 , A2 , · · · , An−1 , An > are respectively abbreviations for [A1 −> [A2 −> · · · [An−1 −> An ] · · · ; ]] @(· · · @(@(A1 , A2 ), A3 ), · · · , An ) < A1 , < A2 , · · · < An−1 , An > · · · >>
Type Theory and PowerEpsilon
29
Unlike function application which is left-associative, all of other constructs are right-associative. The dec and def constructs are sugared λ-expressions which can be decoded as an explicit on-line form of λ-expression. For instance, if a sequence of defconstructs are given as follows: def S = \(T : Prop) \(x : [T -> T -> T], y : [T -> T], z : T) @(x, z, @(y, z)); def K = \(T : Prop) \(x : T, y : T) x; def I = \(T : Prop) \(x : T) x; ......
These λ-expressions can be decoded as \(S : \(T : \(x : @(x, \(K : \(T : \(I : \(T : ......
Prop) [T -> T -> T], y : [T -> T], z : T) z, @(y, z))) Prop) \(x : T, y : T) x) Prop) \(x : T) x)
In PowerEpsilon, expressions and types have same forms of representation, for example, the term \(x : T) E can be interpreted as either an expression or a type depending on the role played by that this term in context. Current version of PowerEpsilon has neither built-in functions nor built-in types. Everything must be constructed from bottom. The recursive functions can be defined using both dec and def constructs. There are two kind of variables: identifiers and meta-variables. An identifier is a string of letters or digits beginning with a letter. A meta-variable is an identifier beginning with a character “*”. The meta-variables are specially used for defining inductively defined types.
Type Theory and PowerEpsilon
3.3.5
30
Abstract Syntax
The abstract syntax of basic expressions in PowerEpsilon are defined as follows: T
::=
Prop
| |
Type(i) (i ∈ ω) Kind
| | |
x ! (x : T1 )T2 ? (x : T1 )T2
| |
\ (x : T1 )T2 [T1 −>T2 ]
| | |
@(T1 , T2 ) < T1 , T2 > let x = T1 in T2
|
lec x : T1 in T2
The kinds Prop, Type(i), and Kind are called type universes. Every kind is assigned a number as its level: LEVEL(Prop)
=
LEVEL(Type(i)) = LEVEL(Kind) =
−1; i; ω.
The semantic domains of PowerEpsilon can be classified into three categories. The first is the set of terms. Intuitively, terms are the “ordinary expressions” that describe computable functions and results of computation. The second category contains the types of terms. The third class is kind which is used to describe the functionality of subexpressions of types. Essentially, kinds are “types” of things that appear in types. In PowerEpsilon there are no syntactic distinction between terms, types and kinds, all things are represented as terms. The semantic classification for any given term can be determined by type inference system. Terms are defined inductively as follows: Prop, Type(i) for any natural number i and Kind are term; any variable x is a term; if t1 and t2 are terms, then @(t1, t2), and [t1 -> t2] are terms; if x is a variable, T1 and T2 are a terms, then \(x : T1) T2, !(x : T1) T2, ?(x : T1) T2, let x = T1 in T2 and lec x : T1 in T2 are a term, where the symbol \ is the λ-abstraction symbol λ, ! is the universal quantifier ∀ and ? is the existential quantifier ∃. Interactions with PowerEpsilon is centered on the theory. A theory contains a set of subtheories and an ordered collection of definitions, theorems
Type Theory and PowerEpsilon
31
and objects. A checked theory is retained by the system and can be later referred to by the users. The definition of a term, type or kind t with body b is given in the form of “def t = b”. The declaration for a term, type or kind t with the declaration T is given in the form “dec t : T”. In a formal theory, the axioms and assumptions can be described using declaration-constructs, and the proofs of propositions, lemmas and theorems will be represented using definition-constructs.
3.4
Type Inference Rules of PowerEpsilon
We now describe the judgment form and the inference rules of PowerEpsilon.
3.4.1
Contexts
A context Γ is a list of bindings of the form x:A, where x is a variable and A is a term. The empty context is denoted by . The set of free variables in a context Γ ≡ x1 : A1 , · · · , xn : An , is defined as ∪ ∪ ({xi } FV(Ai )) FV(Γ) = 1≤i≤n
3.4.2
Judgements
A judgment is a form Γ⊢M:A where Γ is a context, and M and A are terms. The intuitive meaning of the judgment is that M has type A in context Γ. We write ⊢ M : A for ⊢ M : A.
3.4.3
Inference Rules
The type inference rules are listed in Figure 3.1 and Figure 3.2. In the rules, Γ is assumed to be a valid context, where K and K’ stand for arbitrary kinds, i, j and k for natural numbers. There is a special treatment of the formation rule for the strong sum types (the existential quantifier formula) ?(x : A) B for preventing the logically inconsistency of in system, where the objects in Prop hierarchy are lifted to the Type(0) hierarchy, the objects in Type(i) hierarchy are lifted to the Type(i+1) hierarchy (i ∈ ω), and the types of form ?(x : Kind) @(P, x) are not allowed. Since adding type-indexed strong sums directly to the proposition level Prop of the system results in a logically inconsistent system in which Girard’s paradox can be derived. Furthermore, the type ?(x : Kind) @(P, x) formally does not have any logical meaning, since Kind is merely used for specifying generic type hierarchies in the system.
Type Theory and PowerEpsilon
(Ax)
(Variable)
(Constant)
Γ, x : A, Γ′ ⊢ Prop : Type(0) Γ, x : A, Γ′ ⊢ x : A
Γ ⊢A : K (x ̸∈ FV(Γ)) Γ, x : A ⊢ Prop : Type(0)
(Type)
(Π − 1)
(Π − 2)
⊢ Prop : Type(0)
Γ ⊢ Prop : Type(0) Γ ⊢ Type(i) : Type(i + 1) Γ ⊢A : K; Γ, x : A ⊢P : Prop Γ ⊢ !(x : A)P : Prop
Γ ⊢A : K; Γ, x : A ⊢B : Type(j) (k = max{LEVEL(K), j}) Γ ⊢ !(x : A)B : Type(k) where K ≡ Prop or Type(i), (i ∈ ω)
Figure 3.1: Type Inference Rules for PowerEpsilon
32
Type Theory and PowerEpsilon
(−> − 1)
(−> − 2)
Γ, A : K ⊢P : Prop Γ ⊢ [A−>P] : Prop
Γ ⊢A : K; Γ ⊢B : Type(j) (k = max{LEVEL(K), j}) Γ ⊢ [A−>B] : Type(k) where K ≡ Prop or Type(i), (i ∈ ω) (λ − Abst)
Γ, x : A ⊢M : B; Γ, x : A ⊢B : K Γ ⊢ \(x : A)M :!(x : A)B
(App − 1)
Γ ⊢M :!(x : A)B; Γ ⊢N : A′ (A′ ≪ A) Γ ⊢ @(M, N) : B[N/x]
(App − 2)
Γ ⊢M : [A−>B]; Γ ⊢N : A′ (A′ ≪ A) Γ ⊢ @(M, N) : B
(App − 3)
(App − 4)
(Σ)
33
Γ ⊢M ≡ \(x : Kind)M′ ; Γ ⊢N ≡ Prop; Γ ⊢M′ [N/x] : A Γ ⊢ @(M, N) ≡ M′ [N/x] : A Γ ⊢M ≡ \(x : Kind)M′ ; Γ ⊢N ≡ Type(i); Γ ⊢M′ [N/x] : A Γ ⊢ @(M, N) ≡ M′ [N/x] : A
Γ ⊢A : K; Γ, x : A ⊢B : K′ (k = max{0, LEVEL(K), LEVEL(K′ )}) Γ ⊢ ?(x : A)B : Type(k) where K ≡ Prop or Type(i), K′ ≡ Prop or Type(j), (i, j ∈ ω)
(Pair)
(Proj − 1)
Γ ⊢M : A′ ; Γ ⊢N : B′ ; Γ, x : A ⊢B : K (A′ ≪ A, B′ ≪ B[M/x]) Γ ⊢ < M, N >:?(x : A)B Γ ⊢ M :?(x : A)B Γ ⊢ M :?(x : A)B (Proj − 2) Γ ⊢ @(FST, M) : A Γ ⊢ @(SND, M) : B[@(FST, M)/x]
(Conversion)
(Cumulativity)
Γ ⊢M : A; Γ ⊢A′ : K (A ≡ A′ ) Γ ⊢M : A′ Γ ⊢M : A; Γ ⊢A′ : K (A ≪ A′ ) Γ ⊢M : A′
Figure 3.2: More on Type Inference Rules for PowerEpsilon
Type Theory and PowerEpsilon
3.4.4
34
Derivations
A derivation of a judgment J is a finite sequence of judgements J 1 , · · · , Jn with Jn ≡ J such that, for all 1 ≤ i ≤ n, Ji is the consequence of some instance of an inference rule whose premises are in {Jk | k < i}. A judgment J is derivable if there is a derivation of J.
3.4.5
Γ-Terms, Γ-Types and Γ-Propositions
A term M is called a Γ-term (or well-typed term under Γ) if Γ ⊢M:T for some T. A term T is called a Γ-type if Γ ⊢T:K for some kind K. A Γ-type T is called a Γ-proposition if Γ ⊢T’: Prop for some T′ ≡ T and called a proper Γ-type otherwise.
3.4.6
Type Conversion Rules
We now introduce another kind of judgment Γ ⊢M ≡ N, whose intuitive meaning is that the terms M and N denote the same object. Here ≡ is the smallest congruence over propositions and contexts containing β-conversion. Figure 3.3 summarizes the definition of type conversion rules.
3.4.7
Cumulativity Relation
The type inclusions between the universes induce the type cumulativity that is syntactically characterized by the cumulativity relation ≪. The binary relations ≪i (i ∈ ω) over terms are inductively defined as follows: 1. A ≪0 B if and only if one of the following holds: (a) A ≡ B; (b) A ≡ Prop and B ≡ Type(i) for some i ∈ ω, or A ≡ Type(i) and B ≡ Type(j) for some i < j; (c) A ≡ Prop and B ≡ Kind, or A ≡ Type(i) and B ≡ Kind for some i ∈ ω. 2. A ≪i+1 B if and only if one of the following holds: (a) A ≪i B; (b) A ≡ !(x : A1)A2 and B ≡ !(x : B1)B2 for some A1 ≪i B1 and A2 ≪i B2; (c) A ≡ \(x : A1)A2 and B ≡ \(x : B1)B2 for some A1 ≪i B1 and A2 ≪i B2; (d) A ≡ ?(x : A1)A2 and B ≡ ?(x : B1)B2 for some A1 ≪i B1 and A2 ≪i B2; (e) A ≡ [A1−>A2] and B ≡ [B1−>B2] for some A1 ≪i B1 and A2 ≪i B2; (f) A ≡ @(A1, A2) and B ≡ @(B1, B2) for some A1 ≪i B1 and A2 ≪i B2;
Type Theory and PowerEpsilon
35
Γ ⊢M : P; Γ ⊢P : Prop; Γ ⊢P ≡ Q (Type − Equality1) Γ ⊢M : Q Γ ⊢M : P; Γ ⊢P : Type(i); Γ ⊢P ≡ Q (Type − Equality2) Γ ⊢M : Q Γ ⊢M : P; Γ ⊢P : Kind; Γ ⊢P ≡ Q (Type − Equality3) Γ ⊢M : Q Γ ⊢M : N (Reflectivity) Γ ⊢M ≡ M
Γ ⊢M ≡ N (Symmetry) Γ ⊢N ≡ M
Γ ⊢M ≡ N; Γ ⊢N ≡ P (Transitivity) Γ ⊢M ≡ P Γ ⊢P1 ≡ P2; Γ, x : P1 ⊢M1 ≡ M2 (Abst − Equality) Γ ⊢ \(x : P1)M1 ≡ \(x : P2)M2 Γ ⊢P1 ≡ P2; Γ, x : P1 ⊢M1 ≡ M2 (π − Equality) Γ ⊢ !(x : P1)M1 ≡ !(x : P2)M2 Γ ⊢P1 ≡ P2; Γ, x : P1 ⊢M1 ≡ M2 (Σ − Equality) Γ ⊢ ?(x : P1)M1 ≡ ?(x : P2)M2 Γ ⊢P1 ≡ P2; Γ ⊢M1 ≡ M2 (−> − Equality) Γ ⊢ [P1−>M1] ≡ [P2−>M2] Γ ⊢ @(M, N) : P; Γ ⊢M ≡ M1; Γ ⊢N ≡ N1 (App − Equality) Γ ⊢ @(M, N) ≡ @(M1, N1) Γ ⊢ < M, N > : P; Γ ⊢M ≡ M1; Γ ⊢N ≡ N1 (Pair − Equality) Γ ⊢ < M, N > ≡ < M1, N1 > Γ, x : A ⊢M : P; Γ ⊢N : A (β − conversion) Γ ⊢ @(\(x : A)M, N) ≡ M[N/x] Meta − Var
Γ ⊢ ∗a : A; Γ ⊢ b : B; Γ ⊢ A ≡ B Γ ⊢ ∗a ≡ b
Figure 3.3: Type Conversion Rules for PowerEpsilon
Type Theory and PowerEpsilon
36
(g) A ≡ < A1, A2 > and B ≡ < B1, B2 > for some A1 ≪i B1 and A2 ≪i B2; The additional cumulativity relation ≪ defined for Kind over variables of type Kind are given as follows: 1. X ≪ Prop if X is a variable and X : Kind; 2. X ≪ Type(i) if X is a variable and X : Kind; 3. X ≪ Y if X and Y are variables, and X : Kind and Y : Kind; In connection with the rules App - 3 and App - 4, this will consists of a complete lazy type evaluation mechanism for Kind. With the definition given above, the cumulativity relation ≪ is defined as follows: ∪ def ≪ = ≪i i
3.4.8
Curry-Howard Isomorphism
One of the basic ideas behind constructive type theory is the Curry-Howard interpretation of propositions as types and proofs as programs. This view of propositions is related both to Heyting’s explanation of intuitionistic logic and, on a more formal level, to Kleene’s realizability interpretation of intuitionistic arithmetic. The Curry-Howard [9] isomorphism establishes the relationship between the calculus of deductions in the higher-order intuitionistic predicate logic and the calculus of typed terms in the polymorphic λ-calculus. The isomorphism maps • Higher-order predicate logic to corresponding types. • Deduction of predicates to terms of the corresponding type. This correspondence between propositions and types is a powerful paradigm for mechanical proof construction and computer programming. The judgment or type assignment “a : A” in PowerEpsilon can be read in at least the four following ways: • a is an element of type A. • a is a proof object for the proposition A. • a is a program satisfying the specification A. • a is a solution to the problem A.
Type Theory and PowerEpsilon
37
In classical mathematics, a proposition is thought of as being true or false independently of whether we can prove or disprove it. On the other hand, a proposition is constructively true only if we have a method to prove it. For example, classically the law of excluded middle, A ∨ (¬A), is true, since the proposition A is either true or false. Constructively, however, a disjunction is true only if we can prove one of the disjuncts. Since we have no method of proving or disproving an arbitrary proposition A, we have no proof of A ∨ (¬A) and therefore the law of excluded middle is not constructively valid. We may establish the following identifications between propositions and types. • A proof of type [A -> B] is a function (method, program) which to each proof of A gives a proof of B. • A proof of type @(Product, A, B) is a pair whose first component is a proof A and whose second component is a proof of B. • A proof of type @(Sum, A, B) is either a proof A or a proof of B together with the information of which of A or B we have a proof. The elements in @(Sum, A, B) are of the form @(INJ1, A, B, a) and @(INJ2, A, B, b) where a : A and b : B. • A proof of type !(x : A) @(B, x) is a function (method, program) which to each element a of type A gives a proof of @(B, a). The type corresponding to this is the Cartesian product of a family of types. The elements of this type are functions which, when applied to an element a in the type A gives an element in the type @(B, a). • A proof of type ?(x : A) @(B, x) is a pair whose first component a is an element of type A and whose second component is a proof of @(B, a). The type corresponding to this is the disjoint union of a family of types. The elements of this type are pairs where a : A and b : @(B, a). From the points of view for computer programming, a proposition could be interpreted as the specifications of the task of a program in the following way. • @(Product, A, B) is a specification of programs which, when executed, yield a pair @(PRODUCT, A, B, a, b), where a is a program for the task A and b is a program for the task B. • @(Sum, A, B) is a specification of programs which, when executed, either yields @(INJ1, A, B, a) or @(INJ2, A, B, b), where a is a program for A and b is a program for B. • [A -> B] is a specification of programs which, when executed, yields \(x : A) b, where b is a program for B under the assumption that x is a program for A.
Type Theory and PowerEpsilon
38
• !(x : A) @(B, x) is a specification of programs which, when executed, yields \(x : A) b, where b is a program for @(B, x) under the assumption that x is an object of A. This means that when a program for the problem !(x : A) @(B, x) is applied to an arbitrary object x of A, the result will be the program for @(B, x). • ?(x : A) @(B, x) is a specification of programs which, when executed, yields , where a is an object of A and b is a program for @(B, a). So, to solve the task ?(x : A) @(B, x) it is necessary to find a method which yields an object a in A and a program for @(B, a). There are two ways to manipulate types, one way is to construct programs from types and another is to deduce type structures from the corresponding programs. The former is corresponding to program derivation from specification and the later is corresponding to program verification. 3.4.8.1
From Types to Programs: The Constructive Mathematics
The extraction of programs from proofs or programming in constructive logic is based on the idea that under some restrictions proofs can be considered as programs. The general scheme of extracting programs from proofs is the following: at the beginning one writes a specification of the problem in some formal language (for example, the PowerEpsilon). Then a formal proof of this specification is constructed and the program is extracted from this proof according to one of the known methods. Because proof construction is not decidable, strategic information has to be provided by users. 3.4.8.2
From Programs to Types: The Type Inferences
The type inference mechanism of PowerEpsilon can be used mathematically as a proof editor to check whether a proof for a mathematical theorem is written correctly.
3.4.9
Applications of PowerEpsilon
There are many different ways that PowerEpsilon can be used. Standardization of Mathematics The system can be used as a constructive logic to develop mathematical proofs. Usually, the papers submmited to mathematical journals contain a large amount of mathematical theorems and proofs. Those theorems and proofs often have two problems. First, since the space limitation, the proofs are incomplete presented. Secondly, most proofs contain errors. To judge the correctness of those papers left a heavy burden to the referees. The problems may be solved by making, in certain degree, the standardization of mathematics and mechanization of
Type Theory and PowerEpsilon
39
proof checking much similar to the standardization and mechanization of programming languages processing we have made in software engineering. Functional Language The system can be seen as a functional language, with a number of novel features, such as that every expression has a defined value; every program terminates; the system of types is more expressive than those in common use as it does dependent product and function spaces; and the language is integrated with a logic which to reason about the programs. Formal Program Development System The system can be used as a tool for formal program derivation where programs are extracted from constructive proofs. Formal Program Verification System The system can be used as a tool for program verification, where the programs are developed first and then their correctness are proved. This shows that we have therefore a system in which programming and verification are integrated. Program Transformation System The system can also be used to support program transformation. The essence of program transformation is to take a program into another with same application behaviour, yet improved in some aspect such as time efficiency or space usage. Two functions have the same behaviours when they return the same the same results for all arguments, when they are extensionally equal, in other words. In PowerEpsilon, program transformation will therefore involve the replacement of an object by an extensionally equivalent one, through a series of simple steps of the same kind. From the point of view of constructive logic, program transformation can be considered as the translation from one type to another. Therefore, PowerEpsilon can be used as a meta-language to study the general strategies and schemes of program transformations. Decision Support System PowerEpsilon can be used as a decision support system based on the explanation that decision making can be viewed as a theorem proving process, where for a given problem, we have to prove whether there is a solution to this problem. A typical decision making process can be expressed at least as the following two propositions: !(p : Problem) ?(s : Solution) @(Solve, s, p); or for a specific SOLUTION of type Solution, !(p : Problem) @(Solve, SOLUTION, p);
Type Theory and PowerEpsilon
40
for the first formula we have to decide for every problem p whether we can find a solution s which solves p and for the second formula we have to decide for every problem p where a specific method SOLUTION solves p. Knowledge Base System PowerEpsilon can be used as a knowledge base system. A formalism for representing knowledge should at least be capable of fulfilling the following five criteria: 1. Say that something has a certain property without saying what thing has that property. For example, to say John has a sister without saying that who she is. Formally speaking we have: ?(x : Person) @(Sister, John, x). 2. Say that everything in a certain class has a certain property without saying that what everything in that class is. For example, to say that all dogs are mammals without listing all the dogs. Formally speaking we have !(x : Animal) [@(Dog, x) -> @(Mammal, x)]. 3. Say that at least one of two statements is true without saying which is true. For example, to say that John teaches computer science 101 or 102 without specifying which of these courses he actually does teach. Formally speaking we have @(Or, @(Teach, John, CSC101), @(Teach, John, CSC102)). 4. Explicitly say that something is false. For example, John has no sister. Formally speaking, @(Not, ?(x : Person) @(Sister, John, x)). 5. Either settle or leave open to doubt whether two non-identical expressions name the same object. For example, @(FATHER, John) and Bill are two non-identical expressions. They may or may not denote the same individual. If they do, we can explicitly say so by @(Equal, Person, @(FATHER, John), Bill). If there is doubt about their naming the same individual, we omit the above equality. This omission does not preclude their naming the same individual; it simply leaves the knowledge base agnostic about this possibility. PowerEpsilon easily satisfies these five criteria and therefore is a good candidate for representing knowledge. Beside knowledge representation, PowerEpsilon provides powerful mechanism for knowledge manipulation including natural deduction and consistency checking. The reflection mechanism of PowerEpsilon provide a flexible way to adjust system itself to a specific application dynamically and autonomously. Computer-Aided Education Computer-aided instruction has many advantages. When well programmed, a computer can relieve teachers of giving and correcting drill exercises, even of teaching many manipulative techniques. Students who react negatively to a teacher can turn to the computer; it instructs without emotional involvement and gives instant, impartial
Type Theory and PowerEpsilon
41
feedback. It shows no impatience no matter how often a student repeats a mistake. The computer’s greatest asset is that it forces the student to become an active participant. For most of students, mathematical theorem proving is a hard job. PowerEpsilon can provide a lot of assistance in this area. Tools for Studying Semantics of Programming Languages With its powerful type system, PowerEpsilon can be used as a formal tool to study semantics of programming languages.
3.5
Formal Logic in PowerEpsilon
3.5.1
Logical Operators Defined by PowerEpsilon
3.5.1.1
Logical Implication
If A and B are two predicates, then [A -> B] represents the logical implication; its antecedent is A and its consequent is B. 3.5.1.2
Free and Bound Variables
A variable x of type T is said to be free in an expression e if x occurs in e and !(x : T) does not occur in e. We say that x is bound in e if !(x : T) occurs in e. 3.5.1.3
Universal Quantified Formula
If A and B are two predicates and x is a free variable in B, then !(x : a formula. 3.5.1.4
Existential Quantified Formula
If A and B are two predicates and x is a free variable in B, then ?(x : a formula.
3.5.2
A) B is
A) B is
Logical Operators Derived from PowerEpsilon
Four logical operators are defined over predicates Prop and type universe Type(i) where i = 0, 1, . . .. 3.5.2.1
Logical Negation
If B is a predicate, then @(Not, B) is a predicate too. dec Not : [Prop -> Prop]; dec Not0 : [Type(0) -> Prop];
Type Theory and PowerEpsilon
dec dec dec dec
Not1 Not2 Not3 Not4
3.5.2.2
: : : :
[Type(1) [Type(2) [Type(3) [Type(4)
-> -> -> ->
42
Prop]; Prop]; Prop]; Prop];
Logical Conjunction
If A and B are two predicates, then @(And, A, B) represents the logical conjunction; its operands A and B is called conjuncts. dec dec dec dec dec dec
And And0 And1 And2 And3 And4
: : : : : :
[Prop -> [Type(0) [Type(1) [Type(2) [Type(3) [Type(4)
Prop -> Prop]; -> Type(0) -> Prop]; -> Type(1) -> Prop]; -> Type(2) -> Prop]; -> Type(3) -> Prop]; -> Type(4) -> Prop];
PRODUCT is the constructor of And. dec PRODUCT : !(A : Prop, B : Prop) [A -> B -> @(And, A, B)];
PROJ1 and PROJ2 are two projection functions of And. dec PROJ1 dec PROJ2
: !(A : Prop, B : Prop) [@(And, A, B) -> A]; : !(A : Prop, B : Prop) [@(And, A, B) -> B];
Similarly, PRODUCT0 is the constructor of And0. dec PRODUCT0 : !(A : Type(0), B : Type(0)) [A -> B -> @(And0, A, B)];
and PROJ01 and PROJ02 are two projection functions of And0. dec PROJ01 : !(A : Type(0), B : Type(0)) [@(And0, A, B) -> A]; dec PROJ02 : !(A : Type(0), B : Type(0)) [@(And0, A, B) -> B];
3.5.2.3
Logical Disjunction
If A and B are two predicates, then @(Or, A, B) represents the logical disjunction; its operands A and B is called disjuncts. dec Or : [Prop -> Prop -> Prop]; dec Or0 : [Type(0) -> Type(0) -> Prop]; dec Or1 : [Type(1) -> Type(1) -> Prop];
Type Theory and PowerEpsilon
dec Or2 : [Type(2) -> Type(2) -> Prop]; dec Or3 : [Type(3) -> Type(3) -> Prop];
INJ1 and INJ2 are two constructors of Or. dec INJ1 : !(A : Prop, B : Prop) [A -> @(Or, A, B)]; dec INJ2 : !(A : Prop, B : Prop) [B -> @(Or, A, B)];
WHEN is the projection function of Or. dec WHEN : !(U : Prop, V : Prop, W : Prop) [@(Or, U, V) -> [U -> W] -> [V -> W] -> W];
INJ01 and INJ02 are two constructors of Or0. dec INJ01 : !(A : Type(0), B : Type(0)) [A -> @(Or0, A, B)]; dec INJ02 : !(A : Type(0), B : Type(0)) [B -> @(Or0, A, B)];
WHEN0 is the projection function of Or0. dec WHEN0 : !(U : Type(0), V : Type(0), W : Type(0)) [@(Or0, U, V) -> [U -> W] -> [V -> W] -> W];
dec Or30 : [Type(0) -> Type(0) -> Type(0) -> Prop];
INJ301 and INJ302 and INJ303 are three constructors of Or30. dec INJ301 : !(A : Type(0), B : Type(0), C : Type(0)) [A -> @(Or30, A, B, C)]; dec INJ302 : !(A : Type(0), B : Type(0), C : Type(0)) [B -> @(Or30, A, B, C)]; dec INJ303 : !(A : Type(0), B : Type(0), C : Type(0)) [C -> @(Or30, A, B, C)];
WHEN30 is the projection function of Or30. dec WHEN30 : !(U : Type(0), V : Type(0), Z : Type(0), W : Type(0)) [@(Or30, U, V, Z) -> [U -> W] ->
43
Type Theory and PowerEpsilon
44
[V -> W] -> [Z -> W] -> W];
3.5.2.4
Equivalence Relation
Two formulas A and B are said to be equivalent if and only if [A -> B] and [B -> A]. def def def def def
3.5.3
Eq Eq0 Eq1 Eq2 Eq3
= = = = =
\(A \(A \(A \(A \(A
: : : : :
Prop, Type(0), Type(1), Type(2), Type(3),
B B B B B
: : : : :
Prop) Type(0)) Type(1)) Type(2)) Type(3))
@(And, @(And0, @(And1, @(And2, @(And3,
[A [A [A [A [A
-> -> -> -> ->
B], B], B], B], B],
[B [B [B [B [B
-> -> -> -> ->
A]); A]); A]); A]); A]);
Proof by Contradiction
In a proof by contradiction, one begins by supposing that the assertion we wish to prove is false. Then we can feel free to use the negation of what we are trying to prove as one of the initial statements in constructing a proof. In a proof by contradiction we look for a pair of statements developed in the course of the proof which contradict one another. Since both cannot be true, we have to conclude that our original supposition was wrong and therefore that our desired conclusion is correct. The possibility of extending the Curry-Howard isomorphism to classical logic is a significant discovery of the decade. It has consequences both from the point of view of mathematical logic and from the point of view of computer science. We get classical logic from intuitionistic logic by adding the axiom ¬¬A−>A for any proposition A. The computational counterpart of this axiom has been very recently understood. It corresponds to a control operator such as the operator C defined by M. Felleisen in 1986. This kind of operator, with appropriated reduction rules, allows to add imperative features (for instance goto, exception handling, ..., but not assignments) to purely functional languages. A good candidate for implementation is probably by λµ-calculus of M. Parigot. It is a variant of the λ-calculus + C but has more elegant reduction rules. Now, if we consider classical logic without implication, it becomes possible to identify the formula ¬¬A with A. This has led to λSym -calculus, a nice restriction of λ-calculus defined with non-deterministic computational rules. Another approach is to interpret proofs as winning strategies for a two-player game in which the rules depend on the disputed formula. This view emphasizes a dynamic analysis of computation, strongly related to weak-head-style reduction. Especially, in this framework, we can define computation algorithms radically different from the usual computation algorithm based on λ-calculus, but with a good behaviour on some examples of classical proofs.
Type Theory and PowerEpsilon
45
dec Excl_Mid : !(A : Type(0), a : A, b : A) @(Sum2, @(Equal0, A, a, b), @(Not, @(Equal0, A, a, b)));
3.5.4
Informal and Formal Theorem Proving
By informal mathematical theorem proving, we mean the proof is described in a natural language. As a comparison study, let us take an example. There is no need to say that the theorem and its proof described in natural language and PowerEpsilon are completely different from each other. Of course, the theorem and proof written in natural language is much easier to understand. While its PowerEpsilon counterpart is much more clear and precise. Also the description of theorem and proof in PowerEpsilon is longer than in natural language.
3.6
General Schema of Investigating Algebraic Structures
The algebraic presentation for a variety of algebraic structures such as semigroups, groups, rings and fields in terms of PowerEpsilon is generally configured as follows: 1. Definition of algebraic structure. 2. Subalgebra of an algebraic structure. 3. Finite algebra of an algebraic structure. 4. Isomorphism of algebraic structures. 5. Homomorphism of algebraic structures.
3.7
Functions
Generally, if A and B are sets, a function f : [A -> B] on A to B is a rule which assigns to each element a in A an element @(f, a) in B. A function f : [A -> B] is also called a mapping, a transformation, or a correspondence from A to B. The set A is called the domain of the function f, and B its codomain. The image (or “range”) of a function f : [A -> B] is the set of all the “values” of the function; that is, all @(f, a) for a in A. The image is a subset of the codomain B, but need not be all of B.
Type Theory and PowerEpsilon
3.7.1
46
Injection, Surjection and Bijection
A function f : @(f, b).
[A -> B] is called into when a = b always implies @(f, a) =
def Into = \(A1 : Type(0), A2 : Type(0), f : [A1 -> A2]) !(a1 : A1, b1 : A1) [@(Equal0, A1, a1, b1) -> @(Equal0, A2, @(f, a1), @(f, b1))]; def Into1 = \(A1 : Type(1), A2 : Type(1), f : [A1 -> A2]) !(a1 : A1, b1 : A1) [@(Equal1, A1, a1, b1) -> @(Equal1, A2, @(f, a1), @(f, b1))];
A function f : [A -> B] is called surjection (or onto) when every element b ∈ B is in the image – that is, when the image is the whole codomain. def Surjection = \(A1 : Type(0), A2 : Type(0), f : [A1 -> A2]) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in !(a2 : A2) ?(a1 : A1) @(p, a1, a2); def SSurjection = \(A1 : Type(0), A2 : Type(0), S : [A2 -> Type(0)], f : [A1 -> A2]) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in !(a2 : A2) [@(S, a2) -> ?(a1 : A1) @(p, a1, a2)]; def Surjection1 = \(A1 : Type(1), A2 : Type(1), f : [A1 -> A2]) let p = \(a1 : A1, a2 : A2) @(Equal1, A2, a2, @(f, a1)) in !(a2 : A2) ?(a1 : A1) @(p, a1, a2);
A function f : [A -> B] is called one-one when every element b ∈ B is in the image – that is, when the image is the whole codomain. def OneToOne = \(A1 : Type(0), A2 : Type(0), f : [A1 -> A2]) !(a1 : A1, b1 : A1) [@(Equal0, A2, @(f, a1), @(f, b1)) -> @(Equal0, A1, a1, b1)]; def OneToOne1 = \(A1 : Type(1), A2 : Type(1), f : [A1 -> A2]) !(a1 : A1, b1 : A1) [@(Equal1, A2, @(f, a1), @(f, b1)) -> @(Equal1, A1, a1, b1)];
A function f :
[A -> B] is an injection when it is both one-one and into.
Type Theory and PowerEpsilon
47
def Injection = \(A1 : Type(0), A2 : Type(0), f : [A1 -> A2]) @(And, @(Into, A1, A2, f), @(OneToOne, A1, A2, f)); def Injection1 = \(A1 : Type(1), A2 : Type(1), f : [A1 -> A2]) @(And1, @(Into1, A1, A2, f), @(OneToOne1, A1, A2, f));
A function is called bijection (or bijective, or one-to-one onto) when it is both injective and surjective. def Bijection = \(A1 : Type(0), A2 : Type(0), f : [A1 -> A2]) @(And, @(Surjection, A1, A2, f), @(Injection, A1, A2, f)); def SBijection = \(A1 : Type(0), A2 : Type(0), S : [A2 -> Type(0)], f : [A1 -> A2]) @(And, @(SSurjection, A1, A2, S, f), @(Injection, A1, A2, f)); def Bijection1 = \(A1 : Type(1), A2 : Type(1), f : [A1 -> A2]) @(And1, @(Surjection1, A1, A2, f), @(Injection1, A1, A2, f));
3.7.2
Binary Operations
Operations on pairs of numbers arise in many contexts – the addition of two integers, the multiplication of two real numbers, the subtraction of one integer from another, and the like. In such cases we speak of a binary operation. In general, a binary operation “◦” on a set S of elements a, b, c, . . . is a rule which assigns to each ordered pair of elements a and b from S a uniquely defined third element c = a ◦ b in the same set S. Here by “uniquely” we mean the substitution property a1 = a2 ∧ b1 = b2 ← a1 ◦ b1 = a2 ◦ b2
3.8
Sets and Operations
A set P on A is nonvoid if and only if there exist an element a in P. def Nonvoid = \(A : Type(0), P : [A -> Type(0)]) ?(a : A) @(P, a);
Type Theory and PowerEpsilon
48
def Include = \(A : Type(0), P : [A -> Type(0)], Q : [A -> Type(0)]) !(a : A) [@(P, a) -> @(Q, a)];
If P and Q are any subsets of A, the collection of elements c such that c in P and c in Q is called the intersection P ∧ Q of P and Q. def Intersect = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)]) \(a : A) @(And, @(P, a), @(Q, a)); def Intersect0 = \(A : Type(0)) \(P : [A -> Prop], Q : [A -> Prop]) \(a : A) @(And, @(P, a), @(Q, a));
Similar remarks apply to logical sums of subsets of A. def Union = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)]) \(a : A) @(Or, @(P, a), @(Q, a)); def Union0 = \(A : Type(0)) \(P : [A -> Prop], Q : [A -> Prop]) \(a : A) @(Or, @(P, a), @(Q, a));
Two subsets P and Q are said to be same if and only if for every a of type A we have both that a is in P implies a being in Q and a is in Q implies a being in Q. def Same = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)]) !(a : A) @(And, [@(P, a) -> @(Q, a)], [@(Q, a) -> @(P, a)]);
@(Same, A) is an equivalence relation on A. The proofs is given as follows: def SameRefl = \(A : Type(0))
Type Theory and PowerEpsilon
49
\(P : [A -> Type(0)]) \(a : A) let Q = [@(P, a) -> @(P, a)] in let q = \(p : @(P, a)) p in @(ANDS, Q, Q, q, q); def SameSymm = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)]) \(p : @(Same, A, P, Q)) \(a : A) let U1 = [@(P, a) -> @(Q, a)], U2 = [@(Q, a) -> @(P, a)] in let u1 = @(PJ1, U1, U2, @(p, a)), u2 = @(PJ2, U1, U2, @(p, a)) in @(ANDS, U2, U1, u2, u1); def SameTran = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)], R : [A -> Type(0)]) \(p : @(Same, A, P, Q), q : @(Same, A, Q, R)) \(a : A) let U1 = [@(P, a) -> @(Q, a)], U2 = [@(Q, a) -> @(P, a)], V1 = [@(Q, a) -> @(R, a)], V2 = [@(R, a) -> @(Q, a)], W1 = [@(P, a) -> @(R, a)], W2 = [@(R, a) -> @(P, a)] in let u1 = @(PJ1, U1, U2, @(p, a)), u2 = @(PJ2, U1, U2, @(p, a)), v1 = @(PJ1, V1, V2, @(q, a)), v2 = @(PJ2, V1, V2, @(q, a)) in let w1 = \(r : @(P, a)) @(v1, @(u1, r)), w2 = \(r : @(R, a)) @(u2, @(v2, r)) in @(ANDS, W1, W2, w1, w2);
The collection of all subsets of the given set P will be denoted as @(PowerSet, A, P). def PowerSet = \(A : Type(0)) \(P : [A -> Type(0)], Q : [A -> Type(0)]) @(Include, A, Q, P);
Part II
Semi-Groups, Monoids and Groups
50
Chapter 4
Semi-Groups The theory of group is one of the oldest and richest branches of abstract algebra. Groups of transformations play an important role in geometry, and finite groups are fundamental in Galoi’s discoveries in the theory of equations. These two fields provided the original impetus to the development of the theory of groups. A more general concept than that of a group is that of a semi-group. Thought this notion appears to be useful in many connections, the theory of semi-groups is comparatively new and it certainly cannot be regarded as having reached a definitive stage. In this chapter we shall begin with this more general concept, but we treat it only briefly. Our aims in considering semi-groups are to provide an introduction to the theory of groups and to obtain some elementary results that will be useful in the study of rings. The principal concepts that we consider here are those of isomorphism, homomorphism, subgroup, invariant subgroup (coset), factor group, and transformation group.
4.1
Definition of Semi-Groups
Generally, an abstract mathematical theory can be viewed as an algebraic system which basically consists of a signature (a set of basic notions such as constants and function symbols), a set of hypotheses (axioms) and the proved theorems (possibly together with their proofs). Definition 4.1 A semi-group is a system consisting of a set A and an associative binary operation s on A. Though this notion appears to be useful in many connections, the theory of semi-groups is comparatively new and it certainly cannot be regarded as having reached a definitive stage. In describing a particular semi-group one has to specify the operation as well as the set A in which it acts. Thus the same set may be the set part of many different semi-groups. 51
Semi-Groups
52
A signature of a semi-group Sig SG consists of a carrier set A and an operation of type [A -> A -> A]. We can express the abstract mathematical theories by using either strongproduct types or strong-sum types. For instance, a semi-group SG might be expressed as def SG = !(s : Sig_SG) @(Ax_SG, s); where Sig SG = !(X : Type(0)) [X -> X -> X]; or def SG = ?(s : Sig_SG) @(Ax_SG, s); where Sig SG = ?(X : Type(0)) [X -> X -> X]. For the former case, the proof of SG is a function p = \(s : Sig SG) t such that @(p, a) ∈ @(Ax SG, a) provided that a ∈ Sig SG; for the later case, the proof of SG is a pair of such that a ∈ Sig SG and b ∈ @(Ax SG, a). As we can see that the later approach is better than former one, since in the first case we can only get one proof @(p, a) to show that for a given a ∈ Sig SG, @(p, a) ∈ @(Ax SG, a). However, we cannot prove the existence of such a. So we take the later approach to model any abstract mathematical theories. def Sig_SG = ?(A : Type(0)) [A -> A -> A]; The axiom part of semi-group is described as follows: def Ass_ax = \(A : Type(0), s : [A -> A -> A]) !(x : A, y : A, z : A) @(Equal, A, @(s, x, @(s, y, z)), @(s, @(s, x, y), z)); def Ax_SG = \(s : Sig_SG) @(Ass_ax, @(FST, s), @(SND, s)); Alternatively, the axiom part can be defined as follows: def Ax_SG2 = \(A : Type(0), s : [A -> A -> A]) @(Ass_ax, A, s); Informally a semi-group is a tuple ⟨A, +⟩ consisting of a set A and a binary operation + on A, such that the + is associative. The following is the definition of a semi-group in terms of PowerEpsilon.
Semi-Groups
53
def Semi_group = ?(s : Sig_SG) @(Ax_SG, s); The semi-groups are therefore simplest algebraic systems with only one axiom.
4.2
Examples of Semi-Group
• The set P of positive integers and the composition of ordinary addition in P. • P and ordinary multiplication. • P and the composition a ◦ b = a + b + ab. It can be verified that this is associative. • The set I of integers, addition as composition. • I and multiplication. • The set P of subsets of a set S, the joint composition A ∪ B. • P and the intersection composition A ∩ B.
4.2.1
Semi-Group of Natural Number
4.2.1.1
Natural Numbers
The system of natural numbers 1, 2, 3, ... is fundamental in algebra in two respects. In the first place, it serves as a starting point for constructing examples of more elaborate systems. Thus we shall use this system to construct the system of integers, the system of rational numbers, of residue classes modulo an integer, etc. In the second place, in studying algebraic systems, functions or mappings of the set of natural numbers play an associative multiplication is defined, the power an of a fixed a determine a function or mapping n 7→ an of the set of natural numbers. 4.2.1.2
Definition of Nat
Let us present a definition for natural number and few functions over naturals in terms of PowerEpsilon. def Nat = !(Ti : Prop) [Ti -> [Ti -> Ti] -> Ti];
Semi-Groups
4.2.1.3
Function Definitions for Nat
4.2.1.4
Constructors
54
There are two constructors for generating a natural number, namely, OO and SS. def OO = \(Ti : Prop, x : Ti, y : [Ti -> Ti]) x; def SS = \(t : Nat, Ti : Prop, x : Ti, y : [Ti -> Ti]) @(y, @(t, Ti, x, y));
4.2.1.5
Canonical Functions
It is rather straightforward to define addition, multiplication, and exponential operations. def IS_ZERO = \(n : Nat) @(n, Bool, TT, \(x : Bool) FF); def ADD = \(n1 : Nat, n2 : Nat) @(n2, Nat, n1, SS); def TIMES = \(n1 : Nat, n2 : Nat) @(n2, Nat, OO, @(ADD, n1)); def EXP = \(n1 : Nat, n2 : Nat) @(n2, Nat, @(SS, OO), @(TIMES, n1));
where IS ZERO is a Boolean function to check whether a given natural number is zero or not. The addition function ADD is obtained by iterating successor SS; the multiplication function TIMES is obtained by iterating ADD; similarly, the exponentiation function EXP is obtained by iterating TIMES. However, it is a little bit tricky to define a predecessor function PP for any given natural numbers. def T = \(x : Nat, y : Nat) x; def F = \(x : Nat, y : Nat) y; def PP = \(n : Nat) @(n, [[Nat -> Nat -> Nat] -> Nat], \(u : [Nat -> Nat -> Nat]) @(u, OO, OO), \(p : [[Nat -> Nat -> Nat] -> Nat], v : [Nat -> Nat -> Nat]) @(v, @(SS, @(p, T)), @(p, T)), F); The following are some functions being defined using PP. dec ERR : [Nat -> Nat];
Semi-Groups
55
def NIF_THEN_ELSE = @(GIF_THEN_ELSE, Nat); dec MINUS : [Nat -> Nat -> Nat]; def MINUS = \(n1 : Nat, n2 : Nat) @(NIF_THEN_ELSE, @(LESS, n1, n2), @(ERR, n1), @(NIF_THEN_ELSE, @(IS_ZERO, n2), n1, @(MINUS, @(PP, n1), @(PP, n2)))); dec EQUAL : [Nat -> Nat -> Bool]; def EQUAL = \(n1 : Nat, n2 : Nat) @(BIF_THEN_ELSE, @(IS_ZERO, n1), @(IS_ZERO, n2), @(BIF_THEN_ELSE, @(IS_ZERO, n2), FF, @(EQUAL, @(PP, n1), @(PP, n2)))); dec LESS
: [Nat -> Nat -> Bool];
def LESS = \(n1 : Nat, n2 : Nat) @(BIF_THEN_ELSE, @(EQUAL, n1, n2), FF, @(BIF_THEN_ELSE, @(IS_ZERO, n1), TT, @(BIF_THEN_ELSE, @(IS_ZERO, n2), FF, @(LESS, @(PP, n1), @(PP, n2))))); dec REC : !(A : Prop) [Nat -> A -> [Nat -> A -> A] -> A]; def REC = \(A : Prop) \(n : Nat, a : A, f : [Nat -> A -> A])
Semi-Groups
56
@(GIF_THEN_ELSE, A, @(IS_ZERO, n), a, @(f, n, @(REC, A, @(PP, n), a, f))); where EQUAL is a Boolean function to check whether two given natural numbers are equal or not. LESS is a Boolean function to check whether one given natural number is less than another one or not. We may see that natural numbers are polymorphic iterators. The REC is a recursive operator. Iterating a natural on a functional type may produce non-primitive recursive functions; for example, we can get Ackermann’s function by the following definition: def ACK = \(n : Nat) @(n, [Nat -> Nat], SS, \(f : [Nat -> Nat]) \(m : Nat) @(m, Nat, m, f)); It is interesting to see the type Nat as expression the proposition “there are natural numbers”, which has the constructive proofs OO, @(SS, OO), @(SS, @(SS, OO)), . . . . Indeed, most (total) recursive functions are definable as proofs in PowerEpsilon.
4.2.1.6
Properties of Nat
OO as Identity of ADD dec AddLLem0 : !(n : Nat) @(Equal, Nat, @(ADD, OO, n), n); dec AddRLem0 : !(n : Nat) @(Equal, Nat, @(ADD, n, OO), n); def AddIdLem0 = \(n : Nat) let Q1 = @(Equal, Nat, @(ADD, OO, n), n), Q2 = @(Equal, Nat, @(ADD, n, OO), n) in let q1 = @(AddLLem0, n), q2 = @(AddRLem0, n) in @(ANDS, Q2, Q1, q2, q1);
Commutativity of ADD dec AddCommLem :
Semi-Groups
57
!(n : Nat, m : Nat) @(Equal, Nat, @(ADD, n, m), @(ADD, m, n));
Associativity of ADD dec AddAssoLem : !(m : Nat, n : Nat, e : Nat) @(Equal, Nat, @(ADD, @(ADD, m, n), e), @(ADD, m, @(ADD, n, e)));
4.2.1.7
Semi-Group: Nat SG
We now give a proof to show that the set of natural numbers is a semi-group: def Ass_law = \(p : Nat) !(m : Nat, n : Nat) @(Equal, Nat, @(ADD, m, @(ADD, n, p)), @(ADD, @(ADD, m, n), p)); def Ass_pr = \(p : Nat, m : Nat, n : Nat) let prf1 = @(AddAssoLem, m, n, p) in let prf2 = @(Symm_Eq, Nat, @(ADD, @(ADD, m, n), p), @(ADD, m, @(ADD, n, p)), prf1) in prf2; def Nat_SG = @(SG_Gen, , Ass_pr); where Ass pr is a proof to show that Nat satisfies the associative property and the Nat SG is a proof to show that Nat is a semi-group.
4.2.2
Semi-Groups of Transformations
4.2.2.1
Transformations
Two transformations f : [S -> T] and g : [S -> T] with the same domain S and codomain T are called equal if they have the same effect upon every point of S. def Eq_Tran = \(S : Type(0), T : Type(0)) \(f : [S -> T], g : [S -> T])
Semi-Groups
58
!(x : S) @(Equal, T, @(f, x), @(g, x)); The product or composite @(Comp Tran, f, g) of two transformations is again defined as the result of performing them in succession; first f and then g, provided however that codomain of f is the domain of g. def Comp_Tran = \(S : Type(0), T : Type(0), U : Type(0)) \(f : [S -> T], g : [T -> U]) \(x : S) @(g, @(f, x)); The identity transformation Iden Tran is defined as follows: def Iden_Tran = \(S : Type(0)) \(x : S) x;
4.2.2.2
Semi-Groups of Transformations
Multiplication of transformations conforms to the association law. dec Tran_Ax_SG_Pr : !(S : Type(0)) @(Ass_ax, [S -> S], @(Comp_Tran, S, S, S)); def Tran_SG = \(S : Type(0)) @(SG_Gen, S], @(Comp_Tran, S, S, S)>, @(Tran_Ax_SG_Pr, S));
4.3
Finite Semi-Groups
Definition 4.2 A semi-group is said to be finite if it contains only a finite number of elements. In terms of PowerEpsilon we have a set A is finite with m members if and only if A is isomorphic to set N = ?(n : Nat) @(NLe, n, m). def Card_Set = \(A : Type(0), N : Type(0)) ?(f : [A -> N]) @(Bijection1, A, N, f); dec Is_Finite_SmGrp : [Semi_group -> Type(0)];
Semi-Groups
59
def Is_Finite_SmGrp = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in ?(m : Nat) let N = ?(n : Nat) @(NLe, n, m) in @(Card_Set, A, N); def SMGRPORD = \(g : Semi_group, p : @(Is_Finite_SmGrp, g)) @(FST, p);
4.4
Isomorphism
One of the most important concepts of modern algebra is that of isomorphism. We now define this concept for semi-groups. Definition 4.3 By an isomorphism between two semi-groups g1 and g2 we mean a bijection between their elements which preserves semi-group multiplication.
def Semi_Group_Isom = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in ?(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) -> @(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]); def Semi_Group_Isom2 = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in \(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) ->
Semi-Groups
60
@(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]) Isomorphism behaves like equality according to the following theorem. Theorem 4.1 The relation “G is isomorphic to G’” is a reflexive, symmetric, and transitive relation between semigroups.
dec SGIsom_Relf : @(Refl0, Semi_group, Semi_Group_Isom); dec SGIsom_Symm : @(Symm0, Semi_group, Semi_Group_Isom); dec SGIsom_Tran : @(Tran0, Semi_group, Semi_Group_Isom); It is worth observing that Theorem 4.1 and its proof hold equally for isomorphisms between groups, rings, integral domains, and indeed for isomorphisms between algebraic systems of any kind whatever. We shall finally prove a remarkable result of Cayley, which can be interpreted as demonstrating the completeness of our postulations on the multiplication of transformations. Theorem 4.2 Any abstract semigroup G is isomorphic with a semigroup of transformations. dec SmGrp_Isom_Thm : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in ?(P : [S -> Type(0)]) let ts = @(Comp_Tran, A, A, A) in @(And, @(And, @(Subsg_ax, S, ts, P), @(Ass_ax, S, ts)), ?(f : [A -> S]) @(And, @(SBijection, A, S, P, f), !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y))))); Before proving SmGrp Isom Thm, we assume that the following two lemmas hold. dec Fun_Cong_Lem :
Semi-Groups
61
!(A1 : Type(0), A2 : Type(0), t1 : [A1 -> A2], t2 : [A1 -> A2]) [!(z : A1) @(Equal, A2, @(t1, z), @(t2, z)) -> @(Equal, [A1 -> A2], \(z : A1) @(t1, z), \(z : A1) @(t2, z))]; dec Eq_Cong : !(A : Type(0), P : [A -> Type(0)]) !(a : A, b : A) [@(And, [@(P, a) -> @(P, b)], [@(P, b) -> @(P, a)]) -> @(Equal0, A, a, b)]; The proof of SmGrp Isom Thm is divided into the following hierarchy. To prove SmGrp Isom Thm, we need to prove two theorems SmGrp Isom Thm1 and SmGrp IsomThm2. dec SmGrp_Isom_Thm1 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in @(And, @(Subsg_ax, S, ts, P), @(Ass_ax, S, ts)); dec SmGrp_Isom_Thm2 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in ?(f : [A -> S]) @(And, @(SBijection, A, S, P, f), !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y)))); To prove SmGrp Isom Thm1, we need to prove lemmas SmGrp Isom Lem11 and SmGrp Isom Lem12. dec SmGrp_Isom_Lem11 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t),
Semi-Groups
62
s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in @(Subsg_ax, S, ts, P); dec SmGrp_Isom_Lem12 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in @(Ass_ax, S, ts); The proofs of SmGrp Isom Lem11 and SmGrp Isom Lem12 are described as follows: def SmGrp_Isom_Lem11 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in \(f : S, h : S, p1 : @(P, f), p2 : @(P, h)) let a = @(FST, p1), u = @(SND, p1), b = @(FST, p2), v = @(SND, p2) in let fh = \(x : A) @(s, x, a), hh = \(x : A) @(s, x, b) in let q1 = @(Op_Cong1, S, ts, fh, h, hh, v), q2 = @(Op_Cong2, S, ts, h, f, fh, u), q3 = @(Eq_Tran3, S, @(ts, f, h), @(ts, fh, h), @(ts, fh, hh), q2, q1) in let r1 = \(x : A) @(Eq_Refl, A, @(ts, fh, hh, x)), r2 = \(x : A) @(SG_Ass_Axm, g, x, a, b), r3 = \(x : A) @(Eq_Symm, A, @(s, x, @(s, a, b)),
Semi-Groups
@(s, @(s, x, a), b), @(r2, x)), r4 = \(x : A) @(Eq_Tran3, A, @(ts, fh, hh, x), @(s, @(s, x, a), b), @(s, x, @(s, a, b)), @(r1, x), @(r3, x)), r5 = @(Fun_Cong_Lem, A, A, \(x : A) @(s, @(s, x, a), b), \(x : A) @(s, x, @(s, a, b)), r4), r6 = @(Eq_Tran3, S, @(ts, f, h), @(ts, fh, hh), \(x : A) @(s, x, @(s, a, b)), q3, r5) in ; def SmGrp_Isom_Lem12 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in \(f : S, h : S, k : S) let p1 = @(Eq_Refl, S, @(ts, f, @(ts, h, k))), p2 = @(Eq_Refl, S, @(ts, @(ts, f, h), k)) in @(Eq_Tran3, S, @(ts, f, @(ts, h, k)), \(x : A) @(k, @(h, @(f, x))), @(ts, @(ts, f, h), k), p1, p2); We are now ready to give the proof of SmGrp Isom Thm1. def SmGrp_Isom_Thm1 = \(g : Semi_group)
63
Semi-Groups
64
let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let U = @(Subsg_ax, S, ts, P), V = @(Ass_ax, S, ts) in let u = @(SmGrp_Isom_Lem11, g), v = @(SmGrp_Isom_Lem12, g) in @(ANDS, U, V, u, v); To prove SmGrp Isom Thm2, we first need to prove lemmas SmGrp IsomLem21 and SmGrp IsomLem22. dec SmGrp_IsomLem21 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let f = \(a : A, x : A) @(s, x, a) in @(SBijection, A, S, P, f); dec SmGrp_IsomLem22 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let f = \(a : A, x : A) @(s, x, a) in !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y))); We then need SmGrpIsomLem211 and SmGrpIsomLem212 to prove SmGrp IsomLem21. dec SmGrpIsomLem211 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in
Semi-Groups
65
let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let f = \(a : A, x : A) @(s, x, a) in @(SSurjection, A, S, P, f); dec SmGrpIsomLem212 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in @(Injection, A, S, f); The proofs of SmGrpIsomLem211 is described as follows: def SmGrpIsomLem211 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let f = \(a : A, x : A) @(s, x, a) in \(h : S, p : @(P, h)) p; The proofs of SmGrpIsomLem212 is then a composition of SmGrpIsomLem2121 and SmGrpIsomLem2122 described as follows: dec SmGrpIsomLem2121 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in !(a : A, b : A) [@(Equal0, A, a, b) -> @(Equal0, S, @(f, a), @(f, b))]; dec SmGrpIsomLem2122 : !(g : Semi_group) let t = @(FST, g) in let A = @(FST, t),
Semi-Groups
66
s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in !(a : A, b : A) [@(Equal0, S, @(f, a), @(f, b)) -> @(Equal0, A, a, b)]; The proofs of SmGrpIsomLem2121 and SmGrpIsomLem2122 is described as follows: def SmGrpIsomLem2121 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in \(a : A, b : A) \(p : @(Equal0, A, a, b)) let q = \(x : A) @(Op_Cong1, A, s, x, a, b, p) in @(Fun_Cong_Lem, A, A, \(x : A) @(s, x, a), \(x : A) @(s, x, b), q); def SmGrpIsomLem2122 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in \(a : A, b : A) \(p : @(Equal0, S, @(f, a), @(f, b))) let Q = \(x : A) @(Equal0, S, @(f, x), @(f, b)) in let q = @(Eq_Refl, S, @(f, b)) in let p1 = \(r : @(Q, a)) q, p2 = \(r : @(Q, b)) p in let u = @(ANDS, [@(Q, a) -> @(Q, b)], [@(Q, b) -> @(Q, a)], p1, p2) in @(Eq_Cong, A, Q, a, b, u); The proof of SmGrpIsomLem212 is then described in terms of SmGrpIsomLem2121 and SmGrpIsomLem2122.
Semi-Groups
def SmGrpIsomLem212 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let f = \(a : A, x : A) @(s, x, a) in let U = @(Into, A, S, f), V = @(OneToOne, A, S, f) in let u = @(SmGrpIsomLem2121, g), v = @(SmGrpIsomLem2122, g) in @(ANDS, U, V, u, v); We then will be able to give the proof of SmGrp IsomLem21. def SmGrp_IsomLem21 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let f = \(a : A, x : A) @(s, x, a) in let U = @(SSurjection, A, S, P, f), V = @(Injection, A, S, f) in let u = @(SmGrpIsomLem211, g), v = @(SmGrpIsomLem212, g) in @(ANDS, U, V, u, v); def SmGrp_IsomLem22 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let f = \(a : A, x : A) @(s, x, a), p = \(a : A, b : A) let p1 = @(Eq_Refl, S, @(f, @(s, a, b))), p2 = \(z : A) @(SG_Ass_Axm, g, z, a, b), p3 = @(Fun_Cong_Lem, A, A, \(z : A) @(s, z, @(s, a, b)),
67
Semi-Groups
68
\(z : A) @(s, @(s, z, a), b), p2) in @(Eq_Tran3, S, @(f, @(s, a, b)), \(z : A) @(s, z, @(s, a, b)), @(ts, @(f, a), @(f, b)), p1, p3) in p; To use SmGrp IsomLem21 and SmGrp IsomLem22, we will be able to prove SmGrpIsom Thm2. def SmGrp_Isom_Thm2 = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let f = \(a : A, x : A) @(s, x, a) in let U1 = @(SBijection, A, S, P, f), U2 = !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y))) in let u1 = @(SmGrp_IsomLem21, g), u2 = @(SmGrp_IsomLem22, g) in ; Finally the proof of SmGrp Isom Thm is given as follows. def SmGrp_Isom_Thm = \(g : Semi_group) let t = @(FST, g) in let A = @(FST, t), s = @(SND, t) in let S = [A -> A] in let ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, x, a)) in let P1 = @(And, @(Subsg_ax, S, ts, P), @(Ass_ax, S, ts)), P2 = ?(f : [A -> S])
Semi-Groups
69
@(And, @(SBijection, A, S, P, f), !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y)))) in let p1 = @(SmGrp_Isom_Thm1, g), p2 = @(SmGrp_Isom_Thm2, g) in ;
4.5
Sub-Semigroups
Many semi-groups are contained in larger semi-groups. This suggests the concept of a sub-semigroup. Definition 4.4 A subset S of a semi-group G is called a sub-semigroup of G if S is itself a semi-group with respect to the binary operation of G. We therefore need a new axiom for sub-semigroups. def Subsg_ax = \(A : Type(0)) \(s : [A -> A -> A]) \(S : [A -> Type(0)]) !(a : A, b : A) [@(S, a) -> @(S, b) -> @(S, @(s, a, b))]; Putting together Ax SG2 and Subsg ax, we have def Ax_SubSG = \(s : Sig_SG) let A = @(FST, s), r = @(SND, s) in ?(S : [A -> Type(0)]) @(And, @(Ax_SG2, A, r), @(Subsg_ax, A, r, S)); def Sub_Semigroup = ?(s : Sig_SG) @(Ax_SubSG, s); def Sub_Semigroup2 = ?(G : Semi_group) let s = @(FST, G) in let A = @(FST, s), r = @(SND, s) in ?(P : [A -> Type(0)]) @(Subsg_ax, A, r, P); The whole semi-group G is a sub-semigroup of itself. dec Total_Subsmgrp_Lem :
Semi-Groups
70
!(G : Semi_group) let s = @(FST, G) in let A = @(FST, s), r = @(SND, s) in let P = \(a : A) @(Equal0, A, a, a) in @(Subsg_ax, A, r, P); def Total_Subsmgrp_Lem = \(G : Semi_group) let s = @(FST, G) in let A = @(FST, s), r = @(SND, s) in let P = \(a : A) @(Equal0, A, a, a) in \(a : A, b : A) \(p1 : @(P, a), p2 : @(P, b)) let ab = @(r, a, b) in @(Eq_Refl, A, ab); def Total_Subsmgroup = \(G : Semi_group) let s = @(FST, G) in let A = @(FST, s), r = @(SND, s) in let P = \(a : A) @(Equal0, A, a, a) in ;
4.6
Homomorphism
A single-valued transformation from a semigroup g1 to a semigroup g2 may preserve multiplication without being one-one (i.e., without being an isomorphism. We then have the following concept. Definition 4.5 A homomorphism of a semi-group g1 to a semi-group g2 is a singlevalued transformation x1 7→ @(f, x1) = x2 mapping g1 into g2, such that @(f, @(s1, x, y)) = @(s2, @(f, x), @(f, y)) for all x and y in g1. In terms of PowerEpsilon, we have def Semi_Group_Hom = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in ?(f : [A1 -> A2]) @(And, @(Into, A1, A2, f), !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y)))); and
Semi-Groups
71
def Semi_Group_Hom2 = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in \(f : [A1 -> A2]) @(And, @(Into, A1, A2, f), !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))));
Definition 4.6 A homomorphism onto is called an epimorphism.
def Semi_Group_Epim = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in ?(f : [A1 -> A2]) @(And1, @(Surjection, A1, A2, f), @(Semi_Group_Hom2, g1, g2, f)); def Semi_Group_Epim2 = \(g1 : Semi_group, g2 : Semi_group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), s1 = @(SND, t1), s2 = @(SND, t2) in \(f : [A1 -> A2]) @(And1, @(Surjection, A1, A2, f), @(Semi_Group_Hom2, g1, g2, f));
4.7 4.7.1
Endomorphism and Automorphism Endomorphisms
Definition 4.7 A homomorphism of a semi-group into itself is called an endomorphism.
def SmEndomorp = \(G : Semi_group) @(Semi_Group_Hom, G, G);
Semi-Groups
72
def SmEndomorp2 = \(G : Semi_group) @(Semi_Group_Hom2, G, G); def SmEndomorp3 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in ?(F : [A -> A]) @(SmEndomorp2, G, F);
4.7.2
Automorphisms
Definition 4.8 An isomomorphism of a semi-group into itself is called an automorphism.
def SmAutomorp = \(G : Semi_group) @(Semi_Group_Isom, G, G); def SmAutomorp2 = \(G : Semi_group) @(Semi_Group_Isom2, G, G); def SmAutomorp3 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in ?(F : [A -> A]) @(SmAutomorp2, G, F) The automorphisms of any semi-group G themselves form a semi-group A. dec Comp_AutoSM_Lem : !(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in !(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), g = @(FST, ga) in let h = @(Comp_Tran, A, A, A, f, g) in @(SmAutomorp2, G, h); def Comp_AutoSM = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), g = @(FST, ga) in let h = @(Comp_Tran, A, A, A, f, g) in ;
Semi-Groups
73
dec Auto_Ax_SM_Pr : !(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in @(Ass_ax, @(SmAutomorp3, G), @(Comp_AutoSM, G)); def Auto_Semi_Group = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in @(SG_Gen, , @(Auto_Ax_SM_Pr, G)); To prove Comp AutoSM Lem, we need to prove three lemmas: Comp AutoSM Lem1, Comp AutoSM Lem2 and Comp AutoSM Lem3. The first lemma Comp AutoSM Lem1 is easy to be shown. def Comp_AutoSO_Lxm1 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), fp = @(SND, fa), g = @(FST, ga), gp = @(SND, ga) in let F1 = @(Bijection, A, A, f), F2 = !(x : A, y : A) @(Equal0, A, @(f, @(s, x, y)), @(s, @(f, x), @(f, y))), G1 = @(Bijection, A, A, g), G2 = !(x : A, y : A) @(Equal0, A, @(g, @(s, x, y)), @(s, @(g, x), @(g, y))) in let fp1 = @(PJ1, F1, F2, fp), fp2 = @(PJ2, F1, F2, fp), gp1 = @(PJ1, G1, G2, gp), gp2 = @(PJ2, G1, G2, gp) in let P1 = @(Surjection, A, A, f), P2 = @(Injection, A, A, f), Q1 = @(Surjection, A, A, g),
Semi-Groups
74
Q2 = @(Injection, Z, A, g) in let p1 = @(PJ1, P1, P2, fp1), p2 = @(PJ2, P1, P2, fp1), q1 = @(PJ1, Q1, Q2, gp1), q2 = @(PJ2, Q1, Q2, gp1) in let R1 = @(Into, A, A, f), R2 = @(OneToOne, A, A, f), T1 = @(Into, A, A, g), T2 = @(OneToOne, A, A, g) in let r1 = @(PJ1, R1, R2, p2), r2 = @(PJ2, R1, R2, p2), t1 = @(PJ1, T1, T2, q2), t2 = @(PJ2, T1, T2, q2) in let h = @(Comp_Tran, A, A, A, f, g) in \(a2 : A) let a11 = @(FST, @(q5, a2)), q11 = @(SND, @(q1, a2)), a12 = @(FCT, @(p1, a11)), p12 = @(SND, @(p1, a11)) in let u = @(t1, a11, @(f, a12), p12), v = @(Eq_Tran3, A, a2, @(g, a11), @(g, @(f, a12)), q11, u) in ; To prove Comp AutoSM Lem2, we need another two lemmas: Comp AutoSM Lem21 and Comp AutoSM Lem22. def Comp_AutoSMLem21 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), fp = @(SND, fa), g = @(FST, ga), gp = @(SND, ga) in let F1 = @(Bijection, A, A, f), F2 = !(x : A, y : A) @(Equal0, A, @(f, @(s, x, y)), @(s, @(f, x), @(f, y))), G1 = @(Bijection, A, A, g),
Semi-Groups
G2 = !(x : A, y : A) @(Equal0, A, @(g, @(s, x, y)), @(s, @(g, x), @(g, y))) in let fp1 = @(PJ1, F1, F2, fp), fp2 = @(PJ2, F1, F2, fp), gp1 = @(PJ1, G1, G2, gp), gp2 = @(PJ2, G1, G2, gp) in let P1 = @(Surjection, A, A, f), P2 = @(Injection, A, A, f), Q1 = @(Surjection, A, A, g), Q2 = @(Injection, A, A, g) in let p1 = @(PJ1, P1, P2, fp1), p2 = @(PJ2, P1, P2, fp1), q1 = @(PJ1, Q1, Q2, gp1), q2 = @(PJ2, Q1, Q2, gp1) in let R1 = @(Into, A, A, f), R2 = @(OneToOne, A, A, f), T1 = @(Into, A, A, g), T2 = @(OneToOne, A, A, g) in let r1 = @(PJ1, R1, R2, p2), r2 = @(PJ2, R1, R2, p2), t1 = @(PJ1, T1, T2, q2), t2 = @(PJ2, T1, T2, q2) in let h = @(Comp_Tran, A, A, A, f, g) in \(a : A, b : A) \(r : @(Equal0, A, a, b)) let u = @(r1, a, b, r) in @(t1, @(f, a), @(f, b), u); def Comp_AutoSMLem22 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), fp = @(SND, fa), g = @(FST, ga), gp = @(SND, ga) in let F1 = @(Bijection, A, A, f), F2 = !(x : A, y : A) @(Equal0, A, @(f, @(s, x, y)), @(s, @(f, x), @(f, y))), G1 = @(Bijection, A, A, g), G2 = !(x : A, y : A)
75
Semi-Groups
@(Equal0, A, @(g, @(s, x, y)), @(s, @(g, x), @(g, y))) in let fp1 = @(PJ1, F1, F2, fp), fp2 = @(PJ2, F1, F2, fp), gp1 = @(PJ1, G1, G2, gp), gp2 = @(PJ2, G1, G2, gp) in let P1 = @(Surjection, A, A, f), P2 = @(Injection, A, A, f), Q1 = @(Surjection, A, A, g), Q2 = @(Injection, A, A, g) in let p1 = @(PJ1, P1, P2, fp1), p2 = @(PJ2, P1, P2, fp1), q1 = @(PJ1, Q1, Q2, gp1), q2 = @(PJ2, Q1, Q2, gp1) in let R1 = @(Into, A, A, f), R2 = @(OneToOne, A, A, f), T1 = @(Into, A, A, g), T2 = @(OneToOne, A, A, g) in let r1 = @(PJ1, R1, R2, p2), r2 = @(PJ2, R1, R2, p2), t1 = @(PJ1, T1, T2, q2), t2 = @(PJ2, T1, T2, q2) in let h = @(Comp_Tran, A, A, A, f, g) in \(a : A, b : A) \(r : @(Equal0, A, @(h, a), @(h, b))) let u = @(t2, @(f, a), @(f, b), r) in @(r2, a, b, u); The proof of Comp AutoSM Lem2 is then given as follows: def Comp_AutoSM_Lem2 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), fp = @(SND, fa), g = @(FST, ga), gp = @(SND, ga) in let F1 = @(Bijection, A, A, f), F2 = !(x : A, y : A) @(Equal0, A, @(f, @(s, x, y)), @(s, @(f, x), @(f, y))), G1 = @(Bijection, A, A, g),
76
Semi-Groups
G2 = !(x : A, y : A) @(Equal0, A, @(g, @(s, x, y)), @(s, @(g, x), @(g, y))) let fp1 = @(PJ1, F1, F2, fp), fp2 = @(PJ2, F1, F2, fp), gp1 = @(PJ1, G1, G2, gp), gp2 = @(PJ2, G1, G2, gp) in let P1 = @(Surjection, A, A, f), P2 = @(Injection, A, A, f), Q1 = @(Surjection, A, A, g), Q2 = @(Injection, A, A, g) in let p1 = @(PJ1, P1, P2, fp1), p2 = @(PJ2, P1, P2, fp1), q1 = @(PJ1, Q1, Q2, gp1), q2 = @(PJ2, Q1, Q2, gp1) in let h = @(Comp_Tran, A, A, A, f, g) let U1 = @(Into, A, A, h), U2 = @(OneToOne, A, A, h) in let u1 = @(Comp_AutoSMLem21, G, fa, u2 = @(Comp_AutoSMLem22, G, fa, @(ANDS, U1, U2, u1, u2);
77
in
in
ga), ga) in
We then give the proof of Comp AutoSM Lem3. def Comp_AutoSM_Lem3 = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), fp = @(SND, fa), g = @(FST, ga), gp = @(SND, ga) in let F1 = @(Bijection, A, A, f), F2 = !(x : A, y : A) @(Equal0, A, @(f, @(s, x, y)), @(s, @(f, x), @(f, y))), G1 = @(Bijection, A, A, g), G2 = !(x : A, y : A) @(Equal0, A, @(g, @(s, x, y)), @(s, @(g, x), @(g, y))) in let fp1 = @(PJ1, F1, F2, fp),
Semi-Groups
78
fp2 = @(PJ2, F1, F2, fp), gp1 = @(PJ1, G1, G2, gp), gp2 = @(PJ2, G1, G2, gp) in let P1 = @(Surjection, A, A, f), P2 = @(Injection, A, A, f), Q1 = @(Surjection, A, A, g), Q2 = @(Injection, A, A, g) in let p1 = @(PJ1, P1, P2, fp1), p2 = @(PJ2, P1, P2, fp1), q1 = @(PJ1, Q1, Q2, gp1), q2 = @(PJ2, Q1, Q2, gp1) in let R1 = @(Into, A, A, f), R2 = @(OneToOne, A, A, f), T1 = @(Into, A, A, g), T2 = @(OneToOne, A, A, g) in let r1 = @(PJ1, R1, R2, p2), r2 = @(PJ2, R1, R2, p2), t1 = @(PJ1, T1, T2, q2), t2 = @(PJ2, T1, T2, q2) in let h = @(Comp_Tran, A, A, A, f, g) in \(x : A, y : A) let u1 = @(Eq_Refl, A, @(h, @(s, x, y))), u2 = @(t1, @(f, @(s, x, y)), @(s, @(f, x), @(f, y)), @(fp2, x, y)), u3 = @(gp2, @(f, x), @(f, y)) in @(Eq_Tran4, A, @(h, @(s, x, y)), @(g, @(f, @(s, x, y))), @(g, @(s, @(f, x), @(f, y))), @(s, @(g, @(f, x)), @(g, @(f, y))), u1, u2, u3); Finally we will be able to give the proof of Comp AutoSM Lem in terms of the three lemmas presented above. def Comp_AutoSM_Lem = \(G : Semi_group) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in \(fa : @(SmAutomorp3, G), ga : @(SmAutomorp3, G)) let f = @(FST, fa), g = @(FST, ga) in
Semi-Groups
let h = @(Comp_Tran, A, A, A, f, g) in let P1 = @(Surjection, A, A, h), P2 = @(Injection, A, A, h), P3 = @(Bijection, A, A, h), P4 = !(x : A, y : A) @(Equal0, A, @(h, @(s, x, y)), @(s, @(h, x), @(h, y))) in let p1 = @(Comp_AutoSM_Lem1, G, fa, ga), p2 = @(Comp_AutoSM_Lem2, G, fa, ga), p3 = @(ANDS, P1, P2, p1, p2), p4 = @(Comp_AutoSM_Lem3, G, fa, ga) in @(ANDS, @(And1, P1, P2), P4, p3, p4);
79
Chapter 5
Monoid 5.1
Definition of Monoid
Definition 5.1 A monoid G is a semi-group which contains a (two-sided) identity element o such that ao = oa = a for all a in G.
def Ide_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) @(And, @(Equal, A, @(s, x, o), x), @(Equal, A, @(s, o, x), x)); The signature of monoids is defined as follows: def Sig_MO = ?(A : Type(0), o : A) [A -> A -> A]; The axiom part of monoid is described as follows: def Ax_MO = \(s : Sig_MO) let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ass_ax, T, r), @(Ide_ax, T, o, r)); def Ax_MO2 = \(T : Type(0), o : T, r : [T -> T -> T]) @(And, @(Ass_ax, T, r), @(Ide_ax, T, o, r));
80
Monoid
The following is the definition of a monoid in terms of PowerEpsilon. def Monoid = ?(s : Sig_MO) @(Ax_MO, s); def MO_Gen = \(s : Sig_MO, p : @(Ax_MO, s)) ; The following theorem holds for any monoid. Theorem 5.1 A monoid has only one identity element.
dec Mo_Idn_Lem1 : !(g : Monoid) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal, A, a, @(s, a, o)); dec Mo_Idn_Lem2 : !(g : Monoid) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal, A, a, @(s, o, a)); dec Mo_Uniq_Ident : !(g : Monoid) let t = @(FST, g), a = @(SND, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(e : A) [!(x : A) @(Equal, A, @(s, e, x), x) -> @(Equal, A, e, o)];
def Mo_Uniq_Ident = \(g : Monoid) let t = @(FST, g), a = @(SND, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(e : A, p : !(x : A) @(Equal, A, @(s, e, x), x)) let p1 = @(Mo_Idn_Lem1, g, e),
81
Monoid
82
p2 = @(p, o) in @(Eq_Tran, A, e, @(s, e, o), o, p1, p2);
5.2 5.2.1
Examples Monoid of Natural Number
We now give a proof to show that the set of natural numbers is a monoid.
5.2.1.1
Basic Properties of Natural Numbers
def Ass_law = \(p : Nat) !(m : Nat, n : Nat) @(Equal, Nat, @(ADD, m, @(ADD, n, p)), @(ADD, @(ADD, m, n), p)); def Ide_law = \(x : Nat) @(And, @(Equal, Nat, @(ADD, x, OO), x), @(Equal, Nat, @(ADD, OO, x), x));
5.2.1.2
Proof of Identity
def Ide_pr = AddIdLem0;
5.2.1.3
Proof of Nat as a Monoid
def MO_pr = @(ANDS, @(Ass_ax, Nat, ADD), @(Ide_ax, Nat, OO, ADD), Ass_pr, Ide_pr); def Nat_Monoi = @(MO_Gen, , MO_pr);
5.3
Finite Monoid
Definition 5.2 A monoid is said to be finite if it contains only a finite number of elements.
Monoid
83
dec Is_Finite_Monoi : [Monoid -> Type(0)]; def Is_Finite_Monoi = \(g : Monoid) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in ?(m : Nat) let N = ?(n : Nat) @(NLe, n, m) in @(Card_Set, A, N); def MONOIORD = \(g : Monoid, p : @(Is_Finite_Monoi, g)) @(FST, p);
5.4
Isomorphism
Definition 5.3 By an isomorphism between two monoids g1 and g2 is meant a bijection between their elements which preserves monoid identity and multiplication.
def Monoid_Isom = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in ?(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) -> @(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]); def Monoid_Isom2 = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2])
Monoid
84
@(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) -> @(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]);
5.5
Sub-Monoid
Definition 5.4 A subset S of a monoid G is called a sub-monoid of G if S is itself a monoid with respect to the binary operation of G. We therefore need a new axiom for sub-monoid.
def Submo_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(S : [A -> Type(0)]) @(And, @(S, o), !(a : A, b : A) [@(S, a) -> @(S, b) -> @(S, @(s, a, b))]); def Ax_SubMO = \(s : Sig_MO) let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in ?(S : [A -> Type(0)]) @(And, @(Ax_MO, ), @(Submo_ax, A, o, r, S)); def Sub_Monoid = ?(s : Sig_MO) @(Ax_SubMO, s); def Sub_Monoid2 = ?(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in ?(P : [A -> Type(0)]) @(Submo_ax, A, o, r, P); The subset of G which contains element o only is a trivial sub-monoid.
Monoid
dec Triv_Submon_Lem : !(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in @(Submo_ax, A, o, r, P); def Triv_Submon_Lem1 = \(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in @(Eq_Refl, A, o); def Triv_Submon_Lem2 = \(G : Monoid) let s = @(FST, G), t = @(SND, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in \(a : A, b : A) \(p1 : @(P, a), p2 : @(P, b)) let T1 = @(Ass_ax, A, r), T2 = @(Ide_ax, A, o, r) in let t1 = @(PJ1, T1, T2, t), t2 = @(PJ2, T1, T2, t) in let T21 = @(Equal, A, @(r, a, o), a), T22 = @(Equal, A, @(r, o, a), a) in let t21 = @(PJ1, T21, T22, @(t2, a)), t22 = @(PJ2, T21, T22, @(t2, a)) in let q1 = @(Op_Cong1, A, r, a, b, o, p2), q2 = @(Eq_Tran, A, @(r, a, b), @(r, a, o), a, q1, t21) in @(Eq_Tran, A, @(r, a, b), a, o, q2, p1); def Triv_Submon_Lem =
85
Monoid
86
\(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in let P1 = @(P, o), P2 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in let p1 = @(Triv_Submon_Lem1, G), p2 = @(Triv_Submon_Lem2, G) in @(ANDS, P1, P2, p1, p2); def Triv_Submonoid = \(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in ; G is a sub-monoid of itself. dec Tol_Submon_Lem : !(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, a) in @(Submo_ax, A, o, r, P); def Tol_Submon_Lem = \(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, let Q1 = @(P, o), Q2 = !(a : A, b : A) [@(P, a) -> @(P, b) let q1 = @(Eq_Refl, A, o), q2 = \(a : A, b : A) \(p1 : @(P, a), p2 : let ab = @(r, a, b)
a, a) in
-> @(P, @(r, a, b))] in
@(P, b)) in
Monoid
87
@(Eq_Refl, A, ab) in @(ANDS, Q1, Q2, q1, q2); def Total_Submonoid = \(G : Monoid) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, a) in
5.6
Homomorphism
A single-valued transformation from a monoid g1 to a monoid g2 may preserve multiplication without being one-one (i.e., without being an isomorphism. Definition 5.5 A homomorphism of a monoid g1 to a monoid g2 is a single-valued transformation x1 7→ @(f, x1) = x2 mapping g1 into g2, such that @(f, @(s1, x, y)) = @(s2, @(f, x), @(f, y)) for all x and y in g1. In terms of PowerEpsilon, we have def Monoid_Hom = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in ?(f : [A1 -> A2]) @(And, @(Into, A1, A2, f), !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y)))); def Monoid_Hom2 = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2]) @(And, @(Into, A1, A2, f), !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))));
Monoid
88
Theorem 5.2 The set N of all elements of G mapped on the identity e’ of G’, under a homomorphism of G to G’, is a submonoid of G. dec MonoidHomCol : !(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in @(Submo_ax, A1, o1, s1, N); The following lemma MIdn Cancel Lem has to be proved by contradiction. dec MIdn_Cancel_Lem : !(g : Monoid) let s = @(FST, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : T) [@(Equal0, T, a, @(r, a, a)) -> @(Equal0, T, a, o)]; def MIdn_Cancel_Lem = \(g : Monoid) let s = @(FST, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : T, p : @(Equal0, T, a, @(r, a, a))) @(WHEN, @(Equal0, T, a, o), @(Not, @(Equal0, T, a, o)), @(Equal0, T, a, o), @(Excl_Mid, T, a, o), \(u : @(Equal0, T, a, o)) u, \(v : @(Not, @(Equal0, T, a, o))) let r1 = @(Eq_Refl, T, a), r2 = @(NOp_Cong1, T, r, a, a, a, o, r1, v), r3 = @(MIdn_Axm1, g, a), r4 = @(Eq_Symm, T, a, @(r, a, a), p), r5 = @(NEq_Tran, T, @(r, a, a),
Monoid
89
@(r, a, o), a, r2, r3) in @(r5, r4, @(Equal0, T, a, o)));
Lemma 5.1 Under any homomorpgism G -> G’, the identity o of G goes into the identity of G’.
dec Monoid_Hom_Lem : !(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p) in @(Equal0, A2, @(f, o1), o2); def Monoid_Hom_Lem = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let Q1 = @(Into, A1, A2, f), Q2 = !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))) in let q1 = @(PJ1, Q1, Q2, q), q2 = @(PJ2, Q1, Q2, q) in let r1 = @(q2, o1, o1), r2 = @(Mo_Idn_Lem1, g1, o1), r3 = @(q1, o1, @(s1, o1, o1), r2), r4 = @(Eq_Tran3, A2, @(f, o1), @(f, @(s1, o1, o1)), @(s2, @(f, o1), @(f, o1)), r3, r1) in @(MIdn_Cancel_Lem, g2, @(f, o1), r4);
Monoid
dec MonoidHomCol1 : !(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in @(N, o1); def MonoidHomCol1 = Monoid_Hom_Lem; dec MonoidHomCol2 : !(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in !(a1 : A1, b1 : A1) [@(N, a1) -> @(N, b1) -> @(N, @(s1, a1, b1))]; def MonoidHomCol2 = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in \(a1 : A1, b1 : A1) \(p1 : @(N, a1), p2 : @(N, b1)) let R1 = @(Into, A1, A2, f), R2 = !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))) in let r1 = @(PJ1, R1, R2, q), r2 = @(PJ2, R1, R2, q) in let q1 = @(r2, a1, b1), q2 = @(Op_Cong1,
90
Monoid
91
A2, s2, @(f, a1), @(f, b1), o2, p2), q3 = @(Op_Cong2, A2, s2, o2, @(f, a1), o2, p1), q4 = @(MIdn_Axm1, g2, o2) in @(Eq_Tran5, A2, @(f, @(s1, a1, b1)), @(s2, @(f, a1), @(f, b1)), @(s2, @(f, a1), o2), @(s2, o2, o2), o2, q1, q2, q3, q4); def MonoidHomCol = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in let P1 = @(N, o1), P2 = !(a : A1, b : A1) [@(N, a) -> @(N, b) -> @(N, @(s1, a, b))] in let p1 = @(MonoidHomCol1, g1, g2, p), p2 = @(MonoidHomCol2, g1, g2, p) in @(ANDS, P1, P2, p1, p2);
5.6.1
Kernel of Monoids
Definition 5.6 The set N of all elements of G mapped on the identity e’ of G’, under a homomorphism of G to G’, is a submonoid of G. This set N is called the kernel of the homomorphism.
def MoKernel = \(g1 : Monoid, g2 : Monoid) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2),
Monoid
92
o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Monoid_Hom, g1, g2)) let f = @(FST, p) in \(a1 : A1) @(Equal0, A2, @(f, a1), o2)
5.7 5.7.1
Endomorphism and Automorphism Endomorphisms
Definition 5.7 A homomorphism of a monoid into itself is called an endomorphism.
def MoEndomorp = \(G : Monoid) @(Monoid_Hom, G, G); def MoEndomorp2 = \(G : Monoid) @(Monoid_Hom2, G, G); def MoEndomorp3 = \(G : Monoid) let t = @(FST, G) in let A = @(FST, t), s = @(SND, t) in ?(F : [A -> A]) @(MoEndomorp2, G, F);
5.7.2
Automorphisms
Definition 5.8 An isomorphism of a monoid onto itself is called an automorphism.
def MoAutomorp = \(G : Monoid) @(Monoid_Isom, G, G); def MoAutomorp2 = \(G : Monoid) @(Monoid_Isom2, G, G); def MoAutomorp3 = \(G : Monoid) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in ?(F : [A -> A]) @(MoAutomorp2, G, F);
Monoid
5.8 5.8.1
93
Commutative Monoid Definition of Commutative Monoid
def Ide_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) @(And, @(Equal, A, @(s, x, o), x), @(Equal, A, @(s, o, x), x)); def Com_ax = \(A : Type(0)) \(s : [A -> A -> A]) !(x : A, y : A) @(Equal, A, @(s, x, y), @(s, y, x)); def Ax_CMO = \(A : Type(0), o : A, s : [A -> A -> A]) @(And, @(Ide_ax, A, o, s), @(And, @(Ass_ax, A, s), @(Com_ax, A, s))); def CMonoid = ?(A : Type(0), o : A, s : [A -> A -> A]) @(Ax_CMO, A, o, s); def CMO_Gen = \(A : Type(0), o : A, a : [A -> A -> A], p : @(Ax_CMO, A, o, a)) ;
5.8.2
Commutative Monoid of Natural Number
5.8.2.1
Basic Properties of Natural Numbers
def Ass_law = \(p : Nat) !(m : Nat, n : Nat) @(Equal, Nat, @(ADD, m, @(ADD, n, p)), @(ADD, @(ADD, m, n), p)); def Com_law = \(m : Nat) !(n : Nat) @(Equal, Nat, @(ADD, m, n), @(ADD, n, m));
Monoid
94
def Ide_law = \(x : Nat) @(And, @(Equal, Nat, @(ADD, x, OO), x), @(Equal, Nat, @(ADD, OO, x), x));
5.8.2.2
Proof of Associativity
def Ass_pr = \(p : Nat, m : Nat, n : Nat) let prf = @(AddAssoLem2, m, n, p) in prf;
5.8.2.3
Proof of Commutativity
def Com_pr = AddCommLem;
5.8.2.4
Proof of Identity
def Ide_pr = AddIdLem0;
5.8.2.5
Proof of Nat as a Commutative Monoid
def CMO_pr = @(ANDS, @(Ide_ax, Nat, OO, ADD), @(And, @(Ass_ax, Nat, ADD), @(Com_ax, Nat, ADD)), Ide_pr, @(ANDS, @(Ass_ax, Nat, ADD), @(Com_ax, Nat, ADD), Ass_pr, Com_pr)); def Nat_CM = @(CMO_Gen, Nat, OO, ADD, CMO_pr);
Chapter 6
Groups 6.1
Symmetries of the Square
The idea of “symmetry” is familiar to every educated person. But fewer people realize that there is a consequential algebra of symmetry. This algebra will now be introduced in the concrete case of the symmetries of the squares. Imagine a cardboard square laid on a plane with fixed axes, so that the center of the square falls on the origin of coordinates, and one side is horizontal. It is clear that the square has rotational symmetry: it is carried into itself by the following rigid motions. • R: A 90◦ rotation clockwise around its center O. • R’, R": Similar rotations through 180◦ and 270◦ . The square also has reflective symmetry; it can be carried into itself by the following rigid reflections. • H: A reflection in the horizontal axis through O. • V: A reflection in the vertical axis through O. • D: A reflection in the diagonal in quadrants I and III. • D’: A reflection in the diagonal in quadrants II and IV. Our list thus includes seven symmetries so far. The algebra of symmetries has its genesis in the fact that we can multiply two motions by performing them in succession. Thus, the product HR is obtained by first reflecting the square in a horizontal axis, then rotating clockwise through 90◦ . By experimenting with a square piece of cardboard, one can verify that this has the same net effect as D’, reflection about the diagonal from the upper left-hand to the lower right-hand corner. Alternatively, the equation HR = D’ can be checked by noting that both sides have the same effect on each vertex of the square.
95
Groups
6.2
96
Groups of Transformations
The algebra of symmetry can be extended to one-one transformation of any set S of elements whatever. Although it is often suggestive to think of the set S as a “space” (e.g., a plane or a sphere), its elements as “points”, and the bijections as “symmetries” of S with respect to suitable properties, the bijections of S satisfy some nontrivial algebraic laws in any case. To understand these laws, one must have clearly in mind the definitions of function, injection, surjection, and bijection. To illustrate these afresh, we give some new examples. • The function f (x) = e2πix maps the field of R of all real numbers into the field C of all complex numbers; its range (image) is the unit circle. • Similarly, g(z) = |z| is a function g : C ← R whose image is the set of all nonnegative real numbers. • Again, consider the following functions ϕ : Z ← Z and ψ : Z ← Z on the domain Z of all integers to itself: nϕ = 2n
{
and mψ =
m/2 0
if m is even if m is odd
By the cancellation law of multiplication ϕ is one-one; yet its range consists only of even integers, so that phi does not transform Z onto Z. On the other hand, ψ is not one-one, since all odd integers are mapped onto zero, but it does map Z onto Z; thus ψ is surjective but not injective. We turn now to the algebra of transformations. We have the following definitions. Definition 6.1 Two transformations f : [S -> T] and g : [S -> T] with the same domain S and codomain T are called equal if they have the same effect upon every point of S.
def Eq_Tran = \(S : Type(0), T : Type(0)) \(f : [S -> T], g : [S -> T]) !(x : S) @(Equal, T, @(f, x), @(g, x));
Definition 6.2 The product or composite @(Comp Tran, A, B, C, f, g) of two transformations is again defined as the result of performing them in succession; first f and then g, provided however that codomain of f is the domain of g. In other words, if f : [S -> T] and g : [T -> U], then @(Comp Tran, S, T, U, f, g) is the transformation of S into U given the following equation: def Comp_Tran =
Groups
97
\(S : Type(0), T : Type(0), U : Type(0)) \(f : [S -> T], g : [T -> U]) \(x : S) @(g, @(f, x));
@(Comp Tran, S, T, U, f, g, x) defines the effect of @(Comp Tran, S, T, U, f, g) upon any point x of S. In particular, the product of two transformations of S (into itself) is always defined. We shall now restrict our attention to this case, although almost all the identities proved below apply also to the general case, provided that the products involved are defined. Multiplication of transformations conforms to the associative law whenever the products involved are defined. Definition 6.3 The identity transformation @(Iden Tran, S) on the set S us that transformation from S to S which leaves every point of S fixed. This is stated algebraically as follows: def Iden_Tran = \(S : Type(0)) \(x : S) x;
From the above definitions there follows directly the identity law. Definition 6.4 If the transformations f : [S -> S] and g : [S -> S] have the product @(Comp Tran, S, S, S, f, g) = @(Iden Tran, S), then f is called a left-inverse of g and g is a right-inverse of f. def LInverse = \(S : Type(0)) \(f : [S -> S], g : [S -> S]) @(Equal0, [S -> S], @(Comp_Tran, S, S, S, f, g), @(Iden_Tran, S)); def RInverse = \(S : Type(0)) \(f : [S -> S], g : [S -> S]) @(Equal0, [S -> S], @(Comp_Tran, S, S, S, g, f), @(Iden_Tran, S));
These definitions are closely related to the concepts of being “one-one” (injective) and “onto” (surjective), as defined earlier. Theorem 6.1 A transformation f : [S -> S] is one-one if and only if it has a right-inverse; it is onto if and only if it has a left-inverse.
Groups
98
dec Tran_Thm11 : !(S : Type(0)) !(f : [S -> S]) [@(OneToOne, S, S, f) -> ?(g : [S -> S]) @(RInverse, S, g, f)]; dec Tran_Thm12 : !(S : Type(0)) !(f : [S -> S]) [?(g : [S -> S]) @(RInverse, S, g, f) -> @(OneToOne, S, S, f)]; dec Tran_Thm21 : !(S : Type(0)) !(f : [S -> S]) [@(Surjection, S, S, f) -> ?(g : [S -> S]) @(LInverse, S, g, f)]; dec Tran_Thm22 : !(S : Type(0)) !(f : [S -> S]) [?(g : [S -> S]) @(LInverse, S, g, f) -> @(Surjection, S, S, f)];
The meaning of two-side inverse stays the same, however, as do the following corollary. Corollary 6.1 A transformation f : [S -> S] is a bijection if and only if it has both a right-inverse and a left-inverse. When this is the case, any rightinverse of f is equal to any left-inverse of f. dec Tran_Col31 : !(S : Type(0)) !(f : [S -> S]) [@(Bijection, S, S, f) -> ?(g : [S -> S]) @(And, @(RInverse, S, g, f), @(LInverse, S, g, f))]; dec Tran_Col32 : !(S : Type(0)) !(f : [S -> S]) [?(g : [S -> S]) @(And, @(RInverse, S, g, f), @(LInverse, S, g, f)) -> @(Bijection, S, S, f)]; dec Tran_Col33 : !(S : Type(0)) !(f : [S -> S], g1 : [S -> S], g2 : [S -> S]) [@(And, @(RInverse, S, g1, f), @(LInverse, S, g2, f)) ->
Groups
99
@(Equal0, [S -> S], g1, g2)];
We now need to define the concept of Inverse. Definition 6.5 If the transformation f : [S -> S] is both right-inverse and left-inverse of transformation g : [S -> S], then f is called the inverse of g. def Inverse = \(S : Type(0)) \(f : [S -> S], g : [S -> S]) @(And, @(RInverse, S, g, f), @(LInverse, S, f, g));
Corollary 6.2 A transformation f : [S -> S] is bijective if and only if it has a (two-sided) inverse f−1 . When this is the case, any two inverses of f are equal, −1 (f−1 )
dec Tran_Col41 : !(S : Type(0)) !(f : [S -> S]) [@(Bijection, S, S, f) -> ?(g : [S -> S]) @(Inverse, S, g, f)]; dec Tran_Col42 : !(S : Type(0)) !(f : [S -> S]) [?(g : [S -> S]) @(Inverse, S, g, f) -> @(Bijection, S, S, f)]; dec Tran_Col43 : !(S : Type(0)) !(f : [S -> S], g1 : [S -> S], g2 : [S -> S]) [@(Inverse, S, g1, f) -> @(Inverse, S, g2, f) -> @(Equal0, [S -> S], g1, g2)]; dec Tran_Col44 : !(S : Type(0)) !(f : [S -> S], p : @(Bijection, S, S, f)) @(Bijection, S, S, @(INVERSE, S, f, p)); dec Tran_Col45 : !(S : Type(0)) !(f : [S -> S], p : @(Bijection, S, S, f))
Groups
100
let q = @(Tran_Col44, S, f, p) in @(Equal0, [S -> S], @(INVERSE, S, @(INVERSE, S, f, p), q), f);
where INVERSE is derived from Tran Col41 as follows: def INVERSE = \(S : Type(0)) \(f : [S -> S], p : @(Bijection, S, S, f)) let p = @(Tran_Col41, S, f, p) in @(FST, p);
6.3
Definition of Groups
The theory of groups is one of the oldest and richest branches of algebra. Groups of transformations play an important role in geometry, and finite groups are the basis of Galois’s discoveries in the theory of equations. These two fields provided the original impetus for the development of the theory of groups, whose systematic study dates from the early part of the nineteenth century. Definition 6.6 A group G is a system of elements with a binary operation which 1. is associative; 2. admits an identity satisfying the identity law; 3. admits for each element a an element a’ (called its inverse) satisfying the inverse law. In terms of PowerEpsilon, we have the following formal presentation. def Ide_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) @(And, @(Equal, A, @(s, x, o), x), @(Equal, A, @(s, o, x), x)); def Inv_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) ?(y : A) @(And, @(Equal, A, @(s, x, y), o), @(Equal, A, @(s, y, x), o));
The signature of groups is formally represented in PowerEpsilon as follows: def Sig_G = ?(A : Type(0), o : A) [A -> A -> A];
Groups
101
The axiomatic part of a group definition is represented as follows. def Ax_G = \(s : Sig_G) let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ide_ax, T, o, r), @(And, @(Ass_ax, T, r), @(Inv_ax, T, o, r))); def Ax_G2 = \(T : Type(0), o : T, r : [T -> T -> T]) @(And, @(Ide_ax, T, o, r), @(And, @(Ass_ax, T, r), @(Inv_ax, T, o, r)));
By putting things all togeter, we have def Group = ?(s : Sig_G) @(Ax_G, s); def Gr_Gen = \(s : Sig_G, p : @(Ax_G, s)) ;
Similarly, we may also define groups on type hierarchy Type(1). def Ide_ax1 = \(A : Type(1)) \(o : A, s : [A -> A -> A]) !(x : A) @(And, @(Equal1, A, @(s, x, o), x), @(Equal1, A, @(s, o, x), x)); def Inv_ax1 = \(A : Type(1)) \(o : A, s : [A -> A -> A]) !(x : A) ?(y : A) @(And, @(Equal1, A, @(s, x, y), o), @(Equal1, A, @(s, y, x), o)); def Ass_ax1 = \(A : Type(1), s : [A -> A -> A]) !(x : A, y : A, z : A) @(Equal1, A, @(s, x, @(s, y, z)), @(s, @(s, x, y), z)); def Sig_G1 = ?(A : Type(1), o : A) [A -> A -> A]; def Ax_G1 = \(s : Sig_G1) let T = @(FST, s),
Groups
102
o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ide_ax1, T, o, r), @(And1, @(Ass_ax1, T, r), @(Inv_ax1, T, o, r))); def Ax_G12 = \(T : Type(1), o : T, r : [T -> T -> T]) @(And, @(Ide_ax1, T, o, r), @(And1, @(Ass_ax1, T, r), @(Inv_ax1, T, o, r))); def Group1 = ?(s : Sig_G1) @(Ax_G1, s); def Gr_Gen1 = \(s : Sig_G1, p : @(Ax_G1, s)) ;
Groups can be defined abstractly, without reference to transformations, in many way; groups so defined are often called abstract groups.
6.3.1
Operators on Groups
From the axioms of a given group G, we can directly derive three operators, namely, the identity operator IDN, the additive operator GAD and the inverse operator INV. def IDN = \(g : Group) let s = @(FST, let T = @(FST, o = @(FST, r = @(SND, o; def GAD = \(g : Group) let s = @(FST, let T = @(FST, o = @(FST, r = @(SND, r; def INV = \(g : Group) let s = @(FST, let T = @(FST, o = @(FST, r = @(SND,
g) in s), @(SND, s)), @(SND, s)) in
g) in s), @(SND, s)), @(SND, s)) in
g), a = @(SND, g) in s), @(SND, s)), @(SND, s)) in
Groups
103
let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let ivx = @(PJ2, A2, A3, @(PJ2, A1, @(And, A2, A3), a)) in \(x : T) @(FST, @(ivx, x));
6.3.2
Postulates
Explicitly, we will have the following axioms defined for groups. The formulas Idn Axm1 and Idn Axm2 are axioms for identity o. def Idn_Axm1 = \(g : Group) let s = @(FST, g), a = @(SND, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let idx = @(PJ1, A1, @(And, A2, A3), a) in \(x : T) let P1 = @(Equal0, T, @(r, x, o), x), P2 = @(Equal0, T, @(r, o, x), x) in @(PJ1, P1, P2, @(idx, x)); def Idn_Axm2 = \(g : Group) let s = @(FST, g), a = @(SND, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let idx = @(PJ1, A1, @(And, A2, A3), a) in \(x : T) let P1 = @(Equal0, T, @(r, x, o), x), P2 = @(Equal0, T, @(r, o, x), x) in @(PJ2, P1, P2, @(idx, x));
The formulas Inv Axm1 and Inv Axm2 represent inverse laws. def Inv_Axm1 = \(g : Group)
Groups
let s = @(FST, g), a = @(SND, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let ivx = @(PJ2, A2, A3, @(PJ2, A1, @(And, A2, A3), a)) in \(x : T) let invx = @(FST, @(ivx, x)), invp = @(SND, @(ivx, x)) in let P1 = @(Equal0, T, @(r, x, invx), o), P2 = @(Equal0, T, @(r, invx, x), o) in @(PJ1, P1, P2, invp); def Inv_Axm2 = \(g : Group) let s = @(FST, g), a = @(SND, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let ivx = @(PJ2, A2, A3, @(PJ2, A1, @(And, A2, A3), a)) in \(x : T) let invx = @(FST, @(ivx, x)), invp = @(SND, @(ivx, x)) in let P1 = @(Equal0, T, @(r, x, invx), o), P2 = @(Equal0, T, @(r, invx, x), o) in @(PJ2, P1, P2, invp);
The formula Ass Axm is for associative law. def Ass_Axm = \(g : Group) let s = @(FST, g), a = @(SND, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let A1 = @(Ide_ax, T, o, r), A2 = @(Ass_ax, T, r), A3 = @(Inv_ax, T, o, r) in let ass = @(PJ1, A2, A3, @(PJ2, A1, @(And, A2, A3), a)) in ass;
104
Groups
6.3.3
105
Equivalence Relation on Groups
Among the most fundamental rules of groups are the three basic laws for equality Equal0. dec Eq_Refl0 : !(g : Group) let s = @(FST, g) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let R = @(Equal0, A) in !(x : A) @(R, x, x); dec Eq_Symm0 : !(g : Group) let s = @(FST, g) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let R = @(Equal0, A) in !(x : A, y : A) [@(R, x, y) -> @(R, y, x)]; dec Eq_Tran0 : !(g : Group) let s = @(FST, g) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let R = @(Equal0, A) in !(x : A, y : A, z : A) [@(R, x, y) -> @(R, y, z) -> @(R, x, z)];
We then represent the congruent rules of groups. dec Grp_Op_Cong1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, b : A, c : A) [@(Equal0, A, b, c) -> @(Equal0, A, @(s, a, b), @(s, a, c))]; dec Grp_Op_Cong2 : !(g : Group)
Groups
106
let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, b : A, c : A) [@(Equal0, A, b, c) -> @(Equal0, A, @(s, b, a), @(s, c, a))];
6.3.4
Basic Properties of Groups
From the axioms defined on groups, we will be very easily to derive a set of properties for groups. 6.3.4.1
Basic Properties of Inverse Operation
The lemmas Inv Lem1 and Inv Lem2 are simply the inverse results of Inv Axm1 and Inv Axm2. dec Inv_Lem1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal0, A, @(IDN, g), @(s, a, @(INV, g, a))); dec Inv_Lem2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal0, A, @(IDN, g), @(s, @(INV, g, a), a));
6.3.4.2
Basic Properties of Associativity
dec Ass_Lem : !(g : Group) let t = @(FST, let A = @(FST, o = @(FST, s = @(SND, !(x : A, y : @(Equal, A,
g) in t), @(SND, t)), @(SND, t)) in A, z : A) @(s, @(s, x, y), z), @(s, x, @(s, y, z)));
Groups
6.3.4.3
107
Basic Properties of Identity
dec Idn_Lem1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal0, A, a, @(s, a, o)); dec Idn_Lem2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) @(Equal0, A, a, @(s, o, a));
6.3.4.4
Cancellation Laws
Theorem 6.2 In any group, xa = b and ay = b have the unique solutions x = ba−1 and y = a−1 b.
dec CancelThm1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(x : A, y : A, a : A, b : A) [@(And, @(Equal0, A, @(s, x, a), b), @(Equal0, A, @(s, a, y), b)) -> @(And, @(Equal0, A, x, @(s, b, @(INV, g, a))), @(Equal0, A, y, @(s, @(INV, g, a), b)))]; dec CancelThm2 : !(g : Group) let t = @(FST, let A = @(FST, o = @(FST, s = @(SND, !(x : A, y : [@(And,
g) in t), @(SND, t)), @(SND, t)) in A, a : A, b : A)
Groups
108
@(Equal0, @(Equal0, @(And, @(Equal0, @(Equal0,
A, x, @(s, b, @(INV, g, a))), A, y, @(s, @(INV, g, a), b))) -> A, @(s, x, a), b), A, @(s, a, y), b))];
To prove CancelThm1, we need two lemmas CancelLem1 and CancelLem2 represented as follows: dec CancelLem1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(x : A, a : A, b : A) let inva = @(INV, g, a) in [@(Equal0, A, @(s, x, a), b) -> @(Equal0, A, x, @(s, b, inva))]; dec CancelLem2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(y : A, a : A, b : A) let inva = @(INV, g, a) in [@(Equal0, A, @(s, a, y), b) -> @(Equal0, A, y, @(s, inva, b))];
To prove CancelThm2, we need two lemmas CancelLem3 and CancelLem4 represented as follows: dec CancelLem3 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(x : A, a : A, b : A) let inva = @(INV, g, a) in [@(Equal0, A, x, @(s, b, inva)) -> @(Equal0, A, @(s, x, a), b)]; dec CancelLem4 : !(g : Group)
Groups
let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(y : A, a : A, b : A) let inva = @(INV, g, a) in [@(Equal0, A, y, @(s, inva, b)) -> @(Equal0, A, @(s, a, y), b)];
A complete proof CancelLem1 is given as follows. def CancelLem1 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(x : A, a : A, b : A) \(p : @(Equal0, A, @(s, x, a), b)) let e = @(IDN, g), inva = @(INV, g, a) in let q1 = p, q2 = @(Idn_Axm1, g, x), q3 = @(Eq_Symm0, g, @(s, x, e), x, q2), q4 = @(Inv_Lem1, g, a), q5 = @(Grp_Op_Cong1, g, x, e, @(s, a, inva), q4), q6 = @(Eq_Tran0, g, x, @(s, x, e), @(s, x, @(s, a, inva)), q3, q5), q7 = @(Ass_Axm, g, x, a, inva), q8 = @(Grp_Op_Cong2, g, inva, @(s, x, a), b, q1), q9 = @(Eq_Tran0, g, @(s, x, @(s, a, inva)), @(s, @(s, x, a), inva), @(s, b, inva), q7, q8) in @(Eq_Tran0, g, x, @(s, x, @(s, a, inva)), @(s, b, inva), q6, q9);
Similarly, we may prove CancelLem3. def CancelLem3 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)),
109
Groups
110
s = @(SND, @(SND, t)) in \(x : A, a : A, b : A) let e = @(IDN, g), inva = @(INV, g, a) in \(p : @(Equal0, A, x, @(s, b, inva))) let q1 = p, q2 = @(Ass_Axm, g, b, inva, a), q3 = @(Eq_Symm0, g, @(s, b, @(s, inva, a)), @(s, @(s, b, inva), a), q2), q4 = @(Inv_Axm2, g, a), q5 = @(Grp_Op_Cong1, g, b, @(s, inva, a), e, q4), q6 = @(Idn_Axm1, g, b), q7 = @(Eq_Tran0, g, @(s, b, @(s, inva, a)), @(s, b, e), b, q5, q6), q8 = @(Grp_Op_Cong2, g, a, x, @(s, b, inva), q1), q9 = @(Eq_Tran0, g, @(s, @(s, b, inva), a), @(s, b, @(s, inva, a)), b, q3, q7) in @(Eq_Tran0, g, @(s, x, a), @(s, @(s, b, inva), a), b, q8, q9);
We will now be able to give the proof of CancelThm1 and CancelThm2. def CancelThm1 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(x : A, y : A, a : A, b : A) \(p : @(And, @(Equal0, A, @(s, x, a), b), @(Equal0, A, @(s, a, y), b))) let P1 = @(Equal0, A, @(s, x, a), b), P2 = @(Equal0, A, @(s, a, y), b) in let p1 = @(PJ1, P1, P2, p), p2 = @(PJ2, P1, P2, p) in let Q1 = @(Equal0, A, x, @(s, b, @(INV, g, a))), Q2 = @(Equal0, A, y, @(s, @(INV, g, a), b)) in let q1 = @(CancelLem1, g, x, a, b, p1),
Groups
111
q2 = @(CancelLem2, g, y, a, b, p2) in @(PRODUCT, Q1, Q2, q1, q2); def CancelThm2 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(x : A, y : A, a : A, b : A) \(p : @(And, @(Equal0, A, x, @(s, b, @(INV, g, a))), @(Equal0, A, y, @(s, @(INV, g, a), b)))) let P1 = @(Equal0, A, x, @(s, b, @(INV, g, a))), P2 = @(Equal0, A, y, @(s, @(INV, g, a), b)) in let p1 = @(PJ1, P1, P2, p), p2 = @(PJ2, P1, P2, p) in let Q1 = @(Equal0, A, @(s, x, a), b), Q2 = @(Equal0, A, @(s, a, y), b) in let q1 = @(CancelLem3, g, x, a, b, p1), q2 = @(CancelLem4, g, y, a, b, p2) in @(PRODUCT, Q1, Q2, q1, q2);
Additionally, we may need the following two cancellation laws in the rest of the book. dec CancelLaw1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, b : A, c : A, d : A) [@(Equal0, A, @(s, c, a), @(s, d, a)) -> @(Equal0, A, c, d)]; dec CancelLaw2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, b : A, c : A, d : A) [@(Equal0, A, @(s, a, c), @(s, a, d)) -> @(Equal0, A, c, d)];
Groups
112
The proof of CancelLaw1 is presented below and we will leave CancelLaw2 to the interested readers as an exercise. def CancelLaw1 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(a : A, b : A, c : A, d : A) \(p : @(Equal0, A, @(s, c, a), @(s, d, a))) let e = @(IDN, g), inva = @(INV, g, a) in let p1 = @(Grp_Op_Cong2, g, inva, @(s, c, a), @(s, d, a), p), p2 = @(Ass_Axm, g, c, a, inva), p3 = @(Ass_Lem, g, d, a, inva), p4 = @(Eq_Tran0, g, @(s, c, @(s, a, inva)), @(s, @(s, c, a), inva), @(s, @(s, d, a), inva), p2, p1), p5 = @(Eq_Tran0, g, @(s, c, @(s, a, inva)), @(s, @(s, d, a), inva), @(s, d, @(s, a, inva)), p4, p3), p6 = @(Inv_Lem1, g, a), p7 = @(Inv_Axm1, g, a), p8 = @(Grp_Op_Cong1, g, c, e, @(s, a, inva), p6), p9 = @(Grp_Op_Cong1, g, d, @(s, a, inva), e, p7) in let q1 = @(Eq_Tran0, g, @(s, c, e), @(s, c, @(s, a, inva)), @(s, d, @(s, a, inva)), p8, p5), q2 = @(Eq_Tran0, g, @(s, c, e),
Groups
113
q3 q4 q5 q6 q6;
6.3.4.5
= = = =
@(s, d, @(s, @(s, d, e), q1, p9), @(Idn_Lem1, g, @(Idn_Axm1, g, @(Eq_Tran0, g, @(Eq_Tran0, g,
a, inva)),
c), d), c, @(s, c, e), @(s, d, e), q3, q2), c, @(s, d, e), d, q5, q4) in
Uniqueness of Identity
Corollary 6.3 A group has only one identity, and only one inverse a−1 for each element a. dec Uniq_Ident : !(g : Group) let t = @(FST, g), a = @(SND, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(e : A) [!(x : A) @(Equal0, A, @(s, e, x), x) -> @(Equal0, A, e, o)]; dec Uniq_Inverse : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, b : A) [@(Equal0, A, @(s, a, b), o) -> @(Equal0, A, a, @(INV, g, b))];
The proofs of Uniq Ident and Uniq Inverse are described as follows: def Uniq_Ident = \(g : Group) let t = @(FST, g), a = @(SND, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(e : A, p : !(x : A) @(Equal0, A, @(s, e, x), x)) let p1 = @(Idn_Lem1, g, e), p2 = @(p, o) in @(Eq_Tran, A, e, @(s, e, o), o, p1, p2);
Groups
114
def Uniq_Inverse = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(a : A, b : A, p : @(Equal0, A, @(s, a, b), o)) let invb = @(INV, g, b) in let p1 = @(CancelLem1, g, a, b, o, p), p2 = @(Idn_Axm2, g, invb) in @(Eq_Tran, A, a, @(s, o, invb), invb, p1, p2);
6.3.4.6
Other Postulates for Groups
Theorem 6.3 In the preceding definition of a group, the identity and inverse laws can be replaced by the weaker laws. def LIde_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) @(Equal0, A, @(s, o, x), x); def LInv_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) !(x : A) ?(y : A) @(Equal0, A, @(s, y, x), o); def LINV = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p : @(LInv_ax, A, o, s)) \(x : A) @(FST, @(p, x)); def LInv_Axm = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p : @(LInv_ax, A, o, s)) \(x : A) @(SND, @(p, x)); dec Weak_Twoinv_Lem : !(A : Type(0), o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> !(p2 : @(LInv_ax, A, o, s))
Groups
115
[@(Ass_ax, A, s) -> !(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in @(Equal0, A, x, @(s, x2, o))]];
The proof of Weak Twoinv Lem is given as follows: def Weak_Twoinv_Lem = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(p1, x), q2 = @(Eq_Symm, A, @(s, o, x), x, q1), q3 = @(SND, @(p2, x1)), q4 = @(Eq_Symm, A, @(s, x2, x1), o, q3), q5 = @(p3, x2, x1, x), q6 = @(Eq_Symm, A, @(s, x2, @(s, x1, x)), @(s, @(s, x2, x1), x), q5), q7 = @(SND, @(p2, x)), q8 = @(Op_Cong1, A, s, x2, @(s, x1, x), o, q7), q9 = @(Eq_Tran, A, @(s, @(s, x2, x1), x), @(s, x2, @(s, x1, x)), @(s, x2, o), q6, q8) in let r1 = @(Op_Cong2, A, s, x, o, @(s, x2, x1), q4), r2 = @(Eq_Tran, A, x, @(s, o, x), @(s, @(s, x2, x1), x), q2, r1) in @(Eq_Tran, A, x, @(s, @(s, x2, x1), x), @(s, x2, o), r2, q9);
Another lemma of left inverse law is described as follows:
Groups
dec Twoinv_Lem : !(A : Type(0), o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> !(p2 : @(LInv_ax, A, o, s)) [@(Ass_ax, A, s) -> !(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in @(Equal0, A, x, x2)]];
Ide ax and Inv ax can be derived from LIdn ax and LInv ax. dec Weak_Idn_Thm1 : !(A : Type(0)) !(o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> @(LInv_ax, A, o, s) -> @(Ass_ax, A, s) -> !(x : A) @(Equal0, A, @(s, x, o), x)]; dec Weak_Idn_Thm2 : !(A : Type(0)) !(o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> !(x : A) @(Equal0, A, @(s, o, x), x)];
The proof of Weak Idn Thm2 is simply represented as follows: def Weak_Idn_Thm2 = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p : @(LIde_ax, A, o, s)) p;
We then two theorems for weak inverse operator. dec Weak_Inv_Thm1 : !(A : Type(0)) !(o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> @(LInv_ax, A, o, s) -> @(Ass_ax, A, s) -> !(x : A) ?(y : A) @(Equal0, A, @(s, x, y), o)]; dec Weak_Inv_Thm2 : !(A : Type(0))
116
Groups
117
!(o : A, s : [A -> A -> A]) [@(LInv_ax, A, o, s) -> !(x : A) ?(y : A) @(Equal0, A, @(s, y, x), o)]; dec Weak_Inv_Thm : !(A : Type(0), o : A, s : [A -> A -> A]) [@(LIde_ax, A, o, s) -> @(LInv_ax, A, o, s) -> @(Ass_ax, A, s) -> !(x : A) ?(y : A) @(And, @(Equal0, A, @(s, x, y), o), @(Equal0, A, @(s, y, x), o))];
Weak Idn Thm1 can be proven using Weak Twoinv Lem by letting @(Equal0, A, x, @(s, x2, o)). Where x1 = x2 =
@(LINV, A, o, s, p2, x) @(LINV, A, o, s, p2, x1)
def Twoinv_Lem = \(A : Type(0), o : A, s : [A -> A -> A]) \(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(Weak_Twoinv_Lem, A, o, s, p1, p2, p3, x), q2 = @(Weak_Idn_Thm1, A, o, s, p1, p2, p3, x2) in @(Eq_Tran, A, x, @(s, x2, o), x2, q1, q2); def Weak_Idn_Thm1 = \(A : Type(0), o : A, s : [A -> A -> A]) \(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(SND, @(p2, x)), q2 = @(Eq_Symm, A, @(s, x1, x), o, q1), q3 = @(Op_Cong1, A, s, x, o, @(s, x1, x), q2), q4 = @(Twoinv_Lem, A, o, s, p1, p2, p3, x), q5 = @(Op_Cong2, A, s, @(s, x1, x), x, x2, q4), q6 = @(p3, x2, x1, x),
Groups
118
q7 = @(SND, @(p2, x1)), q8 = @(Op_Cong2, A, s, x, @(s, x2, x1), o, q7), q9 = @(p1, x) in @(Eq_Tran6, A, @(s, x, o), @(s, x, @(s, x1, x)), @(s, x2, @(s, x1, x)), @(s, @(s, x2, x1), x), @(s, o, x), x, q3, q5, q6, q8, q9);
Alternatively, Weak Idn Thm1 can be proven using Weak Twoinv Lem. def Weak_Idn_Thm1 = \(A : Type(0), o : A, s : [A -> A -> A]) \(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(SND, @(p2, x)), q2 = @(Eq_Symm, A, @(s, x1, x), o, q1), q3 = @(Op_Cong1, A, s, x, o, @(s, x1, x), q2), q4 = @(Weak_Twoinv_Lem, A, o, s, p1, p2, p3, x), q5 = @(Op_Cong2, A, s, @(s, x1, x), x, @(s, x2, o), q4), q6 = @(p3, x2, o, @(s, x1, x)), q7 = @(Eq_Symm, A, @(s, x2, @(s, o, @(s, x1, x))), @(s, @(s, x2, o), @(s, x1, x)), q6), q8 = @(p1, @(s, x1, x)), q9 = @(Op_Cong1, A, s, x2, @(s, o, @(s, x1, x)), @(s, x1, x), q8) in let r0 = @(p3, x2, x1, x), r1 = @(SND, @(p2, x1)),
Groups
119
r2 = @(Op_Cong2, A, s, x, @(s, x2, x1), o, r1), r3 = @(p1, x) in @(Eq_Tran8, A, @(s, x, o), @(s, x, @(s, x1, x)), @(s, @(s, x2, o), @(s, x1, x)), @(s, x2, @(s, o, @(s, x1, x))), @(s, x2, @(s, x1, x)), @(s, @(s, x2, x1), x), @(s, o, x), x, q3, q5, q7, q9, r0, r2, r3);
We now give the proofs of Weak Inv Thm2, Weak Inv Thm1, and Weak Inv Thm. def Weak_Inv_Thm2 = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p : @(LInv_ax, A, o, s)) p; def Weak_Inv_Thm1 = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(Twoinv_Lem, A, o, s, p1, p2, p3, x), q2 = @(SND, @(p2, x1)), q3 = @(Op_Cong2, A, s, x1, x, x2, q1), q4 = @(Eq_Tran, A, @(s, x, x1), @(s, x2, x1), o, q3, q2) in ; def Weak_Inv_Thm = \(A : Type(0)) \(o : A, s : [A -> A -> A])
Groups
120
\(p1 : @(LIde_ax, A, o, s), p2 : @(LInv_ax, A, o, s), p3 : @(Ass_ax, A, s)) \(x : A) let x1 = @(LINV, A, o, s, p2, x), x2 = @(LINV, A, o, s, p2, x1) in let q1 = @(Twoinv_Lem, A, o, s, p1, p2, p3, x), q2 = @(SND, @(p2, x1)), q3 = @(Op_Cong2, A, s, x1, x, x2, q1), q4 = @(Eq_Tran, A, @(s, x, x1), @(s, x2, x1), o, q3, q2) in let U1 = @(Equal0, A, @(s, x, x1), o), U2 = @(Equal0, A, @(s, x1, x), o) in let u = @(ANDS, U1, U2, q4, @(SND, @(p2, x))) in ;
There are many other postulate systems for groups. A useful one may be set up in terms of the possibility of division, as follows: Theorem 6.4 If G is a nonvoid system closed under an associative multiplication for which all equations xa = b and ay = b have solutions x and y in G, then G is a group. dec Eq_Grp_Thm : !(A : Type(0), s : [A -> A -> A]) [@(Ass_ax, A, s) -> ?(x : A, y : A) !(a : A) @(And, @(Equal0, A, @(s, x, a), a), @(Equal0, A, @(s, a, y), a)) -> !(a : A, b : A) ?(x : A, y : A) @(And, @(Equal0, A, @(s, x, a), b), @(Equal0, A, @(s, a, y), b)) -> ?(A : Type(0), o : A, s : [A -> A -> A]) @(And, @(Ide_ax, A, o, s), @(And, @(Ass_ax, A, s), @(Inv_ax, A, o, s)))];
The proof of Eq Grp Thm is given as follows: def Eq_Grp_Lem = \(A : Type(0), s : [A -> A -> A]) \(p1 : @(Ass_ax, A, s), p2 : ?(x : A, y : A) !(a : A)
Groups
@(And, @(Equal0, A, @(s, x, a), a), @(Equal0, A, @(s, a, y), a)), p3 : !(a : A, b : A) ?(x : A, y : A) @(And, @(Equal0, A, @(s, x, a), b), @(Equal0, A, @(s, a, y), b))) let o1 = @(FST, p2), o2 = @(FST, @(SND, p2)), r = @(SND, @(SND, p2)) in let R1 = \(c : A) @(Equal0, A, @(s, o1, c), c), R2 = \(c : A) @(Equal0, A, @(s, c, o2), c) in let r1 = \(c : A) @(PJ1, @(R1, c), @(R2, c), @(r, c)), r2 = \(c : A) @(PJ2, @(R1, c), @(R2, c), @(r, c)) in let u1 = \(c : A) let w = @(p3, c, o1) in let lc = @(FST, w), rc = @(FST, @(SND, w)), pc = @(SND, @(SND, w)) in let W1 = @(Equal0, A, @(s, lc, c), o1), W2 = @(Equal0, A, @(s, c, rc), o1) in let w1 = @(PJ1, W1, W2, pc), w2 = @(PJ2, W1, W2, pc) in , u2 = @(Weak_Idn_Thm1, A, o1, s, r1, u1, p1) in let V1 = \(c : A) @(Equal0, A, @(s, o1, c), c), V2 = \(c : A) @(Equal0, A, @(s, c, o1), c) in let v = \(c : A) @(ANDS, @(V2, c), @(V1, c), @(u2, c), @(r1, c)) in ; def Eq_Grp_Thm = \(A : Type(0), s : [A -> A -> A]) \(p1 : @(Ass_ax, A, s), p2 : ?(x : A, y : A) !(a : A) @(And, @(Equal0, A, @(s, x, a), a), @(Equal0, A, @(s, a, y), a)), p3 : !(a : A, b : A) ?(x : A, y : A) @(And, @(Equal0, A, @(s, x, a), b), @(Equal0, A, @(s, a, y), b))) let o1 = @(FST, p2), o2 = @(FST, @(SND, p2)), r = @(SND, @(SND, p2)) in let R1 = \(c : A) @(Equal0, A, @(s, o1, c), c), R2 = \(c : A) @(Equal0, A, @(s, c, o2), c) in let r1 = \(c : A) @(PJ1, @(R1, c), @(R2, c), @(r, c)), r2 = \(c : A) @(PJ2, @(R1, c), @(R2, c), @(r, c)) in
121
Groups
122
let u1 = \(c : A) let w = @(p3, c, o1) in let lc = @(FST, w), rc = @(FST, @(SND, w)), pc = @(SND, @(SND, w)) in let W1 = @(Equal0, A, @(s, lc, c), o1), W2 = @(Equal0, A, @(s, c, rc), o1) in let w1 = @(PJ1, W1, W2, pc), w2 = @(PJ2, W1, W2, pc) in , u2 = @(Weak_Idn_Thm1, A, o1, s, r1, u1, p1) in let V1 = \(c : A) @(Equal0, A, @(s, o1, c), c), V2 = \(c : A) @(Equal0, A, @(s, c, o1), c) in let v1 = \(c : A) @(ANDS, @(V2, c), @(V1, c), @(u2, c), @(r1, c)), v2 = @(Weak_Inv_Thm, A, o1, s, r1, u1, p1) in let W1 = @(Ide_ax, A, o1, s), W2 = @(Inv_ax, A, o1, s), W3 = @(Ass_ax, A, s) in let w = @(ANDS, W1, @(And, W3, W2), v1, @(ANDS, W3, W2, p1, v2)) in ;
6.4
Examples
6.4.1
Integers
6.4.1.1
Definition of Integers
Now we extend our type Nat of natural numbers to a type Int of integers (both positive and negative). Here “extension” is to be loosely interpreted, since Nat will not actually be a subset of Int. But Int will include an “isomorphic copy” of Nat. 1. A negative integer can be named by using two natural numbers and a subtraction symbol: 2 − 3, 5 − 10, etc. For instance, we could try to take the integer −1 to be the pair ⟨2, 3⟩ of natural numbers. 2. We can define an equivalence relation sim such that ⟨2, 3⟩ ∼ ⟨0, 1⟩. Then for the type Int of all integers, we can take the set of all equivalence classes: Int = (Nat × Nat)/ ∼ To call a pair of natural numbers a difference, then an integer will be an equivalence class of differences. Consequently we can formulate the following definition: In terms of PowerEpsilon, Int is defined as follows:
Groups
123
def Int = !(Ti : Prop) [[Nat -> Nat -> Ti] -> Ti];
6.4.1.2
Function Definitions for Int
6.4.1.3
Constructors of Int
The constructor of Int is defined as a function INT which takes two natural numbers u and v as a input and generate an integer. def INT = \(u : Nat, v : Nat) \(Ti : Prop, z : [Nat -> Nat -> Ti]) @(z, u, v);
6.4.1.4
Canonical Functions of Int
The following canonical functions are defined for Int. def PRO1 = \(t : Int) @(t, Nat, \(x : Nat, y : Nat) x); def PRO2 = \(t : Int) @(t, Nat, \(x : Nat, y : Nat) y); def IEQ = \(i1 : Int, i2 : Int) @(EQUAL, @(ADD, @(PRO1, i1), @(PRO2, i2)), @(ADD, @(PRO1, i2), @(PRO2, i1))); def ILS = \(i1 : Int, i2 : Int) @(LESS, @(ADD, @(PRO1, i1), @(PRO2, i2)), @(ADD, @(PRO1, i2), @(PRO2, i1))); def IADD = \(i1 : Int, i2 : Int) @(INT, @(ADD, @(PRO1, i1), @(PRO1, i2)), @(ADD, @(PRO2, i1), @(PRO2, i2))); def NEG = \(i : Int) @(INT, @(PRO2, i), @(PRO1, i)); def ITIMES = \(i1 : Int, i2 : Int) @(INT, @(ADD,
Groups
124
@(TIMES, @(TIMES, @(ADD, @(TIMES, @(TIMES,
@(PRO1, i1), @(PRO1, i2)), @(PRO2, i1), @(PRO2, i2))), @(PRO1, i1), @(PRO1, i2)), @(PRO2, i1), @(PRO1, i2))));
def EE = \(n : Nat) @(INT, n, OO);
where IEQ is a Boolean function to check whether two given integers are equal or not. Given two integers i1 and i2, ILS is a Boolean function to check whether i1 is less than i2 or not. IADD is an addition function, ITIMES is a multiplication function and NEG is a negative function for integers. IEE is isomorphic embedding function which embeds Nat into Int.
6.4.2
Group of Integers
The set of integers defined as Int with the operations described above forms a group. dec Int_Ax_Gr_Pr : @(And, @(Ide_ax, Int, IOO, IADD), @(And, @(Ass_ax, Int, IADD), @(Inv_ax, Int, IOO, IADD))); def Int_Gr = @(Gr_Gen, , Int_Ax_Gr_Pr);
6.4.3
Group of Nat with Modulo Additive Operation
In giving the time of day, it is customary to count only up to 12, and then to begin over again. This simple idea of throwing away the multiples of a fixed number 12 is the basis of the arithmetical notion of congruence. We call two integers congruent “modulo 12” if they differ only by an integral multiple of 12. For instance, 7 ad 19 are so congruent. def ADDMODn = \(n3 : Nat, n1 : Nat, n2 : Nat) @(ADDMOD, n1, n2, n3); dec Nat_Ax_Gr_Pr : !(n : Nat) @(And, @(Ide_ax, Nat, OO, @(ADDMODn, n)), @(And, @(Ass_ax, Nat, @(ADDMODn, n)), @(Inv_ax, Nat, OO, @(ADDMODn, n)))); def Nat_Gr = \(n : Nat) @(Gr_Gen, , @(Nat_Ax_Gr_Pr, n));
Groups
125
dec Nat_Gen_Ax_Pr : !(n : Nat) @(Gen_ax, Nat, OO, @(ADDMODn, n)); def Nat_Mod_Gr = \(n : Nat) @(Cycl_Gr_Gen, @(Nat_Gr, n), @(Nat_Gen_Ax_Pr, n));
6.4.4
Group of Transformations
Theorem 6.5 The set S of all bijections of any space P onto itself is a group of transformation.
dec Biject_Ax_SGr_Pr : !(S : Type(0)) let P = \(f : [S -> S]) @(Bijection, S, S, f) in @(And, @(And1, @(Ide_ax, [S -> S], @(Iden_Tran, S), @(Comp_Tran, S, S, S)), @(And1, @(Ass_ax, [S -> S], @(Comp_Tran, S, S, S)), @(Inv_ax, [S -> S], @(Iden_Tran, S), @(Comp_Tran, S, S, S)))), @(Sub_ax, [S -> S], @(Iden_Tran, S), @(Comp_Tran, S, S, S), P)); def Biject_SGrs = \(S : Type(0)) let Z = S], @(Iden_Tran, S), @(Comp_Tran, S, S, S)>, P = \(f : [S -> S]) @(Bijection, S, S, f) in ;
6.4.5
Further Examples
In this section, we give some more examples without formal presentation in PowerEpsilon. The interested reader may use these examples their own PowerEpsilon programs. The symmetries of a cube form a a interesting group. Geometrically speaking, these symmetries are the one-one transformations which preserve distances
Groups
126
on the cube. They are known as “isometries”, and are 48 numbers. To see this, note that any initial vertex can be carried into any one of the eight vertices. After transform of any one vertex has been fixed, the three adjacent vertices can be permuted in any of six ways, giving 6 × 8 = 48 possibilities. When one vertex and the three adjacent vertices occupy known positions, every point of the cube is in fixed position, so the whole symmetry is known. Hence the cube has exactly 48 symmetries. Many of them have special geometrical properties, such as the one which reflects each point into the diametrically opposite point. A familiar group containing an infinite number of transformations is the socalled Euclidean group. This consists of the “isometries” of the plane – or, in the language of elementary geometry, of the transformations under which the plane is congruent to itself. It is made up of products of translations, rigid rotations, and reflections. Another group consists of the “similarity” transformations of space – those one-one transformations which multiply all distances by constant factor k > 0 (a factor of proportionality). The rigid motions of the surface of any sphere into itself again constitute a group. The isometries of the plane leaving invariant a regular hexagonal network form another interesting group. Again, a rubber band held in a straight line between fixed endpoints P and Q may be deformed in many ways along this line. All such deformations form a group (the group of so-called “homeomorphisms” of the segment PQ). Generally speaking, those one-one transformations of any set of elements which preserve any given property or properties of these elements form a group. Felix Klein (Erlanger Programm, 1872) has eloquently described how the different branches of geometry can be regarded as the study of those properties of suitable spaces which are preserved under appropriate groups of transformations. Thus Euclidean geometry deals with those properties of space preserved under all isometries, and topology with those which preserved under homomorphisms.
6.5 6.5.1
Isomorphism Isomorphism of Groups
Consider the transformation x 7→ log x on the domain of real numbers. It is well known that as x increases in the interval 0 < x < +∞, log x increases continuously in the interval −∞ < y < +∞; that is, the correspondence is one-one between the system of positive real numbers and the system of all real numbers (the inverse transformation being y 7→ ey ). Moreover log (xy) = log x + log y for all x, y: we can replace computations of products by parallel computations with sums. This is indeed the main practical use of logarithms!
Groups
127
This is instance of the general concept of “isomorphism”. This concept is simple and also important for groups. Definition 6.7 By an isomorphism between two groups G and G’ is meant a bijection a ↔ a’ between their elements which preserves group multiplication – i.e., which is such that if a 7→ a’ and b ↔ b’, then ab ↔ a’b’. In terms of PowerEpsilon, two different formulations will be given. The first, Group Isom, says that two groups g1 and g2 are isomorphism if and only if there exists a bijection f in between g1 and g2 satisfying the isomorphic conditions. def Group_Isom = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in ?(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) -> @(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]);
The second, Group Isom2, says that two groups g1 and g2 are isomorphism under a given bijection f in between g1 and g2 satisfying the isomorphic conditions. def Group_Isom2 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(p, a1, a2) -> @(p, b1, b2) -> @(p, @(s1, a1, b1), @(s2, a2, b2))]);
The only difference between Group Isom and Group Isom2 is that in the first the existence of a bijection f is given and in the second a bijection f is explicitly presented.
Groups
6.5.2
128
Isomorphism of Sub-Groups
We now define the concept of isomorphism of subgroups. The concept of subgroups will be defined in the Section 6.7. def SGroup_Isom2 = \(h1 : Subgroup2, h2 : Subgroup2) let g1 = @(FST, h1), P1 = @(FST, @(SND, h1)), g2 = @(FST, h2), P2 = @(FST, @(SND, h2)) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(P1, a1) -> @(P1, b1) -> @(P2, a2) -> @(P2, b2) -> @(p, a1, a2) -> @(p, b1, b2) -> @(And, @(And, @(P1, @(s1, a1, b1)), @(P2, @(s2, a2, b2))), @(p, @(s1, a1, b1), @(s2, a2, b2)))]); def SGroup_Isom3 = \(h1 : Subgroup2, g2 : Group) let g1 = @(FST, h1), P1 = @(FST, @(SND, h1)) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(P2 : [A2 -> Type(0)], f : [A1 -> A2]) @(And, @(Bijection, A1, A2, f), !(a1 : A1, b1 : A1, a2 : A2, b2 : A2) let p = \(a1 : A1, a2 : A2) @(Equal0, A2, a2, @(f, a1)) in [@(P1, a1) -> @(P1, b1) -> @(P2, a2) -> @(P2, b2) -> @(p, a1, a2) -> @(p, b1, b2) -> @(And, @(And, @(P1, @(s1, a1, b1)), @(P2, @(s2, a2, b2))),
Groups
129
@(p, @(s1, a1, b1), @(s2, a2, b2)))]);
Thus, in the first example, we have described an isomorphism between the group of positive real numbers under multiplication, and that of all real numbers under addition. In the second, we have pointed out the isomorphism of the additive group of the integers mod 3 with the group of rotational symmetries of the equilateral triangle. Similarly, the mapping 0 7→ 1, 1 7→ 2, 2 7→ 4, 3 7→ 3 is an isomorphism from the group of integers under addition mod 4 to the group of nonzero integers mod 5 under multiplication. It is convenient to check this result by comparing the group table for the integers under addition mod 4 with that for the nonzero elements of Z5 under multiplication. In turn, the group of the integers under addition modulo 4 is isomorphic with the group of rotation symmetries of the square. That the bijection 0 ↔ I, 1 ↔ R, 2 ↔ R’, 3 ↔ R" is an isomorphism can be checked easily. The notion of isomorphism is technically valuable because it gives form to the recognition that the same abstract group-theoretic situation can arise in entirely different contexts. The fact isomorphic groups are abstractly the same (and differ only in the notation for their elements) can be seen in a number of ways. Thus, by definition, two finite groups g1 and g2 are isomorphic if and only if every group table for g1 yields a group table for g2, by appropriate substitution. It turns out that g2 is Abelian if and only if g1 is; that is, any isomorphic image of a finite Abelian group is Abelian. Again, isomorphism behaves like equality in another respect.
6.5.3
Properties of Isomorphism of Groups
Theorem 6.6 The relation “G is isomorphic to G’” is a reflexive, symmetric, and transitive relation between groups.
dec GIsom_Relf : @(Refl0, Group, Group_Isom); dec GIsom_Symm : @(Symm0, Group, Group_Isom); dec GIsom_Tran : @(Tran0, Group, Group_Isom); It is worth observing that 6.6 hold equally for isomorphisms between integral domains we are going to study, and indeed for isomorphisms between algebraic systems of any kind whatever. Theorem 6.7 Under an isomorphism between two groups, the identity elements correspond and the inverses of corresponding elements correspond.
Groups
130
In terms of PowerEpsilon, we have dec Group_Isom_Thm1 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Isom, g1, g2)) let f = @(FST, p) in @(And, @(Equal, A2, @(f, o1), o2), !(a : A1) @(Equal, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a))));
The proof of Group Isom Thm1 is given as follows. First we need in additional two lemmas Group Isom Thm11 and Group Isom Thm12. dec Group_Isom_Thm11 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Isom, g1, g2)) let f = @(FST, p) in @(Equal, A2, @(f, o1), o2); dec Group_Isom_Thm12 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Isom, g1, g2)) let f = @(FST, p) in !(a : A1) @(Equal, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a)));
The proof of Group Isom Thm11 is given as follows: def Group_Isom_Thm11 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in
Groups
131
\(p : @(Group_Isom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let Q1 = @(Bijection, A1, A2, f), Q2 = !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))) in let q1 = @(PJ1, Q1, Q2, q), q2 = @(PJ2, Q1, Q2, q) in let R1 = @(Surjection, A1, A2, f), R2 = @(Injection, A1, A2, f) in let r1 = @(PJ1, R1, R2, q1), r2 = @(PJ2, R1, R2, q1) in let U1 = @(Into, A1, A2, f), U2 = @(OneToOne, A1, A2, f) in let u1 = @(PJ1, U1, U2, r2), u2 = @(PJ2, U1, U2, r2) in let e1 = @(FST, @(r1, o2)), w1 = @(SND, @(r1, o2)) in let t1 = @(q2, e1, o1), t2 = @(Eq_Symm, A2, o2, @(f, e1), w1), t3 = @(Op_Cong2, A2, s2, @(f, o1), @(f, e1), o2, t2), t4 = @(Eq_Tran3, A2, @(f, @(s1, e1, o1)), @(s2, @(f, e1), @(f, o1)), @(s2, o2, @(f, o1)), t1, t3), t5 = @(Idn_Axm2, g2, @(f, o1)), t6 = @(Eq_Tran3, A2, @(f, @(s1, e1, o1)), @(s2, o2, @(f, o1)), @(f, o1), t4, t5) in let a1 = @(s1, e1, o1), b1 = e1 in let v1 = @(Idn_Axm1, g1, e1), v2 = @(u1, a1, b1, v1), v3 = @(Eq_Symm, A2, @(f, @(s1, e1, o1)), @(f, e1), v2), v4 = @(Eq_Tran3, A2, o2, @(f, e1), @(f, @(s1, e1, o1)), w1, v3), v5 = @(Eq_Tran3, A2, o2, @(f, @(s1, e1, o1)), @(f, o1), v4, t6) in @(Eq_Symm, A2, o2, @(f, o1), v5);
We then prove Group Isom Thm12 for inverse operation. def Group_Isom_Thm12 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in
Groups
let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Isom, g1, g2)) let f = @(FST, p), q = @(SND, p) in \(a : A1) let Q1 = @(Bijection, A1, A2, f), Q2 = !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))) in let q1 = @(PJ1, Q1, Q2, q), q2 = @(PJ2, Q1, Q2, q) in let R1 = @(Surjection, A1, A2, f), R2 = @(Injection, A1, A2, f) in let r1 = @(PJ1, R1, R2, q1), r2 = @(PJ2, R1, R2, q1) in let U1 = @(Into, A1, A2, f), U2 = @(OneToOne, A1, A2, f) in let u1 = @(PJ1, U1, U2, r2), u2 = @(PJ2, U1, U2, r2) in let e1 = @(FST, @(r1, o2)), w1 = @(SND, @(r1, o2)) in let inva = @(INV, g1, a), invf = @(INV, g2, @(f, a)) in let p1 = @(q2, a, inva), p2 = @(Inv_Axm1, g1, a), p3 = @(u1, @(s1, a, inva), o1, p2), p4 = @(Group_Isom_Thm11, g1, g2, p), p5 = @(Eq_Symm, A2, @(f, @(s1, a, inva)), @(s2, @(f, a), @(f, inva)), p1), p6 = @(Eq_Tran4, A2, @(s2, @(f, a), @(f, inva)), @(f, @(s1, a, inva)), @(f, o1), o2, p5, p3, p4), p7 = @(Inv_Axm1, g2, @(f, a)), p8 = @(Eq_Symm, A2, @(s2, @(f, a), invf), o2, p7), p9 = @(Eq_Tran3,
132
Groups
133
A2, @(s2, @(f, a), @(f, inva)), o2, @(s2, @(f, a), invf), p6, p8) in @(CancelLaw2, g2, @(f, a), @(f, inva), invf, p9);
Finally we will be able to prove Group Isom Thm1. def Group_Isom_Thm1 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Isom, g1, g2)) let f = @(FST, p) in let P1 = @(Equal, A2, @(f, o1), o2), P2 = !(a : A1) @(Equal, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a))) in let p1 = @(Group_Isom_Thm11, g1, g2, p), p2 = @(Group_Isom_Thm12, g1, g2, p) in @(ANDS, P1, P2, p1, p2);
We shall finally prove a remarkable result of Cayley, which can be interpreted as demonstrating the completeness of our postulates on the multiplication of transformations. Theorem 6.8 Any abstract group G is isomorphic with a group of transformations. dec Group_Isom_Thm2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let S = [A -> A] in ?(Q : [S -> Type(0)]) let to = @(Iden_Tran, A), ts = @(Comp_Tran, A, A, A) in @(And, @(And,
Groups
134
@(Sub_ax, S, to, ts, Q), @(And, @(Ide_ax, S, to, ts), @(And, @(Ass_ax, S, ts), @(Inv_ax, S, to, ts)))), ?(f : [A -> S]) @(And, @(SBijection, A, S, Q, f), !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y)))));
To prove Group Isom Thm2, we need two lemmas, namely, Group Isom Thm21 and Group Isom Thm22. dec Group_Isom_Thm21 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let S = [A -> A] in let to = @(Iden_Tran, A), ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, a, x)) in @(And, @(Sub_ax, S, to, ts, P), @(And, @(Ide_ax, S, to, ts), @(And, @(Ass_ax, S, ts), @(Inv_ax, S, to, ts)))); dec Group_Isom_Thm22 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let S = [A -> A] in let to = @(Iden_Tran, A), ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, a, x)) in ?(f : [A -> S]) @(And, @(SBijection, A, S, P, f), !(x : A, y : A)
Groups
135
@(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y))));
The proof of Group Isom Thm2 is finally given as follows: def Group_Isom_Thm2 = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let S = [A -> A] in let to = @(Iden_Tran, A), ts = @(Comp_Tran, A, A, A) in let P = \(h : S) ?(a : A) @(Equal0, S, h, \(x : A) @(s, a, x)) in let P1 = @(And, @(Sub_ax, S, to, ts, P), @(And, @(Ide_ax, S, to, ts), @(And, @(Ass_ax, S, ts), @(Inv_ax, S, to, ts)))), P2 = ?(f : [A -> S]) @(And, @(SBijection, A, S, P, f), !(x : A, y : A) @(Equal0, S, @(f, @(s, x, y)), @(ts, @(f, x), @(f, y)))) in let p1 = @(Group_Isom_Thm21, g), p2 = @(Group_Isom_Thm22, g) in ;
6.6 6.6.1
Cyclic and Finite Groups Cyclic Groups
In any group, the integral powers am of the group element a can be defined separately for positive, zero, and negative exponents. We define a function GPOW for this purpose which represented recursively as follows: dec GPOW : !(T : Type(0)) [T -> [T -> T -> T] -> T -> Int -> T];
Groups
136
def GPOW = \(T : Type(0), o : T, r : [T -> T -> T]) \(a : T, m : Int) @(GIF_THEN_ELSE0, T, @(ILS, m, IOO), @(GIF_THEN_ELSE0, T, @(IEQ, m, IOO), o, @(r, a, @(GPOW, T, o, r, a, @(IADD, m, III)))), @(GIF_THEN_ELSE0, T, @(IEQ, m, IOO), o, @(r, a, @(GPOW, T, o, r, a, @(IMINUS, m, III)))));
If m > 0, we have −1 m
am = a · a . . . a, a0 = o, (a
) .
(6.1)
Two of the usual laws of exponents hold, r s
ar as = ar+s , (a ) = ars .
(6.2)
r
On the other hand, (ab) ̸= ar bs in general. If both exponents r and s are positive, the laws 6.2 follow directly from the induction. In the other cases for the first law of 6.2, one of the r or s may be zero, in which case 6.2 is immediate, or both r and s may be negative, in which case the result comes directly from the last part of the definition 6.1. There remains the case when one exponent is negative and one positive, say r = −m and s = n, with m > 0 and n > 0. Then −1 m n
a−m an = (a
−1
) a = (a
. . . a−1 )(a . . . a)
(6.3)
By the associative law we can cancel successive a’s against the inverses a−1 . In case n ≥ m we have left an−m , while if n < m, we have some inverses left, −1 m−n (a ) or a−(m−n) . In both cases we have the desired law a−m an = an+(−m) . The second half of 6.2 can be established even more simply. If s is positive, then by the first half of 6.2, ar ar . . . ar = ar+r+...+r = ars .
(6.4) −1
If s is negative, we can make a similar expansion, noting that (ar ) = a−r whether r is positive, zero, or negative. If s is zero, the result is immediate. Definition 6.8 The order of an element a in a group is the least positive integer m such that am = o; if no positive power of a equals the identity o, a has order infinity.
Groups
137
def Is_Ord_Elem = \(A : Type(0)) \(o : A, s : [A -> A -> A], a : A, m : Int) @(And, @(Equal0, A, @(GPOW, A, o, s, a, m), o), !(n : Int) [@(Equal0, A, @(GPOW, A, o, s, a, n), o) -> @(ILe, m, n)]);
Definition 6.9 The group G is cyclic if it contains some one element x whose powers exhaust G; this element is said to generate the group.
def Gen_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) ?(x : A) !(y : A) ?(m : Int) @(Equal0, A, @(GPOW, A, o, s, x, m), y);
We then will be able to define a cyclic group. def Ax_CyclG = \(s : Sig_G) let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ax_G, ), @(Gen_ax, A, o, r)); def Cycle_Group = ?(s : Sig_G) @(Ax_CyclG, s); def Cycle_Group2 = ?(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(Gen_ax, A, o, r); def Cycl_Gr_Gen = \(G : Group) let s = @(FST, let A = @(FST, o = @(FST, r = @(SND,
G) in s), @(SND, s)), @(SND, s)) in
Groups
138
\(p : @(Gen_ax, A, o, r)) ;
The generator of a cyclic group is defined as follows. def CYCGEN = \(g : Cycle_Group2) let s = @(SND, g) in @(FST, s);
For example, the group of all rotations of a square into itself consists of the four powers R, R2 , R3 , and R4 = I of the clockwise rotation R of 90◦ . This group might equally well have been generated by R3 , which is a counterclockwise 2 3 rotation of 90◦ , since R2 = (R3 ) , R = (R3 ) Theorem 6.9 If an element a generates the cyclic group G, then the order of a determines G to within isomorphism. In fact, if the order of a is infinite, G is isomorphic with the additive group of the integers; if the order of a is some finite integer n, G is isomorphic with the additive group of the integers module n. In terms of PowerEpsilon, we divide the whole theorem stated above into four formulas, namely, Cycle Thm1, Cycle Thm2, InfIsomThm and FiniteIsomThm. dec Cycle_Thm1 : !(g1 : Cycle_Group2, g2 : Cycle_Group2) !(p1 : @(Is_Finite_CGrp, g1), p2 : @(Is_Finite_CGrp, g2)) let gg1 = @(FST, g1), gg2 = @(FST, g2) in let n1 = @(CYCORD, g1, p1), n2 = @(CYCORD, g2, p2) in [@(Equal, Int, n1, n2) -> @(Group_Isom, gg1, gg2)]; dec Cycle_Thm2 : !(g1 : Cycle_Group2, g2 : Cycle_Group2) !(p1 : @(Not0, @(Is_Finite_CGrp, g1)), p2 : @(Not0, @(Is_Finite_CGrp, g2))) let gg1 = @(FST, g1), gg2 = @(FST, g2) in @(Group_Isom, gg1, gg2); dec InfIsomThm : !(G : Cycle_Group2) let GG = @(FST, G) in [@(Not0, @(Is_Finite_CGrp, G)) -> @(Group_Isom, GG, Int_Gr)]; dec FiniteIsomThm : !(G : Cycle_Group2, p : @(Is_Finite_CGrp, G)) let GG = @(FST, G) in
Groups
139
let n = @(IPJ, @(FST, p)) in @(Group_Isom, GG, @(Nat_Gr, n));
6.6.1.1
Proof of FiniteIsomThm
dec FiniteIsomLem : !(G : Cycle_Group2, p : @(Is_Finite_CGrp, G)) let GG = @(FST, G), q = @(SND, G) in let s = @(FST, GG) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let n = @(IPJ, @(FST, p)) in let a = @(FST, q), g = @(SND, q) in let f = \(x : A) @(IPJ, @(FST, @(g, x))) in @(Group_Isom2, GG, @(Nat_Gr, n), f); def FiniteIsomThm = \(G : Cycle_Group2, p : @(Is_Finite_CGrp, G)) let GG = @(FST, G), q = @(SND, G) in let s = @(FST, GG) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let n = @(IPJ, @(FST, p)) in let a = @(FST, q), g = @(SND, q) in let f = \(x : A) @(IPJ, @(FST, @(g, x))) in ;
6.6.1.2
Proof of InfIsomThm
dec InfiniteIsomLem : !(G : Cycle_Group2, p : @(Not0, @(Is_Finite_CGrp, G))) let GG = @(FST, G), q = @(SND, G) in let s = @(FST, GG) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let a = @(FST, q), g = @(SND, q) in let f = \(x : A) @(FST, @(g, x)) in @(Group_Isom2, GG, Int_Gr, f); def InfIsomThm = \(G : Cycle_Group2, p : @(Not0, @(Is_Finite_CGrp, G)))
Groups
140
let GG = @(FST, G), q = @(SND, G) in let s = @(FST, GG) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let a = @(FST, q), g = @(SND, q) in let f = \(x : A) @(FST, @(g, x)) in ;
6.6.1.3
Proof of CyclThm1
dec FinIsomLem : !(g1 : Cycle_Group2, g2 : Cycle_Group2) !(p1 : @(Is_Finite_CGrp, g1), p2 : @(Is_Finite_CGrp, g2)) let gg1 = @(FST, g1), gg2 = @(FST, g2) in let n1 = @(CYCORD, g1, p1), n2 = @(CYCORD, g2, p2) in [@(Equal, Int, n1, n2) -> @(Group_Isom, gg1, @(Nat_Gr, @(IPJ, n1))) -> @(Group_Isom, gg2, @(Nat_Gr, @(IPJ, n2))) -> @(Group_Isom, gg1, gg2)]; def Cycle_Thm1 = \(g1 : Cycle_Group2, g2 : Cycle_Group2) \(p1 : @(Is_Finite_CGrp, g1), p2 : @(Is_Finite_CGrp, g2)) let gg1 = @(FST, g1), gg2 = @(FST, g2) in let n1 = @(CYCORD, g1, p1), n2 = @(CYCORD, g2, p2) in \(q : @(Equal, Int, n1, n2)) let r1 = @(FiniteIsomThm, g1, p1), r2 = @(FiniteIsomThm, g2, p2) in @(FinIsomLem, g1, g2, p1, p2, q, r1, r2);
6.6.1.4
Proof of CyclThm2
dec InfIsomLem : !(g1 : Cycle_Group2, g2 : Cycle_Group2) let gg1 = @(FST, g1), gg2 = @(FST, g2) in [@(Group_Isom, gg1, Int_Gr) -> @(Group_Isom, gg2, Int_Gr) -> @(Group_Isom, gg1, gg2)]; def Cycle_Thm2 = \(g1 : Cycle_Group2, g2 : Cycle_Group2) \(p1 : @(Not0, @(Is_Finite_CGrp, g1)),
Groups
141
p2 : @(Not0, @(Is_Finite_CGrp, g2))) let gg1 = @(FST, g1), gg2 = @(FST, g2) in let r1 = @(InfIsomThm, g1, p1), r2 = @(InfIsomThm, g2, p2) in @(InfIsomLem, g1, g2, r1, r2);
6.6.2
Finite Groups
6.6.2.1
Finite Cyclic Groups
Definition 6.10 A cyclic group is finite if and only if there is a least positive integer m such that am = o.
def Is_Finite_CGrp = \(g : Cycle_Group2) let gg = @(FST, g) in let t = @(FST, gg) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let a = @(CYCGEN, g) in ?(m : Int) @(Is_Ord_Elem, A, o, s, a, m); def CYCORD = \(g : Cycle_Group2, p : @(Is_Finite_CGrp, g)) @(FST, p);
6.6.2.2
Finite Groups
The group of the square is not cyclic, and H; indeed we have R0 R R2 R3 H HR HR2 HR3
but is generated by the two elements R = = = = = = = =
I R R′ R” H D′ V D
Groups
142
The elements of the group are thus represented uniquelyl as Hi Rj with i = 0, 1 and j = 0, 1, 2, 3. Furthermore, H and R satisfy R4 = I H2 = I RH = HR3 These are called “defining relations” because they suffice to put the product of any two elements i Rj (i = 0, 1) into the same form. For example, D′ V = HRHR2 = HHR2 R2 = IR = R. Since a finite group will always contain some cyclic generators, a finite group can be defined alternatively as follows: def Is_Finite_Grp = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in ?(m : Nat) !(a : A) @(Is_Ord_Elem, A, o, s, a, @(EE, m)); def GRPORD = \(g : Group, p : @(Is_Finite_Grp, g)) @(FST, p);
6.6.2.3
Finite Subgroups
Similarly, we will be able to define the concept of finite subgroups. def Finite_Subgroup = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in ?(m : Nat) !(a : A) [@(P, a) -> @(Is_Ord_Elem, A, o, r, a, m)]; def SGRPORD = \(g : Subgroup2)
Groups
143
\(p : @(Finite_Subgroup, g)) @(FST, p);
6.6.3
Properties of Cyclic and Finite Groups
Theorem 6.10 If an element a generates the cyclic group G, then the order of a determines G to within isomorphism. In fact, if the order of a is infinite, G is isomorphic with the additive group of the integers; if the order of a is some finite integer n, G is isomorphic with the additive group of the integers module n. In terms of PowerEpsilon, we split the theorem into the following four formulas. dec Cycle_Thm1 : !(g1 : Cycle_Group2, g2 : Cycle_Group2) !(p1 : @(Is_Finite_CGrp, g1), p2 : @(Is_Finite_CGrp, g2)) let gg1 = @(FST, g1), gg2 = @(FST, g2) in let n1 = @(CYCORD, g1, p1), n2 = @(CYCORD, g2, p2) in [@(Equal, Int, n1, n2) -> @(Group_Isom, gg1, gg2)]; dec Cycle_Thm2 : !(g1 : Cycle_Group2, g2 : Cycle_Group2) !(p1 : @(Not0, @(Is_Finite_CGrp, g1)), p2 : @(Not0, @(Is_Finite_CGrp, g2))) let gg1 = @(FST, g1), gg2 = @(FST, g2) in @(Group_Isom, gg1, gg2); dec InfIsomThm : !(G : Cycle_Group2) let GG = @(FST, G) in [@(Not0, @(Is_Finite_CGrp, G)) -> @(Group_Isom, GG, Int_Gr)]; dec FiniteIsomThm : !(G : Cycle_Group2, p : @(Is_Finite_CGrp, G)) let GG = @(FST, G) in let n = @(IPJ, @(FST, p)) in @(Group_Isom, GG, @(Nat_Gr, n));
6.7
Sub-Groups
Many groups are contained in larger groups. Thus, the group of rotations of the square is a part of the group of all symmetries of the square. Again, the group of the eight permutations of the vertices of the square induced by symmetries
Groups
144
is a part of the group of all 4! = 24 permutations of these vertices. The group of the even integers under addition is a part of the group of all integers under addition. These examples suggest the concept of a subgroup. Definition 6.11 A subset S of a group G is called a subgroup of G if S is itself a group with respect to the binary operation of G. def Sub_ax = \(A : Type(0)) \(o : A, s : [A -> A -> A]) \(S : [A -> Type(0)]) @(And, @(S, o), @(And, !(a : A) ?(b : A) @(And, @(Equal0, A, @(s, a, b), o), [@(S, a) -> @(S, b)]), !(a : A, b : A) [@(S, a) -> @(S, b) -> @(S, @(s, a, b))])); def Ax_SubG = \(s : Sig_G) let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in ?(S : [A -> Type(0)]) @(And, @(Ax_G, s), @(Sub_ax, A, o, r, S)); def Subgroup = ?(s : Sig_G) @(Ax_SubG, s); def Subgroup2 = ?(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in ?(P : [A -> Type(0)]) @(Sub_ax, A, o, r, P);
In any group G, the set consisting of the identity o alone is a subgroup. dec Triv_Subgrp_Lem : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in
Groups
145
let P = \(a : A) @(Equal0, A, a, o) in @(Sub_ax, A, o, r, P); def Triv_Subgroup = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, o) in ;
The whole group G is also a subgroup of itslf. dec Total_Subgrp_Lem : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, a) in @(Sub_ax, A, o, r, P); def Total_Subgroup = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = \(a : A) @(Equal0, A, a, a) in ;
Subgroups of G other than the trivial (“improper”) subgroups are called “proper subgroups”. dec Pred_Cong1 : !(A : Type(0), P : [A -> Type(0)]) !(a : A, b : A) [@(Equal0, A, a, b) -> @(P, a) -> @(P, b)]; dec Pred_Cong2 : !(A : Type(0), P : [A -> Type(0)]) !(a : A, b : A) [@(Equal0, A, a, b) -> @(P, b) -> @(P, a)];
Theorem 6.11 A nonvoid subset S of a group G is a subgroup if and only if
Groups
146
1. a and b ∈ S imply ab ∈ S. 2. a ∈ S implies a−1 ∈ S. In terms of PowerEpsilon, we have the following description: dec SubThmL : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Nonvoid, A, P), @(And, !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], !(a : A) [@(P, a) -> @(P, @(INV, G, a))])); dec SubThmR : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)]) [@(Nonvoid, A, P) -> @(And, !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], !(a : A) [@(P, a) -> @(P, @(INV, G, a))]) -> @(Sub_ax, A, o, r, P)];
To start proving the theorems, we need the following lemmas for characteristics of GPOW. dec GPow_Eq_Lem : !(A : Type(0), o : A, s : [A -> A -> A], a : A, b : A, n : Int) [@(Equal0, A, a, b) -> @(Equal0, A, @(GPOW, A, o, s, a, n), @(GPOW, A, o, s, b, n))]; dec GPow_Com_Lem : !(A : Type(0), o : A, s : [A -> A -> A], a : A, n : Int, m : Int) @(Equal0, A,
Groups
147
@(GPOW, A, o, s, @(GPOW, A, o, s, a, m), n), @(GPOW, A, o, s, @(GPOW, A, o, s, a, n), m)); dec GPow_Zro_Lem : !(A : Type(0), o : A, r : [A -> A -> A], n : Int) @(Equal0, A, @(GPOW, A, o, r, o, n), o); dec GGen_Lem : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let n = @(FST, p) in !(a : A) @(Equal0, A, @(GPOW, A, o, r, a, @(EE, n)), o); def GGen_Lem = \(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) let m = @(FST, p), q = @(SND, p) in let Q1 = @(Equal0, A, @(GPOW, A, o, r, a, @(EE, m)), o), Q2 = !(n : Int) [@(Equal0, A, @(GPOW, A, o, r, a, n), o) -> @(ILe, @(EE, m), n)] in let q1 = @(PJ1, Q1, Q2, @(q, a)), q2 = @(PJ2, Q1, Q2, @(q, a)) in q1;
To prove theorem SubThmL, we need in addition prove three lemmas SubLemL1, SubLemL2, and SubLemL3. def SubLemL1 = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, p = @(SND, @(SND, let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, r = @(SND, @(SND, let P1 = @(P, o), P2 = !(a : A)
S)), S)) in
s)), s)) in
Groups
[@(P, a) -> ?(b : A) @(And, @(P, b), @(And, @(Equal0, A, @(r, a, b), o), @(Equal0, A, @(r, b, a), o)))], P3 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in let p1 = @(PJ1, P1, @(And, P2, P3), p), p2 = @(PJ1, P2, P3, @(PJ2, P1, @(And, P2, P3), p)), p3 = @(PJ2, P2, P3, @(PJ2, P1, @(And, P2, P3), p)) in ; def SubLemL2 = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)), p = @(SND, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P1 = @(P, o), P2 = !(a : A) [@(P, a) -> ?(b : A) @(And, @(P, b), @(And, @(Equal0, A, @(r, a, b), o), @(Equal0, A, @(r, b, a), o)))], P3 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in let p1 = @(PJ1, P1, @(And, P2, P3), p), p2 = @(PJ1, P2, P3, @(PJ2, P1, @(And, P2, P3), p)), p3 = @(PJ2, P2, P3, @(PJ2, P1, @(And, P2, P3), p)) in p3; def SubLemL3 = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)), p = @(SND, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)),
148
Groups
r = @(SND, @(SND, s)) in let P1 = @(P, o), P2 = !(a : A) [@(P, a) -> ?(b : A) @(And, @(P, b), @(And, @(Equal0, A, @(r, a, b), o), @(Equal0, A, @(r, b, a), o)))], P3 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in let p1 = @(PJ1, P1, @(And, P2, P3), p), p2 = @(PJ1, P2, P3, @(PJ2, P1, @(And, P2, P3), p)), p3 = @(PJ2, P2, P3, @(PJ2, P1, @(And, P2, P3), p)) in \(a : A, q : @(P, a)) let u = @(p2, a, q) in let b = @(FST, u), v = @(SND, u) in let V1 = @(P, b), V2 = @(Equal0, A, @(r, a, b), o), V3 = @(Equal0, A, @(r, b, a), o) in let v1 = @(PJ1, V1, @(And, V2, V3), v), v2 = @(PJ1, V2, V3, @(PJ2, V1, @(And, V2, V3), v)), v3 = @(PJ2, V2, V3, @(PJ2, V1, @(And, V2, V3), v)) in let w1 = @(Inv_Axm1, G, a), w2 = @(Eq_Symm, A, @(r, a, b), o, v2), w3 = @(Eq_Tran3, A, @(r, a, @(INV, G, a)), o, @(r, a, b), w1, w2), w4 = @(CancelLaw2, G, a, @(INV, G, a), b, w3) in @(Pred_Cong2, A, P, @(INV, G, a), b, w4, v1);
We then will be able to prove theorems SubThmL. def SubThmL = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P1 = @(Nonvoid, A, P), P2 = !(a : A, b : A)
149
Groups
150
[@(P, a) -> @(P, b) -> @(P, @(r, a, b))], P3 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in let p1 = @(SubLemL1, S), p2 = @(SubLemL2, S), p3 = @(SubLemL3, S) in @(ANDS, P1, @(And, P2, P3), p1, @(ANDS, P2, P3, p2, p3));
To prove theorem SubThmR, we need in addition prove three lemmas SubLemR1, SubLemR2, and SubLemR3. def SubLemR1 = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)], q : @(Nonvoid, A, P)) let P1 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], P2 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in \(p : @(And, P1, P2)) let p1 = @(PJ1, P1, P2, p), p2 = @(PJ2, P1, P2, p) in let a = @(FST, q), c = @(SND, q), inva = @(INV, G, a) in let q1 = @(p2, a, c), q2 = @(p1, a, inva, c, q1), q3 = @(Inv_Axm1, G, a) in @(Pred_Cong1, A, P, @(r, a, inva), o, q3, q2); def SubLemR2 = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)], q : @(Nonvoid, A, P)) let P1 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], P2 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in \(p : @(And, P1, P2)) let p1 = @(PJ1, P1, P2, p), p2 = @(PJ2, P1, P2, p) in p1; def SubLemR3 = \(G : Group)
Groups
let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)], q : @(Nonvoid, A, P)) let P1 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], P2 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in \(p : @(And, P1, P2)) \(a : A, q : @(P, a)) let p1 = @(PJ1, P1, P2, p), p2 = @(PJ2, P1, P2, p) in let b = @(INV, G, a) in let Q1 = @(P, b), Q2 = @(Equal0, A, @(r, a, b), o), Q3 = @(Equal0, A, @(r, b, a), o) in let q1 = @(p2, a, q), q2 = @(Inv_Axm1, G, a), q3 = @(Inv_Axm2, G, a) in ;
Finally we will be able to the theorem SubThmR. def SubThmR = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)], q : @(Nonvoid, A, P)) let Q1 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], Q2 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in let P1 = @(P, o), P2 = !(a : A) [@(P, a) -> ?(b : A) @(And, @(P, b), @(And, @(Equal0, A, @(r, a, b), o), @(Equal0, A, @(r, b, a), o)))], P3 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in \(p : @(And, Q1, Q2)) let p1 = @(SubLemR1, G, P, q, p), p2 = @(SubLemR3, G, P, q, p),
151
Groups
152
p3 = @(SubLemR2, G, P, q, p) in @(ANDS, P1, @(And, P2, P3), p1, @(ANDS, P2, P3, p2, p3));
For elements a of finite order m, clearly am−1 a = am = o, and so a−1 = a . Hence one has the following simplified condition. m−1
Theorem 6.12 A nonvoid subset S of a finite group G is a subgroup of G if and only if the product of any elements in S is itself in S. In terms of PowerEpsilon, we will represent the theorem by two formulas. dec FGSubThmL : !(G : Group) [@(Is_Finite_Grp, G) -> let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)]) [@(Sub_ax, A, o, r, P) -> !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))]]]; dec FGSubThmR : !(G : Group) [@(Is_Finite_Grp, G) -> let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)]) [@(Nonvoid, A, P) -> !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] -> @(Sub_ax, A, o, r, P)]];
To prove FGSubThmR, we need two lemmas FGSubLemR and GPow Lem. dec FGSubLemR : !(G : Group) [@(Is_Finite_Grp, G) -> let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)]) [@(Nonvoid, A, P) -> !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] -> !(a : A)
Groups
153
[@(P, a) -> !(m : Int) let b = @(GPOW, A, o, r, a, m) in @(P, b)]]]; dec GPow_Lem : !(A : Type(0), o : A, r : [A -> A -> A], a : A, m : Int) @(Equal0, A, @(r, a, @(GPOW, A, o, r, a, @(IMINUS, m, III))), @(GPOW, A, o, r, a, m));
Using FGSubLemR and GPow Lem, we will be able to give the proof of FGSubThmR. def FGSubThmR = \(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)], u : @(Nonvoid, A, P), v : !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))]) let a = @(FST, u), w = @(SND, u) in let n = @(FST, p) in let b = @(GPOW, A, o, r, a, @(IMINUS, @(EE, n), III)) in let z1 = @(FGSubLemR, G, p, P, u, v, a, w, @(IMINUS, @(EE, n), III)), z2 = @(v, a, b, w, z1), z3 = @(GPow_Lem, A, o, r, a, @(EE, n)), z4 = @(GGen_Lem, G, p, a), z5 = @(Eq_Tran, A, @(r, a, b), @(GPOW, A, o, r, a, @(EE, n)), o, z3, z4), z6 = @(Pred_Cong1, A, P, @(r, a, b), o, z5, z2) in let Z1 = @(P, o), Z2 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))] in @(ANDS, Z1, Z2, z6, v);
6.7.0.1
Center of Group
Among the subgroups of a given non-Abelian group G, one of the most important is its center. This is defined as the set of all elements a ∈ G such that ax = xa for all x ∈ G.
Groups
154
def Center = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) !(x : A) @(Equal0, A, @(r, a, x), @(r, x, a));
The center is, in fact, always a subgroup of G. dec CenterGrp_Lem : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in @(Sub_ax, A, o, r, P); def CenterGrp = \(G : Group) ; To prove lemma CenterGrp Lem, we need three lemmas CenterGrp Lem1, CenterGrp Lem2, and CenterGrp Lem3. dec CenterGrp_Lem1 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in @(Nonvoid, A, P); dec CenterGrp_Lem2 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))];
Groups
155
dec CenterGrp_Lem3 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in !(a : A) [@(P, a) -> @(P, @(INV, G, a))];
The proofs of lemmas CenterGrp Lem1, CenterGrp Lem2, and CenterGrp Lem3 are given as follows. def CenterGrp_Lem1 = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in let p = \(x : A) let p1 = @(Idn_Axm1, G, x), p2 = @(Idn_Axm2, G, x), p3 = @(Eq_Symm, A, @(r, x, o), x, p1) in @(Eq_Tran, A, @(r, o, x), x, @(r, x, o), p2, p3) in ; def CenterGrp_Lem2 = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in \(a : A, b : A) \(p1 : @(P, a), p2 : @(P, b)) \(x : A) let q1 = @(Ass_Lem, G, a, b, x), q2 = @(Op_Cong1, A, r, a, @(r, b, x), @(r, x, b),
Groups
156
@(p2, x)), q3 = @(Ass_Axm, G, a, x, b), q4 = @(Op_Cong2, A, r, b, @(r, a, x), @(r, x, a), @(p1, x)), q5 = @(Ass_Lem, G, x, a, b) in @(Eq_Tran6, A, @(r, @(r, a, b), x), @(r, a, @(r, b, x)), @(r, a, @(r, x, b)), @(r, @(r, a, x), b), @(r, @(r, x, a), b), @(r, x, @(r, a, b)), q1, q2, q3, q4, q5); def CenterGrp_Lem3 = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in \(a : A) \(p : @(P, a)) \(x : A) let inva = @(INV, G, a) in let p1 = @(Idn_Lem1, G, @(r, inva, x)), p2 = @(Inv_Lem1, G, a), p3 = @(Op_Cong1, A, r, @(r, inva, x), o, @(r, a, inva), p2), p4 = @(Ass_Axm, G, @(r, inva, x), a, inva), p5 = @(Ass_Lem, G, inva, x, a), p6 = @(Eq_Symm, A, @(r, a, x), @(r, x, a), @(p, x)), p7 = @(Op_Cong1, A, r, inva, @(r, x, a), @(r, a, x), p6), p8 = @(Ass_Axm, G, inva, a, x), p9 = @(Inv_Axm2, G, a) in let q1 = @(Op_Cong2, A, r, x, @(r, inva, a), o, p9), q2 = @(Idn_Axm2, G, x), q3 = @(Eq_Tran6, A, @(r, @(r, inva, x), a), @(r, inva, @(r, x, a)), @(r, inva, @(r, a, x)), @(r, @(r, inva, a), x),
Groups
157
@(r, o, x), x, p5, p7, p8, q1, q2), q4 = @(Op_Cong2, A, r, inva, @(r, @(r, inva, x), a), x, q3) in @(Eq_Tran5, A, @(r, inva, x), @(r, @(r, inva, x), o), @(r, @(r, inva, x), @(r, a, inva)), @(r, @(r, @(r, inva, x), a), inva), @(r, x, inva), p1, p3, p4, q4);
Putting the three lemmas together, we obtain the proof of CennterGrp Lem. def CenterGrp_Lem = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let P = @(Center, G) in let Q2 = !(a : A, b : A) [@(P, a) -> @(P, b) -> @(P, @(r, a, b))], Q3 = !(a : A) [@(P, a) -> @(P, @(INV, G, a))] in let q1 = @(CenterGrp_Lem1, G), q2 = @(CenterGrp_Lem2, G), q3 = @(CenterGrp_Lem3, G) in @(SubThmR, G, P, q1, @(ANDS, Q2, Q3, q2, q3));
The problem of determining all subgroups of a specific group G is in general very difficult. We shall now solve it in the case that G is a cyclic group. Definition 6.12 Any subgroup S of a cyclic group G is itself cyclic. dec SubCyclThm : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s),
Groups
158
o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Gen_ax, A, o, r) -> @(SubGen_ax, A, o, r, P)];
In case G is infinite, every r > 0 determines a different subgroup. If G has n elements, then since an = o is surely in S, only those r > 0 which are divisors of n determine subgroups in this manner – but again these subgroups are all distinct. To obtain material for further development, we now enumerate all the subgroups of the group of the square. By examining the definitions given in the previous section for the operations of this group, one finds the (proper) subgroups leaving invariant each of the eight following configurations: Adiagonal
[I, D, D′ , R′ ] Anaxis
[I, H, V, R′ ] Af ace
[I, R, R′ , R”] Anaxisandadiagonal ′
[I, R ]
V ertex1(or3)
[I, D] V ertex2(or4) ′
[I, D ]
Averticalside
[I, H] Aorizontalside
[I, V] By the transformations leaving a face invariant, we understand those which do not turn the square over. All these subgroups may be displayed in their relation to each other in a table, where each group is joined to all of its subgroups by a descending line or sequence of lines. Without using geometry we could still find all these subgroups. Indeed, the determination of all the subgroups of a specified finite group G is most efficiently handled by considering the group elements purely abstractly, as follows. Observe first that if a subgroup S of G contains an element a, it also contains the “cyclic” subgroup {a} (prove it is a subgroup!) consisting of all the powers of a. In the present case, this gives us all but the first two of the subgroups listed. Next observe that any subgroup must contain not only two cyclic subgroups {a} and {b}, but also the set {a, b} of all products such as a2 b−3 a, of powers of a and b. In the present case, this procedure gives us the remaining subgroups. (We shall see in 6.8 why they all contain either 2 or 4 elements). In general,
Groups
159
we may have to test further for subgroups {a, b, c} generated by three or more elements, but this can never happen unless the number of elements in the group is a product of at least four distinct primes. The intersection S ∧ T of two subgroups (indeed, of any two sets!) S and T is the set of all elements which belong both to S and to T. Theorem 6.13 The intersection S ∧ T of two subgroups S and T of a group G is a subgroup of G. dec IntersectThm : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)], Q : [A -> Type(0)]) [@(Sub_ax, A, o, r, P) -> @(Sub_ax, A, o, r, Q) -> @(Sub_ax, A, o, r, @(Intersect, A, P, Q))]
6.8
Cosets
We now come to a far-reaching concept of abstract group theory: the idea that any subgroup S of a group G decomposes G into cosets. Definition 6.13 By the order of a group or subgroup is meant the number of its elements. By a right coset (left coset) of a subgroup S of a group G is meant any set Sa (or aS) consisting of all the right-multiples sa. (left-multiples as) of the elements s of S by a fixed element a in G. The number of distinct right cosets is called the “index” of S in G. In terms of PowerEpsilon, we have RCoset and RCoset2 for right cosets. def RCoset = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) \(t : A) ?(x : A) @(And, @(P, x), @(Equal0, A, @(r, x, a), t)); def RCoset2 = \(S : Subgroup2)
Groups
let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) ;
and LCoset and LCoset2 for left cosets. def LCoset = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) \(t : A) ?(x : A) @(And, @(P, x), @(Equal0, A, @(r, a, x), t)); def LCoset2 = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(a : A) ;
Lemma 6.1 For any coset Q of a subgroup S, Q is a subset of S.
dec RCoset_Subset_Lem : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A) let Q = @(RCoset, S, a) in @(Include, A, Q, P); def Finite_RCoset_Lem = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in
160
Groups
161
let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(p : @(Finite_Subgroup, S), a : A) let Q = @(RCoset, S, a), q = @(RCoset_Subset_Lem, S, a) in @(Finite_GSubset_Lem, S, p, Q, q);
Since So = S, S is a right coset of itself. Moreover, one has Lemma 6.2 If S is finite, each right coset Sa of S has exactly as many elements as S does. That means that S has same order as each of its right coset. dec RCosetLem1 : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(p : @(Finite_Subgroup, S)) !(a : A) let q = @(Finite_RCoset_Lem, S, p, a) in let n = @(FST, p), m = @(FST, q) in @(Equal, Nat, n, m); dec GRCosetLem1 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)], p : @(Sub_ax, A, o, r, P), q : @(Is_Finite_Subset, G, P)) !(a : A) let w = @(Fin_RCoset_Lem, G, P, p, q, a) in let n = @(FST, q), m = @(FST, w) in @(Equal, Nat, n, m);
6.8.0.2
Draft of Proof:
For the transformation s 7→ sa is bijective: each element t = sa of the coset Sa is the image of one and only one element s = ta−1 of S. Q.E.D. dec RCosetLem11 :
Groups
162
!(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A) let f = \(x : A) @(r, x, a) in @(SGroup_Isom3, S, G, @(RCoset, S, a), f); dec RCosetLem12 : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A, f : [A -> A], Q : [A -> Type(0)]) !(p1 : @(Finite_Subgroup, S), p2 : @(Is_Finite_GSubset, S, Q)) [@(SGroup_Isom3, S, G, Q, f) -> let n = @(FST, p1) in let Q1 = @(Is_Finite_Subset, G, P), Q2 = @(Include, A, Q, P) in let q1 = @(PJ11, Q1, Q2, p2), q2 = @(PJ12, Q1, Q2, p2) in let m = @(FST, q1) in @(Equal, Nat, n, m)]; def RCosetLem1 = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(p : @(Finite_Subgroup, S), a : A) let f = \(x : A) @(r, x, a), Q = @(RCoset, S, a) in let q1 = @(Finite_RCoset_Lem, S, p, a), q2 = @(RCosetLem11, S, a) in @(RCosetLem12, S, a, f, Q, p, q1, q2);
Lemma 6.3 Two right cosets Sa and Sb of S are either identical or without common elements.
Groups
163
dec RCosetLem21 : !(S : Subgroup2) let G = @(FST, S) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A, b : A) let C1 = @(RCoset, S, a), C2 = @(RCoset, S, b) in [?(c : A) @(And, @(C1, c), @(C2, c)) -> @(Same, A, C1, C2)]; dec RCosetLem2 : !(S : Subgroup2) let G = @(FST, S) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A, b : A) let C1 = @(RCoset, S, a), C2 = @(RCoset, S, b) in @(Or, @(Same, A, C1, C2), !(c : A) @(Or1, [@(C1, c) -> @(Not0, @(C2, c))], [@(C2, c) -> @(Not0, @(C1, c))])); dec GRCosetLem21 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)], p : @(Sub_ax, A, o, r, P)) !(a : A, b : A) let C1 = @(GRCoset, G, P, p, a), C2 = @(GRCoset, G, P, p, b) in [?(c : A) @(And, @(C1, c), @(C2, c)) -> @(Same, A, C1, C2)]; dec GRCosetLem2 : !(G : Group) let s = @(FST, let A = @(FST, o = @(FST, r = @(SND,
G) in s), @(SND, s)), @(SND, s)) in
Groups
164
!(P : [A -> Type(0)], p : @(Sub_ax, A, o, r, P)) !(a : A, b : A) let C1 = @(GRCoset, G, P, p, a), C2 = @(GRCoset, G, P, p, b) in @(Or, @(Same, A, C1, C2), !(c : A) @(Or1, [@(C1, c) -> @(Not0, @(C2, c))], [@(C2, c) -> @(Not0, @(C1, c))]));
6.8.0.3
Draft of Proof:
For, suppose Sa and Sb have an element c = s’a = s"b (s’, s" in S) in com−1 −1 mon. Then Sb contains every element sa = s(s′ ) s’a = ss′ s"b of Sa, and similarly Sa contains every element of Sb. Consequently, Sa = Sb. Q.E.D. It is easy to illustrate these results. Thus, if G is the group of symmtries of the square, the subgroup S = [I, H] has the four right cosets [I, H]I [I, H]R [I, H]R′ [I, H]R”
= [I, H] = [I, H] = [R, D′ ] ′ ′ = [R , HR ] = [R′ , V] = [R”, HR”] = [R”, D]
Each coset has two elements, and every element of the group falls into one of the four right cosets. Again, if G is the additive group of the integers, the subgroup of multiples of ±5n of 5 has for right cosets the different residue classes modulo 5. Finally, let G be the symmetric group of all permutations of the symbols 1, . . ., 6, while S is the subgroup leaving the symbol 1 fixed. Then f(1) = k implies for all g ∈ S that g(f(1)) = f(1) = k. Hence the coset Sf contains only the 5! permutations carrying 1 7→ k. Therefore the right cosets of S are the subsets carrying 1 7→ 1, 1 7→ 2, . . ., 1 7→ 6, respectively.
6.8.1
Finiteness Conditions for Subsets
def Is_Finite_Subset = \(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(P : [A -> Type(0)]) ?(n : Int, p : @(SubGen_ax, A, o, r, P))
Groups
165
let a = @(FST, p) in @(Is_Ord_Elem, A, o, r, a, n); def Is_Finite_GSubset = \(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(Q : [A -> Type(0)]) @(And1, @(Is_Finite_Subset, G, P), @(Include, A, Q, P));
Lemma 6.4 Any subset S of a finite group G is finite too.
dec Finite_Subset_Lem : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Is_Finite_Grp, G) -> !(P : [A -> Type(0)]) @(Is_Finite_Subset, G, P)];
Lemma 6.5 Any subset S of a finite subgroup G is finite too.
dec Finite_GSubset_Lem : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Finite_Subgroup, S) -> !(Q : [A -> Type(0)]) [@(Include, A, Q, P) -> @(Is_Finite_GSubset, S, Q)]];
Lemma 6.6 If subgroup S is finite, then its right coset Q is also finite.
dec Finite_RCoset_Lem : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in
Groups
166
let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Finite_Subgroup, S) -> !(a : A) let Q = @(RCoset, S, a) in @(Is_Finite_GSubset, S, Q)]; dec Fin_RCoset_Lem : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(P : [A -> Type(0)], p : @(Sub_ax, A, o, r, P)) [@(Is_Finite_Subset, G, P) -> !(a : A) let Q = @(GRCoset, G, P, p, a) in @(Is_Finite_Subset, G, Q)];
6.8.2
Lagrange’s Theorem
Definition 6.14 An integer p is divisible by an integer q when p = qr for some intger r. We also call q a factor or divisor of p.
def Is_Divisor = \(p : Nat, q : Nat) ?(r : Nat) @(Equal, Nat, p, @(TIMES, q, r));
Definition 6.15 An integer p is a prime if p is not 0 or ±1 and if p is divisible only by ±1 and ±p. def Is_Prime = \(p : Nat) !(q : Nat) [@(Is_Divisor, p, q) -> @(Or, @(Equal, Nat, q, II), @(Equal, Nat, q, p))];
The first few positive primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31.
Groups
167
The following set of formulas are defined for power set [[A -> Type(1)] -> Type(1)]. def PEqual = \(A : Type(1), L : [[A -> Type(1)] -> Type(1)], x : L, y : L) !(P : [L -> Prop]) [@(P, x) -> @(P, y)]; def PSurjection = \(A1 : Type(1), L1 : [[A1 -> Type(0)] -> Type(0)], A2 : Type(1), f : [L1 -> A2]) let p = \(a1 : L1, a2 : A2) @(Equal1, A2, a2, @(f, a1)) in !(a2 : A2) ?(a1 : L1) @(p, a1, a2); def PInjection = \(A1 : Type(1), L1 : [[A1 -> Type(0)] -> Type(0)], A2 : Type(1), f : [L1 -> A2]) !(a1 : L1, b1 : L1) @(And1, [@(PEqual, A1, L1, a1, b1) -> @(Equal1, A2, @(f, a1), @(f, b1))], [@(Equal1, A2, @(f, a1), @(f, b1)) -> @(PEqual, A1, L1, a1, b1)]); def PBijection = \(A1 : Type(1), L1 : [[A1 -> Type(0)] -> Type(0)], A2 : Type(1), f : [L1 -> A2]) @(And1, @(PSurjection, A1, L1, A2, f), @(PInjection, A1, L1, A2, f)); def PCard_Set = \(A : Type(0), L : [[A -> Type(0)] -> Type(0)], N : Type(0)) ?(f : [L -> N]) @(PBijection, A, L, N, f);
From Lemma 6.2 and 6.3, we obtain a classic result which is of fundamental important for the theory of finite group. If G is finite, the conclusion is the Lagrange Theorem. To represent the Lagrange Theorem, we first need to have the following lemmas.
Groups
168
dec GrpCoset_Lem1 : !(G : Group) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(S : [A -> Type(0)], p : @(Sub_ax, A, o, r, S)) ?(L : [[A -> Type(0)] -> Type(0)]) @(And1, !(a : A) let C = @(GRCoset, G, S, p, a) in @(L, C), !(Z : [A -> Type(0)]) [@(L, Z) -> ?(b : A) let B = @(GRCoset, G, S, p, b) in @(Same, A, Z, B)]); dec GrpCoset_Lem2 : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(S : [A -> Type(0)], q : @(Sub_ax, A, o, r, S)) let u = @(GrpCoset_Lem1, G, S, q) in ?(n : Nat) let L = @(FST, u), N = ?(m : Nat) @(NLe, m, n) in @(PCard_Set, A, L, N); dec Lagrange_Lem : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(S : [A -> Type(0)], q : @(Sub_ax, A, o, r, S)) let u = @(Finite_Subset_Lem, G, p, S) in let n = @(FST, p), m = @(FST, u) in let l = @(FST, @(GrpCoset_Lem2, G, p, S, q)) in @(Equal, Nat, n, @(TIMES, m, l));
Theorem 6.14 (Lagrange) The order of a finite group G is a multiple of the order of every one of its subgroups.
Groups
169
dec Lagrange_Thm : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(S : [A -> Type(0)], q : @(Sub_ax, A, o, r, S)) let u = @(Finite_Subset_Lem, G, p, S) in let n = @(FST, p), m = @(FST, u) in @(Is_Divisor, n, m);
Corollary 6.4 Each element a of G generates a cyclic subgroup, whose order is simply the order of a. dec LagCol0 : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A) ?(P : [A -> Type(0)]) @(And, @(Sub_ax, A, o, r, P), @(SubGen_ax, A, o, r, P));
Corollary 6.5 Every element of a finite group G has as order a divisor of the order of G. dec LagCol1 : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : A) let v = @(LagCol0, G, p, a) in let P = @(FST, v), w = @(SND, v) in let W1 = @(Sub_ax, A, o, r, P), W2 = @(SubGen_ax, A, o, r, P) in let w1 = @(PJ1, W1, W2, w), w2 = @(PJ2, W1, W2, w) in let z = @(Finite_Subset_Lem, G, p, P) in let n = @(FST, p), m = @(FST, z) in @(Is_Divisor, n, m);
Groups
170
Corollary 6.6 Every group G of a prime order p is cyclic.
dec LagCol2 : !(G : Group, p : @(Is_Finite_Grp, G)) let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let n = @(FST, p) in [@(Is_Prime, n) -> @(Gen_ax, A, o, r)];
More generally, Lagrange’s theorem can be applied to determine (up to isomorphism) all abstract groups of any low order. As an example, define the four group as the group with four commuting element o (the identity) and a, b, c = ab, the latter each of order two. It will be shown that this group is isomorphic to the group of symmetries of a rectangle.
6.9
Permutation
Definition 6.16 A bijection of a finite set S to itself is usually called a permutation of S.
def Is_Permutation = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(f : [A -> A]) @(Bijection, A, A, f);
In other words, a permutation is a one-one transformation of a finite set into itself. For instance, the set might consist of the five digits 1, 2, 3, 4, 5. One permutation might be the transformation ϕ. ϕ(1) ϕ(2) ϕ(3) ϕ(4) ϕ(5)
= = = = =
2 3 4 5 1
(6.5)
Groups
171
Another might be the transformation ϕ′ with ϕ′ (1) ϕ′ (2) ϕ′ (3) ϕ′ (4) ϕ′ (5)
= = = = =
2 3 1 5 4
(6.6)
The reader will find it instructive to compute ϕϕ′ , ϕ′ ϕ, and to note that ϕϕ′ ̸= ϕ′ ϕ. The group of all permutations of n elements is called the symmetric group of degree n; it evidently contains n! permutations, for the image k1 of the first element can be chosen in n ways, that of the second element can then be chosen in n-1 ways from the elements not k1 , and so on. Permutations which, like the permutation ϕ defined above, give a circular rearrangement of the symbols permuted are called cyclic permutations or cycles. def Is_CyclPerm = \(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(f : [A -> A]) @(And1, @(Is_Permutation, g, f), ?(S : [Nat -> A]) !(a : A) ?(i : Nat) @(And, @(Equal, A, a, @(S, i)), @(Equal, A, @(f, a), @(S, @(SS, i)))));
dec FPOW : !(T : Type(0)) [[T -> T] -> Nat -> T -> T]; def FPOW = \(T : Type(0), f : [T -> T], n : Nat) \(a : T) @(GIF_THEN_ELSE0, T, @(EQUAL, n, OO), a, let an = @(FPOW, T, f, @(PP, n), a) in @(f, an));
Groups
172
Theorem 6.15 A cyclic permutation of n symbols has order n. dec CyclPermThm : !(g : Group, p : @(Is_Finite_Grp, g)) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(f : [A -> A]) [@(Is_CyclPerm, g, f) -> let n = @(FST, p) in !(a : A) @(Equal, A, @(FPOW, A, f, n, a), a)];
6.9.0.1
Draft of Proof:
The cyclic permutation f = (a1 a2 . . . an ) carries ai into ai+1 . Hence f2 has the doubled effect of carrying each ai into ai+2 , and generally fk carries ai into ai+k , where all subscripts are to be reduced modulo n. We have in fk the identity I if and only if ai+k equals ai ; that is, if and only if k ≡ 0 (mod n). The smallest k with fk = I is then n itself, so f does have the order n. The cycle f is said to have length n. Q.E.D. The notation for a cyclic permutation can be extended to any permutation. For example, the permutation ϕ′ in 6.6 cyclically permutes the digits 1, 2, and 3 by themselves, and 4 and 5 by themselves. Thus, it is the product of these two cycles, (123)(45) = (45)(123) This product may be written in either order, since symbols permuted by (123) are left unchanged by (45), which means that successive application of these permutations in either order gives the same result. Theorem 6.16 Any permutation f can be written as a product of cycles, acting on disjoint sets symbols (more briefly: a product of disjoint1 cycles). dec PermProdThm1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(f : [A -> A]) [@(Is_Permutation, g, f) -> 1 Two
sets are called disjoint when they have no element in common.
Groups
173
?(l : @(List, [A -> A])) [@(Is_Disj_Cycl_Perm, A, f, l) -> let h = @(COMP_PERM_LIST, A, l) in @(Equal0, [A -> A], f, h)]];
Conversely, evidently any product of disjoint cycles represents a permutation. Moreover, one can prove Theorem 6.17 The order of any permutation ϕ is the least common multiple of the lengths of its disjoint cycles. To represent the theorem in terms of PowerEpsilon, we need the following functions and predicates: dec LCM : [Nat -> Nat -> Nat]; dec LENGTH : !(A : Type(1)) [@(List, A) -> Nat]; dec Is_In_List : !(A : Type(1)) [@(List, A) -> A -> Prop];
LCM is the least common multiple function. LENGTH is used to calculating the length of a given list. Is In List is used to test whether an item is in a list or not. dec PermProdThm2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(f : [A -> A], p : @(Is_Permutation, g, f)) let P1 = @(Is_Finite_Grp, g), P2 = @(Bijection, A, A, f) in let p1 = @(PJ11, P1, P2, p), p2 = @(PJ12, P1, P2, p) in let n = @(FST, p1) in [!(a : A) @(Equal, A, @(FPOW, A, f, n, a), a) -> !(l : @(List, [A -> A])) !(h : [A -> A], q : @(Is_Permutation, g, h)) [@(Is_In_List, [A -> A], l, h) -> let Q1 = @(Is_Finite_Grp, g), Q2 = @(Bijection, A, A, h) in let q1 = @(PJ11, Q1, Q2, q), q2 = @(PJ12, Q1, Q2, q) in let k = @(FST, q1) in let m = @(LENGTH, [A -> A], l) in @(Equal0, Nat, n, @(LCM, m, k))]];
Groups
174
Every finite group is isomorphic with one or more groups of permutations. In particular, this is true of finite groups of symmetries of geometrical figures. Consider the group of symmetries of rectangle. Under it, the vertices are transformed by the four permutations I R H V
= = = =
(1)(2)(3)(4) (14)(23) (13)(24) (12)(34)
This group is known as the four group. It is isomorphic with the group of permutations fI = (I)(R)(V)(H), fR = (IR)(HV), fH = (IH)(RV), fV = (IV)(RH). The group of symmetries of the square can similarly be represented as a group of permutations of the four vertices. We can also represent it as a group of permutations of the eight symbols which represent the elements of the group. Thus, R corresponds to the permutation effected on right-multiplication of these symbols by “R”; from the column headed “R” in the group table, one sees that this permutation is (IRR’R")(HD’VD). Similarly, H corresponds to (IH)(RD)(R’V)(R"D’). Two cycles of the same length are closely related. For example, if γ = (1234) and γ ′ = (2143), then one may compute that γ ′ = ϕ−1 γϕ, where ϕ = (12)(34) is the permutation taking each digit of the cycle γ into the corresponding digit in γ ′ . This is a special case of the following result. Theorem 6.18 Let ϕ and γ be permutations of n letters, where gama is a cyclic permutation γ = (a1 , . . . , am ), and denote by γ ′ = (ϕ(a1 ), . . . , ϕ(am )) the cycle obtained by replacing each letter ai in the representation of γ by its image under ϕ. Then ϕ−1 γϕ = γ ′ . dec PermProdThm3 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(f1 : [A -> A], q1 : @(Is_Permutation, g, f1), f2 : [A -> A], q2 : @(Is_Permutation, g, f2)) let P1 = @(Is_Finite_Grp, g), P2 = @(Bijection, A, A, f1), P3 = @(Bijection, A, A, f2) in let p1 = @(PJ11, P1, P2, q1), p2 = @(PJ12, P1, P2, q1), p3 = @(PJ11, P1, P3, q2), p4 = @(PJ12, P1, P3, q2) in let n1 = @(FST, p1), n2 = @(FST, p3) in
Groups
175
@(And, @(Equal0, Nat, n1, n2), @(And, @(Is_CyclPerm, g, f2), let f3 = @(MAP_LIST, A, f1, f2, p2) in let invf1 = @(INVERSE, A, f1, p2) in @(Equal1, [A -> A], @(Comp_Tran, A, A, A, @(Comp_Tran, A, A, A, invf1, f2), f1), f3)));
where MAP LIST is defined as follows: def MAP_LIST = \(A : Type(0)) \(f1 : [A -> A], f2 : [A -> A], p1 : @(Bijection, A, A, f1)) let invf1 = @(INVERSE, A, f1, p1) in \(a : A) @(f1, @(f2, @(invf1, a)));
6.10
Homomorphism
6.10.1
Homomorphism of Groups
A single-valued transformation from a group G1 to a group G2 may preserve multiplication without being one-one (i.e., without being an isomorphism). Thus, consider the correspondence between the symmetric group of degree n and the group of ±1 under multiplication, which carries even permutations into +1 and odd one −1. √ Or consider the correspondence n 7→ in , where i = −1, between the additive group of the integers and the multiplication group of the fourth roots of unity. Again the group operation is preserved: im+n = im in , but the correspondence is many-one. These and other examples lead to the following concept. Definition 6.17 A homomorphism of a group G to a group G’ is a single-valued transformation x 7→ x’ mapping G into G’, such that (xy)’ = x’y’ for all x, y in G’. def Group_Hom = \(g1 : Group, g2 let t1 = @(FST, let A1 = @(FST, o1 = @(FST, s1 = @(SND,
: Group) g1), t2 = @(FST, g2) in t1), A2 = @(FST, t2), @(SND, t1)), o2 = @(FST, @(SND, t2)), @(SND, t1)), s2 = @(SND, @(SND, t2)) in
Groups
176
?(f : [A1 -> A2]) @(And, @(Injection1, A1, A2, f), !(x : A1, y : A1) @(Equal0, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y)))); def Group_Hom1 = \(g1 : Group1, g2 : Group1) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in ?(f : [A1 -> A2]) @(And, @(Injection1, A1, A2, f), !(x : A1, y : A1) @(Equal1, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y)))); def Group_Hom2 = \(g1 : Group, g2 : Group1) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2]) @(And, @(Injection1, A1, A2, f), !(x : A1, y : A1) @(Equal1, A2, @(f, @(s1, x, y)), @(s2, @(f, x), @(f, y))));
Definition 6.18 A homomorphism onto is also called an epimorphism. def Group_Epim = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in ?(f : [A1 -> A2]) @(And1, @(Surjection, A1, A2, f), @(Group_Hom2, g1, g2, f)); def Group_Epim2 = \(g1 : Group, g2 let t1 = @(FST, let A1 = @(FST, o1 = @(FST,
: Group) g1), t2 = @(FST, g2) in t1), A2 = @(FST, t2), @(SND, t1)), o2 = @(FST, @(SND, t2)),
Groups
177
s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(f : [A1 -> A2]) @(And1, @(Surjection, A1, A2, f), @(Group_Hom2, g1, g2, f));
Theorem 6.19 Under any homomorpgism G -> G’, the identity o of G goes into the identity of G’, and the inverses into inverses.
dec Group_Hom_Thm : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in @(And, @(Equal0, A2, @(f, o1), o2), !(a : A1) @(Equal0, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a))));
The proof of Group Hom Thm is given as follows. First of, we need to prove two lemmas Group Hom Lem1 and Group Hom Lem2. dec Group_Hom_Lem1 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in @(Equal0, A2, @(f, o1), o2); dec Group_Hom_Lem2 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in !(a : A1) @(Equal0, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a)));
To prove Group Hom Lem1, we then need the following two lemmas.
Groups
dec Homo_Cong_Lem !(A1 : Type(0), [@(Equal0, A1, @(Equal0, A2,
178
: A2 : Type(0), f : [A1 -> A2], a1 : A1, a2 : A1) a1, a2) -> @(f, a1), @(f, a2))];
dec Idn_Cancel_Lem : !(g : Group) let s = @(FST, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in !(a : T) [@(Equal, T, a, @(r, a, a)) -> @(Equal, T, a, o)];
We then will be able to give the proof of Group Hom Lem1. def Group_Hom_Lem1 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let r1 = @(q, o1, o1), r2 = @(Idn_Lem1, g1, o1), r3 = @(Homo_Cong_Lem, A1, A2, f, o1, @(s1, o1, o1), r2), r4 = @(Eq_Tran1, A2, @(f, o1), @(f, @(s1, o1, o1)), @(s2, @(f, o1), @(f, o1)), r3, r1) in @(Idn_Cancel_Lem, g2, @(f, o1), r4);
To prove Group Hom Lem2, we need the following two lemmas. dec Op_Cong_Lem1 : !(A : Type(0), s : [A -> A -> A]) !(a : A, b : A, c : A) [@(Equal0, A, @(s, a, b), @(s, a, c)) -> @(Equal0, A, b, c)]; dec Op_Cong_Lem2 : !(A : Type(0), s : [A -> A -> A])
Groups
!(a : A, b : A, c : A) [@(Equal0, A, @(s, b, a), @(s, c, a)) -> @(Equal0, A, b, c)];
We then will be able to give the proof of Group Hom Lem2. def Group_Hom_Lem2 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in \(a : A1) let inva = @(INV, g1, a) in let r1 = @(q, a, inva), r2 = @(Inv_Axm1, g1, a), r3 = @(Homo_Cong_Lem, A1, A2, f, @(s1, a, inva), o1, r2), r4 = @(Eq_Symm, A2, @(f, @(s1, a, inva)), @(f, o1), r3), r5 = @(Eq_Tran, A2, @(f, o1), @(f, @(s1, a, inva)), @(s2, @(f, a), @(f, inva)), r4, r1), r6 = @(Eq_Symm, A2, @(f, o1), @(s2, @(f, a), @(f, inva)), r5), r7 = @(Group_Hom_Lem1, g1, g2, p), r8 = @(Eq_Tran, A2, @(s2, @(f, a), @(f, inva)), @(f, o1), o2, r6, r7), r9 = @(Inv_Axm1, g2, @(f, a)) in let u1 = @(Eq_Symm, A2, @(s2, @(f, a), @(INV, g2, @(f, a))), o2, r9), u2 = @(Eq_Tran, A2, @(s2, @(f, a), @(f, inva)), o2, @(s2, @(f, a), @(INV, g2, @(f, a))), r8,
179
Groups
180
u1) in @(Op_Cong_Lem1, A2, s2, @(f, a), @(f, inva), @(INV, g2, @(f, a)), u2);
We finally give the proof of Group Hom Thm. def Group_Hom_Thm = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in let P1 = @(Equal0, A2, @(f, o1), o2), P2 = !(a : A1) @(Equal0, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a))) in let p1 = @(Group_Hom_Lem1, g1, g2, p), p2 = @(Group_Hom_Lem2, g1, g2, p) in @(ANDS, P1, P2, p1, p2);
Corollary 6.7 Any homomorphic image of a cyclic group is cyclic. Notice that homomorphisms onto are called epimorphisms, and correspondingly homomorphic images are called epimorphic images. dec CyclGrpHomCol : !(G1 : Cycle_Group2, g2 : Group) let g1 = @(FST, G1) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in [@(Surjection, A1, A2, f) -> @(Gen_ax, A2, o2, s2)];
To prove CyclGrpHomCol, we need the following two lemmas.
Groups
dec CyclGrpHomLem : !(G1 : Cycle_Group2, g2 : Group) let g1 = @(FST, G1), q1 = @(SND, G1) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in !(r : @(Surjection, A1, A2, f)) let x1 = @(FST, q1), r1 = @(SND, q1) in let x2 = @(f, x1) in !(y2 : A2) let u = @(r, y2) in let y1 = @(FST, u), v = @(SND, u) in let w = @(r1, y1) in let m = @(FST, w), t = @(SND, w) in @(Equal0, A2, @(GPOW, A2, o2, s2, x2, m), y2); dec GPowHomLem : !(G1 : Cycle_Group2, g2 : Group) let g1 = @(FST, G1), q1 = @(SND, G1) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in !(x1 : A1, m : Int) @(Equal0, A2, @(f, @(GPOW, A1, o1, s1, x1, m)), @(GPOW, A2, o2, s2, @(f, x1), m));
Among them the proof CyclGrpHomLem is given as follows: def CyclGrpHomLem = \(G1 : Cycle_Group2, g2 : Group) let g1 = @(FST, G1), q1 = @(SND, G1) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in \(r : @(Surjection, A1, A2, f))
181
Groups
182
let x1 let x2 \(y2 let let let let let
= @(FST, q1), r1 = @(SND, q1) in = @(f, x1) in : A2) u = @(r, y2) in y1 = @(FST, u), v = @(SND, u) in w = @(r1, y1) in m = @(FST, w), t = @(SND, w) in w1 = @(GPowHomLem, G1, g2, p, x1, m), w2 = @(Homo_Cong_Lem, A1, A2, f, @(GPOW, A1, o1, s1, x1, m), y1, t), w3 = @(Eq_Symm, A2, @(f, @(GPOW, A1, o1, s1, x1, m)), @(GPOW, A2, o2, s2, x2, m), w1), w4 = @(Eq_Symm, A2, y2, @(f, y1), v) in @(Eq_Tran4, A2, @(GPOW, A2, o2, s2, x2, m), @(f, @(GPOW, A1, o1, s1, x1, m)), @(f, y1), y2, w3, w2, w4);
The proof CyclGrpHomCol is then given as follows: def CyclGrpHomCol = \(G1 : Cycle_Group2, g2 : Group) let g1 = @(FST, G1), q1 = @(SND, G1) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in \(r : @(Surjection, A1, A2, f)) let x1 = @(FST, q1), r1 = @(SND, q1) in let x2 = @(f, x1) in let r2 = \(y2 : A2) let u = @(r, y2) in
Groups
183
let y1 = @(FST, u), v = @(SND, u) in let w = @(r1, y1) in let m = @(FST, w), t = @(SND, w) in in ;
Corollary 6.8 The set N of all elements of G mapped on the identity e’ of G’, under a homomorphism of G to G’, is a subgroup of G.
dec GrpHomCol : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in @(Sub_ax, A1, o1, s1, N);
The proof of GrpHomCol divided into three parts. We need to prove three corollaries first. The first corollary GrpHomCol1 says that N is nonvoid set. dec GrpHomCol1 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in @(Nonvoid, A1, N);
The proof of GrpHomCol1 is represented as follows: def GrpHomCol1 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in
Groups
184
let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in let q1 = @(q, o1, o1), q2 = @(Idn_Axm1, g1, o1), q3 = @(Homo_Cong_Lem, A1, A2, f, @(s1, o1, o1), o1, q2), q4 = @(Eq_Symm, A2, @(f, @(s1, o1, o1)), @(f, o1), q3), q5 = @(Eq_Tran, A2, @(f, o1), @(f, @(s1, o1, o1)), @(s2, @(f, o1), @(f, o1)), q4, q1), q6 = @(Group_Hom_Lem1, g1, g2, p), q7 = @(Op_Cong1, A2, s2, @(f, o1), @(f, o1), o2, q6), q8 = @(Op_Cong2, A2, s2, o2, @(f, o1), o2, q6), q9 = @(Eq_Tran, A2, @(s2, @(f, o1), @(f, o1)), @(s2, @(f, o1), o2), @(s2, o2, o2), q7, q8) in let r1 = @(Eq_Tran, A2, @(f, o1), @(s2, @(f, o1), @(f, o1)), @(s2, o2, o2), q5, q9), r2 = @(Idn_Axm1, g2, o2), r3 = @(Eq_Tran, A2, @(f, o1), @(s2, o2, o2), o2, r1, r2) in ;
The second corollary GrpHomCol2 says that for any element a1 and b1 of type A1 if a1 and b1 are in N, then @(s1, a1, b1) is in N too. dec GrpHomCol2 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in !(a1 : A1, b1 : A1)
Groups
185
[@(N, a1) -> @(N, b1) -> @(N, @(s1, a1, b1))];
The proof of GrpHomCol2 is represented as follows: def GrpHomCol2 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in \(a1 : A1, b1 : A1) \(p1 : @(N, a1), p2 : @(N, b1)) let q1 = @(q, a1, b1), q2 = @(Op_Cong1, A2, s2, @(f, a1), @(f, b1), o2, p2), q3 = @(Op_Cong2, A2, s2, o2, @(f, a1), o2, p1), q4 = @(Idn_Axm1, g2, o2) in @(Eq_Tran5, A2, @(f, @(s1, a1, b1)), @(s2, @(f, a1), @(f, b1)), @(s2, @(f, a1), o2), @(s2, o2, o2), o2, q1, q2, q3, q4);
The third corollary GrpHomCol3 says that for any element a of type A1, if a is in N then its inverse is also in N. dec GrpHomCol3 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in !(a : A1) [@(N, a) -> @(N, @(INV, g1, a))];
To prove GrpHomCol3, we need the following lemma.
Groups
dec Idn_Inv_Lem : !(g : Group) let s = @(FST, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(Equal, T, @(INV, g, o), o); It is simply proved as follows: def Idn_Inv_Lem = \(g : Group) let s = @(FST, g) in let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in let p1 = @(Inv_Axm1, g, o), p2 = @(Idn_Axm2, g, @(INV, g, o)), p3 = @(Eq_Symm, T, @(r, o, @(INV, g, o)), @(INV, g, o), p2) in @(Eq_Tran, T, @(INV, g, o), @(r, o, @(INV, g, o)), o, p3, p1);
The proof of GrpHomCol3 is represented as follows: def GrpHomCol3 = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), q = @(SND, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, a1), o2) in \(a : A1) \(r : @(N, a)) let u = @(Group_Hom_Thm, g1, g2, p) in let U1 = @(Equal0, A2, @(f, o1), o2), U2 = !(a : A1) @(Equal0, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a))) in let u1 = @(PJ1, U1, U2, u), u2 = @(PJ2, U1, U2, u) in
186
Groups
187
let v1 = @(u2, a), v2 = @(Homo_Cong_Lem, A2, A2, @(INV, g2), @(f, a), o2, r), v3 = @(Idn_Inv_Lem, g2) in @(Eq_Tran4, A2, @(f, @(INV, g1, a)), @(INV, g2, @(f, a)), @(INV, g2, o2), o2, v1, v2, v3);
The proof of GrpHomCol is then achieved by applying SubThmR: def GrpHomCol = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, s1 = @(SND, @(SND, t1)), s2 = @(SND, \(p : @(Group_Hom, g1, g2)) let f = @(FST, p) in let N = \(a1 : A1) @(Equal0, A2, @(f, let P2 = !(a : A1, b : A1) [@(N, a) -> @(N, b) -> @(N, P3 = !(a : A1) [@(N, a) -> @(N, @(INV, g1, let p1 = @(GrpHomCol1, g1, g2, p), p2 = @(GrpHomCol2, g1, g2, p), p3 = @(GrpHomCol3, g1, g2, p), p4 = @(ANDS, P2, P3, p2, p3) in @(SubThmR, g1, N, p1, p4);
6.10.2
@(SND, t2)), @(SND, t2)) in
a1), o2) in @(s1, a, b))], a))] in
Kernel
The set N of all elements of G mapped on the identity e’ of G’, under a homomorphism of G to G’, is a subgroup of G. This set N is called the kernel of the homomorphism. def Kernel = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2))
Groups
188
let f = @(FST, p) in \(a1 : A1) @(Equal0, A2, @(f, a1), o2);
6.10.3
Direct Products of Groups
Any two groups G and H have a direct product G × H. The elements of G × H are the ordered pairs (g, h) with g ∈ G, h ∈ H; multiplication in G × H is defined by the formula (g, h)(g′ , h′ ) = (gg′ , hh′ ) Evidently, (o, o’) acts as an identity in G × H; (g− 1, h− 1) is an inverse of (g, h), and multiplication is associative; hence G × H is a group. The direct products of two given groups g1 and g2 is defined as follows: def GrpProdSet = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in @(And, A1, A2);
The multiplication of two direct products of groups is defined as follows: def GrpProdMul = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(a : @(And, A1, A2), b : @(And, A1, A2)) let a1 = @(PJ1, A1, A2, a), a2 = @(PJ2, A1, A2, a), b1 = @(PJ1, A1, A2, b), b2 = @(PJ2, A1, A2, b) in @(ANDS, A1, A2, @(s1, a1, b1), @(s2, a2, b2));
The identity of direct products of groups is defined as follows: def GrpProdIdn = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in @(ANDS, A1, A2, o1, o2);
Groups
189
The inverse of a direct product of groups is defined as follows: def GrpProdInv = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(a : @(And, A1, A2)) let a1 = @(PJ1, A1, A2, a), a2 = @(PJ2, A1, A2, a) in @(ANDS, A1, A2, @(INV, g1, a1), @(INV, g2, a2));
The group of direct products of groups is defined as follows: dec Prod_Ax_Gr_Pr : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in let ProdA = @(GrpProdSet, g1, g2), ProdO = @(GrpProdIdn, g1, g2), ProdS = @(GrpProdMul, g1, g2) in @(And1, @(Ide_ax, ProdA, ProdO, ProdS), @(And1, @(Ass_ax, ProdA, ProdS), @(Inv_ax, ProdA, ProdO, ProdS))); def Prod_Grs = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in let ProdA = @(GrpProdSet, g1, g2), ProdO = @(GrpProdIdn, g1, g2), ProdS = @(GrpProdMul, g1, g2) in @(Gr_Gen, , @(Prod_Ax_Gr_Pr, g1, g2));
Moreover, the function @(f, (g, h)) = g defines a homomorphism f from G × H onto G, and the function @(f, (g, h)) = h is a homomorphism from G × H onto H. dec ProdHom1 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in
Groups
190
let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in let f = \(a : @(And, A1, A2)) @(PJ1, A1, A2, a) in let G = @(Prod_Grs, g1, g2) in @(And, @(Group_Hom2, G, g1, f), @(Surjection, @(And, A1, A2), A1, f)); dec ProdHom2 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in let f = \(a : @(And, A1, A2)) @(PJ2, A1, A2, a) in let G = @(Prod_Grs, g1, g2) in @(And, @(Group_Hom2, G, g2, f), @(Surjection, @(And, A1, A2), A2, f)); dec ProdHomThm1 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in let f = \(a : @(And, A1, A2)) @(PJ1, A1, A2, a) in @(And, !(x : @(And, A1, A2), y : @(And, A1, A2)) @(Equal1, A1, @(f, @(GrpProdMul, g1, g2, x, y)), @(s1, @(f, x), @(f, y))), @(Surjection, @(And, A1, A2), A1, f)); dec ProdHomThm2 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, s1 = @(SND, @(SND, t1)), s2 = @(SND, let f = \(a : @(And, A1, A2)) @(PJ2, A1, @(And, !(x : @(And, A1, A2), y : @(And, A1, @(Equal1, A2,
@(SND, t2)), @(SND, t2)) in A2, a) in A2))
Groups
191
@(f, @(GrpProdMul, g1, g2, x, y)), @(s2, @(f, x), @(f, y))), @(Surjection, @(And, A1, A2), A2, f));
It can be proved that every Abelian group of finite order is isomorphic to a direct product of cyclic groups of prime-power orders. We content ourselves here with the following, much weaker result. Theorem 6.20 If m and n are relatively prime, then the direct product of cyclic groups of orders m and n is itself a cyclic group, of order mn. dec GCD : [Nat -> Nat -> Nat]; def Is_RelPrime = \(p : Nat, q : Nat) @(Equal, Nat, @(GCD, p, q), II); dec ProdCyclThm : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p1 : @(Is_Finite_Grp, g1), p2 : @(Is_Finite_Grp, g2)) [@(Gen_ax, A1, o1, s1) -> @(Gen_ax, A2, o2, s2) -> let m = @(FST, p1), n = @(FST, p2) in let ProdA = @(GrpProdSet, g1, g2), ProdO = @(GrpProdIdn, g1, g2), ProdS = @(GrpProdMul, g1, g2) in let G = @(Prod_Grs, g1, g2) in [@(Is_RelPrime, m, n) -> ?(q : @(Is_Finite_Grp, G)) let l = @(FST, q) in @(And, @(Gen_ax, ProdA, ProdO, ProdS), @(Equal, Int, l, @(ITIMES, m, n)))]];
6.11
Endomorphism and Automorphism
6.11.1
Endomorphism
Definition 6.19 A homomorphism of a group into itself is called an endomorphism.
Groups
192
def Endomorp = \(G : Group) @(Group_Hom, G, G); def Endomorp2 = \(G : Group) @(Group_Hom2, G, G); def Endomorp3 = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in ?(F : [A -> A]) @(Endomorp2, G, F);
6.11.2
Automorphism
Definition 6.20 An isomorphism of a group onto itself is called an automorphism. Thus an automorphism α of G is a one-one transformation of G onto itself (bijection of G.
def Automorp = \(G : Group) @(Group_Isom, G, G); def Automorp2 = \(G : Group) @(Group_Isom2, G, G); def Automorp3 = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in ?(F : [A -> A]) @(Automorp2, G, F);
6.11.3
Group of Automorphism
Theorem 6.21 The automorphisms of any group G themselves form a group A. To prove the theorem, we first need to define the identity automorphism. dec Iden_Auto_Lem : !(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let f = @(Iden_Tran, A) in
Groups
193
@(Automorp2, G, f); def Iden_Automorp = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let f = @(Iden_Tran, A) in ;
Then the composition of automorphisms are defined. dec Comp_Auto_Lem : !(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(fa : @(Automorp3, G), ga : @(Automorp3, G)) let f = @(FST, fa), g = @(FST, ga) in let h = @(Comp_Tran, A, f, g) in @(Automorp2, G, h); def Comp_Automorp = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(fa : @(Automorp3, G), ga : @(Automorp3, G)) let f = @(FST, fa), g = @(FST, ga) in let h = @(Comp_Tran, A, f, g) in ;
We then will be able to prove that under the definitions given above the automorphisms form a group. dec Auto_Ax_Gr_Pr : !(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in @(And, @(Ide_ax, @(Automorp3, G),
Groups
194
@(Iden_Automorp, G), @(Comp_Automorp, G)), @(And, @(Ass_ax, @(Automorp3, G), @(Comp_Automorp, G)), @(Inv_ax, @(Automorp3, G), @(Iden_Automorp, G), @(Comp_Automorp, G)))); def Auto_Group = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in @(Gr_Gen, , @(Auto_Ax_Gr_Pr, G));
A parallel definition and theorem apply to integral domains, and indeed to abstract algebras in general. One can fruitful regard an “automorphism” of an abstract algebra A as just a symmetry of A.
6.11.4
Conjugate
Definition 6.21 In any group G, a−1 xa is called the conjugate of x under “conjugation” by a.
def Conjugate = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(a : A) \(x : A) @(s, @(s, @(INV, G, a), x), a);
Theorem 6.22 For any fixed element a of the group G, the conjugation Ta : x 7→ a−1 xa is an automorphism of G. dec ConjugateThm : !(G : Group) let t = @(FST, G) in
Groups
195
let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) let Ta = \(x : A) @(s, @(s, @(INV, G, a), x), a) in @(Automorp2, G, Ta);
Definition 6.22 Automorphisms Ta of the form x 7→ a−1 are called inner automorphisms; all other automorphisms are outer.
def Inner_Auto = \(G : Group, p : @(Automorp3, G)) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(a : A) let Sa = @(FST, p), Ta = \(x : A) @(s, @(s, @(INV, G, a), x), a) in @(Equal, [A -> A], Sa, Ta); def Outer_Auto = \(G : Group, p : @(Automorp3, G)) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(a : A) let Sa = @(FST, p), Ta = \(x : A) @(s, @(s, @(INV, G, a), x), a) in @(Not, @(Equal, [A -> A], Sa, Ta));
It may be checked that the group of symmetries of the square has four distinct inner automorphisms; it has four outer automorphisms. On the other hand, the cyclic group of order three has no inner automorphisms except the identity, but has the “outer” automorphism x ↔ x2 . Theorem 6.23 The inner automorphisms of any group G form a subgroup of the group of all automorphisms of G. dec Inner_Auto_Lem : !(G : Group) let t = @(FST, G) in let A = @(FST, t),
Groups
o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let P = \(a : A) let Ta = \(x : A) @(s, @(s, @(INV, G, a), x), a) in @(Automorp2, G, Ta) in @(Sub_ax, A, o, s, P); def Inner_Sub_Auto = \(G : Group) let t = @(FST, G) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in let P = \(a : A) let Ta = \(x : A) @(s, @(s, @(INV, G, a), x), a) in @(Automorp2, G, Ta) in ;
Lemma 6.7 Every subgroup of an Abelian group is normal. dec SubAbelNormal : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Com_ax, A, r) -> @(Normal, S)];
The proof of SubAbelNormal is represented as follows: def SubAbelNormal = \(S : Subgroup2) let G = @(FST, S), N = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(p : @(Com_ax, A, r)) \(a : A) let Ta = \(x : A) @(r, @(r, @(INV, G, a), x), a) in \(x : A, q : @(N, x)) let p1 = @(p, @(INV, G, a), x), p2 = @(Op_Cong2, A, r,
196
Groups
197
a, @(r, @(INV, G, a), x), @(r, x, @(INV, G, a)), p1), p3 = @(Ass_Axm, G, x, @(INV, G, a), a), p4 = @(Eq_Symm, A, @(r, x, @(r, @(INV, G, a), a)), @(r, @(r, x, @(INV, G, a)), a), p3), p5 = @(Inv_Axm2, G, a), p6 = @(Op_Cong1, A, r, x, @(r, @(INV, G, a), a), o, p5), p7 = @(Idn_Axm1, G, x), p8 = @(Eq_Tran5, A, @(r, @(r, @(INV, G, a), x), a), @(r, @(r, x, @(INV, G, a)), a), @(r, x, @(r, @(INV, G, a), a)), @(r, x, o), x, p2, p4, p6, p7) in @(Eq_Symm, A, @(Ta, x), x, p8);
Theorem 6.24 The kernel N of any homomorphism g : mal subgroup of G.
[G -> H] is a nor-
dec Kern_Normal : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let N = @(Kernel, g1, g2, p) in let s = in @(Normal, s);
Groups
198
dec KernNormLem : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let N = @(Kernel, g1, g2, p) in @(Normal2, g1, N);
The proof of KernNormLem is represented as follows: def KernNormLem = \(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in \(p : @(Group_Hom, g1, g2)) let f = @(FST, p), r = @(SND, p) in let N = @(Kernel, g1, g2, p) in \(a : A1) let Ta = \(x : A1) @(s1, @(s1, @(INV, g1, a), x), a) in \(x : A1, q : @(N, x)) let inva = @(INV, g1, a) in let w = @(Group_Hom_Thm, g1, g2, p) in let W1 = @(Equal0, A2, @(f, o1), o2), W2 = !(a : A1) @(Equal0, A2, @(f, inva), @(INV, g2, @(f, a))) in let w1 = @(PJ1, W1, W2, w), w2 = @(PJ2, W1, W2, w) in let u1 = @(r, @(s1, inva, x), a), u2 = @(r, inva, x), u3 = @(Op_Cong1, A2, s2, @(f, inva), @(f, x), o2, q), u4 = @(Idn_Axm1, g2, @(f, inva)), u5 = @(Eq_Tran4, A2, @(f, @(s1, inva, x)), @(s2, @(f, inva), @(f, x)), @(s2, @(f, inva), o2), @(f, inva), u2, u3, u4),
Groups
199
u6 = @(Op_Cong2, A2, s2, @(f, a), @(f, @(s1, inva, x)), @(f, inva), u5), u7 = @(Op_Cong2, A2, s2, @(f, a), @(f, inva), @(INV, g2, @(f, a)), @(w2, a)), u8 = @(Inv_Axm2, g2, @(f, a)) in @(Eq_Tran5, A2, @(f, @(s1, @(s1, inva, x), a)), @(s2, @(f, @(s1, inva, x)), @(f, a)), @(s2, @(f, inva), @(f, a)), @(s2, @(INV, g2, @(f, a)), @(f, a)), o2, u1, u6, u7, u8);
Theorem 6.25 A subgroup S is normal if and only if all its right cosets are left cosets.
dec Normal_CosetL : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [@(Normal, S) -> !(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in @(Same, A, rcs, lcs)]; dec Normal_CosetR : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in
Groups
let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [!(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in @(Same, A, rcs, lcs) -> @(Normal, S)]; dec GrpInv_Lem : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, x : A) let l = @(s, @(s, @(INV, g, @(INV, g, a)), x), @(INV, g, a)), r = @(s, @(s, a, x), @(INV, g, a)) in @(Equal, A, l, r); dec GrpAss_Lem1 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, x : A) let r = @(s, @(s, a, x), @(INV, g, a)) in @(Equal, A, @(s, r, a), @(s, a, x)); dec GrpAss_Lem2 : !(g : Group) let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A, x : A) let r = @(s, @(s, @(INV, g, a), x), a) in @(Equal, A, @(s, a, r), @(s, x, a)); dec Normal_CosetL1 : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [@(Normal, S) -> !(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in !(t : A) [@(rcs, t) -> @(lcs, t)]];
200
Groups
dec Normal_CosetL2 : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [@(Normal, S) -> !(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in !(t : A) [@(lcs, t) -> @(rcs, t)]]; def Normal_CosetL1 = \(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(p : @(Normal, S)) \(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in \(t : A, q : @(rcs, t)) let x = @(FST, q), u = @(SND, q) in let U1 = @(N, x), U2 = @(Equal0, A, @(s, x, a), t) in let u1 = @(PJ1, U1, U2, u), u2 = @(PJ2, U1, U2, u) in let axa1 = @(s, @(s, @(INV, g, @(INV, g, a)), x), @(INV, g, a)), axa2 = @(s, @(s, a, x), @(INV, g, a)) in let v1 = @(p, @(INV, g, a), x, u1), v2 = @(GrpInv_Lem, g, a, x), v3 = @(Eq_Tran3, A, x, axa1, axa2, v1, v2), v4 = @(Op_Cong2, A, s, a, x, axa2, v3), v5 = @(GrpAss_Lem1, g, a, x), v6 = @(Eq_Symm, A, @(s, x, a), t, u2), v7 = @(Eq_Tran3, A, @(s, x, a), @(s, axa2, a), @(s, a, x), v4, v5), v8 = @(Eq_Tran3, A, t, @(s, x, a), @(s, a, x), v6, v7), v9 = @(Eq_Symm, A, t, @(s, a, x), v8) in let V1 = @(N, x), V2 = @(Equal0, A, @(s, a, x), t) in let v = @(ANDS, V1, V2, u1, v9) in ;
201
Groups
def Normal_CosetL2 = \(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(p : @(Normal, S)) \(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in \(t : A, q : @(lcs, t)) let x = @(FST, q), u = @(SND, q) in let U1 = @(N, x), U2 = @(Equal0, A, @(s, a, x), t) in let u1 = @(PJ1, U1, U2, u), u2 = @(PJ2, U1, U2, u) in let axa1 = @(s, @(s, @(INV, g, a), x), a) in let v1 = @(p, a, x, u1), v2 = @(Op_Cong1, A, s, a, x, axa1, v1), v3 = @(GrpAss_Lem2, g, a, x), v4 = @(Eq_Symm, A, @(s, a, x), t, u2), v5 = @(Eq_Tran3, A, @(s, a, x), @(s, a, axa1), @(s, x, a), v2, v3), v6 = @(Eq_Tran3, A, t, @(s, a, x), @(s, x, a), v4, v5), v7 = @(Eq_Symm, A, t, @(s, x, a), v6) in let V1 = @(N, x), V2 = @(Equal0, A, @(s, x, a), t) in let v = @(ANDS, V1, V2, u1, v7) in ; def Normal_CosetL = \(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(p : @(Normal, S)) \(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in \(t : A) let Q1 = [@(rcs, t) -> @(lcs, t)], Q2 = [@(lcs, t) -> @(rcs, t)] in let q1 = @(Normal_CosetL1, S, p, a, t),
202
Groups
203
q2 = @(Normal_CosetL2, S, p, a, t) in @(ANDS, Q1, Q2, q1, q2);
6.11.5
Galois
Definition 6.23 (Galois) A subgroup S of a group G is normal in G if and only if it is invariant under all inner automorphisms of G (i.e., contains with any element all its conjugates). A normal subgroup is sometimes called a “self-conjugate” or an “invariant” subgroup. def Normal = \(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in !(a : A) let Ta = \(x : A) @(s, @(s, @(INV, g, a), x), a) in !(x : A) [@(N, x) -> @(N, @(Ta, x))];
Lemma 6.8 Every subgroup of an Abelian group is normal.
dec SubAbelNormal : !(S : Subgroup2) let G = @(FST, S), P = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in [@(Com_ax, A, r) -> @(Normal, S)];
The proof of SubAbelNormal is given as follows: def SubAbelNormal = \(S : Subgroup2) let G = @(FST, S), N = @(FST, @(SND, S)) in let s = @(FST, G) in let A = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in \(p : @(Com_ax, A, r))
Groups
204
\(a : A) let Ta = \(x : A) @(r, @(r, @(INV, G, a), x), a) in \(x : A, q : @(N, x)) let p1 = @(p, @(INV, G, a), x), p2 = @(Op_Cong2, A, r, a, @(r, @(INV, G, a), x), @(r, x, @(INV, G, a)), p1), p3 = @(Ass_Axm, G, x, @(INV, G, a), a), p4 = @(Eq_Symm, A, @(r, x, @(r, @(INV, G, a), a)), @(r, @(r, x, @(INV, G, a)), a), p3), p5 = @(Inv_Axm2, G, a), p6 = @(Op_Cong1, A, r, x, @(r, @(INV, G, a), a), o, p5), p7 = @(Idn_Axm1, G, x), p8 = @(Eq_Tran5, A, @(r, @(r, @(INV, G, a), x), a), @(r, @(r, x, @(INV, G, a)), a), @(r, x, @(r, @(INV, G, a), a)), @(r, x, o), x, p2, p4, p6, p7) in @(Eq_Symm, A, @(Ta, x), x, p8);
Theorem 6.26 The kernel N of any homomorphism g : mal subgroup of G. dec Kern_Normal : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2),
[G -> H] is a nor-
Groups
205
o1 = @(FST, @(SND, t1)), o2 s1 = @(SND, @(SND, t1)), s2 !(p : @(Group_Hom, g1, g2)) let N = @(Kernel, g1, g2, p) let s = in
dec KernNormLem : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2)) let N = @(Kernel, g1, g2, p) in @(Normal2, g1, N);
In general, let a−1 Sa denote the set of all products a−1 sa for s in S. The definition then states that S is normal if and only if the set a−1 Sa equals S for every a in G. Theorem 6.27 A subgroup S is normal if and only if all its right cosets are left cosets. dec Normal_CosetL : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [@(Normal, S) -> !(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in @(Equal1, [A -> Type(0)], rcs, lcs)]; dec Normal_CosetR : !(S : Subgroup2) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in [!(a : A) let rcs = @(RCoset, S, a), lcs = @(LCoset, S, a) in
Groups
206
@(Equal1, [A -> Type(0)], rcs, lcs) -> @(Normal, S)];
6.12
Commutative Group
Definition 6.24 A group whose operation satisfies the commutative law is called a “commutative” or “Abelian” group.
def Com_ax = \(A : Type(0)) \(s : [A -> A -> A]) !(x : A, y : A) @(Equal, A, @(s, x, y), @(s, y, x)); def Sig_AG = ?(A : Type(0), o : A) [A -> A -> A]; def Ax_AG = \(s : Sig_G) let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ide_ax, T, o, r), @(And, @(Ass_ax, T, r), @(And, @(Com_ax, T, r), @(Inv_ax, T, o, r)))); def Ax_AG2 = \(T : Type(0), o : T, r : [T -> T -> T]) @(And, @(Ide_ax, T, o, r), @(And, @(Ass_ax, T, r), @(And, @(Com_ax, T, r), @(Inv_ax, T, o, r)))); def Abelian_group = ?(s : Sig_AG) @(Ax_AG, s); def AG_Gen = \(s : Sig_AG, p : @(Ax_AG, s)) ; def Abelian_group2 = ?(G : Group) let s = @(FST, G) in @(Ax_AG, s); def AG_Gen2 = \(G : Group)
Groups
207
let s = @(FST, G) in \(p : @(Ax_AG, s)) ; def Com_ax1 = \(A : Type(1)) \(s : [A -> A -> A]) !(x : A, y : A) @(Equal1, A, @(s, x, y), @(s, y, x)); def Sig_AG1 = ?(A : Type(1), o : A) [A -> A -> A]; def Ax_AG1 = \(s : Sig_G1) let T = @(FST, s), o = @(FST, @(SND, s)), r = @(SND, @(SND, s)) in @(And, @(Ide_ax1, T, o, r), @(And, @(Ass_ax1, T, r), @(And1, @(Com_ax1, T, r), @(Inv_ax1, T, o, r)))); def Ax_AG12 = \(T : Type(1), o : T, r : [T -> T -> T]) @(And, @(Ide_ax1, T, o, r), @(And, @(Ass_ax1, T, r), @(And1, @(Com_ax1, T, r), @(Inv_ax1, T, o, r)))); def Abelian_group1 = ?(s : Sig_AG1) @(Ax_AG1, s); def AG_Gen1 = \(s : Sig_AG1, p : @(Ax_AG1, s)) ;
6.13
Commutative Group of Integers
The set of integers forms a commutative group. dec Int_Ax_AblGr_Pr : @(And, @(Ide_ax, Int, IOO, IADD), @(And, @(Ass_ax, Int, IADD), @(And, @(Com_ax, Int, IADD), @(Inv_ax, Int, IOO, IADD)))); def Int_AblGr = @(AG_Gen, , Int_Ax_AblGr_Pr);
Groups
6.14
208
Quotient Groups
We now shall show how to construct isomorphic replicas of all the homomorphic images G’ of a specific abstract group G. Indeed, let x 7→ x’ be any homomorphism of G onto a group G’, and let N be the kernel of this homomorphism. If a and b are any elements of G, we can write b = at, so that b’ = a’t’. But by the cancellation law, a’t’ = a’ if and only if t’ = e’ – that is, if and only if t ∈ N. In summary, b’ = a’ if and only if b = at (t ∈ N). Lemma 6.9 Two elements of G have the same image in G’ if and only if they are in the same coset Nx = xN of the kernel N. dec QuotLemL1 : !(S : Subgroup2, g2 : Group) let g1 = @(FST, S), N = @(FST, @(SND, S)) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2), q : @(Kernel, S, g2, p)) let u = @(CyclGrpHomCol2, g1, g2, p, N, q) in let f = @(FST, p) in !(a1 : A1, b1 : A1) [@(Equal0, A2, @(f, a1), @(f, b1)) -> ?(x : A1) let Nx = @(GRCoset, g1, N, u, x), xN = @(GLCoset, g1, N, u, x) in @(And, @(And, @(Nx, a1), @(Nx, b1)), @(Same, A1, Nx, xN))]; dec QuotLemR1 : !(S : Subgroup2, g2 : Group) let g1 = @(FST, S), N = @(FST, @(SND, S)) in let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(p : @(Group_Hom, g1, g2), q : @(Kernel, S, g2, p)) let u = @(CyclGrpHomCol2, g1, g2, p, N, q) in let f = @(FST, p) in !(a1 : A1, b1 : A1) [?(x : A1) let Nx = @(GRCoset, g1, N, u, x), xN = @(GLCoset, g1, N, u, x) in @(And,
Groups
209
@(And, @(Nx, a1), @(Nx, b1)), @(Same, A1, Nx, xN)) -> @(Equal0, A2, @(f, a1), @(f, b1))];
This establishes a one-one correspondence between the elements of G’ and the cosets of N in G. Hence the order of G’ is the number of cosets of N in G. Lemma 6.10 Let x’ and y’ be elements of G’. Then x’y’ may be found as follows. Let Nx and Ny correspond to x’ and y’, respectively; then x’y’ corresponds to the (unique) coset of N containing the set NxNy of all product uv (u ∈ Nx, v ∈ Ny). dec QuotLem2 : !(g1 : Group, g2 : Group) let t1 = @(FST, g1), t2 = @(FST, g2) in let A1 = @(FST, t1), A2 = @(FST, t2), o1 = @(FST, @(SND, t1)), o2 = @(FST, @(SND, t2)), s1 = @(SND, @(SND, t1)), s2 = @(SND, @(SND, t2)) in !(N : [A1 -> Type(0)]) !(p : @(Group_Hom, g1, g2), q : @(Kernel2, g1, g2, N, p)) !(x1 : A1, y1 : A1) let u = @(CyclGrpHomCol2, g1, g2, p, N, q) in let Nx = @(GRCoset, g1, N, u, x1), Ny = @(GRCoset, g1, N, u, y1) in let Nxy = @(GRCoset, g1, N, u, @(s1, x1, y1)) in let NxNy = \(w1 : A1) ?(u1 : A1, v1 : A1) @(And, @(Equal, A1, w1, @(s1, u1, v1)), @(And, @(Nx, u1), @(Ny, v1))) in @(Equal1, [A1 -> Type(0)], Nxy, NxNy);
Thus G’ is determined to within isomorphism by G and N: it is isomorphic with the system of cosets of N in G, multiplied by the rule that the “product” Nx ◦ Ny of two cosets is the (unique) coset containing all products uv (u ∈ Nx, v ∈ Ny). We will now establish a quotient-group from group G and any normal subgroup N of G as follows: Lemma 6.11 The cosets of any normal subgroup N of G form a group under multiplication. In terms of PowerEpsilon, we have the following definitions. Iden RCoset for identity and Comp RCoset for composition operator. def Iden_RCoset = \(S : Subgroup2, u : @(Normal, S))
Groups
210
let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in @(RCoset2, S, o); def Comp_RCoset = \(S : Subgroup2, u : @(Normal, S)) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in \(Nx : ?(x : A) [A -> Type(0)], Ny : ?(y : A) [A -> Type(0)]) let x = @(FST, Nx), y = @(FST, Ny) in @(RCoset2, S, @(s, x, y));
We then will be able to prove that under the definitions given above the right cosets satisfy the postulates of groups. dec Quot_Ax_Gr_Pr : !(S : Subgroup2, u : @(Normal, S)) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in @(And, @(Ide_ax1, ?(x : A) [A -> Type(0)], @(Iden_RCoset, S, u), @(Comp_RCoset, S, u)), @(And1, @(Ass_ax1, ?(x : A) [A -> Type(0)], @(Comp_RCoset, S, u)), @(Inv_ax1, ?(x : A) [A -> Type(0)], @(Iden_RCoset, S, u), @(Comp_RCoset, S, u))));
Definition 6.25 The group of cosets of N is called the quotient-group (or factor group) of G by N and is denoted by G/N. The correspondence x 7→ Nx is a homomorphism of G onto G/N, and the kernel
Groups
211
of this homomorphism is N. def Quot_Group = \(S : Subgroup2, u : @(Normal, S)) let g = @(FST, S), N = @(FST, @(SND, S)) in let t = @(FST, g) in let A = @(FST, t), o = @(FST, @(SND, t)), s = @(SND, @(SND, t)) in @(Gr_Gen1,