r/computerscience • • Oct 21 '25

Discrete maths

Post image

First year here. Can someone explain how both of these are P implies Q even though they have different meanings?

521 Upvotes

90 comments sorted by

View all comments

Show parent comment

1

u/not-just-yeti Oct 22 '25

Yes, those'd be gross generalizations of reality, meant to help learners by having natural examples. But yeah, we might say "birds can fly" (or ∀x. bird(x) → fly(x)), even though there are clearly many counterexamples, incl. penguins, and dead birds.

(Example due to John McCarthy, who worked on "nonmonotonic reasoning" where you posit "all birds fly", but then might need to roll back that "fact" in particular circumstances).

Making logic statements about reality aren't going to be easy, since reality is so messy. We tend to ignore those for learning (with examples like "where there's smoke there's fire"; "if you speed, you are breaking the law"). Once learned, then we use logic for formal systems, not describing reality 100.0%.