CIS 500 Software Foundations Fall Reasoning about evaluation. More on induction. Induction principles. More induction principles

Similar documents
1/ 19 2/17 3/23 4/23 5/18 Total/100. Please do not write in the spaces above.

Logic and Philosophy of Science (LPS)

Lecture 3: Nondeterministic Computation

On the Infinity of Primes of the Form 2x 2 1

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

Yale University Department of Computer Science

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

Informatique Fondamentale IMA S8

Introduction to Artificial Intelligence. Learning from Oberservations

Introduction to Artificial Intelligence. Learning from Oberservations

Disquotation, Conditionals, and the Liar 1

Ling 130: Formal Semantics. Spring Natural Deduction with Propositional Logic. Introducing. Natural Deduction

Scientific Philosophy

Cognitive Units, Connections and Mathematical Proof

Here s a question for you: What happens if we try to go the other way? For instance:

NON-EXAMPLES AND PROOF BY CONTRADICTION

Chapter 12. Synchronous Circuits. Contents

What is Character? David Braun. University of Rochester. In "Demonstratives", David Kaplan argues that indexicals and other expressions have a

Partitioning a Proof: An Exploratory Study on Undergraduates Comprehension of Proofs

Part I: Graph Coloring

Formalizing Irony with Doxastic Logic

mcs 2015/5/18 1:43 page 15 #23

1/9. Descartes on Simple Ideas (2)

cse371/mat371 LOGIC Professor Anita Wasilewska

Minnesota State College Southeast

1360 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 59, NO. 3, MARCH Optimal Encoding for Discrete Degraded Broadcast Channels

Ontology as a formal one. The language of ontology as the ontology itself: the zero-level language

A Functional Representation of Fuzzy Preferences

A NOTE ON THE ERGODIC THEOREMS

Logic. Andrew Mark Allen March 4, 2012

Introduction p. 1 The Elements of an Argument p. 1 Deduction and Induction p. 5 Deductive Argument Forms p. 7 Truth and Validity p. 8 Soundness p.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Figure 9.1: A clock signal.

1/8. Axioms of Intuition

211: Computer Architecture Summer 2016

INTERNATIONAL CONFERENCE ON ENGINEERING DESIGN ICED 05 MELBOURNE, AUGUST 15-18, 2005 GENERAL DESIGN THEORY AND GENETIC EPISTEMOLOGY

Peirce's Remarkable Rules of Inference

Primes and Composites

Vagueness & Pragmatics

Criterion A: Understanding knowledge issues

Carlo Martini 2009_07_23. Summary of: Robert Sugden - Credible Worlds: the Status of Theoretical Models in Economics 1.

Mathematical Principles of Fuzzy Logic

The Philosophy of Language. Frege s Sense/Reference Distinction

Encoders and Decoders: Details and Design Issues

2 nd Int. Conf. CiiT, Molika, Dec CHAITIN ARTICLES

Logica & Linguaggio: Tablaux

Introduction Section 1: Logic. The basic purpose is to learn some elementary logic.

Conclusion. 1) From the point of view of the Sudoku addict, the most striking results should be the following.

6.034 Notes: Section 4.1

Music and Mathematics: On Symmetry

Lecture 10 Popper s Propensity Theory; Hájek s Metatheory

ANALYSIS OF THE PREVAILING VIEWS REGARDING THE NATURE OF THEORY- CHANGE IN THE FIELD OF SCIENCE

The RTE-3 Extended Task. Hoa Dang Ellen Voorhees

COSC282 BIG DATA ANALYTICS FALL 2015 LECTURE 11 - OCT 21

Sidestepping the holes of holism

The second disease is very common: there are many books that violate the principle of having something to say by trying to say too many things.

Curry s Formalism as Structuralism

On the Optimal Compressions in the Compress-and-Forward Relay Schemes

EPR-like funny business in the theory of branching space-times

Appendix B. Elements of Style for Proofs

INTRODUCTION TO AXIOMATIC SET THEORY

CSE221- Logic Design, Spring 2003

SENSE AND OBJECTIVITY IN FREGE'S LOGIC

AREA OF KNOWLEDGE: MATHEMATICS

Phenomenology Glossary

1 METHODS IN OPTIMIZATION

Profile of requirements for Master Theses

Computability and Logic, Fifth Edition

INTRODUCTION TO MATHEMATICAL REASONING. Worksheet 3. Sets and Logics

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

