[stack] Small remarks (corrections?) while look through the "Mathematical foundations of Joy"
Michael Nedzelsky <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Hi All, I have read (not in full details, though) the text "Mathematical foundations of Joy" (See: http://www.latrobe.edu.au/philosophy/phimvt/joy/j02maf.html ) Here some small remarks. 1) At the beginning of the secion "Function composition and the identity function" . <quote> If the programs P and Q denote the same function, then the functions P and Q are identical. Two functions are identical if for all values in the intersection of their domains they yield the same value. ... The identity relation between functions is clearly reflexive, symmetric and transitive. </quote> It seems that the second sentence must be: Two functions are identical if and only if their domains are coincided and for all values in their domains these functions yield the same value. Otherwise, if we take the second sentence as the definition of "identical", than this relation will not be transitive. 2) At the end of the secion "Function composition and the identity function" . <quote> It is appropriate to remark here that there is also a left zero element and there is a right zero element. Two such elements l and r satisfy the following for all programs P: l P == l P r == r Since function composition is not commutative, the two zero elements are not identical. In Joy the left zero l is the abort operator, it ignores any program following it. The right zero r is the clearstack operator, it empties the stack and hence ignores any calculations that might have been done before. </quote> I think in our case there is no such thing as right zero. Assume that program P will be run forever for some initial state, than clearly for that P we have P r =/= r (clearstack operator on the left side will never get a chance to execute) Regards, Michael Nedzelsky