Logic for exact real arithmetic

Size: px
Start display at page:

Download "Logic for exact real arithmetic"

Transcription

1 Logic for exact real arithmetic Helmut Schwichtenberg Mathematisches Institut, LMU, München Oberwolfach, November / 5

2 Exact real numbers can be given in different formats: Cauchy sequences (of rationals, with Cauchy modulus). Infinite sequences ( streams ) of signed digits { 1, 0, 1}, or { 1, 1, } with at most one ( undefined ): Gray code. Want formally verified algorithms on reals given as streams. Consider formal proofs M and apply realizability to extract their computational content. Switch between different formats of reals by decoration: x A x (x co G A)) (abbreviated x co G A). Computational content of x co G is a stream representing x. / 5

3 Representation of real numbers x [ 1, 1] Dyadic rationals: n<m k n n+1 with k n { 1, 1} with 1 := 1. Adjacent dyadics can differ in many digits: , / 5

4 Cure: flip after 1. Binary reflected (or Gray-) code L R R L L R R L L R R L L R R L 7 8 L R R L L R R L L R R L 1 L 7 16 RRRL, 9 16 RLRL. 0 R 1 3 / 5

5 Problem with productivity: =? (or LRLL... + RRRL =?) What is the first digit? Cure: delay. For binary code: add 0. Signed digit code n<m k n n+1 with k n { 1, 0, 1}. Widely used for real number computation. There is a lot of redundancy: 11 and 0 1 both denote 1. For Gray-code: add U (undefined), D (delay), Fin L/R (finally left / right). Pre-Gray code. 5 / 5

6 Pre-Gray code D U 0 Fin R U 1 R R 3 8 R 7 16 L L D U Fin R Fin L 5 R D Fin 8 R FinL Can remove Fin a (by U Fin a a R, D Fin a Fin a L) U 1 U 9 16 L 3 U RRRLLL... RLRLLL... RUDDDD... all denote 1. Only keep the latter to denote 1. Result: unique representation, called pure Gray code. 6 / 5

7 Average for pre-gray code Pre-Gray code: cototal objects in the (simultaneously defined) free algebras G and H given by the constructors with B = {tt, ff} Lr: B G G U: H G Fin: B G H D: H H 7 / 5

8 Predicates co G and co H Let Γ(X, Y ) := { x r x X r a Psd (x = ax 1 ) r x Y (x = x ) }, (X, Y ) := { x r x X r a Psd (x = ax + 1 ) r x Y (x = x ) } and define ( co G, co H) := ν (X,Y ) (Γ(X, Y ), (X, Y )) (greatest fixed point) Consequences: x co G ( r x co G r a Psd (x = ax 1 ) r x co H (x = x )) x co H ( r x co G r a Psd (x = ax + 1 ) r x co H (x = x )) 8 / 5

9 Lemma (CoGUMinus) x ( co G( x) co Gx), x ( co H( x) co Hx). Proof by coinduction (:= Gfp-axiom), using properties of the unary minus functions. Implicit algorithm. f : G G and f : H H defined by f (Lr a (u)) = Lr a (u), f (U(v)) = U(f (v)), f (Fin a (u)) = Fin a (u), f (D(v)) = D(f (v)). 9 / 5

10 Using CoGUMinus we prove that co G and co H are equivalent. Lemma (CoHToCoG) x (x co H x co G), x (x co G x co H). Implicit algorithm. g : H G and h : G H: g(fin a (u)) = Lr a (f (u)), g(d(v)) = U(v), h(lr a (u)) = Fin a (f (u)), h(u(v)) = D(v) where f := ccoguminus (cl denotes the function extracted from the proof of a lemma L). No corecursive call is involved. 10 / 5

11 Informal proof U. Berger and M. Seisenberger 010. To prove x,y co G (x + y co G) consider two sets of averages, the second one with a carry : P := { x + y x, y co G }, Q := { x + y + i Suffices: Q satisfies the clause coinductively defining co G. x, y co G, i Sd }. By the greatest-fixed-point axiom for co G we have Q co G. Since also P Q we obtain P co G, which is our claim. 11 / 5

12 Lemma (CoGAvToAvc) x,y co G r i Sd r x,y co G (x + y Proof needs CoGPsdTimes: using CoGClause. a Psd nc = x + y + i ). x co G (ax co G). Rest easy, Implicit algorithm. Write f for ccogpsdtimes and s for ccohtocog. f (Lr a (u), Lr a (u )) = (a + a, f ( a, u), f ( a, u )), f (Lr a (u), U(v)) = (a, f ( a, u), s(v)), f (U(v), Lr a (u)) = (a, s(v), f ( a, u)), f (U(v), U(v )) = (0, s(v), s(v )). 1 / 5

