MAC TR-95 fcSSAVS IN ALGEBR/MC SIMPLIFICATION RICHARD J. PATEMAN APRIL 19/2 Spor sored by Advanced Research Projecis Agency ARPA Order No. 433 MASSACHUSETTS INSTITUTE OF TECHNOLOev PROJECT MAC MASSACHUSETTS 0)139 NATION/ MATION SERVICE BEST AVAILABLE COPY UNCLASSTFTED Sactuity CUuidcaliM DOCUMENT OONTMM. DATA . IAD f««cw»r cl—iMcil— »I nil«, tm£ ml aimnM mH Mtlmi mtmiuMum mmmt >» wwwX ■»•» *• ».«rail tt^ti <« cl««»<li»<j I. OMMaIOsINsAaTcIMhOu AsCeTItVtITsY (CI—npstmt»i, mtiulmti)e of Technology la. mt'omr HCUMITT CL»»II»IC»T'ON UNCLASSIFIED Project MAC U. OMOUP Nnnp * MCPO*T TITtB Essays on Algebraic Simplification «. 01 mmmfmmm*im*mnm**mmm$ An M.I.T. revision of a Ph.D. thesis, Division of Engineering & Applied Physics, Harvard Univ., April 1971 S. AUTHOHItl <La»> nm : Ufintm: MIMal> Fateman, Richard J., 1. m^ONT 0»TI »• TOTAL NO. OP PAOIS }» NO or MCM April 1972 192 (a. CONTNACT ON CHANT NO. •in N00014-70-A-0362-0001 MAC TR-95 »• mojicT NO. OTHIA •■»•OUT N0III <A»r •*•» ■iwlata Ma< ••r •• Mt0f4 Ma npiil> 10. AVAILAHLITT/LIMITATION NOTICCI Distribution of this document is unlimited It. irONIOHINO MILITANT ACTIVITY Advanced Research Projects Agency None 3D-200 Pentagon • Washington, P.C. 20301 i* •T«ACT •pfeis thesis consists of essays on several aspects of the problem of algebraic simplification by computer. J*e first discuss a pattern matching system intended to recognize non-obvious occurrences of patterns within algebraic expression. A user of such a system can "teach" the computer new simplification rules. Then we report on new applications of canonical simplification of rational functions. These applications include techniques for picking out coefficients, and for substituting for sums, products, quotients, etc. Our final essay is on a new, practical, canonical simplification algorithm for radical ex- pressions (i.e. algebraic expressions including roots of polynor.üals) . The effectiveness of the procedure is assured through proofs of appro- priate properties of the simplified forms. Two appendices describe MACSYMA, a computer system for algebrair manipulations, which served as the basis for this work. 14. RLT WONOI Algubraic Manipulation Algebraic Simplification Canonical Forms Rational Functions Polynomials Radical Expressions Pattern Matching Time-shared Computer Systems DD.U:-«1473 (M.I.T.) UNCLASSIFTED Security Cltttifirstion ARPA Order Number 433 Program Codp Nuubci N60017 ARPA Contract Number N0Ö0U-70-A-0362-0001 Principal Investigator: Edward Fredkln Phone Number: 617-864-6900 Ext. 5852 Name of Contractor: Massachusetts Institute of Technology Effective Date of Contract: 1 March 1963 Contract Expiration Date: 30 June 1972 Amount of Contract: $26,601,248.00 Scientific Officer: Marvin Denlcoff, Director Information Systems Branch Mathematical Sciences Division Office of Naval Research Dept. of the Navy Arlington, Virginia 22217 Short Title of Work; Algebraic Simplification This research was supp rted by the Advanced Research Projects Agency of the Dept. of Defense and was monltoi -d by ONR under Contract No. N00014-70-A-0362-0001. ESSAYS IN ALGEBRAIC SIMPLIFICATION A Revision of A Thesis Presented by Richard J. Fateman APRIL 1972 PROJECT MAC MASSACHUSETTS INSTITUTE OF TECHNOLOGY Cambridge Massachusetts - 2 - ABSTRACT This thesis consists of essays on several aspects of the problem cf algebraic simplification by computer. Since simpli- fication is at the core of most algebraic manipulations, effi- cient and effective simplification procedures are essential to building useful computer systems for non-numerical machematlcs. Efficiency is attained through carefully designed and engineered algorithms, heuristics, and data types, while effectiveness is assured through theoretical considerations. Chapter 1 Is an Introduction to the field of algebraic ma- nipulation, and serves to place the following chapters In per- spective. Chapter 2 reports on an original design for, and program- ming implementation of, a pattern matching system Intended to recognize non-obvicus occurrences of patterns within algebraic expressions. A user of such a system cjn "teach" the computer new simplification rules. Chapter 3 reports on new applications of standard mathema- tical algorithms used for canonical simplification of rational expressions. These applications, in combinations, allow a computer system to contain a fair amount of expertise In seve-al areas of algebraic manipulation. - 3 - Chapter U reports on a new, practical, canonical simpli- fication algorithm for radical expressions (i.e. algebraic ex- pressions including roots of polynomials). The effectiveness of the procedure is assured through proofs of appropriate properties of these simplified expressions. Chapter S is a brief summary and a discussion of potential research areas. , Two appendices describe MACSYMA, a computer system for symbolic manipulation, an effort of some dozen researchers (including the author) which has served as the vehicle for this work. - 4 - PREFACE This thesis describes a number of contributions to the nrt and science of manipulating algebraic expressions hy compeer. All the experiments were performed using MACSYMA, a computer system for symbolic manipulation of algebraic expressions now under development at the Massachusetts Institute of Technology's Project MAC. The contributions to MACSYMA of some 12 people are detailed In (31). My contributions are as follows. I designed and programmed the rational function package, the radical simplifies the semantic matching subsystem, "SOLVE", the rational "substitution" and "coefficient" routines, and portions of the supervisor and top-level simplifier. I also designed and Implemented a major revision of the polynomial package Incorporating the fast modular greatest common divisor algorithm (3). This revision makes possible the Implementation of the much improved factorization algorithm now in progress (2). Previous theses which describe parts of MACSYMA or Its logical predecessors ((30), (35)) have Included LISP (JJ) listings of the programs used. At this point It is becoming impractical to Include such listing'., eonttltutln* several hundred printed pages. Furthermore, r.uch publication Is of doubtful usefulness since listings and an operational system will be available In the near future to a community of users through th« ^RPA computer network. The system presently occupies some nn,C00 3R- bit computer words and will undoubtedly continue to rrow. - 5 - Work reported herein was supported In part by Project MAC / an M.I.T. interdepartmental laboratory sponsored by the Advanced Research Projects Agency (ARPA)^ Department of Defense, under Office of Naval Research Contract fin001«»-70-A-P362-0001. The author was supported, while a ßraduate student, by ARPA under Air Force contract F1P628-68-0101 with Harvard University, by the National Science Foundation under their Hraduate Tralnoeship pro- gram and by Bell Telephone Laboratories under a contract with Harvard University. Revision of this thesis prior to publication as a MAC Technical Report has been supported in part by the Department of Mathematics, M.I.T. throußb national Science Foundation firant GP 22796. I wish to thank Professor Joel Moses of M.I.T, for his contlnulnR Interest, comments, and suggestions, which have pulded me In this work. I would also like to thank Professor A. C. Oettlnger of Harvard, for providing support, advice, encouragement, and valuable criticism, while allowing ne considerable freedom In ny area of research. - 6 - CONTENTS Chapter 1 - Introduction g 1.1 Algebraic Manipulation g l.J' Algebraic Manipulation by Computer: Prospects and lea I i t i es 12 1.3 Problems and Goals , || l.k Specific Goats of the Thesis 18 Chapter 2 - The User-Level Semantic Matching Capability in MACSYMA 23 2.0 Introduction and Overview 23 2.1 Predicates and Declarations 29 2.2 Match Definitions 32 2.3 Selectors 35 2.1» More Match Details 37 2.5 Markov Algorithms 1,2 2.5.1 Applying Rules 1,3 2.5.2 An Example || 2.6 Advising the Simplifier , || 2.7 Non-Commutative Multiplication 50 2.8 Comparisons with StHATCHEN, FAMOUS, REDUCE, Formula Algol 53 2.9 Differential Equations 62 2.10 Other ApplIcations 63 2.11 Conclusions 51, Appendix I to Chapter 2 - Detailed description of the match processor 55 Appendix II to Chapter 2 - LISP listing of QUAD 73 Appendix 11 I to Chapter 2 - Pa'.tern matching from a theoretical standpoint 75
Description: