fun fact: P != NP is true... for the version of NP defined in terms of higher-or...

@cbaberle@mathstodon.xyz

fun fact: P != NP is true... for the version of NP defined in terms of higher-order functions (i.e. the more "natural" formulation for lambda calculus).

it's a known fact that, although Turing machines and lambda calculus agree on which functions Nat -> Nat are definable, they disagree on the definability of higher-order functions (e.g. (Nat -> Bool) -> Nat), with lambda calculus defining strictly fewer functions than Turing machines. this is because functions in lambda calculus are black boxes—the only thing you can do with them is either apply them or pass them around; by contrast, Turing machines have no native notion of functional arguments and so pass "functions" by encodings, which may reveal additional information about these functions beyond their extensional properties.

so if we defined SAT the "lambda calculus" way, the problem would be: given a function f : ((Vars -> Bool) -> Bool), either output an assignment x : Vars -> Bool such that f x = true or show that none exist. and this version of the problem provably cannot be solved in polynomial time: let f = \x . false and suppose given an algorithm that correctly classifies f, but does so by applying f only polynomially many times. then since there are exponentially many assignments of variables to values, we can pick one which the algorithm doesn't check and flip f's value on it to true, yielding a function which the algorithm will incorrectly classify.

the reason this doesn't carry over to the usual SAT problem is that there we're given a Boolean formula (in CNF) rather than a black-box function. but i think it's interesting that the version of P vs NP that's more "native" to functional programming is actually trivial, in a sense.