Talk:BIT predicate

Ackermann coding
Where else do you propose putting the definition of Ackermann coding, which was already described (albeit incorrectly) and discussed in the history section, where I put it? 2601:547:501:8F90:75EF:C82F:5D9:1C9 (talk) 23:23, 29 January 2023 (UTC)
 * I think that per WP:AUDIENCE, to the extent possible, this article should be readable by beginning-university-level computer science students, because using numbers to encode sets of small integers or other systems of discrete values and using the BIT predicate as a membership test is an important and insufficiently well-known programming technique. So I would definitely like to see an accessible explanation of how this predicate can be used as a set membership test for subsets of a sequence $$x_0,x_1,\dots$$ encoded as $$\{\dots,x_i,x_j,\dots\}\mapsto\cdots+2^i+2^j+\cdots$$. The recursive encoding of hereditary finite sets is a specific example of this encoding, for a specific recursively-defined sequence of values (the hereditary finite sets), but the recursive nature of the sets and the notation-heavy treatment of the recent attempts to explain it make it likely extremely heavy going for such students. So I would prefer to see only a brief mention of that part, with a link to where to find more, rather than an in-depth treatment of this subject here. Beyond its historical value, this encoding is interesting for the fact that it provides an isomorphism between the binary relations of integers under the bit predicate and hereditarily finite sets under set membership, and that should also probably be mentioned somewhere (if written briefly and accessibly, rather than in notation-heavy detail, this could also be in the history). —David Eppstein (talk) 23:40, 29 January 2023 (UTC)
 * PS I have made an attempt at more of an explanation of this technique, in the coding section. —David Eppstein (talk) 00:12, 30 January 2023 (UTC)
 * I agree that a sentence starting "Formally" does not belong in the history section, although a more informal and approachable description could go there. Other math articles often have a "Precise definition" section (not at the top of the article), where they go into some more formal and notation-heavy details.  Perhaps in an article tending more towards computer science, a better section heading would be "Formal viewpoint".  IP editor, what is it that you're really trying to do here? Russ Woodroofe (talk) 09:42, 30 January 2023 (UTC)
 * I definitely agree that the attempted addition from that editor was overly technical and had no place in the history section. What has currently been added to the article seems to cover most it, doesn't it?  One think that may have been lost in the shuffle is the statement that "The Ackermann coding is a primitive recursive function" (with the reference), what actually did not belong in the history section either.  Someone may want to add it back to the Set theory section probably. PatrickR2 (talk) 19:51, 30 January 2023 (UTC)
 * Actually, after looking at it in more detail, the explanation of the Ackermann coding in the Hereditarily finite set article seems a little easier to follow, especially as they have a good illustrative example. Should all the Ackermann encoding info be removed from BIT predicate and instead refer to the other article? PatrickR2 (talk) 19:59, 30 January 2023 (UTC)
 * The version of this info I just added to the applications section, you mean? —David Eppstein (talk) 20:31, 30 January 2023 (UTC)

How about creating a separate article titled Ackermann coding that is specifically about the set-theoretic concept, linking BIT predicate and hereditarily finite set to it and viceversa? (Also, the Implementation section contains an error due to not accounting for multiplicity, e.g. $$\{0\}=\{0,0\}$$.) 2601:547:501:8F90:212A:34FB:FECC:443F (talk) 00:39, 31 January 2023 (UTC)


 * The simple recursive definition is already in this article now, in a more readable form that does not bring in technical and unnecessary concepts like the Von Neumann hierarchy. "Account for multiplicity"??? Sets have no multiplicity. Are you thinking of multisets? —David Eppstein (talk) 01:53, 31 January 2023 (UTC)

$$\{0,0\} = \{0\}$$ but $$2^0+2^0 \neq 2^0$$. It must be specified that the $$i, j, k, \ldots$$ are all distinct. One more thing: You incorrectly flipped the relation in the statement about modelling ZF-Inf. It is the converse relation of BIT that models $$\in$$, not BIT itself. (Note that the arguments are also flipped for the Rado graph relation <.) This could be avoided by defining BIT in the opposite way throughout the article. ("BIT(i, j) iff the ith bit of j is 1.") 2601:547:501:8F90:212A:34FB:FECC:443F (talk) 05:41, 31 January 2023 (UTC)
 * The recursive definition of the inverse function (the other direction of the coding) is missing. I explicitly said $$\{0\}=\{0,0\}$$, not the opposite. Note the equals sign. That sets have no multiplicity is precisely my point. The article currently says "When such a bit array is interpreted as a binary number, the set $\{i,j,k,\dots\}$ is represented as the binary number $2^i+2^j+2^k+\cdots$."
 * If a set is written as {i,j,k} I think it is implicit that these values are distinct. We could make it explicit: "the set $$\{i,j,k,\dots\}$$ (for distinct $$i,j,k,\dots$$)". —David Eppstein (talk) 07:53, 31 January 2023 (UTC)

(and IP guy): The article is starting to look better now, especially with the broad Applications section. But the lead is misleading: the BIT predicate or Ackermann coding, ..., is a predicate that tests ... This puts the BIT predicate itself and the Ackermann coding at the same level and even equates them to the same thing. But they are different things. The BIT predicate is a simple predicate with two variables that can itself be used in many applications in computer science and math, as explained in the Applications section. The Ackermann coding really means the Ackermann coding of the hereditarily finite sets. It can be expressed by means of the BIT predicate, in the same way that the Rado graph or private information retrieval make use of it. But they are not the same thing at all. The Ackermann coding is tied up with hereditarily finite sets and I think that's where more information about it should reside. It's ok to make mention of it in the BIT predicate article, in the same way that the Rado graph is mentioned here. But for example the last paragraph added by IP guy about ZF set theory without thee axiom of infinity is all interesting, but should not be in this article; it should be added to the HF article instead. In summary, we should deemphasize Ackermann coding in this article, remove mention of it in the lead, edit the Ackermann coding redirect to point to the HF article (and expand the HF article as needed). (let me know if you agree and want me to take a stab at some cleanup) PatrickR2 (talk) 15:27, 31 January 2023 (UTC)


 * This is why I suggested creating a separate article called Ackermann coding (linking both BIT predicate and hereditarily finite sets to it and viceversa). It'll help keep things more organized. 2601:547:501:8F90:78E0:1437:F355:228B (talk) 17:37, 31 January 2023 (UTC)


 * It doesn't look to me like there is quite enough to justify a separate article (although I don't feel very strongly). Perhaps, however, instead of having Ackermann coding redirect to the top of this article here, it could redirect to the Set theory subheading or similar (with Ackermann coding in bold, as per WP:R)?  I'll make the side comment that the Ackermann coding might also be mentioned at Heyting arithmetic, although I'm not positive if this is talking about the same thing or not. Russ Woodroofe (talk) 19:29, 31 January 2023 (UTC)
 * I feel strongly that (at least the topic discussed here so far) Ackermann coding is really about a way to encode hereditarily finite sets as integers, and as such is inextricably tied up with HF sets and therefore should not be a separate article. Its purpose is really in inferring properties of HF sets.  The HF article now has a section "Ackermann coding" and that should be expanded. PatrickR2 (talk) 20:03, 31 January 2023 (UTC)
 * Side note: The HF sets are a topic of little interest to first year computer science undergrads (and even later, only more theoretically minded CS students would take an interest in it). So we won't have the need to dumb it down for them. PatrickR2 (talk) 20:07, 31 January 2023 (UTC)
 * Actually, what do you guys mean by "Ackermann coding"? Do you mean "Ackermann coding of HF sets" as we have been discussing, or do you mean something else? PatrickR2 (talk) 20:21, 31 January 2023 (UTC)


 * I moved the content about Ackermann coding to Hereditarily_finite_set. Can we redirect Ackermann coding to the latter? 2601:547:501:8F90:588C:22CB:8445:66EC (talk) 05:49, 2 February 2023 (UTC)
 * This looks good to me. Please do. PatrickR2 (talk) 20:57, 2 February 2023 (UTC)
 * IP editor, is there a textbook type source (or other secondary source) for the Ackermann material over at hereditarily finite set? The material looks more-or-less fine to me, but the only source I see is the original article of Ackermann, a primary source. Russ Woodroofe (talk) 00:25, 3 February 2023 (UTC)
 * I'm obviously not the IP editor, but I think this looks like an adequate textbook source:
 * It calls it the "Ackermann encoding" rather than "Ackermann coding"; that might be more common. —David Eppstein (talk) 02:19, 3 February 2023 (UTC)
 * It calls it the "Ackermann encoding" rather than "Ackermann coding"; that might be more common. —David Eppstein (talk) 02:19, 3 February 2023 (UTC)