rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9783540208549

Interactive Theorem Proving And Program Development

by ; ; ;
  • ISBN13:

    9783540208549

  • ISBN10:

    3540208542

  • Format: Hardcover
  • Copyright: 2004-06-30
  • Publisher: Springer-Nature New York Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $109.99 Save up to $77.59
  • Digital
    $70.20*
    Add to Cart

    DURATION
    PRICE
    *To support the delivery of the digital material to you, a digital delivery fee of $3.99 will be charged on each digital item.

Summary

Coq is an interactive proof assistant for the development of mathematical theories and formally certified software. It is based on a theory called the calculus of inductive constructions, a variant of type theory. This book provides a pragmatic introduction to the development of proofs and certified programs using Coq. With its large collection of examples and exercises it is an invaluable tool for researchers, students, and engineers interested in formal methods and the development of zero-fault software.

Table of Contents

1 A Brief Overview
1(12)
1.1 Expressions, Types, and Functions
2(1)
1.2 Propositions and Proofs
3(1)
1.3 Propositions and Types
4(1)
1.4 Specifications and Certified Programs
5(1)
1.5 A Sorting Example
5(4)
1.5.1 Inductive Definitions
6(1)
1.5.2 The Relation "to have the same elements"
6(1)
1.5.3 A Specification for a Sorting Program
7(1)
1.5.4 An Auxiliary Function
7(1)
1.5.5 The Main Sorting Function
8(1)
1.6 Learning Coq
9(1)
1.7 Contents of This Book
9(2)
1.8 Lexical Conventions
11(2)
2 Types and Expressions
13(30)
2.1 First Steps
13(4)
2.1.1 Terms, Expressions, Types
14(1)
2.1.2 Interpretation Scopes
14(1)
2.1.3 Type Checking
15(2)
2.2 The Rules of the Game
17(12)
2.2.1 Simple Types
17(1)
2.2.2 Identifiers, Environments, Contexts
18(2)
2.2.3 Expressions and Their Types
20(7)
2.2.4 Free and Bound Variables; a-conversion
27(2)
2.3 Declarations and Definitions
29(4)
2.3.1 Global Declarations and Definitions
29(1)
2.3.2 Sections and Local Variables
30(3)
2.4 Computing
33(4)
2.4.1 Substitution
34(1)
2.4.2 Reduction Rules
34(2)
2.4.3 Reduction Sequences
36(1)
2.4.4 Convertibility
37(1)
2.5 Types, Sorts, and Universes
37(4)
2.5.1 The Set Sort
37(1)
2.5.2 Universes
38(1)
2.5.3 Definitions and Declarations of Specifications
39(2)
2.6 Realizing Specifications
41(2)
3 Propositions and Proofs
43(30)
3.1 Minimal Propositional Logic
45(6)
3.1.1 The World of Propositions and Proofs
45(1)
3.1.2 Goals and Tactics
46(1)
3.1.3 A First Goal-directed Proof
47(4)
3.2 Relating Typing Rules and Tactics
51(5)
3.2.1 Proposition Building Rules
51(1)
3.2.2 Inference Rules and Tactics
52(4)
3.3 Structure of an Interactive Proof
56(2)
3.3.1 Activating the Goal Handling System
57(1)
3.3.2 Current Stage of an Interactive Proof
57(1)
3.3.3 Undoing
57(1)
3.3.4 Regular End of a Proof
58(1)
3.4 Proof Irrelevance
58(2)
3.4.1 Theorem Versus Definition
59(1)
3.4.2 Are Tactics Helpful for Building Programs?
59(1)
3.5 Sections and Proofs
60(1)
3.6 Composing Tactics
61(6)
3.6.1 Tacticals
61(4)
3.6.2 Maintenance Issues
65(2)
3.7 On Completeness for Propositional Logic
67(1)
3.7.1 A Complete Set of Tactics
67(1)
3.7.2 Unprovable Propositions
68(1)
3.8 Some More Tactics
68(3)
3.8.1 The cut and assert Tactics
68(2)
3.8.2 An Introduction to Automatic Tactics
70(1)
3.9 A New Kind of Abstraction
71(2)
4 Dependent Products, or Pandora's Box
73(32)
4.1 In Praise of Dependence
74(7)
4.1.1 Extending the Scope of Arrows
74(4)
4.1.2 On Binding
78(1)
4.1.3 A New Construct
79(2)
4.2 Typing Rules and Dependent Products
81(10)
4.2.1 The Application Typing Rule
81(3)
4.2.2 The Abstraction Typing Rule
84(2)
4.2.3 Type Inference
86(4)
4.2.4 The Conversion Rule
90(1)
4.2.5 Dependent Products and the Convertibility Order
90(1)
4.3 * Expressive Power of the Dependent Product
91(14)
4.3.1 Formation Rule for Products
91(1)
4.3.2 Dependent Types
92(2)
4.3.3 Polymorphism
94(4)
4.3.4 Equality in the Coq System
98(1)
4.3.5 Higher-Order Types
99(6)
5 Everyday Logic
105(32)
5.1 Practical Aspects of Dependent Products
105(11)
5.1.1 exact and assumption
105(1)
5.1.2 The intro Tactic
106(2)
5.1.3 The apply Tactic
108(7)
5.1.4 The unfold Tactic
115(1)
5.2 Logical Connectives
116(8)
5.2.1 Introduction and Elimination Rules
116(2)
5.2.2 Using Contradictions
118(1)
5.2.3 Negation
119(2)
5.2.4 Conjunction and Disjunction
121(2)
5.2.5 About the repeat Tactical
123(1)
5.2.6 Existential Quantification
123(1)
5.3 Equality and Rewriting
124(6)
5.3.1 Proving Equalities
124(1)
5.3.2 Using Equality: Rewriting Tactics
125(2)
5.3.3 * The pattern Tactic
127(1)
5.3.4 * Conditional Rewriting
128(1)
5.3.5 Searching Theorems for Rewriting
129(1)
5.3.6 Other Tactics on Equality
129(1)
5.4 Tactic Summary Table
130(1)
5.5 *** Impredicative Definitions
130(7)
5.5.1 Warning
130(1)
5.5.2 True and False
130(1)
5.5.3 Leibniz Equality
131(2)
5.5.4 Some Other Connectives and Quantifiers
133(2)
5.5.5 A Guideline for Impredicative Definitions
135(2)
6 Inductive Data Types
137(50)
6.1 Types Without Recursion
137(11)
6.1.1 Enumerated Types
137(2)
6.1.2 Simple Reasoning and Computing
139(2)
6.1.3 The elim Tactic
141(1)
6.1.4 Pattern Matching
142(3)
6.1.5 Record Types
145(1)
6.1.6 Records with Variants
146(2)
6.2 Case-Based Reasoning
148(12)
6.2.1 The case Tactic
148(3)
6.2.2 Contradictory Equalities
151(2)
6.2.3 Injective Constructors
153(3)
6.2.4 Inductive Types and Equality
156(1)
6.2.5 * Guidelines for the case Tactic
156(4)
6.3 Recursive Types
160(15)
6.3.1 Natural Numbers as an Inductive Type
161(1)
6.3.2 Proof by Induction on Natural Numbers
162(2)
6.3.3 Recursive Programming
164(3)
6.3.4 Variations in the Form of Constructors
167(3)
6.3.5 ** Types with Functional Fields
170(2)
6.3.6 Proofs on Recursive Functions
172(2)
6.3.7 Anonymous Recursive Functions (fix)
174(1)
6.4 Polymorphic Types
175(5)
6.4.1 Polymorphic Lists
175(2)
6.4.2 The option Type
177(2)
6.4.3 The Type of Pairs
179(1)
6.4.4 The Type of Disjoint Sums
180(1)
6.5 * Dependent Inductive Types
180(4)
6.5.1 First-Order Data as Parameters
180(1)
6.5.2 Variably Dependent Inductive Types
181(3)
6.6 * Empty Types
184(3)
6.6.1 Non-dependent Empty Types
184(1)
6.6.2 Dependence and Empty Types
185(2)
7 Tactics and Automation
187(24)
7.1 Tactics for Inductive Types
187(3)
7.1.1 Case-by-Case Analysis and Recursion
187(1)
7.1.2 Conversions
188(2)
7.2 Tactics auto and eauto
190(4)
7.2.1 Tactic Database Handling: Hint
191(3)
7.2.2 * The eauto Tactic
194(1)
7.3 Automatic Tactics for Rewriting
194(2)
7.3.1 The autorewrite Tactic
194(1)
7.3.2 The subst Tactic
195(1)
7.4 Numerical Tactics
196(4)
7.4.1 The ring Tactic
196(2)
7.4.2 The omega Tactic
198(1)
7.4.3 The field Tactic
199(1)
7.4.4 The fourier Tactic
200(1)
7.5 Other Decision Procedures
200(1)
7.6 ** The Tactic Definition Language
201(10)
7.6.1 Arguments in Tactics
202(1)
7.6.2 Pattern Matching
203(7)
7.6.3 Using Reduction in Defined Tactics
210(1)
8 Inductive Predicates
211(40)
8.1 Inductive Properties
211(6)
8.1.1 A Few Examples
211(2)
8.1.2 Inductive Predicates and Logic Programming
213(1)
8.1.3 Advice for Inductive Definitions
214(1)
8.1.4 The Example of Sorted Lists
215(2)
8.2 Inductive Properties and Logical Connectives
217(9)
8.2.1 Representing Truth
218(1)
8.2.2 Representing Contradiction
218(1)
8.2.3 Representing Conjunction
219(1)
8.2.4 Representing Disjunction
219(1)
8.2.5 Representing Existential Quantification
219(1)
8.2.6 Representing Equality
220(1)
8.2.7 *** Heterogeneous Equality
220(5)
8.2.8 An Exotic Induction Principle?
225(1)
8.3 Reasoning about Inductive Properties
226(7)
8.3.1 Structured intros
226(1)
8.3.2 The constructor Tactics
227(1)
8.3.3 * Induction on Inductive Predicates
227(2)
8.3.4 * Induction on le
229(4)
8.4 * Inductive Relations and Functions
233(11)
8.4.1 Representing the Factorial Function
234(5)
8.4.2 ** Representing the Semantics of a Language
239(1)
8.4.3 ** Proving Semantic Properties
240(4)
8.5 * Elaborate Behavior of elim
244(7)
8.5.1 Instantiating the Argument
244(2)
8.5.2 Inversion
246(5)
9 * Functions and Their Specifications
251(34)
9.1 Inductive Types for Specifications
252(4)
9.1.1 The "Subset" Type
252(2)
9.1.2 Nested Subset Types
254(1)
9.1.3 Certified Disjoint Sum
254(2)
9.1.4 Hybrid Disjoint Sum
256(1)
9.2 Strong Specifications
256(11)
9.2.1 Well-specified Functions
257(1)
9.2.2 Building Functions as Proofs
257(1)
9.2.3 Preconditions for Partial Functions
258(1)
9.2.4 ** Proving Preconditions
259(1)
9.2.5 ** Reinforcing Specifications
260(1)
9.2.6 *** Minimal Specification Strengthening
261(4)
9.2.7 The refine Tactic
265(2)
9.3 Variations on Structural Recursion
267(9)
9.3.1 Structural Recursion with Multiple Steps
267(4)
9.3.2 Simplifying the Step
271(1)
9.3.3 Recursive Functions with Several Arguments
271(5)
9.4 ** Binary Division
276(9)
9.4.1 Weakly Specified Division
276(5)
9.4.2 Well-specified Binary Division
281(4)
10 * Extraction and Imperative Programming 285(24)
10.1 Extracting Toward Functional Languages
285(12)
10.1.1 The Extraction Command
286(1)
10.1.2 The Extraction Mechanism
287(8)
10.1.3 Prop, Set, and Extraction
295(2)
10.2 Describing Imperative Programs
297(12)
10.2.1 The Why Tool
297(3)
10.2.2 *** The Inner Workings of Why
300(9)
11 * A Case Study 309(16)
11.1 Binary Search Trees
309(4)
11.1.1 The Data Structure
309(2)
11.1.2 A Naive Approach to Deciding Occurrence
311(1)
11.1.3 Describing Search Trees
311(2)
11.2 Specifying Programs
313(2)
11.2.1 Finding an Occurrence
313(1)
11.2.2 Inserting a Number
313(1)
11.2.3 ** Removing a Number
314(1)
11.3 Auxiliary Lemmas
315(1)
11.4 Realizing Specifications
315(8)
11.4.1 Realizing the Occurrence Test
315(3)
11.4.2 Insertion
318(4)
11.4.3 Removing Elements
322(1)
11.5 Possible Improvements
323(1)
11.6 Another Example
324(1)
12 * The Module System 325(22)
12.1 Signatures
326(2)
12.2 Modules
328(7)
12.2.1 Building a Module
328(1)
12.2.2 An Example: Keys
329(3)
12.2.3 Parametric Modules (Functors)
332(3)
12.3 A Theory of Decidable Order Relations
335(4)
12.3.1 Enriching a Theory with a Functor
335(2)
12.3.2 Lexicographic Order as a Functor
337(2)
12.4 A Dictionary Module
339(6)
12.4.1 Enriched Implementations
340(1)
12.4.2 Constructing a Dictionary with a Functor
340(1)
12.4.3 A Trivial Implementation
340(2)
12.4.4 An Efficient Implementation
342(3)
12.5 Conclusion
345(2)
13 ** Infinite Objects and Proofs 347(30)
13.1 Co-inductive Types
347(3)
13.1.1 The Co-Inductive Command
347(1)
13.1.2 Specific Features of Co-inductive Types
348(1)
13.1.3 Infinite Lists (Streams)
348(1)
13.1.4 Lazy Lists
349(1)
13.1.5 Lazy Binary Trees
349(1)
13.2 Techniques for Co-inductive Types
350(1)
13.2.1 Building Finite Objects
350(1)
13.2.2 Pattern Matching
350(1)
13.3 Building Infinite Objects
351(6)
13.3.1 A Failed Attempt
352(1)
13.3.2 The CoFixpoint Command
352(2)
13.3.3 A Few Co-recursive Functions
354(2)
13.3.4 Badly Formed Definitions
356(1)
13.4 Unfolding Techniques
357(4)
13.4.1 Systematic Decomposition
358(1)
13.4.2 Applying the Decomposition Lemma
358(1)
13.4.3 Simplifying a Call to a Co-recursive Function
359(2)
13.5 Inductive Predicates over Co-inductive Types
361(1)
13.6 Co-inductive Predicates
362(6)
13.6.1 A Predicate for Infinite Sequences
363(1)
13.6.2 Building Infinite Proofs
363(2)
13.6.3 Guard Condition Violation
365(1)
13.6.4 Elimination Techniques
366(2)
13.7 Bisimilarity
368(3)
13.7.1 The bisimilar Predicate
368(2)
13.7.2 Using Bisimilarity
370(1)
13.8 The Park Principle
371(1)
13.9 LTL
372(3)
13.10 A Case Study: Transition Systems
375(1)
13.10.l Automata and Traces
375(1)
13.11 Conclusion
376(1)
14 ** Foundations of Inductive Types 377(30)
14.1 Formation Rules
377(17)
14.1.1 The Inductive Type
377(2)
14.1.2 The Constructors
379(3)
14.1.3 Building the Induction Principle
382(3)
14.1.4 Typing Recursors
385(7)
14.1.5 Induction Principles for Predicates
392(2)
14.1.6 The Scheme Command
394(1)
14.2 *** Pattern Matching and Recursion on Proofs
394(6)
14.2.1 Restrictions on Pattern Matching
395(1)
14.2.2 Relaxing the Restrictions
396(2)
14.2.3 Recursion
398(2)
14.3 Mutually Inductive Types
400(8)
14.3.1 Trees and Forests
400(2)
14.3.2 Proofs by Mutual Induction
402(2)
14.3.3 *** Trees and Tree Lists
404(3)
15 * General Recursion 407(26)
15.1 Bounded Recursion
408(3)
15.2 ** Well-founded Recursive Functions
411(9)
15.2.1 Well-founded Relations
411(1)
15.2.2 Accessibility Proofs
411(2)
15.2.3 Assembling Well-founded Relations
413(1)
15.2.4 Well-founded Recursion
414(1)
15.2.5 The Recursor well_founded_induction
414(1)
15.2.6 Well-founded Euclidean Division
415(4)
15.2.7 Nested Recursion
419(1)
15.3 ** General Recursion by Iteration
420(7)
15.3.1 The Functional Related to a Recursive Function
421(1)
15.3.2 Termination Proof
421(3)
15.3.3 Building the Actual Function
424(1)
15.3.4 Proving the Fixpoint Equation
424(2)
15.3.5 Using the Fixpoint Equation
426(1)
15.3.6 Discussion
427(1)
15.4 *** Recursion on an Ad Hoc Predicate
427(6)
15.4.1 Defining an Ad Hoc Predicate
428(1)
15.4.2 Inversion Theorems
428(1)
15.4.3 Defining the Function
429(1)
15.4.4 Proving Properties of the Function
430(3)
16 * Proof by Reflection 433(16)
16.1 General Presentation
433(2)
16.2 Direct Computation Proofs
435(3)
16.3 ** Proof by Algebraic Computation
438(9)
16.3.1 Proofs Modulo Associativity
438(4)
16.3.2 Making the Type and the Operator More Generic
442(3)
16.3.3 *** Commutativity: Sorting Variables
445(2)
16.4 Conclusion
447(2)
Appendix 449(4)
Insertion Sort
449(4)
References 453(6)
Index 459
Coq and Its Libraries
460(4)
Examples from the Book
464

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program