Exercises. Exercise 1: Hello, world. Exercise 2: Signatures and fields. C. M. Sperberg-McQueen, Black Mesa Technologies. Who owns the mule?

Similar documents
The Development of Laws of Formal Logic of Aristotle

Instructor s Manual 1

Topics and Posterior Analytics. Philosophy 21 Fall, 2004 G. J. Mattey

Philosophy 240: Symbolic Logic

[3.] Bertrand Russell. 1

OSSA Conference Archive OSSA 5

Introduction to Philosophy

The Ontological Argument for the existence of God. Pedro M. Guimarães Ferreira S.J. PUC-Rio Boston College, July 13th. 2011

Etchemendy, Tarski, and Logical Consequence 1 Jared Bates, University of Missouri Southwest Philosophy Review 15 (1999):

Philosophy 1100: Introduction to Ethics. Critical Thinking Lecture 2. Background Material for the Exercise on Inference Indicators

HOW TO ANALYZE AN ARGUMENT

Richard L. W. Clarke, Notes REASONING

MCQ IN TRADITIONAL LOGIC. 1. Logic is the science of A) Thought. B) Beauty. C) Mind. D) Goodness

Class 2 - The Ontological Argument

Courses providing assessment data PHL 202. Semester/Year

Must we have self-evident knowledge if we know anything?

Early Russell on Philosophical Grammar

To better understand VALIDITY, we now turn to the topic of logical form.

Logical Omniscience in the Many Agent Case

Creation & necessity

Logic Appendix: More detailed instruction in deductive logic

DEPARTMENT OF PHILOSOPHY FALL 2013 COURSE DESCRIPTIONS

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Van Inwagen's modal argument for incompatibilism

Deduction. Of all the modes of reasoning, deductive arguments have the strongest relationship between the premises

HANDBOOK (New or substantially modified material appears in boxes.)

A Primer on Logic Part 1: Preliminaries and Vocabulary. Jason Zarri. 1. An Easy $10.00? a 3 c 2. (i) (ii) (iii) (iv)

Pastor-teacher Don Hargrove Faith Bible Church September 8, 2011

Quantificational logic and empty names

DEPARTMENT OF PHILOSOPHY FALL 2014 COURSE DESCRIPTIONS

The cosmological argument (continued)

CRITICAL THINKING (CT) MODEL PART 1 GENERAL CONCEPTS

The Philosophical Review, Vol. 87, No. 4. (Oct., 1978), pp

Semantic Foundations for Deductive Methods

Class #13 - The Consciousness Theory of the Self Locke, The Prince and the Cobbler Reid, Of Mr. Locke's Account of Our Personal Identity

Modal Realism, Counterpart Theory, and Unactualized Possibilities

6. Truth and Possible Worlds

Broad on Theological Arguments. I. The Ontological Argument

HANDBOOK. IV. Argument Construction Determine the Ultimate Conclusion Construct the Chain of Reasoning Communicate the Argument 13

Beyond Symbolic Logic

SAMPLE COURSE OUTLINE PHILOSOPHY AND ETHICS GENERAL YEAR 11

Philosophical Logic. LECTURE TWO MICHAELMAS 2017 Dr Maarten Steenhagen

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Moore on External Relations

Selections from Aristotle s Prior Analytics 41a21 41b5

Aquinas s Third Way Keith Burgess-Jackson 24 September 2017

Department of Philosophy TCD. Great Philosophers. Dennett. Tom Farrell. Department of Surgical Anatomy RCSI Department of Clinical Medicine RCSI

The Appeal to Reason. Introductory Logic pt. 1

THEISM AND BELIEF. Etymological note: deus = God in Latin; theos = God in Greek.

The Problem of Major Premise in Buddhist Logic

Critical Thinking 5.7 Validity in inductive, conductive, and abductive arguments

Coordination Problems

CONTENTS A SYSTEM OF LOGIC

Russell on Denoting. G. J. Mattey. Fall, 2005 / Philosophy 156. The concept any finite number is not odd, nor is it even.

BENEDIKT PAUL GÖCKE. Ruhr-Universität Bochum

Philosophy 1100: Ethics

HANDBOOK (New or substantially modified material appears in boxes.)

Ancient Greek Philosophy. Instructor: Dr. Jason Sheley

A Brief Introduction to Key Terms

Logic for Computer Science - Week 1 Introduction to Informal Logic

Russell: On Denoting

Academic argument does not mean conflict or competition; an argument is a set of reasons which support, or lead to, a conclusion.

Table of x III. Modern Modal Ontological Arguments Norman Malcolm s argument Charles Hartshorne s argument A fly in the ointment? 86

ILLOCUTIONARY ORIGINS OF FAMILIAR LOGICAL OPERATORS

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

THE FORM OF REDUCTIO AD ABSURDUM J. M. LEE. A recent discussion of this topic by Donald Scherer in [6], pp , begins thus:

2. Refutations can be stronger or weaker.

Argumentative Analogy versus Figurative Analogy

Rule-Following and the Ontology of the Mind Abstract The problem of rule-following

Introduction Symbolic Logic