13 Lemma (CoGAvcSatCoICl) i Sd x,y co G r j Sd r k Sd r x,y co G (x + y + i = x +y +j + k ). Proof. Define J, K : Z Z such that i (i = J(i) + K(i)) i ( J(i) ) i ( i 6 K(i) 1) Then we can relate x+d and x+y+i by x+d + y+e + i Implicit algorithm. = x+y+j(d+e+i) + K(d + e + i) f (i, Lr a (u), Lr a (u ))=(J(a+a +i), K(a+a +i), f ( a, u), f ( a, u )), f (i, Lr a (u), U(v))=(J(a + i), K(a + i), f ( a, u), s(v)), f (i, U(v), Lr a (u))=(j(a + i), K(a + i), s(v), f ( a, u)), f (i, U(v), U(v ))=(J(i), K(i), s(v), s(v )).. 13 / 5

14 Lemma (CoGAvcToCoG) z ( r x,y co G r i Sd (z = x + y + i ) z co G), z ( r x,y co G r i Sd (z = x + y + i ) z co H). Proof (by coinduction) uses CoGAvcSatCoICl. We need a lemma: SdDisj: d Sd (d = 0 r r a Psd (d = a)). Here r is an (inductively defined) variant of where only the content of the right hand side is kept. 1 / 5

15 Implicit algorithm. g(i, u, u ) = let (i 1, k, u 1, u 1) = ccogavcsatcoicl(i, u, u ) in case csddisj(k) of 0 U(h(i 1, u 1, u 1)) a Lr a (g( ai 1, f ( a, u 1 ), f ( a, u 1))), h(i, u, u ) = let (i 1, k, u 1, u 1) = ccogavcsatcoicl(i, u, u ) in case csddisj(k) of 0 D(h(i 1, u 1, u 1)) a Fin a (g( ai 1, f ( a, u 1 ), f ( a, u 1))). 15 / 5

16 Theorem (CoGAverage) x,y co G (x + y co G). Implicit algorithm. Compose ccogavtoavc with ccogavctocog. 16 / 5

17 Multiplication for pre-gray code To prove x,x (x, x co G x x co G), consider the two sets P := { x y x, y co G }, Q := { x y + z + i x, y, z co G, i Sd }. Suffices: Q satisfies the clause coinductively defining co G. By the greatest-fixed-point axiom for co G we have Q co G. Since also P Q we obtain P co G, which is our claim. 17 / 5

18 Lemma (CoGMultToMultc) x,y co G r i Sd r x,y,z co G (xy = x y + z + i ). Implicit algorithm. We use s for ccohtocog, and au for f (a, u). g(lr a (u), Lr b (u )) = case ccogaverage( abu, abu ) of Lr c (u ) (c + ab, au, bu, cu ) U(v) (ab, au, bu, s(v)) g(lr a (u), U(v))) = (0, au, s(v), as(v)) g(u(v), Lr a (u)) = (0, s(v), au, as(v)) g(u(v), U(v )) = (0, s(v), s(v ), ccogzero). 18 / 5

19 Lemma (JKLr) i Sd a Psd nc v co G r j Sd r d Sd r z co G (v + a + i Implicit algorithm We use s for ccohtocog. = z + j + d). g(i, a, Lr b0 (Lr b (w))) = (J( b 0 b+b 0 +a+i), K( b 0 b+b 0 +a+i), b 0 bw) g(i, a, Lr b0 (U(w))) g(i, a, U(Lr b (w))) g(i, a, U(U(w))) Lemma (JKU) = (J(b 0 + a + i), K(b 0 + a + i), b 0 s(w)) = (J(b + a + i), K(b + a + i), bw) = (J(a + i), K(a + i), s(w)) i Sd v co G r j Sd r d Sd r z co G (v + i = z + j + d) 19 / 5

20 Lemma (CoGMultcSatCoICl) y co G nc i Sd x,z co G r d Sd r j Sd r x,z co G (xy + z + i = x y+z +j + d Implicit algorithm. We use h for ccogavctocog, w 0 for ccogzero g(u 0, i, Lr a (u), Lr b (u )) = let (j, d, w) = cjklr(i, b, h(i, au 0, bu )) in (d, j, au, w) g(u 0, i, Lr a (u), U(v)) = let (j, d, w) = cjku(i, h(i, au 0, s(v))) in (d, j, au, w) g(u 0, i, U(v), Lr a (u)) = let (j, d, w) = cjklr(i, a, h(i, w 0, au)) in (d, j, s(v), w) g(u 0, i, U(v), U(v )) = let (j, d, w) = cjku(i, h(i, w 0, s(v ))) in (d, j, s(v), w) ). 0 / 5