arxiv: v1 [math.co] 12 Jan 2012

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Cambridge Introductions to Philosophy new textbooks from cambridge

MATH 214 (NOTES) Math 214 Al Nosedal. Department of Mathematics Indiana University of Pennsylvania. MATH 214 (NOTES) p. 1/3

AM AM AM AM PM PM PM

Writing maths, from Euclid to today

2550 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 54, NO. 6, JUNE 2008

Aristotle: an ancient mathematical logician

Table of contents

THE MAJORITY of the time spent by automatic test

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

TOWARDS A BEHAVIORAL PSYCHOLOGY OF MATHEMATICAL THINKING

CSE 101. Algorithm Design and Analysis Miles Jones Office 4208 CSE Building Lecture 9: Greedy

PHILOSOPH ICAL PERSPECTI VES ON PROOF IN MATHEMATI CS EDUCATION

Music Electronics Finally DeMorgan's Theorem establishes two very important simplifications 3 : Multiplexers

Design and Implementation of High Speed 256-Bit Modified Square Root Carry Select Adder

Peak Dynamic Power Estimation of FPGA-mapped Digital Designs

Well-Structured Mathematical Logic

Department of CSIT. Class: B.SC Semester: II Year: 2013 Paper Title: Introduction to logics of Computer Max Marks: 30

Spiral Content Mapping. Spiral 2 1. Learning Outcomes DATAPATH COMPONENTS. Datapath Components: Counters Adders Design Example: Crosswalk Controller

Chapter I: The MU Puzzle

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

Chapter 3. Boolean Algebra and Digital Logic

What are meanings? What do linguistic expressions stand for or denote?

CLASSIC AND MODERN IN ROMANIAN SYLLOGISTIC ABSTRACT

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

COMP12111: Fundamentals of Computer Engineering

Jin-Fu Li Advanced Reliable Systems (ARES) Laboratory. National Central University

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Transcription:

CIS 500 Software Foundations Fall 2004 Reasoning about evaluation More on induction CIS 500, More on induction 1 CIS 500, More on induction 2 Induction principles We ve seen three definitions of sets their associated induction principles: Ordinary natural numbers Boolean terms Arithmetic terms GivenasetdefinedinBNFnotation,itisnottoohardtodescribethe structural induction principle for that set For example: More induction principles However, these are not the only sets that we ve defined inductively so far We defined the semantics of the boolean arithmetic languages using inductively defined relations ie, inductively defined sets of pairs(of terms) These sets also have induction principles What is the structural induction principle for this language? CIS 500, More on induction 3 CIS 500, More on induction 4

Induction on evaluation We can define an induction principle for small-step evaluation Recall the definition(just for booleans, for now): E-IFTRUE E-IFFALSE E-IF Induction on evaluation Induction principle for the evaluation relation: Suppose Ifwecanshow with isapropertyofpairsofterms, thenwemayconcludethat,,, such that, What is the induction principle for this relation? CIS 500, More on induction 5 CIS 500, More on induction 6 Sayingthat Derivations Another way to look at induction on evaluation is in terms of derivations A derivation records the justification for a particular pair of terms that areintheevaluationrelation,intheformofatree We vealreadyseen oneexampleontheboardlasttime Terminology: These trees are called derivation trees(or just derivations) The final statement in a derivation tree is its conclusion Wesaythataderivationisproofofitsconclusion(orawitnessforits conclusion) it records the reasoning steps that justify the conclusion (ie, thepair isintherelation )is equivalenttosaying thereexistsanevaluationderivation whose conclusion is CIS 500, More on induction 7 Observation Lemma: Supposewearegivenaderivation witnessing the pair inthe relation Then exactly one of the following holds: 1 thefinalruleusedin for some 2thefinalruleusedin is E-IFTRUE ;or is E-IFFALSE for some 3thefinalruleusedin ise-if,forsome immediatesubderivationof witnesses ;or ; moreover the CIS 500, More on induction 8

