top | item 37800260

(no title)

mmarx | 2 years ago

From the truth table, subtraction is clearly truth-preserving, so it cannot actually be functionally complete. What am I missing?

discuss

order

orlp|2 years ago

To be entirely precise, it is functionally complete in combination with access to the constant false (-0.0). If not given access to this constant it is not functionally complete, unlike e.g. NAND which can produce false from any value. I shall clarify that in the article.

The point of the article was more to illustrate that using nothing but signed zeros and floating point subtraction you can simulate arbitrary circuits, and 'functionally complete' was the most concise term for that I could think of, even if it is bending the rules a little bit when strictly looking at the truth table.

codeflo|2 years ago

It's a matter of definitions, but it always bothered me that functional completeness is defined so that it only requires the ability to produce any non-nullary function, not any function including nullary ones. That is, the set { NAND } is considered functionally complete, even though it can only produce a function that maps any input x to TRUE, and can't produce the value TRUE itself. As soon as you care about constants, which I think you should, { NAND, FALSE } or whatever isn't any more magical than { AND, NOT } or { XOR, TRUE }.

p4bl0|2 years ago

Hey, not related to the post but since you're here: your domain name has an AAAA IPv6 record but the server doesn't respond to IPv6 requests. The problem most probably is that the web server is not binded to the IPv6 address of the system.

pwdisswordfishc|2 years ago

So { −: F² → F } is not functionally complete, but { −: F² → F, −0: F⁰ → F } is.

mmarx|2 years ago

Ah, thanks, that was indeed what I was missing.

Epa095|2 years ago

I dont really know what you mean by truth-preserving here, but maybe a hint is thats its not ONLY subtraction which is functionally complete, it's subtraction and the constant symbol 0. From subtraction and 0 he makes false (as -0.0), and then he has the functionally complete set found in wikipedia [1] as {->, _|_ } (my attempt at rendering rightarrow and bottom).

1: https://en.wikipedia.org/wiki/Functional_completeness

Joker_vD|2 years ago

Truth-preserving means that it maps T to T. In fact, the Wikipedia's article you link to has Post's theorem about five Post's classes of Boolean functions with all of their definitions: monotonic, affine (which has a funny definition in this article: I was taught the definiton via ANF, "is just a XOR of (some) of variables"), self-dual, truth- and false-preserving. They're all closed but functionally incomplete (in fact, they're functionally pre-complete: adding any single function outside of a class to that class produces a functionally complete set, — and there are no other pre-complete classes).

johnday|2 years ago

Subtraction is truth preserving on the sign bit. It's not truth-preserving in the actual subtractive bits.

(I disagree with their claim that the subtractive bit is functionally complete on its own - you're right, since it's truth-preserving, it clearly is not functionally complete)

gliptic|2 years ago

The sign bit is the only bit involved here. What "subtractive bits" are you referring to?

tromp|2 years ago

Below the truth table for implication (with arguments reversed) they claim

> It turns out this truth table is functionally complete [1]

yet the linked Wikipedia article clearly states that

> every two-element set of connectives containing NOT and one of { AND, OR, IMPLY } is a minimal functionally complete subset of { NOT, AND, OR, IMPLY, IFF }. I.e. IMPLY by itself is not functionally complete.

[1] https://en.wikipedia.org/wiki/Functional_completeness

Epa095|2 years ago

The article kind of took for granted that you could include the number 0 as well, and with "-0" he got bottom, so its the 2-element set {-->, _|_}.

gliptic|2 years ago

The unstated assumption is that you also have FALSE.

gliptic|2 years ago

Why would truth preservation prevent it from being functionally complete? How can you even tell a truth table is truth preserving? A truth table is not a logical argument.

danbruc|2 years ago

Truth-preserving in this context means that the function value is true if all function arguments are true. If you only have truth-preserving functions available, then you can not output false if all inputs are true, hence you can not build all possible functions. An analog argument applies to falsehood-preserving functions.

stavros|2 years ago

What does "truth-preserving" mean in this context? That it will never produce false if either of the arguments is true?