inductive theorem proving
play

Inductive Theorem Proving Automated Reasoning Petros Papapanagiotou - PowerPoint PPT Presentation

Introduction Inductive Proofs Automation Conclusion Inductive Theorem Proving Automated Reasoning Petros Papapanagiotou P.Papapanagiotou@sms.ed.ac.uk 11 October 2012 Petros Papapanagiotou Inductive Theorem Proving Introduction Inductive


  1. Introduction Inductive Proofs Automation Conclusion Inductive Theorem Proving Automated Reasoning Petros Papapanagiotou P.Papapanagiotou@sms.ed.ac.uk 11 October 2012 Petros Papapanagiotou Inductive Theorem Proving

  2. Introduction Inductive Proofs Automation Conclusion General Induction Theorem Proving Proof Assistants: Formalise theories and prove properties. Ensure soundness and correctness . Interactive vs. Automated Decision procedures, model elimination, rewriting, counterexamples,... eg. Interactive: Isabelle, Coq, HOL Light, HOL4, ... Automated: ACL2, IsaPlanner, SAT solvers, ... Petros Papapanagiotou Inductive Theorem Proving

  3. Introduction Inductive Proofs Automation Conclusion General Induction Induction Inductive datatypes are everywhere! Mathematics (eg. arithmetic) Hardware & software models ... Petros Papapanagiotou Inductive Theorem Proving

  4. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Natural Numbers Definition (Natural Numbers) 0, Suc n Petros Papapanagiotou Inductive Theorem Proving

  5. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Natural Numbers Definition (Natural Numbers) 0, Suc n Example Suc 0 = 1 Suc ( Suc 0 ) = 2 Suc ( Suc ( Suc 0 ) = 3 Petros Papapanagiotou Inductive Theorem Proving

  6. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Natural Numbers Definition (Natural Numbers) 0, Suc n Example Suc 0 = 1 Suc ( Suc 0 ) = 2 Suc ( Suc ( Suc 0 ) = 3 Induction principle P ( 0 ) ∀ n . P ( n ) ⇒ P ( Suc n ) ∀ n . P ( n ) Petros Papapanagiotou Inductive Theorem Proving

  7. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Lists Definition (Lists) [ ] , h # t Petros Papapanagiotou Inductive Theorem Proving

  8. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Lists Definition (Lists) [ ] , h # t Example 1 # [ ] = [ 1 ] 1 # ( 2 # [ ]) = [ 1 , 2 ] 1 # ( 2 # ( 3 # [ ])) = [ 1 , 2 , 3 ] Petros Papapanagiotou Inductive Theorem Proving

  9. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Lists Definition (Lists) [ ] , h # t Example 1 # [ ] = [ 1 ] 1 # ( 2 # [ ]) = [ 1 , 2 ] 1 # ( 2 # ( 3 # [ ])) = [ 1 , 2 , 3 ] Induction principle P ([ ]) ∀ h . ∀ l . P ( l ) ⇒ P ( h # l ) ∀ l . P ( l ) Petros Papapanagiotou Inductive Theorem Proving

  10. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Binary Partition Trees Definition (Partition) Empty , Filled , Branch partition 1 partition 2 Petros Papapanagiotou Inductive Theorem Proving

  11. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Binary Partition Trees Definition (Partition) Empty , Filled , Branch partition 1 partition 2 Example Branch Empty ( Branch Filled Filled ) Petros Papapanagiotou Inductive Theorem Proving

  12. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Induction Binary Partition Trees Definition (Partition) Empty , Filled , Branch partition 1 partition 2 Example Branch Empty ( Branch Filled Filled ) Induction principle ( partition.induct ) P ( Empty ) P ( Filled ) ∀ p 1 p 2 . P ( p 1 ) ∧ P ( p 2 ) ⇒ P ( Branch p 1 p 2 ) ∀ partition . P ( partition ) Petros Papapanagiotou Inductive Theorem Proving

  13. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Generally Symbolic evaluation (rewriting). Axioms - definitions Rewrite rules Fertilization (use induction hypothesis). Petros Papapanagiotou Inductive Theorem Proving

  14. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example: List Append Definition (List Append @ ) ∀ l . [ ] @ l = l 1 ∀ h . ∀ t . ∀ l . ( h # t ) @ l = h # ( t @ l ) 2 Example ( [ 1 ; 2 ] @ [ 3 ] = [ 1 ; 2 ; 3 ] ) ( 1 # ( 2 # [ ])) @ ( 3 # [ ])) = 1 # (( 2 # [ ]) @ ( 3 # [ ])) = 1 # ( 2 # ([ ] @ ( 3 # [ ]))) = 1 # ( 2 # ( 3 # [ ])) Petros Papapanagiotou Inductive Theorem Proving

  15. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example: List Append Definition (List Append @ ) ∀ l . [ ] @ l = l 1 ∀ h . ∀ t . ∀ l . ( h # t ) @ l = h # ( t @ l ) 2 Theorem (Associativity of Append) ∀ k . ∀ l . ∀ m . k @ ( l @ m ) = ( k @ l ) @ m Base Case. ⊢ [ ] @ ( l @ m ) = ([ ] @ l ) @ m 1 ⇒ l @ m = ([ ] @ l ) @ m ⇐ 1 ⇒ l @ m = l @ m ⇐ refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  16. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example: List Append Definition (List Append @ ) ∀ l . [ ] @ l = l 1 ∀ h . ∀ t . ∀ l . ( h # t ) @ l = h # ( t @ l ) 2 Step Case. k @ ( l @ m ) = ( k @ l ) @ m ⊢ ( h # k ) @ ( l @ m ) = (( h # k ) @ l ) @ m 2 ⇐ ⇒ h # ( k @ ( l @ m )) = ( h # ( k @ l )) @ m 2 ⇒ h # ( k @ ( l @ m )) = h # (( k @ l ) @ m ) ⇐ repl ⇒ h = h ∧ k @ ( l @ m ) = ( k @ l ) @ m ⇐ IH ⇐ ⇒ h = h refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  17. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example 2: Idempotence of Union Definition (Partition Union @@ ) Empty @@ q = q 3 Filled @@ q = Filled 4 p @@ Empty = p 5 p @@ Filled = Filled 6 ( Branch l 1 r 1 ) @@ ( Branch l 2 r 2 ) = 7 Branch ( l 1 @@ l 2 ) ( r 1 @@ r 2 ) Petros Papapanagiotou Inductive Theorem Proving

  18. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example 2: Idempotence of Union Definition (Partition Union @@ ) Empty @@ q = q 3 Filled @@ q = Filled 4 p @@ Empty = p 5 p @@ Filled = Filled 6 ( Branch l 1 r 1 ) @@ ( Branch l 2 r 2 ) = 7 Branch ( l 1 @@ l 2 ) ( r 1 @@ r 2 ) Theorem (Idempotence of union) ∀ p . p @@ p = p Petros Papapanagiotou Inductive Theorem Proving

  19. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example 2: Idempotence of Union Definition (Partition Union @@ ) Empty @@ q = q 3 Filled @@ q = Filled 4 ( Branch l 1 r 1 ) @@ ( Branch l 2 r 2 ) = 7 Branch ( l 1 @@ l 2 ) ( r 1 @@ r 2 ) Base Case 1. ⊢ Empty @@ Empty = Empty 3 ⇐ ⇒ Empty = Empty refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  20. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example 2: Idempotence of Union Definition (Partition Union @@ ) Empty @@ q = q 3 Filled @@ q = Filled 4 ( Branch l 1 r 1 ) @@ ( Branch l 2 r 2 ) = 7 Branch ( l 1 @@ l 2 ) ( r 1 @@ r 2 ) Base Case 2. ⊢ Filled @@ Filled = Filled 4 ⇒ Filled = Filled ⇐ refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  21. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Simple Example 2: Idempotence of union Definition (Partition Union @@ ) Empty @@ q = q 3 Filled @@ q = Filled 4 ( Branch l 1 r 1 ) @@ ( Branch l 2 r 2 ) = 7 Branch ( l 1 @@ l 2 ) ( r 1 @@ r 2 ) Step Case. p 1 @@ p 1 = p 1 p 2 @@ p 2 = p 2 ∧ ⊢ ( Branch p 1 p 2 ) @@ ( Branch p 1 p 2 ) = Branch p 1 p 2 7 ⇐ ⇒ Branch ( p 1 @@ p 1 ) ( p 2 @@ p 2 ) = Branch p 1 p 2 IH ⇒ Branch p 1 p 2 = Branch p 1 p 2 ⇐ refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  22. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Automation Is rewriting and fertilization enough? No! Because: Incompleteness (G¨ odel) Undecidability of Halting Problem (Turing) Failure of Cut Elimination (Kreisel) Cut Rule A , Γ ⊢ ∆ Γ ⊢ A Γ ⊢ ∆ Petros Papapanagiotou Inductive Theorem Proving

  23. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Blocking Example Definition (List Reverse rev ) rev [ ] = [ ] 8 ∀ h . ∀ t . rev ( h # t ) = rev t @ ( h # [ ]) 9 Theorem (Reverse of reverse) ∀ l . rev ( rev l ) = l Base Case. ⊢ rev ( rev [ ]) = [ ] 8 ⇐ ⇒ rev [ ] = [ ] 8 ⇒ [ ] = [ ] ⇐ refl ⇐ ⇒ true Petros Papapanagiotou Inductive Theorem Proving

  24. Introduction Inductive Proofs Automation Conclusion Numbers Lists Trees On paper Issues Demo Inductive Proofs Blocking Example Definition (List Reverse rev ) rev [ ] = [ ] 8 ∀ h . ∀ t . rev ( h # t ) = rev t @ ( h # [ ]) 9 Theorem (Reverse of reverse) ∀ l . rev ( rev l ) = l Step Case. rev ( rev l ) = l ⊢ rev ( rev ( h # l )) = h # l 9 ⇒ rev ( rev l @( h # [ ])) = h # l ⇐ Now what?? Petros Papapanagiotou Inductive Theorem Proving

Recommend


More recommend