We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Talk:Cornucopia

From Esolang
Jump to navigation Jump to search

Implementation of if(a, b, c)

I haven't formally verified this since I don't know Lean, but assuming I haven't missed anything this should work as an if function:

if(a, b, c) := sub(sub(sub(succ(if(a, sub(b, 1), sub(c, 1))), sub(bool(a), b)), sub(not(a), c)), if(a, 0, 0))

Also, are all functions required to be total? I'm assuming so, but it doesn't seem explicitly stated (unless I'm missing something). –PkmnQ (talk) 12:40, 25 July 2026 (UTC)

1 := sub(succ(1), 1)

Is it valid definition of 1? --Blashyrkh (talk) 13:53, 25 July 2026 (UTC)

Reminds me of ƎↃИAЯT

But contrary to ƎↃИAЯT, I have no idea how to implement this. --Blashyrkh (talk) 13:57, 25 July 2026 (UTC)