21 Lemma (CoGMultcToCoG) z 0 ( r i Sd r x,y,z co G (z 0 = xy + z + i ) z 0 co G), z 0 ( r i Sd r x,y,z co G (z 0 = xy + z + i ) z 0 co H). Proof (by coinduction) uses CoGMultcSatCoICl. We need SdDisj. 1 / 5

22 Implicit algorithm. g(i, u, u, u ) = let (d, j, u 1, u 1) = ccogmultcsatcoicl(u, i, u, u ) in case csddisj(d) of 0 U(h(j, u 1, u, u 1)) a Lr a (g( aj, u 1, f ( a, u ), f ( a, u 1))), h(i, u, u, u ) = let (d, j, u 1, u 1) = ccogmultcsatcoicl(u, i, u, u ) in case csddisj(d) of 0 D(h(j, u 1, u, u 1)) a Fin a (g(aj, u 1, f (a, u ), f (a, u 1))). / 5

23 [iggg](corec sdtwo yprod ag yprod ag yprod ag=>ag sdtwo yprod ag yprod ag yprod ag=>ah)iggg ([iggg0][let djgg (ccogmultcsatcoicl clft crht crht iggg0 clft iggg0 clft crht iggg0 crht crht crht iggg0) [case (csddisj clft djgg) (DummyL -> InR(InR(clft crht djgg pair clft crht crht djgg pair clft crht crht iggg0 pair crht crht crht djgg))) (Inr boole -> InL(boole pair InR(cIntTimesSdtwoPsdToSdtwo clft crht djgg(cpsduminus boole)pair clft crht crht djgg pair ccogpsdtimes clft crht crht iggg0 (cpsduminus boole)pair ccogpsdtimes crht crht crht djgg (cpsduminus boole))))]]) ([iggg0][let djgg...]) 3 / 5

24 Theorem (CoGMult) x,y co G (xy co G). Implicit algorithm. Compose ccogmulttomultc with ccogmultctocog. / 5

25 Conclusion Want formally verified algorithms on real numbers given as streams (signed digits or pre-gray code). Consider formal proofs M and apply realizability to extract their computational content. Switch between different representations of reals by labelling x as x and relativise x to a coinductive predicate whose computational content is a stream representing x. The desired algorithm is obtained as the extracted term et(m) of the proof M. Verification by (automatically generated) formal soundness proof of the realizability interpretation. 5 / 5

Proofs and computations

Proofs and computations (j.w.w. Kenji Miyamoto) Mathematisches Institut, LMU, München Leeds University, 7. March 2012 Formalization and extraction One can extract from a (constructive) proof of a formula with computational content

More information

PROGRAM EXTRACTION IN EXACT REAL ARITHMETIC

PROGRAM EXTRACTION IN EXACT REAL ARITHMETIC PROGRAM EXTRACTION IN EXACT REAL ARITHMETIC KENJI MIYAMOTO AND HELMUT SCHWICHTENBERG Dedicated to John Tucker on occasion of his 60th birthday Abstract. The importance of an abstract approach to a computation

More information

LOGIC FOR GRAY CODE COMPUTATION

LOGIC FOR GRAY CODE COMPUTATION LOGIC FOR GRAY CODE COMPUTATION ULRICH BERGER AND KENJI MIYAMOTO AND HELMUT SCHWICHTENBERG AND HIDEKI TSUIKI Abstract. Gray code is a well-known binary number system such that neighboring values differ

More information

Program extraction in exact real arithmetic

Program extraction in exact real arithmetic Under consideration for publication in Math. Struct. in Comp. Science Program extraction in exact real arithmetic K E N J I M I Y A M O T O and H E L M U T S C H W I C H T E N B E R G Mathematisches Institut,

More information

Extracting programs from proofs

Extracting programs from proofs Extracting programs from proofs Helmut Schwichtenberg Mathematisches Institut, LMU, München JAIST, 7. March 2014 1 / 41 Overview Parsing balanced lists of parentheses Informal proof Discussion of the extracted

More information

Program Extraction in Church s Simple Theory of Types with Applications to Computable Analysis

Program Extraction in Church s Simple Theory of Types with Applications to Computable Analysis Program Extraction in Church s Simple Theory of Types with Applications to Computable Analysis Ulrich Berger Swansea University Computation and Correctness in Analysis (CCA) Nancy, 9 July 2013 1 / 36 A

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Boolean Algebra CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

