scrambled
Concept

Brouwer heyting kolmogorov bhk interpretation

Modified just now
JourneyProgramming Language Theory Statuslearning Tags
  • logic
  • semantics

Motivation. Classical logic tells you that something exists, not how to find it. BHK says to prove something exists, you must exhibit a Witness.

  • Intuitionistic/Constructive logic is syntax-the formal rules.
  • BHK is semantics-what those rules mean.
  • For intuitionistic logic, there can be other interpretations (multiple semantics for the same language).

Motivation. Classical logic tells you that something exists, not how to find it. BHK says to prove something exists, you must exhibit a witness.

To prove...You must...
ABA \wedge BProve both
ABA \lor BProve one (and say which)
ABA \to BGive a method converting proofs of AA into proofs of BB
x. P(x)\exists x.\ P(x)Produce a specific xx and prove P(x)P(x)
x. P(x)\forall x.\ P(x)Give a method that proves P(x)P(x) for any xx

Significance. This makes proofs computational-a proof of x. P(x)\exists x.\ P(x) is an algorithm that outputs a witness.

  • Example

    Suppose we have:

    • A proof pp that AA holds.

    • A function ff that transforms proofs of AA into proofs of B(t)B(t) for some specific tt.

      We want to derive x.  B(x)\exists x.\; B(x).

      The derivation (syntax)

      p:Af:AB(t)B(t)  (-elim)x.  B(x)  (-intro) \frac{\dfrac{p : A \quad f : A \to B(t)}{B(t)} \; (\to\text{-elim})}{\exists x.\; B(x)} \; (\exists\text{-intro})

      The proof object (BHK)

      | Step | Rule | BHK construction | | --- | --- | --- | | We have | (assumption) | pp is a proof of AA | | We have | (assumption) | ff is a function AB(t)A \to B(t) | | Apply ff to pp | (-elim)(\to\text{-elim}) | f(p)f(p) is a proof of B(t)B(t) | | Package with witness | (-intro)(\exists\text{-intro}) | t,f(p)\langle t, f(p) \rangle is a proof of x.  B(x)\exists x.\; B(x) |

      Reading it together. The derivation tree:

      pff(p):B(t)t,f(p):x.  B(x) \frac{\displaystyle\frac{p \quad f}{f(p) : B(t)}}{\langle t, f(p) \rangle : \exists x.\; B(x)}

    • Each horizontal line is a rule.

    • Each expression below the line is the BHK object built from the objects above.

    • The complete derivation is the construction recipe.

      Concrete instance. Let AA be "nn is even" and B(x)B(x) be "xx is the half of nn."

      | We have | BHK object | | --- | --- | | pp : proof that 44 is even | (e.g., 4=2×24 = 2\times 2) | | ff : method that, given evenness proof, computes half | f(p)=2f(p) = 2 with proof | | Conclusion | 2,f(p)\langle 2, f(p) \rangle proves x.  x is half of 4\exists x.\; x \text{ is half of } 4 |

      The derivation doesn't just say a half exists - it yields the half.