38 ms·
Given: all(xs + ys) == (all(xs) and all(ys)) And: xs == xs + [] We have: all(xs) == all(xs + []) == all(xs) and all([]) Which implies: al
by manlobster 3y ago
Given:
all(xs + ys) == (all(xs) and all(ys))
And:
xs == xs + []
We have:
all(xs) == all(xs + []) == all(xs) and all([])
Which implies:
all([]) == True.
- toxik 3y agoI like this variant, it also works to show why any([]) is False.
- Smaug123 3y agoAlthough it's presumably much less controversional that `any([])` is false. After all, most people presumably think of an existential statement as being satisfied precisely when there's a witness to that statement, and of course an empty list contains no witnesses to any statement.
- kccqzy 3y ago"Any" is an existential quantification (what you mean by existential statement). "All" is a universal quantification. It can be vacuously true. If this is controversial to any one at all, refer them to an introduction to logic course.
- Smaug123 3y agoThere are logics in which vacuous truth is just not a thing (e.g. relevance logics). Your casual dismissal of the less common logics does not cause them not to exist.