More information

Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley AN ALGEBRAIC FIELD

Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley AN ALGEBRAIC FIELD Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley Chap. 2 AN ALGEBRAIC FIELD To introduce the notion of an abstract algebraic structure we consider (algebraic) fields. (These should not to

More information

Chapter 2: Switching Algebra and Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits Chapter 2: Switching Algebra and Logic Circuits Formal Foundation of Digital Design In 1854 George Boole published An investigation into the Laws of Thoughts Algebraic system with two values 0 and 1 Used

More information

Practice Test III, Math 314, Spring 2016

Practice Test III, Math 314, Spring 2016 Practice Test III, Math 314, Spring 2016 Dr. Holmes April 26, 2016 This is the 2014 test reorganized to be more readable. I like it as a review test. The students who took this test had to do four sections

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

1 The Real Number System

1 The Real Number System 1 The Real Number System The rational numbers are beautiful, but are not big enough for various purposes, and the set R of real numbers was constructed in the late nineteenth century, as a kind of an envelope

More information

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S. BOOLEAN ALGEBRA 2.1 Introduction Binary logic deals with variables that have two discrete values: 1 for TRUE and 0 for FALSE. A simple switching circuit containing active elements such as a diode and transistor

More information

Program extraction for exact real numbers: Stream multiplication.

Program extraction for exact real numbers: Stream multiplication. Bachelor Thesis Program extraction for exact real numbers: Stream multiplication. Till Überrück-Fries till@ueberfries.de Matriculation number: 109689 submitted to the Department of Mathematics Faculty

More information

Decorating proofs. Helmut Schwichtenberg. joint work with Luca Chiarabini and Diana Ratiu Mathematisches Institut, LMU, München

Decorating proofs. Helmut Schwichtenberg. joint work with Luca Chiarabini and Diana Ratiu Mathematisches Institut, LMU, München joint work with Luca Chiarabini and Diana Ratiu Mathematisches Institut, LMU, München Leeds Symposium on Proof Theory and Constructivism, 3-16 July 2009 Natural deduction with non-computational connectives

More information

First order wave equations. Transport equation is conservation law with J = cu, u t + cu x = 0, < x <.

First order wave equations. Transport equation is conservation law with J = cu, u t + cu x = 0, < x <. First order wave equations Transport equation is conservation law with J = cu, u t + cu x = 0, < x

More information

Chapter 2: Boolean Algebra and Logic Gates

Chapter 2: Boolean Algebra and Logic Gates Chapter 2: Boolean Algebra and Logic Gates Mathematical methods that simplify binary logics or circuits rely primarily on Boolean algebra. Boolean algebra: a set of elements, a set of operators, and a

More information

Logic and Boolean algebra

Logic and Boolean algebra Computer Mathematics Week 7 Logic and Boolean algebra College of Information Science and Engineering Ritsumeikan University last week coding theory channel coding information theory concept Hamming distance

More information

Chapter 2. Boolean Algebra and Logic Gates

Chapter 2. Boolean Algebra and Logic Gates Chapter 2 Boolean Algebra and Logic Gates Basic Definitions A binary operator defined on a set S of elements is a rule that assigns, to each pair of elements from S, a unique element from S. The most common

More information

a = a i 2 i a = All such series are automatically convergent with respect to the standard norm, but note that this representation is not unique: i<0

a = a i 2 i a = All such series are automatically convergent with respect to the standard norm, but note that this representation is not unique: i<0 p-adic Numbers K. Sutner v0.4 1 Modular Arithmetic rings integral domains integers gcd, extended Euclidean algorithm factorization modular numbers add Lemma 1.1 (Chinese Remainder Theorem) Let a b. Then

More information

Light Dialectica program extraction from a classical Fibonacci proof

Light Dialectica program extraction from a classical Fibonacci proof Light Dialectica program extraction from a classical Fibonacci proof using an optimization of Gödel s technique towards the extraction of more efficient programs from classical proofs Mircea Dan HERNEST

More information

/ M Morris Mano Digital Design Ahmad_911@hotmailcom / / / / wwwuqucscom Binary Systems Introduction - Digital Systems - The Conversion Between Numbering Systems - From Binary To Decimal - Octet To Decimal

More information

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic Chapter 5 Synchronous Sequential Logic Sequential circuit: A circuit that includes memory elements. In this case the output depends not only on the current input but also on the past inputs. Memory A synchronous

More information

0.Axioms for the Integers 1

0.Axioms for the Integers 1 0.Axioms for the Integers 1 Number theory is the study of the arithmetical properties of the integers. You have been doing arithmetic with integers since you were a young child, but these mathematical

More information

Logic Synthesis and Verification

Logic Synthesis and Verification Logic Synthesis and Verification Boolean Algebra Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2014 1 2 Boolean Algebra Reading F. M. Brown. Boolean Reasoning:

More information

Contents. Chapter 2 Digital Circuits Page 1 of 30

Contents. Chapter 2 Digital Circuits Page 1 of 30 Chapter 2 Digital Circuits Page 1 of 30 Contents Contents... 1 2 Digital Circuits... 2 2.1 Binary Numbers... 2 2.2 Binary Switch... 4 2.3 Basic Logic Operators and Logic Expressions... 5 2.4 Truth Tables...

More information

Program Extraction from Nested Definitions

Program Extraction from Nested Definitions Program Extraction from Nested Definitions Kenji Miyamoto 1,, Fredrik Nordvall Forsberg 2,, and Helmut Schwichtenberg 1 1 Ludwig-Maximilians-Universität München, Germany 2 Swansea University, UK Abstract

More information

Chapter 7: Exponents

Chapter 7: Exponents Chapter : Exponents Algebra Chapter Notes Name: Notes #: Sections.. Section.: Review Simplify; leave all answers in positive exponents:.) m -.) y -.) m 0.) -.) -.) - -.) (m ) 0.) 0 x y Evaluate if a =

More information

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA 1 Learning Objectives Understand the basic operations and laws of Boolean algebra. Relate these operations and laws to circuits composed of AND gates, OR gates, INVERTERS

More information

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under

More information

Provably Total Functions of Arithmetic with Basic Terms

Provably Total Functions of Arithmetic with Basic Terms Provably Total Functions of Arithmetic with Basic Terms Evgeny Makarov INRIA Orsay, France emakarov@gmail.com A new characterization of provably recursive functions of first-order arithmetic is described.

More information

Spiral 1 / Unit 5. Karnaugh Maps

Spiral 1 / Unit 5. Karnaugh Maps -. Spiral / Unit Karnaugh Maps -. Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least technique to improve

More information

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT): ENGI 386 Digital Logic II. COMBINATIONAL LOGIC DESIGN Combinational Logic output of digital system is only dependent on current inputs (i.e., no memory) (a) Boolean Algebra - developed by George Boole

