The Logic behind Feynman's Paths