A Type-Coercion Problem in Computer Algebra

Size: px
Start display at page:

Download "A Type-Coercion Problem in Computer Algebra"

Transcription

1 Lecture Notes in Computer Science 737, pages A Type-Coercion Problem in Computer Algebra Andreas Weber Wilhelm-Schickard-Institut Universität Tübingen W-7400 Tübingen, Germany hweber@informatik.uni-tuebingen.dei Abstract. An important feature of modern computer algebra systems is the support of a rich type system with the possibility of type inference. Basic features of such a type system are polymorphism and coercion between types. Recently the use of order-sorted rewrite systems was proposed as a general framework. We will give a quite simple example of a family of types arising in computer algebra whose coercion relations cannot be captured by a finite set of first-order rewrite rules. Keywords: Computer algebra, type systems, subtyping, type coercion, type inference, order-sorted rewriting, universal algebra. 1 Introduction Early computer algebra systems did not have a sophisticated type system. This is mainly due to the fact that the types occurring in traditional programming languages are not fully appropriate for algebraic computations. With the progress in computer algebra the number of applications and so of computational domains grew. As a result of not having language constructs that aid in organization the larger systems are considered to be at or near the ceiling of their extendability. Therefore modern languages for symbolic computation come with a type concept [1], [2], and [3]. An important feature that has to be accomplished by a type system is the possibility of an automatic type inference. As an example, the user of a system would like to write down x x + 2 and the system should infer that this is a polynomial over the rationals. Since the problem of type inference in computer algebra is largely predefined by mathematical practice, finding a general mechanism for doing type inference in computer algebra has turned out to be difficult. Some suggestions are given in [4], [5], [6], and [7]. The suggestions given in [4], [6], and [7] are also an attempt to give a safe theoretical foundation for the type inference facilities of an existing system as AXIOM 1 [1]. 1 AXIOM is a trademark of The Numerical Algorithms Group Ltd.

2 189 A notion that is common to all these approaches is that of coercion. It should be possible that the system automatically coerces one type to another, e. g. an integer into a rational number or into an integral polynomial. In [6] the coercion rules are interpreted as rewrite rules over an order-sorted algebra. Types are terms in an order-sorted algebra and term rewriting techniques are used for type inference. This approach seems to be very promising. By the use of type variables many coercion problems arising in a computer algebra system can be handled in a uniform way. Moreover, the use of rules guarantees an easy extendability for future applications. Since term rewriting techniques are well established, a transfer of useful results should be possible to gain practically applicable systems. However, in a certain sense the approach in [6] is too general to be applicable to an important range of problems. If arbitrary (first-order) terms are allowed in the rewrite rules, the general type inference problem becomes undecidable. Therefore we study typical examples from computer algebra in order to find restrictions on the rewrite rules under which the type inference problem becomes decidable. Unfortunately there are not only examples which would suggest such restrictions. There is also a quite simple example of a family of types arising in computer algebra whose coercion relations cannot be captured by a finite set of first-order rewrite rules at all! We will present this example in Sect. 4. A technical result which is needed to set up the example will be proved in Sect Preliminaries We will assume that the reader is familiar with the basic notions of rewrite systems as can be found in [8]. We will also need some concepts of universal algebra. A comprehensive reference is [9]. The set of non-negative integers will be denoted by IN. We will 0 for the first infinite cardinal, the cardinality of IN. The set of strings over an alphabet L will be L, where " is the empty string. We will use to denote a first-order signature. E, E 0 will be sets of equations over, in which we will use t x y v 0 v 1 ::: as variables. The size of a term is the number of function symbols occurring in it. If an algebra A is a model of a set of equations E, we will write Aj= E. A set of equations E over is axiomatized by a set of equations E 0 iff for any algebra A of the type given by, Aj= E implies Aj= E 0. In this case we will write E 0 j= E. E is finitely based iff there is a finite set of equations E 0 which axiomatizes it. Recall that for any cardinal and any set of equations E the free algebra on generators for the equational class defined by E exists (see [9, p. 167]). It can be constructed as the term algebra over the set of generators modulo the equivalence relation given by the equations and is unique up to isomorphism. We will call this algebra the free model of generators over E. We will use the notation of [6]. Since we are basically dealing with terms of the same sort in the example (integral domains), the order-sorted framework collapses to a single sorted one. Thus we will just write down first-order terms to simplify notation.