More information

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps -. -. Spiral / Unit Mark Redekopp Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least technique to improve

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

More information

EXERCISE SET 5.1. = (kx + kx + k, ky + ky + k ) = (kx + kx + 1, ky + ky + 1) = ((k + )x + 1, (k + )y + 1)

EXERCISE SET 5.1. = (kx + kx + k, ky + ky + k ) = (kx + kx + 1, ky + ky + 1) = ((k + )x + 1, (k + )y + 1) EXERCISE SET 5. 6. The pair (, 2) is in the set but the pair ( )(, 2) = (, 2) is not because the first component is negative; hence Axiom 6 fails. Axiom 5 also fails. 8. Axioms, 2, 3, 6, 9, and are easily

More information

Minimal logic for computable functionals

Minimal logic for computable functionals Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universität München Contents 1. Partial continuous functionals 2. Total and structure-total functionals 3. Terms;

More information

Chapter-2 BOOLEAN ALGEBRA

Chapter-2 BOOLEAN ALGEBRA Chapter-2 BOOLEAN ALGEBRA Introduction: An algebra that deals with binary number system is called Boolean Algebra. It is very power in designing logic circuits used by the processor of computer system.

More information

3. Abstract Boolean Algebras

3. Abstract Boolean Algebras 3. ABSTRACT BOOLEAN ALGEBRAS 123 3. Abstract Boolean Algebras 3.1. Abstract Boolean Algebra. Definition 3.1.1. An abstract Boolean algebra is defined as a set B containing two distinct elements 0 and 1,

More information

LATTICE AND BOOLEAN ALGEBRA

LATTICE AND BOOLEAN ALGEBRA 2 LATTICE AND BOOLEAN ALGEBRA This chapter presents, lattice and Boolean algebra, which are basis of switching theory. Also presented are some algebraic systems such as groups, rings, and fields. 2.1 ALGEBRA

More information

CHAPTER 2. Computability

CHAPTER 2. Computability CHAPTER 2 Computability At this point we leave the general setting of logic and aim to get closer to mathematics. We introduce free algebras (for example, the natural numbers) as basic data structures

More information

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra BOOLEAN ALGEBRA Introduction 1854: Logical algebra was published by George Boole known today as Boolean Algebra It s a convenient way and systematic way of expressing and analyzing the operation of logic

More information

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories . Unit Implementing Combinational Functions with Karnaugh Maps or Memories . Outcomes I can use Karnaugh maps to synthesize combinational functions with several outputs I can determine the appropriate

More information

Uniform Schemata for Proof Rules

Uniform Schemata for Proof Rules Uniform Schemata for Proof Rules Ulrich Berger and Tie Hou Department of omputer Science, Swansea University, UK {u.berger,cshou}@swansea.ac.uk Abstract. Motivated by the desire to facilitate the implementation

