Cannot retract the sum block to 1 input

Ok, that's true, but the No Input one has NO INPUT, meaning that argument doesn't work, because your argument uses 2 inputs: 3, and ID. min(ID) is ID, yes, but I'm talking about the case of 0 inputs, like your script pics.

Imagine a recursive implementation. It starts with n args, then evals n-1 args, then n-2 args, ..., then 1 arg, then 0 args. With 0 args, we want it to return the identity so that the 1 arg returns that arg. If min with 0 args returns -Infinity, the 1 arg would also return -Infinity, and so would the 2 arg, and so on.

I just realized I can also explain this with an iterative implementation. We have a result var, and it has to be set to the identity before the iteration. If there are 0 args, the loop terminates without any iterations, and we return the result (in this case, the identity). If there is 1 arg, we update the result var. For it to equal the element, the element must be applied to the operation with the identity (which the result already has). If there are more args, the next element is applied with the previous result.

..Ok.

Maybe I left out some steps in the reasoning.

  1. The underlying, true MIN function takes exactly two inputs. Everything else is an extension based on this starting point.

  2. In particular, talking about an identity element is well-defined only for dyadic (two-input) functions. For example, 1 is the identity element for multiplication because 3×1=1×3=3 and similarly for any other value in place of 3. We express this idea by writing ∀y, y×1=1×y=y.

At this point we leave mathematics and start doing computer science.

  1. What should a×b×c mean? Since the real × function is defined only for two inputs, we have two choices: (a×b)×c or a×(b×c). Luckily, × is associative, so it doesn't matter which we choose. (Side comment: Floating point arithmetic on a computer is not associative, one of the many reasons why you should never try to write your own floating point code, but should instead hire a numerical analysis expert. The other domain with this property is security; never try to write your own security code.)

  2. What should ×a (modadic, one-input) mean? Snap! takes pains not to answer this question, but not because it's hard to answer; everybody else (by which I mean, every Lisp dialect) agrees that ×a should just report a. (Exception: In APL, every punctuation character names two functions, one monadic and one dyadic, not necessarily related. So in APL, ×a means untitled script pic (2).)

  3. What should (×) (niladic, no inputs) mean? This is where @snapenilk's argument about a recursive definition comes in. In general, we want to define

a×b×···×y×z = (a×b×···×y)×z

        where the part in parentheses, having one fewer operand, is taken as having already been defined, and therefore has a number as its value. That leaves one invocation of × to be done, multiplying the recursive result by z. So, as repeated recursive invocations use smaller and smaller numbers of inputs, we get down to

a×b×c×d = (a×b×c)×d

a×b×c = (a×b)×c

        As a practical matter, we could stop the recursion here, because the fundamental definition of × is as a dyadic operation, so we can compute a×b primitively and then compute that×c. That's Jens's view; his initial proposal for the new notation was that clicking the left arrowhead of untitled script pic (4) would give you untitled script pic (5).

        But those of us who've written COMBINE in Snap! and had to build a table of identity elements of dyadic functions into the code want a way to ask Snap! for a function's identity element, and the Official Right Way to do that, if the language lets you expand dyadic functions into variadic ones, is to call the function with no inputs. It's a convention that (×) means 1, same as it's a convention that a×b×c means (a×b)×c.

  1. I've used × as the example (forgetting, at the time, about how easily it can be confused with the 24th letter of the alphabet) because it has a nonzero (to avoid the Scratch convention that empty inputs mean 0) identity element that's easily understood (unlike MIN and MAX). But now redo step 2 above for MIN. The sentence "For example, 1 is the identity element for multiplication because 3×1=1×3=3 and similarly for any other value in place of 3" becomes "For example, ∞ is the identity element for MIN because min(3,∞)=min(∞,3)=3." Then redo step 5 to see why, by convention, untitled script pic (6).

Ooh, wash your mouth out with soap. (Just noticing this, way late.) 0 is a perfectly good value!! Otherwise when you're counting up from -2 you'll have trouble when you get to "−2, −1, umm, err, whatever, 1, 2, 3..." Also you'll have trouble finding an answer to 2 − 2.

Agreed. If 0 has no value, then negative numbers wouldn't exist!!!