3 190 3 A Technical Result Definition 1. Let f : fp Fg ;!fp Fg be the function, which is defined by the following algorithm: If no F is occurring in the input string, then return the input string as output string. Otherwise, remove any F except the leftmost occurrence from the input string and return the result as output string. Let be the binary relation on fp Fg which is defined by 8v w 2fP Fg : v w () f (v) =f (w): Obviously, the function f can be computed in linear time and the relation is an equivalence relation on fp Fg. Let be the first-order signature consisting of the two unary function Symbols F and P. We will now lift the equivalence relation to a set of equations over. Definition 2. Let E be the following set of equations: E = f S 1 (S 2 (S k (x) )=S k+1(s k+2(s r (x) )) : S i 2fF Pg (1 i r) and S 1 S 2 S k S k+1s k+2 S r g Theorem 3. E is not finitely based, i. e. there is no finite set of axioms for E. Proof. Assume towards a contradiction that there is such a finite set E 0. Let M be the free model 0 generators over E and let M 0 be the free model of one generator over E 0. Except for a possible renaming of the variable symbol x, E 0 has to be a subset of E. Otherwise, E 0 would contain an equation of the form or of the form S 1 (S 2 (S k (x) )=S k+1(s k+2(s r (y) )) S 1 (S 2 (S k (x) )=S k+1(s k+2(s r (x) )) S 1 S 2 S k 6 S k+1s k+2 S r : However, none of these equations holds in M. Now let n 2 IN be the maximal size of a term in E 0. Then the equation F (P (P ((P {z } n (x)) ))) = F (P (F (P (P ((P (x)) ))))) {z } n;1 holds in M, but it does not hold in M 0. ut

4 191 4 A Type-Coercion Problem If R is an integral domain, we can form the field of fractions FF(R). We can also built the ring of univariate polynomials in the indeterminate x which we will denote by UP(R x) the ring of polynomials R[x] in the standard mathematical notation which is again an integral domain by a Lemma of Gauß. Thus we can also built the field of fractions of UP(R x), FF(UP(R x)) the field of rational functions R(x). Starting from an integral domain R we will always get an integral domain and can repeatedly built the field of fractions and the ring of polynomials in a new indeterminate. Thus if a computer algebra system has a fixed integral domain R and names for symbols x 0 x 1 x 2 :::, it should also provide types of the form 1. R, 2. FF(R), 3. UP(R x 0 ), 4. UP(FF(R) x 0 ), 5. FF(UP(R x 0 )), 6. UP(UP(R x 0 ) x 1 ), 7. UP(FF(UP(R x 0 )) x 1 ), 8. FF(UP(UP(R x 0 ) x 1 )), 9. FF(UP(FF(UP(R x 0 )) x 1 ), 10. UP(UP(UP(R x 0 ) x 1 ) x 2 ),. It is convenient to use the same symbols for a mathematical object and the symbolic expression which denotes the object. In order to clarify things we will sometimes use additional hhii for the mathematical objects. There are canonical embeddings from an integral domain into its field of fractions and into the ring of polynomials in one indeterminate (an element is mapped to the corresponding constant polynomial). It is common mathematical practice to identify the integral domain with its image under these embeddings. Thus the type system should also provide a coercion between these types. If t is a type variable which ranges over integral domains and x is a symbol, this property can be expressed by the rules and t! FF(t) t! UP(t x) in the framework of [6]. However, not all of the types built by the type constructors FF and UP should be regarded to be different. If the integral domain R happens to be a field, then R will be isomorphic to its field of fractions. Especially, for any integral domain R, hhff(r)ii and hhff(ff(r))ii are isomorphic.

5 192 The fact that also hhff(ff(r))ii can be embedded in hhff(r)ii can be expressed by a rule FF(FF(t))! FF(t) which is one of the examples given in [6, p. 354]. But there are more isomorphisms which govern the relations of this family of types. If we assume that an application of the type constructor UP always uses a new indeterminate as its second argument, any application of the type constructor FF except the outermost one application is redundant. This observation will be captured by the following formal treatment. In order to avoid the technical difficulty of introducing new indeterminates, we will use an unary type constructor up instead the binary UP. The intended meaning of up(t) is UP(t x n ), where x n is a new symbol, i. e. not occurring in t. Definition 4. Define a function trans from ff Pg into the set of types recursively by the following equations. For w 2fF Pg, trans(") =R, trans(fw)=ff(trans(w)), trans(pw)=up(trans(w)). If we take hhrii to be the ring of integers, the following lemma will be an exercise in elementary calculus. 2 Lemma 5. Let hhrii be the ring of integers. For any v w 2fF Pg, the integral domains hhtrans(v)ii and hhtrans(w)ii are isomorphic iff v w. Moreover, hhtrans(v)ii can be embedded in hhtrans(w)ii and hhtrans(w)ii can be embedded in hhtrans(v)ii iff hhtrans(v)ii and hhtrans(w)ii are isomorphic. The simplifications of rational expressions are some of the most frequently used operations in many computer algebra systems. Very often, they are just concrete implementations of the embeddings of Lemma 5. Thus it would be of practical interest if these coercions between types could also be captured within the type system. However, this cannot be done by the use of a term rewriting system over the corresponding signature, since the finite set of rules corresponds to a finite set of equations only. Theorem 6. Let be the signature consisting of the unary function symbols FF and up and the constant R. Let hhrii be the ring of integers. Then there is no finite set of Equations E 0 over, such that for ground terms t 1 and t 2 the following holds. E 0 j= ft 1 = t 2 g()hht 1 ii and hht 2 ii are isomorphic. Proof. If t 1 and t 2 are ground terms, then there are v w 2fF Pg such that t 1 = trans(v) and t 2 = trans(w). Now we are done by Lemma 5 and Theorem 3. ut 2 If we started with the ring of polynomials in infinitely many indeterminates over some domain, then there would be additional isomorphisms.

6 193 The problem is that the equational theory which describes the coercion relations in the example we gave is not finitely based. Since this property of an equational theory is equivalence-invariant in the sense of [9, p. 382], the use of another signature for describing the types does not help. 5 Conclusion The use of rewrite rules seems to be a promising way to describe the coercions between types which occur in a computer algebra system. Important examples can be nicely described in a very short way and it is possible to extend a system by simply adding new rules. Unfortunately there are simple examples of families of types arising in computer algebra whose coercion relations cannot be captured by a finite set of first-order rewrite rules at all. In the present paper we have given a quite simple example of such a system, whose behavior on the object-level can be handled by many existing computer algebra systems. It is of major practical importance to have a safe and reliable interaction between various parts of a computer algebra system. Since many parts of the type system of such a system can be nicely described by rewrite rules, it would be useful if the example that we have given could be incorporated in this framework. This seems to be possible. The relations of the types can be described by means of the equational theory E of Definition 2. Since equivalence under E is decidable, it is possible to use methods of class-rewriting (see [8, Sect. 2.5]). For most practical purposes it will be sufficient to distinguish only between the integers, the rationals, polynomials (in arbitrary many indeterminates) over the integers, polynomials (in arbitrary many indeterminates) over the rationals, and rational functions (in arbitrary many indeterminates) over the integers. This approach is taken in the type system of AXIOM. Acknowledgments. I am indebted to R. Loos, R. Bündgen, and F. Haug for helpful discussions. The suggestions of an anonymous referee helped to improve the paper. References 1. Robert S. Sutor and Richard D. Jenks. The type inference and coercion facilities in the Scratchpad II interpreter. ACM SIGPLAN Notices, 22(7):56 63, SIGPLAN 87 Symposium on Interpreters and Interpretive Techniques. 2. J. H. Davenport and B. M. Trager. Scratchpad s view of algebra I: Basic commutative algebra. In Miola [10], pages S. Kamal Abdali, Guy W. Cherry, and Neil Soiffer. A Smalltak system for algebraic manipulation. ACM SIGPLAN Notices, 21(11): , November OOPSLA 86 Conference Proceedings, Portland, Oregon. 4. D. L. Rector. Semantics in algebraic computation. In Erich Kaltofen and Stephen M. Watt, editors, Computers and Mathematics, pages , Massachusetts Institute of Technology, June Springer-Verlag.

7 Gerald Baumgartner and Ryan Stansifer. A proposal to study type systems for computer algebra. Technical Report , Research Institute for Symbolic Computation Linz, A Linz, Austria, March H. Comon, D. Lugiez, and Philippe Schnoebelen. A rewrite-based type discipline for a subset of computer algebra. Journal of Symbolic Computation, 11: , Albrecht Fortenbacher. Efficient type inference and coercion in computer algebra. In Miola [10], pages Nachum Dershowitz and Jean-Pierre Jouannaud. Rewrite systems. In Jan van Leeuwen, editor, Formal Models and Semantics, volume B of Handbook of Theoretical Computer Science, chapter 6, pages Elsevier, Amsterdam, George Grätzer. Universal Algebra. Springer-Verlag, New York, second edition, A. Miola, editor. Design and Implementation of Symbolic Computation Systems (DISCO 90), volume 429 of Lecture Notes in Computer Science, Capri, Italy, April Springer-Verlag. This article was processed using the LAT E X macro package with LLNCS style

Associative-commutative rewriting via flattening

Associative-commutative rewriting via flattening Associative-commutative rewriting via flattening Jean-Pierre Jouannaud LIX, École Polytechnique 91400 Palaiseau, France Email: jouannaud@lix.polytechnique.fr http://www.lix.polytechnique.fr/labo/jouannaud

More information

The Part of the Theory of Ground Term Algebra Modulo an AC Symbol is Undecidable 1

The Part of the Theory of Ground Term Algebra Modulo an AC Symbol is Undecidable 1 Information and Computation 178, 412 421 (2002) doi:10.1006/inco.2002.3145 The Part of the Theory of Ground Term Algebra Modulo an AC Symbol is Undecidable 1 Jerzy Marcinkowski 2 Institute of Computer

More information

2. Introduction to commutative rings (continued)

2. Introduction to commutative rings (continued) 2. Introduction to commutative rings (continued) 2.1. New examples of commutative rings. Recall that in the first lecture we defined the notions of commutative rings and field and gave some examples of

More information

Meadows. April 19, J A Bergstra 1. Informatics Institute, University of Amsterdam, Kruislaan 403, 1098 SJ Amsterdam, The Netherlands

Meadows. April 19, J A Bergstra 1. Informatics Institute, University of Amsterdam, Kruislaan 403, 1098 SJ Amsterdam, The Netherlands Meadows April 19, 2007 J A Bergstra 1 Informatics Institute, University of Amsterdam, Kruislaan 403, 1098 SJ Amsterdam, The Netherlands Y Hirschfeld 2 Department of Mathematics, Tel Aviv University, Tel

More information

Herbrand Theorem, Equality, and Compactness

Herbrand Theorem, Equality, and Compactness CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order

More information

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 20, 2009 Final versions: June 18, 2009

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 20, 2009 Final versions: June 18, 2009 DCFS 2009 Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 20, 2009 Final versions: June 18, 2009 On the Number of Membranes in Unary P Systems Rudolf Freund (A,B) Andreas

More information

Algebras with finite descriptions

Algebras with finite descriptions Algebras with finite descriptions André Nies The University of Auckland July 19, 2005 Part 1: FA-presentability A countable structure in a finite signature is finite-automaton presentable (or automatic)

More information

The rest of the paper is organized as follows: in Section 2 we prove undecidability of the existential-universal ( 2 ) part of the theory of an AC ide

The rest of the paper is organized as follows: in Section 2 we prove undecidability of the existential-universal ( 2 ) part of the theory of an AC ide Undecidability of the 9 8 part of the theory of ground term algebra modulo an AC symbol Jerzy Marcinkowski jma@tcs.uni.wroc.pl Institute of Computer Science University of Wroc law, ul. Przesmyckiego 20

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2008/09

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Dexter Kozen Cornell University, Ithaca, New York 14853-7501, USA, kozen@cs.cornell.edu, http://www.cs.cornell.edu/~kozen In Honor

More information

Transformational programming and forests

Transformational programming and forests Transformational programming and forests AB18 1 A. Bijlsma Eindhoven University of Technology Department of Mathematics and Computing Science P.O. Box 513, 5600 MB Eindhoven, The Netherlands Introduction

More information

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u. 5. Fields 5.1. Field extensions. Let F E be a subfield of the field E. We also describe this situation by saying that E is an extension field of F, and we write E/F to express this fact. If E/F is a field

More information

Lecture 2: Syntax. January 24, 2018

Lecture 2: Syntax. January 24, 2018 Lecture 2: Syntax January 24, 2018 We now review the basic definitions of first-order logic in more detail. Recall that a language consists of a collection of symbols {P i }, each of which has some specified

More information

Mathematical Foundations of Logic and Functional Programming

Mathematical Foundations of Logic and Functional Programming Mathematical Foundations of Logic and Functional Programming lecture notes The aim of the course is to grasp the mathematical definition of the meaning (or, as we say, the semantics) of programs in two

More information

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ NICOLAS FORD Abstract. The goal of this paper is to present a proof of the Nullstellensatz using tools from a branch of logic called model theory. In

More information

On Modal Logics of Partial Recursive Functions

On Modal Logics of Partial Recursive Functions arxiv:cs/0407031v1 [cs.lo] 12 Jul 2004 On Modal Logics of Partial Recursive Functions Pavel Naumov Computer Science Pennsylvania State University Middletown, PA 17057 naumov@psu.edu June 14, 2018 Abstract

More information

Claude Marche. Bat 490, Universite Paris-Sud. Abstract

Claude Marche. Bat 490, Universite Paris-Sud.   Abstract The Word Problem of ACD-Ground theories is Undecidable Claude Marche Laboratoire de Recherche en Informatique (UA 410 CNRS) Bat 490, Universite Paris-Sud 91405 ORSAY CEDEX, FRANCE E-mail: marche@lri.lri.fr

More information

Equational Logic. Chapter 4

Equational Logic. Chapter 4 Chapter 4 Equational Logic From now on First-order Logic is considered with equality. In this chapter, I investigate properties of a set of unit equations. For a set of unit equations I write E. Full first-order

More information

Handbook of Logic and Proof Techniques for Computer Science

Handbook of Logic and Proof Techniques for Computer Science Steven G. Krantz Handbook of Logic and Proof Techniques for Computer Science With 16 Figures BIRKHAUSER SPRINGER BOSTON * NEW YORK Preface xvii 1 Notation and First-Order Logic 1 1.1 The Use of Connectives

More information

arxiv: v1 [cs.pl] 19 May 2016

arxiv: v1 [cs.pl] 19 May 2016 arxiv:1605.05858v1 [cs.pl] 19 May 2016 Domain Theory: An Introduction Robert Cartwright Rice University Rebecca Parsons ThoughtWorks, Inc. Moez AbdelGawad SRTA-City Hunan University This monograph is an

More information

What are Iteration Theories?

What are Iteration Theories? What are Iteration Theories? Jiří Adámek and Stefan Milius Institute of Theoretical Computer Science Technical University of Braunschweig Germany adamek,milius @iti.cs.tu-bs.de Jiří Velebil Department

More information

Chapter One. The Real Number System

Chapter One. The Real Number System Chapter One. The Real Number System We shall give a quick introduction to the real number system. It is imperative that we know how the set of real numbers behaves in the way that its completeness and

More information

a (b + c) = a b + a c

a (b + c) = a b + a c Chapter 1 Vector spaces In the Linear Algebra I module, we encountered two kinds of vector space, namely real and complex. The real numbers and the complex numbers are both examples of an algebraic structure

More information

mat.haus project Zurab Janelidze s Lectures on UNIVERSE OF SETS last updated 18 May 2017 Stellenbosch University 2017

mat.haus project Zurab Janelidze s Lectures on UNIVERSE OF SETS last updated 18 May 2017 Stellenbosch University 2017 Zurab Janelidze s Lectures on UNIVERSE OF SETS last updated 18 May 2017 Stellenbosch University 2017 Contents 1. Axiom-free universe of sets 1 2. Equality of sets and the empty set 2 3. Comprehension and

More information

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004 KAT and Hoare Logic In this lecture and the next we show that KAT subsumes propositional Hoare logic (PHL). Thus the specialized

More information

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

Hypersequent Calculi for some Intermediate Logics with Bounded Kripke Models

Hypersequent Calculi for some Intermediate Logics with Bounded Kripke Models Hypersequent Calculi for some Intermediate Logics with Bounded Kripke Models Agata Ciabattoni Mauro Ferrari Abstract In this paper we define cut-free hypersequent calculi for some intermediate logics semantically

More information

Making functionality more general

Making functionality more general Making functionality more general Graham Hutton, University of Glasgow Ed Voermans, Eindhoven University of Technology March 23, 1992 Abstract The notion of functionality is not cast in stone, but depends

More information

Hierarchic Superposition: Completeness without Compactness

Hierarchic Superposition: Completeness without Compactness Hierarchic Superposition: Completeness without Compactness Peter Baumgartner 1 and Uwe Waldmann 2 1 NICTA and Australian National University, Canberra, Australia Peter.Baumgartner@nicta.com.au 2 MPI für

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

On minimal models of the Region Connection Calculus

On minimal models of the Region Connection Calculus Fundamenta Informaticae 69 (2006) 1 20 1 IOS Press On minimal models of the Region Connection Calculus Lirong Xia State Key Laboratory of Intelligent Technology and Systems Department of Computer Science

More information

Polynomials, Ideals, and Gröbner Bases

Polynomials, Ideals, and Gröbner Bases Polynomials, Ideals, and Gröbner Bases Notes by Bernd Sturmfels for the lecture on April 10, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra We fix a field K. Some examples of fields

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

Stanford Encyclopedia of Philosophy

Stanford Encyclopedia of Philosophy Stanford Encyclopedia of Philosophy The Mathematics of Boolean Algebra First published Fri Jul 5, 2002; substantive revision Mon Jul 14, 2014 Boolean algebra is the algebra of two-valued logic with only

More information

Algebraic Varieties. Notes by Mateusz Micha lek for the lecture on April 17, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra

Algebraic Varieties. Notes by Mateusz Micha lek for the lecture on April 17, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra Algebraic Varieties Notes by Mateusz Micha lek for the lecture on April 17, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra Algebraic varieties represent solutions of a system of polynomial

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

Computational Tasks and Models

Computational Tasks and Models 1 Computational Tasks and Models Overview: We assume that the reader is familiar with computing devices but may associate the notion of computation with specific incarnations of it. Our first goal is to

More information

Consequence Relations and Natural Deduction

Consequence Relations and Natural Deduction Consequence Relations and Natural Deduction Joshua D. Guttman Worcester Polytechnic Institute September 9, 2010 Contents 1 Consequence Relations 1 2 A Derivation System for Natural Deduction 3 3 Derivations

More information

Halting and Equivalence of Schemes over Recursive Theories

Halting and Equivalence of Schemes over Recursive Theories Halting and Equivalence of Schemes over Recursive Theories Dexter Kozen Computer Science Department, Cornell University, Ithaca, New York 14853-7501, USA Abstract Let Σ be a fixed first-order signature.

More information

About the relationship between formal logic and complexity classes

About the relationship between formal logic and complexity classes About the relationship between formal logic and complexity classes Working paper Comments welcome; my email: armandobcm@yahoo.com Armando B. Matos October 20, 2013 1 Introduction We analyze a particular

More information

CHAPTER 3: THE INTEGERS Z

CHAPTER 3: THE INTEGERS Z CHAPTER 3: THE INTEGERS Z MATH 378, CSUSM. SPRING 2009. AITKEN 1. Introduction The natural numbers are designed for measuring the size of finite sets, but what if you want to compare the sizes of two sets?

More information

Lecture 7. Logic. Section1: Statement Logic.

Lecture 7. Logic. Section1: Statement Logic. Ling 726: Mathematical Linguistics, Logic, Section : Statement Logic V. Borschev and B. Partee, October 5, 26 p. Lecture 7. Logic. Section: Statement Logic.. Statement Logic..... Goals..... Syntax of Statement

More information

MIT Algebraic techniques and semidefinite optimization February 16, Lecture 4

MIT Algebraic techniques and semidefinite optimization February 16, Lecture 4 MIT 6.972 Algebraic techniques and semidefinite optimization February 16, 2006 Lecture 4 Lecturer: Pablo A. Parrilo Scribe: Pablo A. Parrilo In this lecture we will review some basic elements of abstract

More information

An Algebraic Characterization of the Halting Probability

An Algebraic Characterization of the Halting Probability CDMTCS Research Report Series An Algebraic Characterization of the Halting Probability Gregory Chaitin IBM T. J. Watson Research Center, USA CDMTCS-305 April 2007 Centre for Discrete Mathematics and Theoretical

More information

Polynomial Rings and Group Rings for Abelian Groups. E. L. Lady. (June 16, 2009)

Polynomial Rings and Group Rings for Abelian Groups. E. L. Lady. (June 16, 2009) Polynomial Rings and Group Rings for Abelian Groups E. L. Lady (June 16, 2009) A lifetime or so ago, when I was teaching at the University of Kansas, Jim Brewer and I wrote a paper on group rings for finite

More information

CITS2211 Discrete Structures (2017) Cardinality and Countability

CITS2211 Discrete Structures (2017) Cardinality and Countability CITS2211 Discrete Structures (2017) Cardinality and Countability Highlights What is cardinality? Is it the same as size? Types of cardinality and infinite sets Reading Sections 45 and 81 84 of Mathematics

More information

A Preference Semantics. for Ground Nonmonotonic Modal Logics. logics, a family of nonmonotonic modal logics obtained by means of a

A Preference Semantics. for Ground Nonmonotonic Modal Logics. logics, a family of nonmonotonic modal logics obtained by means of a A Preference Semantics for Ground Nonmonotonic Modal Logics Daniele Nardi and Riccardo Rosati Dipartimento di Informatica e Sistemistica, Universita di Roma \La Sapienza", Via Salaria 113, I-00198 Roma,

More information

Outline. We will now investigate the structure of this important set.

Outline. We will now investigate the structure of this important set. The Reals Outline As we have seen, the set of real numbers, R, has cardinality c. This doesn't tell us very much about the reals, since there are many sets with this cardinality and cardinality doesn't

More information

VAUGHT S THEOREM: THE FINITE SPECTRUM OF COMPLETE THEORIES IN ℵ 0. Contents

VAUGHT S THEOREM: THE FINITE SPECTRUM OF COMPLETE THEORIES IN ℵ 0. Contents VAUGHT S THEOREM: THE FINITE SPECTRUM OF COMPLETE THEORIES IN ℵ 0 BENJAMIN LEDEAUX Abstract. This expository paper introduces model theory with a focus on countable models of complete theories. Vaught

More information

Notes on Computer Systems for Solving Symbolic Equations

Notes on Computer Systems for Solving Symbolic Equations Notes on Computer Systems for Solving Symbolic Equations Richard J. Fateman March, 1991, revisited 2005 Abstract Math students learn to solve single equations symbolically beginning in elementary or junior

More information

16.29 GUARDIAN: Guarded Expressions in Practice

16.29 GUARDIAN: Guarded Expressions in Practice 564 CHAPTER 16 USER CONTRIBUTED PACKAGES 1629 GUARDIAN: Guarded Expressions in Practice Computer algebra systems typically drop some degenerate cases when evaluating expressions, eg, x/x becomes 1 dropping

More information

Boolean Algebras. Chapter 2

Boolean Algebras. Chapter 2 Chapter 2 Boolean Algebras Let X be an arbitrary set and let P(X) be the class of all subsets of X (the power set of X). Three natural set-theoretic operations on P(X) are the binary operations of union

More information

Introduction to lambda calculus Part 6

Introduction to lambda calculus Part 6 Introduction to lambda calculus Part 6 Antti-Juhani Kaijanaho 2017-02-16 1 Untyped lambda calculus 2 Typed lambda calculi 2.1 Dynamically typed lambda calculus with integers 2.2 A model of Lisp 2.3 Simply

More information

Permutations and Stratified formulae a Preservation Theorem

Permutations and Stratified formulae a Preservation Theorem Permutations and Stratified formulae a Preservation Theorem Thomas Forster December 31, 2013 Abstract It is shown that the sentences (in the language of Set Theory) preserved by the construction usually

More information

Axioms of Kleene Algebra

Axioms of Kleene Algebra Introduction to Kleene Algebra Lecture 2 CS786 Spring 2004 January 28, 2004 Axioms of Kleene Algebra In this lecture we give the formal definition of a Kleene algebra and derive some basic consequences.

More information

Foundations of Mathematics

Foundations of Mathematics Foundations of Mathematics L. Pedro Poitevin 1. Preliminaries 1.1. Sets We will naively think of a set as a collection of mathematical objects, called its elements or members. To indicate that an object

More information

Efficient Recursive Subtyping

Efficient Recursive Subtyping Mathematical Structures in Computer Science, 5(1):113 125, 1995. Also in Proc. POPL 93, pages 419 428. Efficient Recursive Subtyping Dexter Kozen kozen@cs.cornell.edu Michael I. Schwartzbach mis@daimi.aau.dk

More information

CHAPTER 2. FIRST ORDER LOGIC

CHAPTER 2. FIRST ORDER LOGIC CHAPTER 2. FIRST ORDER LOGIC 1. Introduction First order logic is a much richer system than sentential logic. Its interpretations include the usual structures of mathematics, and its sentences enable us

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

5 Set Operations, Functions, and Counting

5 Set Operations, Functions, and Counting 5 Set Operations, Functions, and Counting Let N denote the positive integers, N 0 := N {0} be the non-negative integers and Z = N 0 ( N) the positive and negative integers including 0, Q the rational numbers,

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

Computing with polynomials: Hensel constructions

Computing with polynomials: Hensel constructions Course Polynomials: Their Power and How to Use Them, JASS 07 Computing with polynomials: Hensel constructions Lukas Bulwahn March 28, 2007 Abstract To solve GCD calculations and factorization of polynomials

More information

Step-Indexed Biorthogonality: a Tutorial Example

Step-Indexed Biorthogonality: a Tutorial Example Step-Indexed Biorthogonality: a Tutorial Example Andrew Pitts University of Cambridge Computer Laboratory 1 Introduction The purpose of this note is to illustrate the use of step-indexing [2] combined

More information

Proofs. Chapter 2 P P Q Q

Proofs. Chapter 2 P P Q Q Chapter Proofs In this chapter we develop three methods for proving a statement. To start let s suppose the statement is of the form P Q or if P, then Q. Direct: This method typically starts with P. Then,

More information

Universal Algebra for Logics

Universal Algebra for Logics Universal Algebra for Logics Joanna GRYGIEL University of Czestochowa Poland j.grygiel@ajd.czest.pl 2005 These notes form Lecture Notes of a short course which I will give at 1st School on Universal Logic

More information

On rigid NL Lambek grammars inference from generalized functor-argument data

On rigid NL Lambek grammars inference from generalized functor-argument data 7 On rigid NL Lambek grammars inference from generalized functor-argument data Denis Béchet and Annie Foret Abstract This paper is concerned with the inference of categorial grammars, a context-free grammar

More information

Short Introduction to Admissible Recursion Theory

Short Introduction to Admissible Recursion Theory Short Introduction to Admissible Recursion Theory Rachael Alvir November 2016 1 Axioms of KP and Admissible Sets An admissible set is a transitive set A satisfying the axioms of Kripke-Platek Set Theory

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

Turing Machines, diagonalization, the halting problem, reducibility

Turing Machines, diagonalization, the halting problem, reducibility Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have

More information

A NEW SET THEORY FOR ANALYSIS

A NEW SET THEORY FOR ANALYSIS Article A NEW SET THEORY FOR ANALYSIS Juan Pablo Ramírez 0000-0002-4912-2952 Abstract: We present the real number system as a generalization of the natural numbers. First, we prove the co-finite topology,

More information

Tree Automata and Rewriting

Tree Automata and Rewriting and Rewriting Ralf Treinen Université Paris Diderot UFR Informatique Laboratoire Preuves, Programmes et Systèmes treinen@pps.jussieu.fr July 23, 2010 What are? Definition Tree Automaton A tree automaton

More information

2.2 Lowenheim-Skolem-Tarski theorems

2.2 Lowenheim-Skolem-Tarski theorems Logic SEP: Day 1 July 15, 2013 1 Some references Syllabus: http://www.math.wisc.edu/graduate/guide-qe Previous years qualifying exams: http://www.math.wisc.edu/ miller/old/qual/index.html Miller s Moore

More information

Kleene Algebras and Algebraic Path Problems

Kleene Algebras and Algebraic Path Problems Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate

More information

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009 Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009 Our main goal is here is to do counting using functions. For that, we

More information

A Harvard Sampler. Evan Chen. February 23, I crashed a few math classes at Harvard on February 21, Here are notes from the classes.

A Harvard Sampler. Evan Chen. February 23, I crashed a few math classes at Harvard on February 21, Here are notes from the classes. A Harvard Sampler Evan Chen February 23, 2014 I crashed a few math classes at Harvard on February 21, 2014. Here are notes from the classes. 1 MATH 123: Algebra II In this lecture we will make two assumptions.

More information

Omitting Types in Fuzzy Predicate Logics

Omitting Types in Fuzzy Predicate Logics University of Ostrava Institute for Research and Applications of Fuzzy Modeling Omitting Types in Fuzzy Predicate Logics Vilém Novák and Petra Murinová Research report No. 126 2008 Submitted/to appear:

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January ) Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January 23 30 2017) John Lasseter Revised February 14, 2017 The following notes are a record of the class sessions we ve devoted to the

More information

MAGIC Set theory. lecture 1

MAGIC Set theory. lecture 1 MAGIC Set theory lecture 1 David Asperó University of East Anglia 15 October 2014 Welcome Welcome to this set theory course. This will be a 10 hour introduction to set theory. The only prerequisite is

More information

On Fixed Point Equations over Commutative Semirings

On Fixed Point Equations over Commutative Semirings On Fixed Point Equations over Commutative Semirings Javier Esparza, Stefan Kiefer, and Michael Luttenberger Universität Stuttgart Institute for Formal Methods in Computer Science Stuttgart, Germany {esparza,kiefersn,luttenml}@informatik.uni-stuttgart.de

More information

A Sequent Calculus for Skeptical Reasoning in Autoepistemic Logic

A Sequent Calculus for Skeptical Reasoning in Autoepistemic Logic A Sequent Calculus for Skeptical Reasoning in Autoepistemic Logic Robert Saxon Milnikel Kenyon College, Gambier OH 43022 USA milnikelr@kenyon.edu Abstract A sequent calculus for skeptical consequence in

More information

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2009/2010 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2009/10

More information

Injectivity of Composite Functions

Injectivity of Composite Functions Injectivity of Composite Functions Kim S. Larsen Michael I. Schwartzbach Computer Science Department, Aarhus University Ny Munkegade, 8000 Aarhus C, Denmark Present address: Department of Mathematics and

More information

Extended Abstract: Reconsidering Intuitionistic Duality

Extended Abstract: Reconsidering Intuitionistic Duality Extended Abstract: Reconsidering Intuitionistic Duality Aaron Stump, Harley Eades III, Ryan McCleeary Computer Science The University of Iowa 1 Introduction This paper proposes a new syntax and proof system

More information

Formal Groups. Niki Myrto Mavraki

Formal Groups. Niki Myrto Mavraki Formal Groups Niki Myrto Mavraki Contents 1. Introduction 1 2. Some preliminaries 2 3. Formal Groups (1 dimensional) 2 4. Groups associated to formal groups 9 5. The Invariant Differential 11 6. The Formal

More information

AN INTRODUCTION TO GEOMETRIC STABILITY THEORY

AN INTRODUCTION TO GEOMETRIC STABILITY THEORY AN INTRODUCTION TO GEOMETRIC STABILITY THEORY SALMAN SIDDIQI Abstract. In this paper, we will introduce some of the most basic concepts in geometric stability theory, and attempt to state a dichotomy theorem

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 September 2, 2004 These supplementary notes review the notion of an inductive definition and

More information

(1.3.1) and in English one says a is an element of M. The statement that a is not an element of M is written as a M

(1.3.1) and in English one says a is an element of M. The statement that a is not an element of M is written as a M 1.3 Set Theory I As long as the terms of a mathematical theory are names of concrete objects as concrete as mothers breast, the very first object that received a name in human languages - there is not

More information

8 Appendix: Polynomial Rings

8 Appendix: Polynomial Rings 8 Appendix: Polynomial Rings Throughout we suppose, unless otherwise specified, that R is a commutative ring. 8.1 (Largely) a reminder about polynomials A polynomial in the indeterminate X with coefficients

More information

1. Introduction to commutative rings and fields

1. Introduction to commutative rings and fields 1. Introduction to commutative rings and fields Very informally speaking, a commutative ring is a set in which we can add, subtract and multiply elements so that the usual laws hold. A field is a commutative

More information

A Complete Narrowing Calculus for Higher-Order Functional Logic Programming

A Complete Narrowing Calculus for Higher-Order Functional Logic Programming A Complete Narrowing Calculus for Higher-Order Functional Logic Programming Koichi Nakahara, 1 Aart Middeldorp, 2 Tetsuo Ida 2 1 Canon Inc. Shimomaruko, Ohta-ku, Tokyo 146, Japan 2 Institute of Information

More information

Notes on Proving Arithmetic Equations

Notes on Proving Arithmetic Equations Massachusetts Institute of Technology Course Notes 1 6.844, Spring 03: Computability Theory of and with Scheme February 10 Prof. Albert Meyer revised February 25, 2003, 1300 minutes Notes on Proving Arithmetic

More information

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems

More information

(Rgs) Rings Math 683L (Summer 2003)

(Rgs) Rings Math 683L (Summer 2003) (Rgs) Rings Math 683L (Summer 2003) We will first summarise the general results that we will need from the theory of rings. A unital ring, R, is a set equipped with two binary operations + and such that

More information

Model Theory MARIA MANZANO. University of Salamanca, Spain. Translated by RUY J. G. B. DE QUEIROZ

Model Theory MARIA MANZANO. University of Salamanca, Spain. Translated by RUY J. G. B. DE QUEIROZ Model Theory MARIA MANZANO University of Salamanca, Spain Translated by RUY J. G. B. DE QUEIROZ CLARENDON PRESS OXFORD 1999 Contents Glossary of symbols and abbreviations General introduction 1 xix 1 1.0

More information

Dismatching and Local Disunification in EL

Dismatching and Local Disunification in EL Dismatching and Local Disunification in EL (Extended Abstract) Franz Baader, Stefan Borgwardt, and Barbara Morawska Theoretical Computer Science, TU Dresden, Germany {baader,stefborg,morawska}@tcs.inf.tu-dresden.de

More information

THE REAL NUMBERS Chapter #4

THE REAL NUMBERS Chapter #4 FOUNDATIONS OF ANALYSIS FALL 2008 TRUE/FALSE QUESTIONS THE REAL NUMBERS Chapter #4 (1) Every element in a field has a multiplicative inverse. (2) In a field the additive inverse of 1 is 0. (3) In a field

More information