More information

Digital Circuit And Logic Design I. Lecture 3

Digital Circuit And Logic Design I. Lecture 3 Digital Circuit And Logic Design I Lecture 3 Outline Combinational Logic Design Principles (). Introduction 2. Switching algebra 3. Combinational-circuit analysis 4. Combinational-circuit synthesis Panupong

More information

Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language. Hongseok Yang (Queen Mary, Univ.

Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language. Hongseok Yang (Queen Mary, Univ. Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language Hongseok Yang (Queen Mary, Univ. of London) Dream Automatically verify the memory safety of systems software,

More information

Spring 2016 Program Analysis and Verification. Lecture 3: Axiomatic Semantics I. Roman Manevich Ben-Gurion University

Spring 2016 Program Analysis and Verification. Lecture 3: Axiomatic Semantics I. Roman Manevich Ben-Gurion University Spring 2016 Program Analysis and Verification Lecture 3: Axiomatic Semantics I Roman Manevich Ben-Gurion University Warm-up exercises 1. Define program state: 2. Define structural semantics configurations:

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Scott Domains for Denotational Semantics and Program Extraction

Scott Domains for Denotational Semantics and Program Extraction Scott Domains for Denotational Semantics and Program Extraction Ulrich Berger Swansea University Workshop Domains Oxford, 7-8 July 2018 1 / 46 Overview 1. Domains 2. Computability 3. Denotational semantics

More information

Unit 2 Boolean Algebra

Unit 2 Boolean Algebra Unit 2 Boolean Algebra 1. Developed by George Boole in 1847 2. Applied to the Design of Switching Circuit by Claude Shannon in 1939 Department of Communication Engineering, NCTU 1 2.1 Basic Operations

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

Jan A. Bergstra and Alban Ponse. Informatics Institute, section Theory of Computer Science University of Amsterdam

Jan A. Bergstra and Alban Ponse. Informatics Institute, section Theory of Computer Science University of Amsterdam Datatype defining rewrite systems for the ring of integers, and for natural and integer arithmetic in unary view arxiv:1608.06212v1 [cs.lo] 22 Aug 2016 Jan A. Bergstra and Alban Ponse Informatics Institute,

More information

25. Chain Rule. Now, f is a function of t only. Expand by multiplication:

25. Chain Rule. Now, f is a function of t only. Expand by multiplication: 25. Chain Rule The Chain Rule is present in all differentiation. If z = f(x, y) represents a two-variable function, then it is plausible to consider the cases when x and y may be functions of other variable(s).

More information

CHAPTER 12 Boolean Algebra

CHAPTER 12 Boolean Algebra 318 Chapter 12 Boolean Algebra CHAPTER 12 Boolean Algebra SECTION 12.1 Boolean Functions 2. a) Since x 1 = x, the only solution is x = 0. b) Since 0 + 0 = 0 and 1 + 1 = 1, the only solution is x = 0. c)

More information

Study Guide for Math 095

Study Guide for Math 095 Study Guide for Math 095 David G. Radcliffe November 7, 1994 1 The Real Number System Writing a fraction in lowest terms. 1. Find the largest number that will divide into both the numerator and the denominator.

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

Week-I. Combinational Logic & Circuits

Week-I. Combinational Logic & Circuits Week-I Combinational Logic & Circuits Overview Binary logic operations and gates Switching algebra Algebraic Minimization Standard forms Karnaugh Map Minimization Other logic operators IC families and

More information

Spring 2015 Program Analysis and Verification. Lecture 4: Axiomatic Semantics I. Roman Manevich Ben-Gurion University

Spring 2015 Program Analysis and Verification. Lecture 4: Axiomatic Semantics I. Roman Manevich Ben-Gurion University Spring 2015 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University Agenda Basic concepts of correctness Axiomatic semantics (pages 175-183) Hoare Logic

More information

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: Boolean Algebra (1) Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: An expression is finite but not unique f(x,y)

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include PUTNAM TRAINING POLYNOMIALS (Last updated: December 11, 2017) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

Groups. 3.1 Definition of a Group. Introduction. Definition 3.1 Group

Groups. 3.1 Definition of a Group. Introduction. Definition 3.1 Group C H A P T E R t h r e E Groups Introduction Some of the standard topics in elementary group theory are treated in this chapter: subgroups, cyclic groups, isomorphisms, and homomorphisms. In the development

More information

Sequential Synchronous Circuit Analysis

Sequential Synchronous Circuit Analysis Sequential Synchronous Circuit Analysis General Model Current State at time (t) is stored in an array of flip-flops. Next State at time (t+1) is a Boolean function of State and Inputs. Outputs at time

More information

