Interesting question: What kind of thing is the Curry-Howard correspondence? It's not a theorem, because you usually don't state it formally, right?

@abs It is a theorem. but it springs from a letter-exchange between curry & howard (therefore curry-howard-correspondence).

Basically sais that Types ~ Mathematical preposistions, Values ~ Mathematical proofs.

i.e. if you can implement a function that produces X, you know that at least one X exists & that you can construct it.

fun :: a -> a can be read as "given 'a', prove that 'a'.". if you implement it as "fun x = x" you just proved that identity works :)

@abs the same works for all functions in programming:

f :: Int -> String -> [String] means "given an Int and a String you can create a List of Strings"
ONE implemenation can be:
f 0 y = []
f x y = [y] ++ f (x-1) y

It gets more interesting if you do not use concrete, but abstract types, as they RESTRICT what you can create.
e.g.: the function above explods on f -1 "..".
If you restrict enough there may be only 1 implementation that can be found automatically.

@Drezil I do know what the Curry-Howard correspondence is, I'm just wondering if there actually exists a properly stated theorem (that actually corresponds to our intuition of CH) with a proper proof. Of course it's (relatively) easy to state and prove for any specific combination of logic and type system, but I'm wondering if there is a way to state the correspondence generalized over logics and type systems.

@abs youtube.com/watch?v=iXZR1v3YN-
at 18:13 there are all three formulations on the board.

They are just different notations of the same thing.

@Drezil But that's still just specific examples of CH(L), right?

@abs That are just definitions for the axiomatic operations in each one.

look at the first: true, false, and, or & implications are all you need to get everything of boolean logic.
(), Void, x, +, -> are everything you need in whole programming, the third one is everything you need for whole category-theory.

you have a proof in one, you change the syntax & get a proof in the other one.

But in each one some things are more obvious than others.

@abs the first two are needed for the latter 3 definitions to have meaning.. ;)

like () + () x () + () x () x () + ... for the definition of a datatype isomorphic to "positive int"

@Drezil I think there's a bit of miscommunication going on here. What I'm thinking about is if there is a proper, formal way of stating and proving the Curry-Howard correspondence (which I interpret as in the attached picture).

What you're giving me are specific examples/corrolaries, which while very exciting and often insightful, are not really what I'm looking for.
2019-11-07-120831_833x333_scrot…
Follow

@abs

Is (ii) definition complete?

Somehow my intuition is that it can exists a (broken) type system where it does not hold.

@Drezil

@Shamar than (ii) merely states: from a broken type-system there exists at least one broken logic that implements it.

Proof by writing out that type in terms of Void, (), x, +, -> and switching notation to get the corresponding logic that implements the exact broken rules of that type system.

As every type is reducible to those 5 things you get *some* 'logic' that behaves like the type-system..

But i'm not a mathematician ;)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.