Is Constructive Logic relevant for Computer Science?
Thorsten Altenkirch University of Nottingham
BCTCS 05 – p.1/16
Is Constructive Logic relevant for Computer Science? Thorsten - - PowerPoint PPT Presentation
Is Constructive Logic relevant for Computer Science? Thorsten Altenkirch University of Nottingham BCTCS 05 p.1/16 Birth of Modern Mathematics BCTCS 05 p.2/16 Birth of Modern Mathematics Isaac Newton (1642 - 1727) BCTCS 05 p.2/16
Thorsten Altenkirch University of Nottingham
BCTCS 05 – p.1/16
BCTCS 05 – p.2/16
Isaac Newton (1642 - 1727)
BCTCS 05 – p.2/16
Isaac Newton (1642 - 1727) 1687: Philosophiae Naturalis Principia Mathematica
BCTCS 05 – p.2/16
BCTCS 05 – p.3/16
Frege (1848-1925) Russell (1872-1970)
BCTCS 05 – p.3/16
Zermelo (1871-1953) Fraenkel (1891-1965)
BCTCS 05 – p.4/16
Zermelo (1871-1953) Fraenkel (1891-1965)
BCTCS 05 – p.4/16
BCTCS 05 – p.5/16
BCTCS 05 – p.6/16
Computer Science focusses on constructive solutions to problems.
BCTCS 05 – p.6/16
Computer Science focusses on constructive solutions to problems.
✁Classical Mathematics is based on the platonic idea of truth.
BCTCS 05 – p.6/16
Computer Science focusses on constructive solutions to problems.
✁Classical Mathematics is based on the platonic idea of truth.
✁Constructive Mathematics is based on the notion of evidence or proof.
BCTCS 05 – p.6/16
BCTCS 05 – p.7/16
Brouwer (1881-1966) Heyting (1898-1980) Kolmogorov (1903-1987)
BCTCS 05 – p.7/16
BCTCS 05 – p.8/16
BCTCS 05 – p.8/16
The same truth table shows that
☞✒✑ ✓ ✌ ✔ ✍ ✕ ✚ ✗ ✓ ☞✒✑ ✌ ✕ ✔ ✓ ☞✒✑ ✍ ✕BCTCS 05 – p.8/16
BCTCS 05 – p.9/16
Evidence for
☞ ✑ ✌is given by pairs:
✛✢✜ ✣ ✤ ✥ ✑ ✦ ✏ ✓ ✥★✧ ✦ ✕BCTCS 05 – p.9/16
Evidence for
☞ ✑ ✌is given by pairs:
✛✢✜ ✣ ✤ ✥ ✑ ✦ ✏ ✓ ✥★✧ ✦ ✕ ✁Evidence for
☞ ✔ ✌is tagged evidence for
☞.
✩✫✪ ✛ ✪ ✥ ✔ ✦ ✏ ✬✮✭ ✯ ✥ ✰ ✬✮✭✱ ✦BCTCS 05 – p.9/16
Evidence for
☞ ✑ ✌is given by pairs:
✛✢✜ ✣ ✤ ✥ ✑ ✦ ✏ ✓ ✥★✧ ✦ ✕ ✁Evidence for
☞ ✔ ✌is tagged evidence for
☞.
✩✫✪ ✛ ✪ ✥ ✔ ✦ ✏ ✬✮✭ ✯ ✥ ✰ ✬✮✭✱ ✦ ✁Evidence for
☞ ✏ ✗ ✌is a program constructing evidence for
✌from evidence for
☞.
✛✢✜ ✣ ✤ ✥ ✏ ✗ ✦ ✏ ✥ ✲ ✦BCTCS 05 – p.9/16
BCTCS 05 – p.10/16
BCTCS 05 – p.10/16
The program is invertible, because the right hand sides are patterns.
BCTCS 05 – p.10/16
The program is invertible, because the right hand sides are patterns.
✁This shows that the types are isomorphic.
BCTCS 05 – p.10/16
BCTCS 05 – p.11/16
Evidence for
✷✹✸ ✴ ✺✼✻ ✽ ✸is a function
✾which assigns to each
✿ ✴ ✺evidence for
✽ ✿.
BCTCS 05 – p.11/16
Evidence for
✷✹✸ ✴ ✺✼✻ ✽ ✸is a function
✾which assigns to each
✿ ✴ ✺evidence for
✽ ✿.
✁Evidence for
❀ ✸ ✴ ✺✼✻ ✽ ✸is a pair
✓ ✿ ✧ ❁ ✕where
✿ ✴ ✺and
❁ ✴ ✽ ✿.
BCTCS 05 – p.11/16
Evidence for
✷✹✸ ✴ ✺✼✻ ✽ ✸is a function
✾which assigns to each
✿ ✴ ✺evidence for
✽ ✿.
✁Evidence for
❀ ✸ ✴ ✺✼✻ ✽ ✸is a pair
✓ ✿ ✧ ❁ ✕where
✿ ✴ ✺and
❁ ✴ ✽ ✿.
✁We need dependent types!
BCTCS 05 – p.11/16
BCTCS 05 – p.12/16
Per Martin-L¨
BCTCS 05 – p.12/16
Per Martin-L¨
Martin-L¨
BCTCS 05 – p.12/16
Per Martin-L¨
Martin-L¨
Implementations: NuPRL, LEGO, ALF , COQ, AGDA, Epigram . . .
BCTCS 05 – p.12/16
BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❉✮❊ ❋❍● ■ ❅ ✔ ❃ ❉✮❊ ❋BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❉✮❊ ❋❍● ■ ❅ ✔ ❃ ❉✮❊ ❋is provable, i.e. Prime is decidable.
BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❉✮❊ ❋❍● ■ ❅ ✔ ❃ ❉✮❊ ❋is provable, i.e. Prime is decidable.
✁Indeed, the proof is the program which decides Prime.
BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❉✮❊ ❋❍● ■ ❅ ✔ ❃ ❉✮❊ ❋is provable, i.e. Prime is decidable.
✁Indeed, the proof is the program which decides Prime.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❏✫❇ ❑ ❈ ❅ ✔ ❃ ❏✫❇ ❑ ❈ ❅BCTCS 05 – p.13/16
We cannot prove
☞ ✔ ❃ ☞, where
❃ ☞ ✏ ☞ ✏ ✗ ❄, for an undecided proposition
☞.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❉✮❊ ❋❍● ■ ❅ ✔ ❃ ❉✮❊ ❋is provable, i.e. Prime is decidable.
✁Indeed, the proof is the program which decides Prime.
✁ ✷✹❅ ✴ ❆✫❇ ❈ ✻ ❏✫❇ ❑ ❈ ❅ ✔ ❃ ❏✫❇ ❑ ❈ ❅is not provable, because Halt is undecidable.
BCTCS 05 – p.13/16
BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸ ❃ ✷ ✸ ✴ ✺✼✻ ❃ ✽ ✸BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸ ❃ ✷ ✸ ✴ ✺✼✻ ❃ ✽ ✸ ✁Negative translation
BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸ ❃ ✷ ✸ ✴ ✺✼✻ ❃ ✽ ✸ ✁Negative translation
✁ ☞ ✔ ❃ ☞is traslated to
❃ ✓ ❃ ☞✒✑ ❃ ❃ ☞ ✕BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸ ❃ ✷ ✸ ✴ ✺✼✻ ❃ ✽ ✸ ✁Negative translation
✁ ☞ ✔ ❃ ☞is traslated to
❃ ✓ ❃ ☞✒✑ ❃ ❃ ☞ ✕which is constructively provable.
BCTCS 05 – p.14/16
Classical reasoner says: Babelfish translates to:
☞ ✔ ✌ ❃ ✓ ❃ ☞✒✑ ❃ ✌ ✕ ❀ ✸ ✴ ✺✼✻ ✽ ✸ ❃ ✷ ✸ ✴ ✺✼✻ ❃ ✽ ✸ ✁Negative translation
✁ ☞ ✔ ❃ ☞is traslated to
❃ ✓ ❃ ☞✒✑ ❃ ❃ ☞ ✕which is constructively provable.
✁A classical reasoner is somebody who is unable to say anything positive.
BCTCS 05 – p.14/16
BCTCS 05 – p.15/16
BCTCS 05 – p.15/16
is provable constructively.
BCTCS 05 – p.15/16
is provable constructively.
✁However, its negative translation:
✷✹✸ ✴ ✺✼✻ ❃ ✷ ▲ ✴ ▼ ✻ ❃ ◆ ✸ ▲ P ❖ P ❃ ✷ ✾ ✴ ✺ ✲ ▼ ✻ ❃ ✷ ✸ ✴ ✺✼✻ ◆ ✸ ✓ ✾ ✸ ✕is not.
BCTCS 05 – p.15/16
is provable constructively.
✁However, its negative translation:
✷✹✸ ✴ ✺✼✻ ❃ ✷ ▲ ✴ ▼ ✻ ❃ ◆ ✸ ▲ P ❖ P ❃ ✷ ✾ ✴ ✺ ✲ ▼ ✻ ❃ ✷ ✸ ✴ ✺✼✻ ◆ ✸ ✓ ✾ ✸ ✕is not.
✁There is empirical evidence that CAC is consistent.
BCTCS 05 – p.15/16
BCTCS 05 – p.16/16