Research Methods in Mathematics Extended assignment 1

Research Methods in Mathematics Extended assignment 1 Research Methods in Mathematics Extended assignment 1 T. PERUTZ Due: at the beginning of class, October 5. Choose one of the following assignments: (1) The circle problem (2) Complete ordered fields 2

More information

3 Applications of partial differentiation

3 Applications of partial differentiation Advanced Calculus Chapter 3 Applications of partial differentiation 37 3 Applications of partial differentiation 3.1 Stationary points Higher derivatives Let U R 2 and f : U R. The partial derivatives

More information

Math 110: Worksheet 1 Solutions

Math 110: Worksheet 1 Solutions Math 110: Worksheet 1 Solutions August 30 Thursday Aug. 4 1. Determine whether or not the following sets form vector spaces over the given fields. (a) The set V of all matrices of the form where a, b R,

More information

TR : Binding Modalities

TR : Binding Modalities City University of New York (CUNY) CUNY Academic Works Computer Science Technical Reports Graduate Center 2012 TR-2012011: Binding Modalities Sergei N. Artemov Tatiana Yavorskaya (Sidon) Follow this and

More information

Binary Logic and Gates

Binary Logic and Gates 1 COE 202- Digital Logic Binary Logic and Gates Dr. Abdulaziz Y. Barnawi COE Department KFUPM 2 Outline Introduction Boolean Algebra Elements of Boolean Algebra (Binary Logic) Logic Operations & Logic

More information

LB 220 Homework 4 Solutions

LB 220 Homework 4 Solutions LB 220 Homework 4 Solutions Section 11.4, # 40: This problem was solved in class on Feb. 03. Section 11.4, # 42: This problem was also solved in class on Feb. 03. Section 11.4, # 43: Also solved in class

More information

Logic Design. Chapter 2: Introduction to Logic Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits Logic Design Chapter 2: Introduction to Logic Circuits Introduction Logic circuits perform operation on digital signal Digital signal: signal values are restricted to a few discrete values Binary logic

More information

2x (x 2 + y 2 + 1) 2 2y. (x 2 + y 2 + 1) 4. 4xy. (1, 1)(x 1) + (1, 1)(y + 1) (1, 1)(x 1)(y + 1) 81 x y y + 7.