Russell on Descriptions

Phil Aristotle. Instructor: Jason Sheley

Logic I, Fall 2009 Final Exam

Undergraduate Calendar Content

Argument Mapping. Table of Contents. By James Wallace Gray 2/13/2012

CHAPTER 2 THE LARGER LOGICAL LANDSCAPE NOVEMBER 2017

IN DEFENCE OF CLOSURE

Syllabus Fall 2014 PHIL 2010: Introduction to Philosophy 11:30-12:45 TR, Allgood Hall 257

Study Guides. Chapter 1 - Basic Training

What is the Frege/Russell Analysis of Quantification? Scott Soames

10.3 Universal and Existential Quantifiers

Introduction to Logic

Primitive Thisness and Primitive Identity Robert Merrihew Adams

What am I? An immaterial thing: the case for dualism

Time : Two Hours Full Marks : 50

Argument and Persuasion. Stating Opinions and Proposals

SMITH ON TRUTHMAKERS 1. Dominic Gregory. I. Introduction

16. Universal derivation

On Truth At Jeffrey C. King Rutgers University

1. Introduction Formal deductive logic Overview

(1) A phrase may be denoting, and yet not denote anything; e.g., 'the present King of France'.

Socrates: Are you saying, then, that making it more difficult to get a gun will have no impact on shootings in the U.S?

Chapter 1 Emergence of being

Logic: A Brief Introduction. Ronald L. Hall, Stetson University

6.041SC Probabilistic Systems Analysis and Applied Probability, Fall 2013 Transcript Lecture 3

A Rate of Passage. Tim Maudlin

The Cosmological Argument

Understanding Truth Scott Soames Précis Philosophy and Phenomenological Research Volume LXV, No. 2, 2002

A Brief History of Thinking about Thinking Thomas Lombardo

Introduction. I. Proof of the Minor Premise ( All reality is completely intelligible )

Transcription:

Exercises C. M. Sperberg-McQueen, Black Mesa Technologies This document contains some hands-on exercises for the Alloy tutorial. Some of these are adapted from other sources (listed at the bottom of the document). Exercise 1: Hello, world 1. Launch the Alloy Analyzer. 2. Transcribe the model given at http://blackmesatech.com/2013/07/alloy/examples/helloworld.als. 3. From the Execute menu, select any of run creata, run ecce, check deus creator, or check deus solus creator. 4. If the predicate you ran has instances, or if the assertion you checked has counter-examples, the Analyzer will show you one. Examine the diagram. Select the Next icon to ask for another instance or counter-example. Exercise 2: Signatures and fields Who owns the mule? (From Willis 1997, puzzle P1-1). This puzzle requires the use of the logical connectives and, or, and not (at least, the instructor s solution uses them and the instructor couldn t find a way to do without them), but does not require anything more elaborate by way of logical machinery. Three farmers who have shared the use of a mule for some time disagree as to who owns the animal. It is not certain, however, that the responsibility of ownership is desired. They have asked Socrates to settle the issue. The three make the following statements. Each makes one true and one false statement. A. B. C. 1. It is C s mule. 2. I can make no claim to it. 1. C has no right to it. 2. It is A s mule. 1. It is my mule. 2. B s second statement is false. Socrates hesitates for scarcely an instant and determines the owner. To which farmer does the mule belong? Bibliographic objects The Functional requirements for bibliographic objects (http://www.ifla.org/files/assets/cataloguing/frbr/frbr_2008.pdf) (IFLA, 1997; rev. 2009) defines four types of bibliographic objects: works, expressions, manifestations, and items, with the following relations holding between related objects: realizes(expression, Work). One to many: one work may be realized by many expressions, but each expression realizes exactly one work. 1

embodies(manifestation, Expression). Many to many: one expression may be embodied by many manifestations, and each manifestation embodies one or more expressions. exemplifies(item, Manifestation). One to many: one manifestation may be exemplified by many item, but each item exemplifies exactly one mnaifestation. Write an Alloy model to describe the four types of object and their formal relations. You may assume either that the four types of object are disjoint, or that they are not necessarily disjoint. Time and interest permitting, write two models (one making the types disjoint, one not doing so) and compare them. Exercise 3: Sets and set operators (From Summers 1968, puzzle 5). Mary s ideal man is tall, dark, and handsome. She knows four men: Alec, Bill, Carl, and Dave. Only one of the four men has all of the characteristics Mary requires. 1. Only three of the men are tall, only two are dark, and only one is handsome. 2. Each of the four men has at least one of the required traits. 3. Alec and Bill have the same complexion. 4. Bill and Carl are the same height. 5. Carl and Dave are not both tall. Which one of the four men satisfies all of Mary s requirements? Exercise 4: sentential logic (These exercises in sentential logic are adapted from Jeffrey 1967, sec. 3.18). Crumm and Moriarty Assume these to be true: Crumm is not guilty. Moriarty is guilty if Crumm is. Moriarty is not guilty. Moriarty s escape Assume these to be true: If Moriarty has escaped, then either Holmes has bungled or Watson is on the job. Holmes has not bungled unless Moriarty has escaped. Watson is not on the job. Moriarty has escaped if and only if Holmes has bungled. 2

