Automated Reasoning. Lecture 9: Isar A Language for Structured Proofs
|
|
- Denis Williams
- 6 years ago
- Views:
Transcription
1 Automated Reasoning Lecture 9: Isar A Language for Structured Proofs Jacques Fleuriot jdf@inf.ed.ac.uk Acknowledgement: Tobias Nipkow kindly provided the slides for this lecture
2 Apply scripts unreadable
3 Apply scripts unreadable hard to maintain
4 Apply scripts unreadable hard to maintain do not scale
5 Apply scripts unreadable hard to maintain do not scale No structure!
6 Apply scripts versus Isar proofs Apply script = assembly language program
7 Apply scripts versus Isar proofs Apply script = assembly language program Isar proof = structured program with comments
8 Apply scripts versus Isar proofs Apply script = assembly language program Isar proof = structured program with comments But: apply still useful for proof exploration
9 A typical Isar proof proof assume formula 0 have formula 1 by simp. have formula n by blast show formula n+1 by... qed
10 A typical Isar proof proof assume formula 0 have formula 1 by simp. have formula n by blast show formula n+1 by... qed proves formula 0 = formula n+1
11 Isar core syntax proof = proof [method] step qed by method
12 Isar core syntax proof = proof [method] step qed by method method = (simp... ) (blast... ) (induction... )
13 Isar core syntax proof = proof [method] step qed by method method = (simp... ) (blast... ) (induction... ) step = fix variables ( ) assume prop (= ) [from fact + ] (have show) prop proof
14 Isar core syntax proof = proof [method] step qed by method method = (simp... ) (blast... ) (induction... ) step = fix variables ( ) assume prop (= ) [from fact + ] (have show) prop proof prop = [name:] formula
15 Isar core syntax proof = proof [method] step qed by method method = (simp... ) (blast... ) (induction... ) step = fix variables ( ) assume prop (= ) [from fact + ] (have show) prop proof prop = [name:] formula fact = name
16 Example: Cantor s theorem lemma surj(f :: a a set)
17 Example: Cantor s theorem lemma surj(f :: a a set) proof
18 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False
19 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f
20 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a
21 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def)
22 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def) from b have c: a. {x. x / f x} = f a
23 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def) from b have c: a. {x. x / f x} = f a by blast
24 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def) from b have c: a. {x. x / f x} = f a by blast from c show False
25 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def) from b have c: a. {x. x / f x} = f a by blast from c show False by blast
26 Example: Cantor s theorem lemma surj(f :: a a set) proof default proof: assume surj, show False assume a: surj f from a have b: A. a. A = f a by(simp add: surj_def) from b have c: a. {x. x / f x} = f a by blast from c show False by blast qed
27 Abbreviations this = the previous proposition proved or assumed then = from this thus = then show hence = then have
28 using and with (have show) prop using facts
29 using and with (have show) prop using facts = from facts (have show) prop
30 using and with (have show) prop using facts = from facts (have show) prop with facts = from facts this
31 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False
32 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof -
33 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof - no automatic proof step
34 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof - no automatic proof step have a. {x. x / f x} = f a using s by(auto simp: surj_def)
35 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof - no automatic proof step have a. {x. x / f x} = f a using s by(auto simp: surj_def) thus False by blast qed
36 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof - no automatic proof step have a. {x. x / f x} = f a using s by(auto simp: surj_def) thus False by blast qed Proves surj f = False
37 Structured lemma statement lemma fixes f :: a a set assumes s: surj f shows False proof - no automatic proof step have a. {x. x / f x} = f a using s by(auto simp: surj_def) thus False by blast qed Proves surj f = False but surj f becomes local fact s in proof.
38 The essence of structured proofs Assumptions and intermediate facts can be named and referred to explicitly and selectively
39 Structured lemma statements fixes x :: τ 1 and y :: τ 2 assumes a: P and b: Q shows R
40 Structured lemma statements fixes x :: τ 1 and y :: τ 2 assumes a: P and b: Q shows R fixes and assumes sections optional
41 Structured lemma statements fixes x :: τ 1 and y :: τ 2 assumes a: P and b: Q shows R fixes and assumes sections optional shows optional if no fixes and assumes
42 Proof patterns: Case distinction show R proof cases assume P. show R... next assume P. show R... qed
43 Proof patterns: Case distinction show R proof cases assume P. show R... next assume P. show R... qed have P Q... then show R proof assume P. show R... next assume Q. show R... qed
44 Proof patterns: Contradiction show P proof assume P. show False... qed
45 Proof patterns: Contradiction show P proof assume P. show False... qed show P proof (rule ccontr) assume P. show False... qed
46 Proof patterns: show P Q proof assume P. show Q... next assume Q. show P... qed
47 Proof patterns: and introduction show x. P(x) proof fix x local fixed variable show P(x)... qed
48 Proof patterns: and introduction show x. P(x) proof fix x local fixed variable show P(x)... qed show x. P(x) proof. show P(witness)... qed
49 Proof patterns: elimination: obtain
50 Proof patterns: elimination: obtain have x. P(x) then obtain x where p: P(x) by blast. x fixed local variable
51 Proof patterns: elimination: obtain have x. P(x) then obtain x where p: P(x) by blast. x fixed local variable Works for one or more x
52 obtain example lemma surj(f :: a a set) proof assume surj f hence a. {x. x / f x} = f a by(auto simp: surj_def)
53 obtain example lemma surj(f :: a a set) proof assume surj f hence a. {x. x / f x} = f a by(auto simp: surj_def) then obtain a where {x. x / f x} = f a by blast
54 obtain example lemma surj(f :: a a set) proof assume surj f hence a. {x. x / f x} = f a by(auto simp: surj_def) then obtain a where {x. x / f x} = f a by blast hence a / f a a f a by blast
55 obtain example lemma surj(f :: a a set) proof assume surj f hence a. {x. x / f x} = f a by(auto simp: surj_def) then obtain a where {x. x / f x} = f a by blast hence a / f a a f a by blast thus False by blast qed
56 Proof patterns: Set equality and subset show A = B proof show A B... next show B A... qed
57 Proof patterns: Set equality and subset show A = B proof show A B... next show B A... qed show A B proof fix x assume x A. show x B... qed
58 Example: pattern matching show formula 1 formula 2 (is?l?r)
59 Example: pattern matching show formula 1 formula 2 proof assume?l. show?r next assume?r. show?l qed (is?l?r)
60 ?thesis show formula proof -. show?thesis qed
61 ?thesis show formula (is?thesis) proof -. show?thesis qed
62 ?thesis show formula (is?thesis) proof -. show?thesis qed Every show implicitly defines?thesis
63 let Introducing local abbreviations in proofs: let?t = "some-big-term". have "?t "
64 Quoting facts by value By name: have x0: x > 0. from x0
65 Quoting facts by value By name: have x0: x > 0. from x0 By value: have x > 0. from x>0
66 Quoting facts by value By name: have x0: x > 0. from x0 By value: have x > 0. from x>0 back quotes
67 Example lemma ( ys zs. xs = zs length ys = length zs) ( ys zs. xs = zs length ys = length zs + 1)
68 Example lemma ( ys zs. xs = zs length ys = length zs) ( ys zs. xs = zs length ys = length zs + 1) proof???
69 When automation fails Split proof up into smaller steps.
70 When automation fails Split proof up into smaller steps. Or explore by apply:
71 When automation fails Split proof up into smaller steps. Or explore by apply: have using
72 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - to make incoming facts part of proof state
73 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - apply auto to make incoming facts part of proof state or whatever
74 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - apply auto apply to make incoming facts part of proof state or whatever
75 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - apply auto apply to make incoming facts part of proof state or whatever At the end:
76 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - apply auto apply to make incoming facts part of proof state or whatever At the end: done
77 When automation fails Split proof up into smaller steps. Or explore by apply: have using apply - apply auto apply to make incoming facts part of proof state or whatever At the end: done Better: convert to structured proof
78 moreover ultimately have P 1... moreover have P 2... moreover. moreover have P n... ultimately have P...
79 moreover ultimately have P 1... moreover have P 2... moreover. moreover have P n... ultimately have P... have lab 1 : P 1... have lab 2 : P have lab n : P n... from lab 1 lab 2... have P... With names
80 Raw proof blocks { fix x 1... x n assume A 1... A m. have B }
81 Raw proof blocks { fix x 1... x n assume A 1... A m. have B } proves [[ A 1 ;... ; A m ]] = B
82 Raw proof blocks { fix x 1... x n assume A 1... A m. have B } proves [[ A 1 ;... ; A m ]] = B where all x i have been replaced by?x i.
83 Proof state and Isar text
84 Proof state and Isar text In general: proof method
85 Proof state and Isar text In general: proof method Applies method and generates subgoal(s): x1... x n [[ A 1 ;... ; A m ]] = B
86 Proof state and Isar text In general: proof method Applies method and generates subgoal(s): x1... x n [[ A 1 ;... ; A m ]] = B How to prove each subgoal:
87 Proof state and Isar text In general: proof method Applies method and generates subgoal(s): x1... x n [[ A 1 ;... ; A m ]] = B How to prove each subgoal: fix x 1... x n assume A 1... A m. show B
88 Proof state and Isar text In general: proof method Applies method and generates subgoal(s): x1... x n [[ A 1 ;... ; A m ]] = B How to prove each subgoal: fix x 1... x n assume A 1... A m. show B Separated by next
89 Datatype case analysis datatype t = C 1 τ
90 Datatype case analysis datatype t = C 1 τ proof (cases "term") case (C 1 x 1... x k ) x j next. qed
91 Datatype case analysis datatype t = C 1 τ proof (cases "term") case (C 1 x 1... x k ) x j next. qed where case (C i x 1... x k ) fix x 1... x k assume C i : }{{} label term = (C i x 1... x k ) }{{} formula
92 Structural induction for nat show P(n) proof (induction n) case 0. show?case next case (Suc n).. show?case qed
93 Structural induction for nat show P(n) proof (induction n) case 0 let?case = P(0). show?case next case (Suc n).. show?case qed
94 Structural induction for nat show P(n) proof (induction n) case 0 let?case = P(0). show?case next case (Suc n) fix n assume Suc: P(n). let?case = P(Suc n). show?case qed
95 Structural induction with = show A(n) = P(n) proof (induction n) case 0. show?case next case (Suc n)... show?case qed
96 Structural induction with = show A(n) = P(n) proof (induction n) case 0 assume 0: A(0). let?case = P(0) show?case next case (Suc n)... show?case qed
97 Structural induction with = show A(n) = P(n) proof (induction n) case 0 assume 0: A(0). let?case = P(0) show?case next case (Suc n) fix n.. assume Suc: A(n) = P(n) A(Suc n). let?case = P(Suc n) show?case qed
98 Named assumptions In a proof of A 1 =... = A n = B by structural induction:
99 Named assumptions In a proof of A 1 =... = A n = B by structural induction: In the context of case C
100 Named assumptions In a proof of A 1 =... = A n = B by structural induction: In the context of case C we have C.IH the induction hypotheses
101 Named assumptions In a proof of A 1 =... = A n = B by structural induction: In the context of case C we have C.IH C.prems the induction hypotheses the premises A i
102 Named assumptions In a proof of A 1 =... = A n = B by structural induction: In the context of case C we have C.IH C.prems C the induction hypotheses the premises A i C.IH + C.prems
103 A remark on style case (Suc n) show?case is easy to write and maintain
104 A remark on style case (Suc n) show?case is easy to write and maintain fix n assume formula show formula is easier to read: all information is shown locally no contextual references (e.g.?case)
105 Rule induction inductive I :: τ σ bool where rule 1 :.... rule n :...
106 Rule induction inductive I :: τ σ bool where rule 1 :... show I x y = P x y. rule n :...
107 Rule induction inductive I :: τ σ bool where rule 1 :... show I x y = P x y proof (induction rule: I.induct). rule n :...
108 Rule induction inductive I :: τ σ bool where rule 1 :.... rule n :... show I x y = P x y proof (induction rule: I.induct) case rule 1 show?case next. next case rule n show?case qed
109 Fixing your own variable names case (rule i x 1... x k ) Renames the first k variables in rule i (from left to right) to x 1... x k.
110 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... :
111 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... : In the context of case R
112 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... : In the context of case R we have R.IH the induction hypotheses
113 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... : In the context of case R we have R.IH R.hyps the induction hypotheses the assumptions of rule R
114 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... : In the context of case R we have R.IH R.hyps R.prems the induction hypotheses the assumptions of rule R the premises A i
115 Named assumptions In a proof of I... = A 1 =... = A n = B by rule induction on I... : In the context of case R we have R.IH R.hyps R.prems R the induction hypotheses the assumptions of rule R the premises A i R.IH + R.hyps + R.prems
116 Rule inversion inductive ev :: nat bool where ev0: ev 0 evss: ev n = ev(suc(suc n)) What can we deduce from ev n?
117 Rule inversion inductive ev :: nat bool where ev0: ev 0 evss: ev n = ev(suc(suc n)) What can we deduce from ev n? That it was proved by either ev0 or evss!
118 Rule inversion inductive ev :: nat bool where ev0: ev 0 evss: ev n = ev(suc(suc n)) What can we deduce from ev n? That it was proved by either ev0 or evss! ev n = n = 0 ( k. n = Suc (Suc k) ev k)
119 Rule inversion inductive ev :: nat bool where ev0: ev 0 evss: ev n = ev(suc(suc n)) What can we deduce from ev n? That it was proved by either ev0 or evss! ev n = n = 0 ( k. n = Suc (Suc k) ev k) Rule inversion = case distinction over rules
120 Rule inversion template from ev n have P proof cases case ev0 n = 0. show?thesis... next case (evss k). show?thesis... qed n = Suc (Suc k), ev k
121 Rule inversion template from ev n have P proof cases case ev0 n = 0. show?thesis... next case (evss k). show?thesis... qed Impossible cases disappear automatically n = Suc (Suc k), ev k
122 Summary Introduction to Isar and to some common proof patterns e.g. case distinction, contradiction, etc. Structured proofs are becoming the norm for Isabelle as they are more readable and easier to maintain. Mastering structured proof takes practice and it is usually better to have a clear proof plan beforehand. Useful resource: Isar quick reference manual (see AR web page). Reading: N&K (Concrete Semantics), Chapter 5.
Automated Reasoning Lecture 17: Inductive Proof (in Isabelle)
Automated Reasoning Lecture 17: Inductive Proof (in Isabelle) Jacques Fleuriot jdf@inf.ed.ac.uk Recap Previously: Unification and Rewriting This time: Proof by Induction (in Isabelle) Proof by Mathematical
More informationAnalyse et Conception Formelle. Lesson 4. Proofs with a proof assistant
Analyse et Conception Formelle Lesson 4 Proofs with a proof assistant T. Genet (ISTIC/IRISA) ACF-4 1 / 26 Prove logic formulas... to prove programs fun nth:: "nat => a list => a" where "nth 0 (x#_)=x"
More informationMiscellaneous Isabelle/Isar examples
Miscellaneous Isabelle/Isar examples Makarius Wenzel With contributions by Gertrud Bauer and Tobias Nipkow October 8, 2017 Abstract Isar offers a high-level (and theory) language for Isabelle. We give
More informationMP 5 Program Transition Systems and Linear Temporal Logic
MP 5 Program Transition Systems and Linear Temporal Logic CS 477 Spring 2018 Revision 1.0 Assigned April 10, 2018 Due April 17, 2018, 9:00 PM Extension extend48 hours (penalty 20% of total points possible)
More informationInteractive Theorem Provers
Interactive Theorem Provers from the perspective of Isabelle/Isar Makarius Wenzel Univ. Paris-Sud, LRI July 2014 = Isabelle λ β Isar α 1 Introduction Notable ITP systems LISP based: ACL2 http://www.cs.utexas.edu/users/moore/acl2
More informationHall s Marriage Theorem
Hall s Marriage Theorem Dongchen Jiang and Tobias Nipkow February 16, 2013 Abstract A proof of Hall s Marriage Theorem due to Halmos and Vaughan [1]. theory Marriage imports Main begin theorem marriage-necessary:
More informationBoolean Expression Checkers
Boolean Expression Checkers Tobias Nipkow May 27, 2015 Abstract This entry provides executable checkers for the following properties of boolean expressions: satisfiability, tautology and equivalence. Internally,
More informationAutomated Reasoning Lecture 5: First-Order Logic
Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional
More informationMuch Ado about Two. By Sascha Böhme. February 22, 2013
Much Ado about Two By Sascha Böhme February 22, 2013 Abstract This article is an Isabelle formalisation of a paper with the same. In a similar way as Knuth s 0-1-principle for sorting algorithms, that
More informationIntroduction to Isabelle/HOL
Introduction to Isabelle/HOL 1 Notes on Isabelle/HOL Notation In Isabelle/HOL: [ A 1 ;A 2 ; ;A n ]G can be read as if A 1 and A 2 and and A n then G 3 Note: -Px (P x) stands for P (x) (P(x)) -P(x, y) can
More informationImperative Insertion Sort
Imperative Insertion Sort Christian Sternagel October 11, 2017 Contents 1 Looping Constructs for Imperative HOL 1 1.1 While Loops............................ 1 1.2 For Loops.............................
More informationAutomated Reasoning Lecture 2: Propositional Logic and Natural Deduction
Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction Jacques Fleuriot jdf@inf.ed.ac.uk Logic Puzzles 1. Tomorrow will be sunny or rainy. Tomorrow will not be sunny. What will the weather
More informationAdvanced Topics in LP and FP
Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection
More informationFunctional Data Structures
Functional Data Structures with Isabelle/HOL Tobias Nipkow Fakultät für Informatik Technische Universität München 2017-2-3 1 Part II Functional Data Structures 2 Chapter 1 Binary Trees 3 1 Binary Trees
More informationNICTA Advanced Course. Theorem Proving Principles, Techniques, Applications
NICTA Advanced Course Theorem Proving Principles, Techniques, Applications λ 1 CONTENT Intro & motivation, getting started with Isabelle Foundations & Principles Lambda Calculus Higher Order Logic, natural
More informationSyntax and semantics of a GPU kernel programming language
Syntax and semantics of a GPU kernel programming language John Wickerson April 17, 2016 Abstract This document accompanies the article The Design and Implementation of a Verification Technique for GPU
More informationUsing the Prover I: Lee Pike. June 3, NASA Langley Formal Methods Group Using the Prover I:
Basic Basic NASA Langley Formal Methods Group lee.s.pike@nasa.gov June 3, 2005 Basic Sequents Basic Sequent semantics: The conjunction of the antecedents above the turnstile implies the disjunction of
More informationApplied 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 informationA General Method for the Proof of Theorems on Tail-recursive Functions
A General Method for the Proof of Theorems on Tail-recursive Functions Pasquale Noce Security Certification Specialist at Arjo Systems - Gep S.p.A. pasquale dot noce dot lavoro at gmail dot com pasquale
More informationAnselm s God in Isabelle/HOL
Anselm s God in Isabelle/HOL Ben Blumson September 12, 2017 Contents 1 Introduction 1 2 Free Logic 2 3 Definite Descriptions 3 4 Anselm s Argument 4 5 The Prover9 Argument 6 6 Soundness 7 7 Conclusion
More information02 Propositional Logic
SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP Recap: Logic, Sets, Relations, Functions
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017 Formal proofs; Simple/strong induction; Mutual induction; Inductively defined sets; Recursively defined functions. Lecture 3 Ana Bove
More informationNICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods
NICTA Advanced Course Theorem Proving Principles, Techniques, Applications Gerwin Klein Formal Methods 1 ORGANISATORIALS When Mon 14:00 15:30 Wed 10:30 12:00 7 weeks ends Mon, 20.9.2004 Exceptions Mon
More informationExamples for program extraction in Higher-Order Logic
Examples for program extraction in Higher-Order Logic Stefan Berghofer October 10, 2011 Contents 1 Auxiliary lemmas used in program extraction examples 1 2 Quotient and remainder 2 3 Greatest common divisor
More informationAutomating Interactive Theorem Proving with Coq and Ltac. by Oron Propp and Alex Sekula Mentored by Drew Haven PRIMES
Automating Interactive Theorem Proving with Coq and Ltac by Oron Propp and Alex Sekula Mentored by Drew Haven PRIMES Motivation Math is usually written by hand, checked by other mathematicians Verifying
More informationPropositional Dynamic Logic
Propositional Dynamic Logic Contents 1 Introduction 1 2 Syntax and Semantics 2 2.1 Syntax................................. 2 2.2 Semantics............................... 2 3 Hilbert-style axiom system
More informationDiscrete Mathematics
Discrete Mathematics Jeremy Siek Spring 2010 Jeremy Siek Discrete Mathematics 1 / 20 Outline of Lecture 4 1. Overview of First-Order Logic 2. Beyond Booleans: natural numbers, integers, etc. 3. Universal
More informationDepending on equations
Depending on equations A proof-relevant framework for unification in dependent type theory Jesper Cockx DistriNet KU Leuven 3 September 2017 Unification for dependent types Unification is used for many
More informationFormalized First-Order Logic. Andreas Halkjær From
Formalized First-Order Logic Andreas Halkjær From Kongens Lyngby 2017 Technical University of Denmark Department of Applied Mathematics and Computer Science Richard Petersens Plads, building 324, 2800
More informationIsabelle/FOL Proof Assistant
Dec 2014 Isabelle/FOL Proof Assistant In a glance Mohamed Abouelwafa University Of Ottawa OCICS Supervised by Professor: Amy Felty Prepared by Mohamed Abouelwafa Mabou069@uottawa.ca 1 Abstract This tutorial
More informationBeyond 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 informationMenger's Theorem. Christoph Dittmann August 16, Contents
Menger's Theorem Christoph Dittmann isabelle@christoph-d.de August 16, 2018 We present a formalization of Menger's Theorem for directed and undirected graphs in Isabelle/HOL. This well-known result shows
More informationMiscellaneous Isabelle/Isar examples
Miscellaneous Isabelle/Isar examples Makarius Wenzel With contributions by Gertrud Bauer and Tobias Nipkow October 8, 2017 Abstract Isar offers a high-level proof (and theory) language for Isabelle. We
More informationLecture 3: Semantics of Propositional Logic
Lecture 3: Semantics of Propositional Logic 1 Semantics of Propositional Logic Every language has two aspects: syntax and semantics. While syntax deals with the form or structure of the language, it is
More informationGerwin Klein, June Andronick, Ramana Kumar S2/2016
COMP4161: Advanced Topics in Software Verification {} Gerwin Klein, June Andronick, Ramana Kumar S2/2016 data61.csiro.au Content Intro & motivation, getting started [1] Foundations & Principles Lambda
More informationM a s t e r r e s e a rc h I n t e r n s h i p. Formalisation of Ground Inference Systems in a Proof Assistant
M a s t e r r e s e a rc h I n t e r n s h i p Master Thesis Formalisation of Ground Inference Systems in a Proof Assistant Domain: Data Structures and Algorithms - Logic in Computer Science Author: Mathias
More informationLecture 13: Soundness, Completeness and Compactness
Discrete Mathematics (II) Spring 2017 Lecture 13: Soundness, Completeness and Compactness Lecturer: Yi Li 1 Overview In this lecture, we will prvoe the soundness and completeness of tableau proof system,
More informationDiscrete Mathematics
Discrete Mathematics Jeremy Siek Spring 2010 Jeremy Siek Discrete Mathematics 1 / 24 Outline of Lecture 3 1. Proofs and Isabelle 2. Proof Strategy, Forward and Backwards Reasoning 3. Making Mistakes Jeremy
More informationThe Divergence of the Prime Harmonic Series
The Divergence of the Prime Harmonic Series Manuel Eberl April 17, 2016 Abstract In this work, we prove the lower bound ln(h n ) ln( 5 3 ) for the partial sum of the Prime Harmonic series and, based on
More informationCSC 344 Algorithms and Complexity. Proof by Mathematical Induction
CSC 344 Algorithms and Complexity Lecture #1 Review of Mathematical Induction Proof by Mathematical Induction Many results in mathematics are claimed true for every positive integer. Any of these results
More informationLecture 10: Gentzen Systems to Refinement Logic CS 4860 Spring 2009 Thursday, February 19, 2009
Applied Logic Lecture 10: Gentzen Systems to Refinement Logic CS 4860 Spring 2009 Thursday, February 19, 2009 Last Tuesday we have looked into Gentzen systems as an alternative proof calculus, which focuses
More informationInterpretation of Locales in Isabelle: Theories and Proof Contexts
Interpretation of Locales in Isabelle: Theories and Proof Contexts Clemens Ballarin Fakultät für Informatik Technische Universität München 85748 Garching, Germany http://www4.in.tum.de/ ballarin Abstract.
More informationHuman-Readable Machine-Verifiable Proofs for Teaching Constructive Logic
Human-Readable Machine-Verifiable Proofs for Teaching Constructive Logic Andreas Abel, Bor-Yuh Evan Chang, and Frank Pfenning Workshop on Proof Transformations, Proof Presentations and Complexity of Proofs
More informationProofs. Joe Patten August 10, 2018
Proofs Joe Patten August 10, 2018 1 Statements and Open Sentences 1.1 Statements A statement is a declarative sentence or assertion that is either true or false. They are often labelled with a capital
More informationStructural Induction
Structural Induction In this lecture we ll extend the applicability of induction to many universes, ones where we can define certain kinds of objects by induction, in addition to proving their properties
More informationLecture 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 informationFocusing on Binding and Computation
Focusing on Binding and Computation Dan Licata Joint work with Noam Zeilberger and Robert Harper Carnegie Mellon University 1 Programming with Proofs Represent syntax, judgements, and proofs Reason about
More informationProving in the Isabelle Proof Assistant that the Set of Real Numbers is not Countable
Downloaded from orbit.dtu.dk on: Mar 18, 2019 Proving in the Isabelle Proof Assistant that the Set of Real Numbers is not Countable Villadsen, Jørgen Publication date: 2018 Document Version Publisher's
More informationMiscellaneous HOL Examples
Miscellaneous HOL Examples June 8, 2008 Contents 1 Foundations of HOL 6 1.1 Pure Logic............................. 6 1.1.1 Basic logical connectives................. 6 1.1.2 Extensional equality...................
More information2.7.1 Foundations of Proof Systems
2.7.1 Foundations of Proof Systems Exam 2017-2018 1 Warming up... Question 1 Give a proof in natural deduction of the following proposition : ( f = (g = h)) = (( f = g) = ( f = h)). Solution. f (g h);
More informationIntersecting Chords Theorem
Intersecting Chords Theorem Lukas Bulwahn October 11, 2017 Abstract This entry provides a geometric proof of the intersecting chords theorem. The theorem states that when two chords intersect each other
More informationChapter 11: Automated Proof Systems
Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are
More informationEDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach
EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types
More informationCode Generation for a Simple First-Order Prover
Code Generation for a Simple First-Order Prover Jørgen Villadsen, Anders Schlichtkrull, and Andreas Halkjær From DTU Compute, Technical University of Denmark, 2800 Kongens Lyngby, Denmark Abstract. We
More informationNominal Inversion Principles
Nominal Inversion Principles Stefan Berghofer and Christian Urban Technische Universität München Institut für Informatik, Boltzmannstraße 3, 85748 Garching, Germany Abstract. When reasoning about inductively
More informationWriting proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases
Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases September 22, 2018 Recall from last week that the purpose of a proof
More informationCHAPTER 10. Gentzen Style Proof Systems for Classical Logic
CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning
More informationCPSC 121: Models of Computation. Module 9: Proof Techniques (part 2) Mathematical Induction
CPSC 121: Models of Computation Module 9: Proof Techniques (part 2) Mathematical Induction Module 9: Announcements Midterm #2: th Monday November 14, 2016 at 17:00 Modules 5 (from multiple quantifiers
More informationChapter 11: Automated Proof Systems (1)
Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems
More informationBasic Propositional Logic. Inductive Theory of the Natural Numbers. Conjunction. Equivalence. Negation and Inequivalence. Implication.
McMaster University COMPSCI&SFWRENG 2DM3 Dept. of Computing and Software Theorem List 4 Dr. W. Kahl 2017-12-09 The names listed here are precisely the names used in the preloaded material you are already
More informationCOMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof
More informationSE 212: Logic and Computation. se212 Nancy Day
E 212, Fall 2018, University of Waterloo, Module 2, Page 1 SE 212: Logic and Computation Module 2: Propositional Logic http://www.student.cs.uwaterloo.ca/ se212 se212@uwaterloo.ca Nancy Day E 212, Fall
More informationThe TLA + proof system
The TLA + proof system Stephan Merz Kaustuv Chaudhuri, Damien Doligez, Leslie Lamport INRIA Nancy & INRIA-MSR Joint Centre, France Amir Pnueli Memorial Symposium New York University, May 8, 2010 Stephan
More informationCOMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof
More informationFormal SOS-Proofs for the Lambda-Calculus
LSFA 8 Formal SOS-Proofs for the Lambda-Calculus Christian Urban 1 and Julien Narboux TU Munich, Germany University of Strasbourg, France Abstract We describe in this paper formalisations for the properties
More informationLecture Notes on Certifying Theorem Provers
Lecture Notes on Certifying Theorem Provers 15-317: Constructive Logic Frank Pfenning Lecture 13 October 17, 2017 1 Introduction How do we trust a theorem prover or decision procedure for a logic? Ideally,
More informationLecture Notes on Quantification
Lecture Notes on Quantification 15-317: Constructive Logic Frank Pfenning Lecture 5 September 8, 2009 1 Introduction In this lecture, we introduce universal and existential quantification As usual, we
More information1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures
CS 6110 S18 Lecture 21 Products, Sums, and Other Datatypes 1 Introduction In this lecture, we add constructs to the typed λ-calculus that allow working with more complicated data structures, such as pairs,
More informationAxiomatic set theory. Chapter Why axiomatic set theory?
Chapter 1 Axiomatic set theory 1.1 Why axiomatic set theory? Essentially all mathematical theories deal with sets in one way or another. In most cases, however, the use of set theory is limited to its
More informationSymbolic Graphs for Attributed Graph Constraints
Symbolic Graphs for Attributed Graph Constraints Fernando Orejas Dpt. L.S.I., Universitat Politècnica de Catalunya, Campus Nord, Mòdul Omega, Jordi Girona 1-3, 08034 Barcelona, Spain. Abstract In this
More informationIntroduction to Metalogic 1
Philosophy 135 Spring 2012 Tony Martin Introduction to Metalogic 1 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: (i) sentence letters p 0, p 1, p 2,... (ii) connectives,
More informationAn Introduction to Modal Logic III
An Introduction to Modal Logic III Soundness of Normal Modal Logics Marco Cerami Palacký University in Olomouc Department of Computer Science Olomouc, Czech Republic Olomouc, October 24 th 2013 Marco Cerami
More informationCOSE212: Programming Languages. Lecture 1 Inductive Definitions (1)
COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2017 Fall Hakjoo Oh COSE212 2017 Fall, Lecture 1 September 4, 2017 1 / 9 Inductive Definitions Inductive definition (induction)
More informationDomain theory and denotational semantics of functional programming
Domain theory and denotational semantics of functional programming Martín Escardó School of Computer Science, Birmingham University MGS 2007, Nottingham, version of April 20, 2007 17:26 What is denotational
More informationInductive Definitions and Fixed Points
6. Inductive Definitions and Fixed Points 6.0 6. Inductive Definitions and Fixed Points 6.0 Chapter 6 Overview of Chapter Inductive Definitions and Fixed Points 6. Inductive Definitions and Fixed Points
More informationAmortized Complexity Verified
Amortized Complexity Verified Tobias Nipkow August 28, 2014 Abstract A framework for the analysis of the amortized complexity of (functional) data structures is formalized in Isabelle/HOL and applied to
More informationCS411 Notes 3 Induction and Recursion
CS411 Notes 3 Induction and Recursion A. Demers 5 Feb 2001 These notes present inductive techniques for defining sets and subsets, for defining functions over sets, and for proving that a property holds
More informationExtensions to the Logic of All x are y: Verbs, Relative Clauses, and Only
1/53 Extensions to the Logic of All x are y: Verbs, Relative Clauses, and Only Larry Moss Indiana University Nordic Logic School August 7-11, 2017 2/53 An example that we ll see a few times Consider the
More informationCMPSCI 601: Tarski s Truth Definition Lecture 15. where
@ CMPSCI 601: Tarski s Truth Definition Lecture 15! "$#&%(') *+,-!".#/%0'!12 43 5 6 7 8:9 4; 9 9 < = 9 = or 5 6?>A@B!9 2 D for all C @B 9 CFE where ) CGE @B-HI LJKK MKK )HG if H ; C if H @ 1 > > > Fitch
More informationOverview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural
More informationWarm-Up Problem. Is the following true or false? 1/35
Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,
More informationIntroduction to Metalogic
Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)
More informationMathematical Induction. Defining Functions. Overview. Notation for recursive functions. Base case Sn(0) = 0 S(n) = S(n 1) + n for n > 0
Readings on induction. Mathematical Induction (a) Weiss, Sec. 7.2, page 233 (b) Course slides f lecture and notes recitation. Every criticism from a good man is of value to me. What you hint at generally
More informationThe L Machines are very high-level, in two senses:
What is a Computer? State of the machine. CMPSCI 630: Programming Languages An Abstract Machine for Control Spring 2009 (with thanks to Robert Harper) Internal registers, memory, etc. Initial and final
More informationFormalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl)
Formalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl) Leran Cai, Ambrus Kaposi, and Thorsten Altenkirch University of Nottingham {psylc5, psxak8, psztxa}@nottingham.ac.uk
More information1 Functions and Sets. 1.1 Sets and Subsets. Phil 450: The Limits of Logic Jeff Russell, Fall 2014
1 Phil 450: The Limits of Logic Jeff Russell, Fall 2014 Any statement that is not an Axiom (Ax) or a Definition (Def) or a Remark (R) or an Example is an Exercise. Unless it says otherwise, the exercise
More informationMathematical Induction Again
Mathematical Induction Again James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University January 12, 2017 Outline Mathematical Induction Simple POMI Examples
More informationA Formalised Proof of Craig s Interpolation Theorem in Nominal Isabelle
A Formalised Proof of Craig s Interpolation Theorem in Nominal Isabelle Overview We intend to: give a reminder of Craig s theorem, and the salient points of the proof introduce the proof assistant Isabelle,
More informationCOSE212: Programming Languages. Lecture 1 Inductive Definitions (1)
COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2018 Fall Hakjoo Oh COSE212 2018 Fall, Lecture 1 September 5, 2018 1 / 10 Inductive Definitions Inductive definition (induction)
More informationInduction and Recursion
Induction and Recursion Prof. Clarkson Fall 2016 Today s music: Dream within a Dream from the soundtrack to Inception by Hans Zimmer Review Previously in 3110: Behavioral equivalence Proofs of correctness
More informationADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS
ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS 1. Cardinal number of a set The cardinal number (or simply cardinal) of a set is a generalization of the concept of the number of elements
More informationA Formal Proof of Correctness of a Distributed Presentation Software System
A Formal Proof of Correctness of a Distributed Presentation Software System Ievgen Ivanov, Taras Panchenko 1 Taras Shevchenko National University of Kyiv, 64/13, Volodymyrska st., Kyiv, 01601, Ukraine,
More informationInductive Definitions with Inference Rules 1 / 27
Inductive Definitions with Inference Rules 1 / 27 Outline Introduction Specifying inductive definitions Inference rules in action Judgments, axioms, and rules Reasoning about inductive definitions Direct
More informationDiscrete Mathematics
Discrete Mathematics Yi Li Software School Fudan University March 13, 2017 Yi Li (Fudan University) Discrete Mathematics March 13, 2017 1 / 1 Review of Lattice Ideal Special Lattice Boolean Algebra Yi
More informationMathematical Induction Again
Mathematical Induction Again James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University January 2, 207 Outline Mathematical Induction 2 Simple POMI Examples
More informationComputer-Aided Program Design
Computer-Aided Program Design Spring 2015, Rice University Unit 3 Swarat Chaudhuri February 5, 2015 Temporal logic Propositional logic is a good language for describing properties of program states. However,
More informationLecture 6: Formal Syntax & Propositional Logic. First: Laziness in Haskell. Lazy Lists. Monads Later. CS 181O Spring 2016 Kim Bruce
Lecture 6: Formal Syntax & CS 181O Spring 2016 Kim Bruce First: Laziness in Haskell Some slide content taken from Unger and Michaelis Lazy Lists Monads Later fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib
More informationThe Locally Nameless Representation
Noname manuscript No. (will be inserted by the editor) The Locally Nameless Representation Arthur Charguéraud Received: date / Accepted: date Abstract This paper provides an introduction to the locally
More informationCITS2211 Discrete Structures Proofs
CITS2211 Discrete Structures Proofs Unit coordinator: Rachel Cardell-Oliver August 13, 2017 Highlights 1 Arguments vs Proofs. 2 Proof strategies 3 Famous proofs Reading Chapter 1: What is a proof? Mathematics
More informationFree Groups. Joachim Breitner. April 17, 2016
Free Groups Joachim Breitner April 17, 2016 Abstract Free Groups are, in a sense, the most generic kind of group. They are defined over a set of generators with no additional relations in between them.
More information