Induction on Derivations We can now write proofs about evaluation by induction on derivation trees Givenanarbitraryderivation with conclusion,weassumethe desiredproperty for its immediate sub-derivations(if any) try to showthat holdsfor itself, using a case analysis(applying the previous lemma) of the final evaluation rule used in constructing the derivation tree Eg Induction on small-step evaluation For example, let us show that small-step evaluation is deterministic Theorem: If then roof: Byinductiononaderivation of (Check: exactly what is here?) 1 Supposethefinalruleusedin is E-IfTrue, with Thenthelast rule of the derivation of cannot be E-IfFalse, because isnot Furthermore, the last rule cannot be E-If either, because this rule requires that, doesnotsteptoanything So thelastrulecanonlybee-iftrue, 2Supposethefinalruleusedin is E-IFFALSE, with Thiscaseissimilartothe previous CIS 500, More on induction 9 CIS 500, More on induction 10 3Supposethefinalruleusedin is E-IF, with,where iswitnessedbyaderivation Thelastruleinthe derivation of canonlybee-if,soitmustbethat By the inductive hypothesis,, fromwhichweconclude What principle to use? We ve proven the same theorem using two different induction principles Q:Whichoneisthebestonetouseinagivencase? A:Theonethatworksinthatcase! For these simple languages, anything you can prove by induction on derivations of,youcanalsoprovebystructuralinductionon Butthatwillnotbethecaseforeverylanguage CIS 500, More on induction 11 CIS 500, More on induction 12

AScepticAsks Well-founded induction Question: Why are any of these induction principles true? Why should I believe a proof that employs one? Answer: These are all instances of a general principle called well-founded induction CIS 500, More on induction 13 CIS 500, More on induction 14 Well-founded induction Well-founded induction Let beawell-foundedrelationonaset letbeaproperty If Forexample,welet def Inthiscase,we can rewrite previous principle as: then If Choosingtheset relation determines the induction principle then Now,bydefinition is either or for some : If then Or, simplifying: If then CIS 500, More on induction 15 CIS 500, More on induction 16

Strong induction Ifwetake to be the strictly less than relation on natural numbers, then the principle we get is strong(or complete ) induction: If then Well-founded relation The induction principle holds only when the relation Definition: A well-founded relation is a binary relation that there are no infinite descending chains Are the successor relations well-founded? is well-founded onaset such CIS 500, More on induction 17 CIS 500, More on induction 18 Now,suppose Theorem: Let property Then roof: The( Validity of well-founded induction isawell-foundedrelationonaset iff )directionistrivial We llshowthe( Letbea ) direction First,observethatanynonemptysubsetQofAhasaminimalelement, evenifqisinfinite oftheset is a contradiction forsome Butthen, in Theremustbeaminimalelement yet which Structural induction Well-founded induction also generalizes structural induction If is the immediate subterm relation, then the principle we get is structural induction for terms For example, in Arith, the term Is the immediate subterm relation well-founded? Yes,sincealltermsofAritharefinite isanimmediatesubtermoftheterm CIS 500, More on induction 19 CIS 500, More on induction 20

Mathematical Digression If you want to understn the full story about induction inductively know defined relations, check out the beginning of Chapter 21 in TAL Termination of evaluation CIS 500, More on induction 21 CIS 500, More on induction 22 Termination of evaluation An Inductive Definition of a Function Theorem: For every there is some normal form such that Wecefinetheofatermwiththefollowingrelation: Howcanweproveit?? Note: thisisyetmoreshorth Howwouldwewritethisdefinitionwith inference rules? CIS 500, More on induction 23 CIS 500, More on induction 24

Theorem: If Induction on Derivations Another Example,then roof: Byinductiononaderivation of 1 Supposethefinalruleusedin is E-IFTRUE, with Thentheresultisimmediate from the definition of 2Supposethefinalruleusedin is E-IFFALSE, with Thentheresultisagain immediate from the definition of 3Supposethefinalruleusedin is E-IF, with,where iswitnessedbyaderivation Bytheinduction Butthen,bythedefinitionof,we hypothesis, have Theorem: For every roof: Termination of evaluation there is some normal form such that First, recall that single-step evaluation strictly reduces the of the term: if,then Now, assume(for a contradiction) that is an infinite-length sequence such that Then is an infinite, strictly decreasing, sequence of natural numbers But such a sequence cannot exist contradiction!, CIS 500, More on induction 25 CIS 500, More on induction 26 Termination roofs Most termination proofs have the same basic form: Theorem: Therelation noinfinitesequences,,,etc suchthat each roof: 1 Choose 2 Show is terminating ie, there are for a well-founded set ie,aset with a partial order such that there are no infinite descending chains in afunction from to 3 Concludethattherearenoinfinitesequences,,,etc such that for each,since,iftherewere,we couldconstructaninfinitedescendingchainin CIS 500, More on induction 27