Exercise 5: Quantification (Adapted from Jeffrey 1967, ch. 6). Holmes and Moriarty Assume these to be true: Holmes, if anyone, can trap Moriarty. Holmes cannot [trap Moriarty]. No one can [trap Moriarty]. Watson and Moriarty If Watson can trap Moriarty, anyone can. Holmes cannot. Watson cannot. Mortality Everyone is mortal. No one is immortal. Watson cannot. Whom Alma loves Everyone whom Alma loves, loves Alma. If Alma loves everyone, then everyone loves Alma. More about Alma Unless Alma loves herself, she loves no one. [N.B. the conjunction unless has the same truth function as (inclusive) or.] Do either of these follow? Alma loves Bert if she loves herself. Alma loves Bert only if she loves herself. 3

Exercise 6: Relational operators The exercise below is placed here partly because one natural assertion to formalize is Leibniz s claim that either all concepts depend on (and are thus reducible to) some set of primitive concepts, or else there must be an infinite series of dependencies. Given a depends on relation describing immediate dependencies, we can generate its transitive closure to get the set of all the other concepts on which a given concept depends. Leibniz on primitive concepts (From Leibniz 1679). Leibniz writes: It is the greatest remedy for the mind if a few thoughts can be found from which infinite others arise in order, just as from the assumption of a few numbers, from one to ten, all the other numbers can be derived in order. Whatever is thought by us is either conceived through itself, or involves the concept of another. Whatever is involved in the concept of another is again either conceived through itself or involves the concept of another; and so on. So one must either proceed to infinity, or all thoughts are resolved into those which are conceived through themselves. If nothing is conceived through itself, nothing will be conceived at all. For what is conceived only through others will be conceived in so far as those others are conceived, and so on; so that we may only be said to conceive something in actuality when we arrive at those things which are conceived through themselves. Can an Alloy model illustrate this argument? Do the conclusions follow from the premises stated? Do they require additional premises? In case of doubt, by conclusions I mean here the sentences So one must... themselves and If nothing is... at all. Other exercises These range in complexity; some of them are easiest if you can arrange items in a sequence (which we don t cover until late in the day). Russell s Barber (From Jeffrey 1967, exercises 7.10 and 7.12). Consistency checking Is this consistent? There is someone who shaves exactly those people who do not shave themselves. Inference There is a man in town who shaves all men in town who do not shave themselves. Some man in town shaves himself. 4

The best player (From Summers 1968, puzzle 1). Mr. Scott, his sister, his son, and his daughter are tennis players. The following facts refer to the people mentioned: 1. The best player s twin and the worst player are of opposite sex. 2. The best player and the worst player are the same age. Which one of the four is the best player? Murder in the family (From Summers 1968, puzzle 3). Murder occurred one evening in the home of a married couple and their son and daughter. One member of the family murdered another member, the third member witnessed the crime, and the fourth member was an accessory after the fact. 1. The accessory and the witness were of opposite sex. 2. The oldest member and the witness were of opposite sex. 3. The youngest member and the victim were of opposite sex. 4. The accessory was older than the victim. 5. The father was the oldest member. 6. The killer was not the youngest member. Which one of the four father, mother, son, or daughter was the killer? Socrates, Plato, Aristotle (From Jeffrey, exercise 9.3a). Given Socrates taught Plato. Socrates had at most one student. Aristotle was a student of someone whom Socrates taught. Does it follow that: Plato taught Aristotle. A week in Arlington (From Summers 1968, puzzle 11). Do sequences make this easier to formulate? In the town of Arlingon the supermarket, the department store, and the bank are open together on one day each week. 1. Each of the three places is open four days a week. 2. On Sunday all three places are closed. 3. None of the three places is open on three consecutive days. 4. On six consecutive days: the department store was closed on the first day the supermarket was closed on the second day the bank was closed on the third day the supermarket was closed on the fourth day the department was closed on the fifth day the bank was closed on the sixth day On which one of the seven days are all three places in Arlington open? 5

The eight-queens problem (An old programming chestnut). Place eight queens on a chessboard in such a way that no queen threatens any other queen. It may be simplest to define the more general n-queens problem, and then write a predicate that holds if the number of queens is eight. Sources Jeffrey, Richard C. Formal logic: its scope and limits. New York: McGraw-Hill, 1967. xii + 238 pp. Leibniz, Gottfried Wilhelm. Of an organon or ars magna of thinking (c. 1679), pp. 1-4 of his Philosophical writings, ed. G. H. R. Parkinson, tr. Mary Morris and G. H. R. Parkinson. London: Dent; Vermont: Charles E. Tuttle 1934; rev. ed. 1973; rpt. 1995. xxxvi + 267 pp. Summers, George J. New puzzles in logical deduction. New York: Dover, 1968. vi + 121 pp. Willis, Norman D. False logic puzzles. New York: Sterling, 1997. [96] pp. Solutions Solutions to some (but not currently all) of these exercises may be found at http://blackmesatech.com/2013/07/alloy/examples/. 6