2x (x 2 + y 2 + 1) 2 2y. (x 2 + y 2 + 1) 4. 4xy. (1, 1)(x 1) + (1, 1)(y + 1) (1, 1)(x 1)(y + 1) 81 x y y + 7. Homework 8 Solutions, November 007. (1 We calculate some derivatives: f x = f y = x (x + y + 1 y (x + y + 1 x = (x + y + 1 4x (x + y + 1 4 y = (x + y + 1 4y (x + y + 1 4 x y = 4xy (x + y + 1 4 Substituting

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

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps -. -. Spiral / Unit Mark Redekopp Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least technique to improve

More information

MTH 309 Supplemental Lecture Notes Based on Robert Messer, Linear Algebra Gateway to Mathematics

MTH 309 Supplemental Lecture Notes Based on Robert Messer, Linear Algebra Gateway to Mathematics MTH 309 Supplemental Lecture Notes Based on Robert Messer, Linear Algebra Gateway to Mathematics Ulrich Meierfrankenfeld Department of Mathematics Michigan State University East Lansing MI 48824 meier@math.msu.edu

More information

Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions

Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions Jurriaan Rot November 19, 2018 By now we ve been talking a lot about coalgebras and coinduction, as well as algebras and induction.

More information

CHAPTER III BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA CHAPTER III- CHAPTER III CHAPTER III R.M. Dansereau; v.. CHAPTER III-2 BOOLEAN VALUES INTRODUCTION BOOLEAN VALUES Boolean algebra is a form of algebra that deals with single digit binary values and variables.

More information

Logic: The Big Picture

Logic: The Big Picture Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving

More information

3 Boolean Algebra 3.1 BOOLEAN ALGEBRA

3 Boolean Algebra 3.1 BOOLEAN ALGEBRA 3 Boolean Algebra 3.1 BOOLEAN ALGEBRA In 1854, George Boole introduced the following formalism which eventually became Boolean Algebra. Definition. An algebraic system consisting of a set B of elements

More information

Axioms of separation

Axioms of separation Axioms of separation These notes discuss the same topic as Sections 31, 32, 33, 34, 35, and also 7, 10 of Munkres book. Some notions (hereditarily normal, perfectly normal, collectionwise normal, monotonically

More information

07 Equational Logic and Algebraic Reasoning

07 Equational Logic and Algebraic Reasoning CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages

More information

Digital Logic Design ENEE x. Lecture 12

Digital Logic Design ENEE x. Lecture 12 Digital Logic Design ENEE 244-010x Lecture 12 Announcements HW5 due today HW6 up on course webpage, due at the beginning of class on Wednesday, 10/28. Agenda Last time: Quine-McClusky (4.8) Petrick s Method

More information

Monadic Refinements for Relational Cost Analysis (Appendix)

Monadic Refinements for Relational Cost Analysis (Appendix) Monadic Refinements for Relational Cost Analysis (Appendix) Ivan Radiček Gilles Barthe Marco Gaboardi Deepak Garg Florian Zuleger Structure of the Appendix In the appendix we give material that was omitted

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

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

First Order Predicate Logic

First Order Predicate Logic Wolfgang Schreiner and Wolfgang Windsteiger http://www.risc.jku.at 1/22 First Order Predicate Logic Pragmatics Wolfgang Schreiner and Wolfgang Windsteiger Wolfgang.(Schreiner Windsteiger)@risc.jku.at Research

More information

Group, Rings, and Fields Rahul Pandharipande. I. Sets Let S be a set. The Cartesian product S S is the set of ordered pairs of elements of S,

Group, Rings, and Fields Rahul Pandharipande. I. Sets Let S be a set. The Cartesian product S S is the set of ordered pairs of elements of S, Group, Rings, and Fields Rahul Pandharipande I. Sets Let S be a set. The Cartesian product S S is the set of ordered pairs of elements of S, A binary operation φ is a function, S S = {(x, y) x, y S}. φ

More information

Chapter 1 Preliminaries

Chapter 1 Preliminaries Chapter 1 Preliminaries 1.1 Conventions and Notations Throughout the book we use the following notations for standard sets of numbers: N the set {1, 2,...} of natural numbers Z the set of integers Q the

More information

Boolean Algebra and Logic Gates

Boolean Algebra and Logic Gates Boolean Algebra and Logic Gates ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outlines Basic

More information

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations D. R. Wilkins Academic Year 1996-7 1 Number Systems and Matrix Algebra Integers The whole numbers 0, ±1, ±2, ±3, ±4,...

More information

f(x, y) = 1 2 x y2 xy 3

f(x, y) = 1 2 x y2 xy 3 Problem. Find the critical points of the function and determine their nature. We have We find the critical points We calculate f(x, y) = 2 x2 + 3 2 y2 xy 3 f x = x y 3 = 0 = x = y 3 f y = 3y 3xy 2 = 0

More information

Chapter 7: Exponents

Chapter 7: Exponents Chapter : Exponents Algebra Chapter Notes Name: Algebra Homework: Chapter (Homework is listed by date assigned; homework is due the following class period) HW# Date In-Class Homework M / Review of Sections.-.

More information

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra D. R. Wilkins Contents 3 Topics in Commutative Algebra 2 3.1 Rings and Fields......................... 2 3.2 Ideals...............................

More information

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus. Chapter 2 Digital Electronics Objectives 1. Understand the operation of basic digital electronic devices. 2. Understand how to describe circuits which can process digital data. 3. Understand how to design

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

Beyond First-Order Logic

Beyond First-Order Logic Beyond 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) Beyond First-Order Logic MFES 2008/09 1 / 37 FOL

More information

First-Order Theorem Proving and Vampire

First-Order Theorem Proving and Vampire First-Order Theorem Proving and Vampire Laura Kovács 1,2 and Martin Suda 2 1 TU Wien 2 Chalmers Outline Introduction First-Order Logic and TPTP Inference Systems Saturation Algorithms Redundancy Elimination

More information

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic CHAPER 1 MAHEMAICAL LOGIC 1.1 undamentals of Mathematical Logic Logic is commonly known as the science of reasoning. Some of the reasons to study logic are the following: At the hardware level the design

More information

CHAPTER III BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA CHAPTER III- CHAPTER III CHAPTER III R.M. Dansereau; v.. CHAPTER III-2 BOOLEAN VALUES INTRODUCTION BOOLEAN VALUES Boolean algebra is a form of algebra that deals with single digit binary values and variables.

More information

Directional Derivatives in the Plane

Directional Derivatives in the Plane Directional Derivatives in the Plane P. Sam Johnson April 10, 2017 P. Sam Johnson (NIT Karnataka) Directional Derivatives in the Plane April 10, 2017 1 / 30 Directional Derivatives in the Plane Let z =

More information

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9 MAT 570 REAL ANALYSIS LECTURE NOTES PROFESSOR: JOHN QUIGG SEMESTER: FALL 204 Contents. Sets 2 2. Functions 5 3. Countability 7 4. Axiom of choice 8 5. Equivalence relations 9 6. Real numbers 9 7. Extended

More information