I translated the statement "If at least one python program is correct, then all python programs are correct." Given the predicates $Python(x)$, $Correct(x)$, and the set of all programs $p$.
I have:
$\exists x \in p, \forall y \in p, Python(x) \land Correct(x) \implies Python(y) \land Correct(y)$
However, the correct answer I was given/told was:
$(\exists x \in p, Python(x) \land Correct(x)) \implies (\forall y \in p, Python(y) \implies Correct(y))$
I can see why the second is 100% correct in capturing the original statements meaning, but I cannot see intuitively why my original statement does not. Anybody have a good way to explain the difference for future reference? The only thing I can think of is that my statement CAN be vacuously true when $x$ is not a python program and correct…
Best Answer
Translating your formal statement back into English reads like this:
As you noticed yourself, this statement is trivially true if there exists a program which is not a python program or not correct. So, in particular, your statement is clearly true in our world, while the given statement clearly is not.
I want to note, however, that the "correct answer" seems to be wrong, too. Translating this statement back to English actually reads:
I would rather translate the given statement as follows: