constructive proofs and program extraction
play

Constructive Proofs and Program Extraction Christoph Kreitz 1. Type - PowerPoint PPT Presentation

Constructive Proofs and Program Extraction Christoph Kreitz 1. Type Theory vs. Set Theory 2. Overview of the Nuprl System 3. Proofs of the Integer Square Root Problem What distinguishes Type Theory from Set Theory? n r r 2 n


  1. Constructive Proofs and Program Extraction Christoph Kreitz 1. Type Theory vs. Set Theory 2. Overview of the Nuprl System 3. Proofs of the Integer Square Root Problem

  2. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  3. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  4. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers – A proof shows that the notion ⌊√ n ⌋ is well-defined PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  5. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers – A proof shows that the notion ⌊√ n ⌋ is well-defined – Different proofs lead to the same insight PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  6. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers – A proof shows that the notion ⌊√ n ⌋ is well-defined – Different proofs lead to the same insight • Type Theory – There is a method to construct integer square roots PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  7. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers – A proof shows that the notion ⌊√ n ⌋ is well-defined – Different proofs lead to the same insight • Type Theory – There is a method to construct integer square roots – Algorithms for computing ⌊√ n ⌋ can be extracted from proofs PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  8. What distinguishes Type Theory from Set Theory? ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 What is the meaning of • Set Theory – Integer square roots exist for all natural numbers – A proof shows that the notion ⌊√ n ⌋ is well-defined – Different proofs lead to the same insight • Type Theory – There is a method to construct integer square roots – Algorithms for computing ⌊√ n ⌋ can be extracted from proofs – Different proofs lead to different algorithms PRL Seminar, February 23, 2004 1 Constructive Proofs and Program Extraction

  9. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  10. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  11. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  12. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  13. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  14. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  15. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  16. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 Choose r = 0, prove 0 2 ≤ 0 ∧ 0 < (0+1) 2 using standard arithmetic PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  17. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 Choose r = 0, prove 0 2 ≤ 0 ∧ 0 < (0+1) 2 using standard arithmetic – Step case: assume ∃ r n r 2 ≤ n ∧ n< ( r n +1) 2 and prove ∃ r r 2 ≤ n +1 ∧ n +1 < ( r +1) 2 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  18. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 Choose r = 0, prove 0 2 ≤ 0 ∧ 0 < (0+1) 2 using standard arithmetic – Step case: assume ∃ r n r 2 ≤ n ∧ n< ( r n +1) 2 and prove ∃ r r 2 ≤ n +1 ∧ n +1 < ( r +1) 2 ✻ 3 2 1 ✲ 0 0 1 2 3 4 5 6 7 8 9 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  19. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 Choose r = 0, prove 0 2 ≤ 0 ∧ 0 < (0+1) 2 using standard arithmetic – Step case: assume ∃ r n r 2 ≤ n ∧ n< ( r n +1) 2 and prove ∃ r r 2 ≤ n +1 ∧ n +1 < ( r +1) 2 – If ( r n +1) 2 ≤ n +1 ✻ 3 2 r n +1 then choose r = r n +1 1 r n n n +1 ✲ 0 0 1 2 3 3 4 5 6 7 8 9 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

  20. Proofs for ∀ n ∃ r r 2 ≤ n ∧ n< ( r +1) 2 • Nonconstructive – Assume r wouldn’t exist for some n – Then for all r : r 2 > n or ( r +1) 2 ≤ n – Consider r 1 = min { r | r 2 > n } -1 1 ≤ n and ( r 1 +1) 2 > n – a contradiction – Then r 2 Unnecessary indirect approach - it masks a constructive argument • Mathematical rigor: Induction on n – Base Case: prove ∃ r r 2 ≤ 0 ∧ 0 < ( r +1) 2 Choose r = 0, prove 0 2 ≤ 0 ∧ 0 < (0+1) 2 using standard arithmetic – Step case: assume ∃ r n r 2 ≤ n ∧ n< ( r n +1) 2 and prove ∃ r r 2 ≤ n +1 ∧ n +1 < ( r +1) 2 – If ( r n +1) 2 ≤ n +1 ✻ 3 2 r n +1 = r n then choose r = r n +1 1 n n +1 ✲ 0 otherwise choose r = r n 0 1 2 3 4 4 5 6 7 8 9 PRL Seminar, February 23, 2004 2 Constructive Proofs and Program Extraction

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend