From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: no empty (zero) string predicate in Elisp Date: Mon, 27 Apr 2015 03:00:25 +0200 Organization: Aioe.org NNTP Server Message-ID: <87pp6qz8pi.fsf@debian.uxu> References: <87h9s4rhx5.fsf@debian.uxu> <87wq0zkqxa.fsf@debian.uxu> <87oambhqze.fsf@kuiper.lan.informatimago.com> <87a8xu20ys.fsf@debian.uxu> <87tww2zp3f.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430096428 19076 80.91.229.3 (27 Apr 2015 01:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Apr 2015 01:00:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 27 03:00:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmXPG-0003Py-Nw for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Apr 2015 03:00:18 +0200 Original-Received: from localhost ([::1]:52682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmXPG-0000Pr-1a for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 21:00:18 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 76 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:L59ZU11bpjtz+G48b0247HzhLdU= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:211734 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104016 Archived-At: Marcin Borkowski writes: >>>> "Predicate" is a word from the grammars of human >>>> languages, but I don't know its exact meaning, >>>> neither there or in programming languages (until >>>> now as for programming). >>> AFAIK, "predicate" is a word from /logic/, and it >>> means (more or less) a function which consumes one >>> or more arguments of any type and gives back >>> a truth-value. >> Doesn't all functions in logic do that? > > First of all: IANAL (here L = logician;-)). But... > > For starters, in propositional calculus (AFAIK, also > in first-order logic) there are no "functions" per > se, since there are no /sets/. Furthermore, in the > logic systems usually used by us mathematicians > there are no /types/. AFAIK, the analogue of "type > mismatch" in these systems is just a plain old > "syntax error". > > What you probably refer to is the fact that in these > simple logic systems both predicates and logical > connectives "generate" truth-values. However, there > are other possibilities; analogues of "functions" in > these systems are called "terms". I just looked it up in one of my favorite books, namely @book{oxford-dictionary-of-computing, title = {Oxford Dictionary of Computing}, author = {John Daintith and Edmund Wright (editors)}, publisher = {Oxford University Press}, year = 2010, ISBN = 0199234000 } and your are absolutely right! A predicate is a boolean function of n-arity: if n = 0 (i.e., no arguments) the function is called a "statement" as the function value cannot change. I also looked up "unary" but it wasn't included in the "unary operator" sense, i.e. a function that accepts a single input argument, e.g. f(x) or the suggested zero-string predicate. However, "unary operation" was included: a function f: D -> R where the input domain equals the output range: f: S -> S - which is *not* what we have here as here the input set is all strings, while the output ditto is the mere { t, nil } So all is clear, but it is error-prone and can be confusion as well. So next time I'll just say "a function with a single argument". Maybe. By the way, "UNIX" (the name) is (?) a pun/joke on this. It's predecessor was Multics, which was planned to be a multiuser system, hence the name. But that never materialized. UNIX, on the other hand, would conquer the world a multiprogram, multiuser, and time-sharing system... -- underground experts united http://user.it.uu.se/~embe8573