3 ms·
You could also look at it like this: We want this general property to hold: sum([ sum(x[0:n]), sum(x[n:]) ]) == sum(x) define sum([]) (n = 0) so that it hold
by cochne 7y ago
You could also look at it like this:
We want this general property to hold:
sum([ sum(x[0:n]), sum(x[n:]) ]) == sum(x)
define sum([]) (n = 0) so that it holds
It works the same for prod, all, and any, and gives a hint as to what the answer should be if there were things like union(sets) (the empty set) or intersection(sets) (the universe, or union of all sets)
- earthboundkid 7y agoOkay, but intuitively, I also want the property !(all(x==1) and all(x!=1)) to hold. Now what?