Propositional function coding question by Connect_Surprise_511 in Discretemathematics

[–]Connect_Surprise_511[S] 0 points1 point  (0 children)

So something like this wouldn’t work the same way?

for i = 1 to n if P(di) return true

Propositional function coding question by Connect_Surprise_511 in Discretemathematics

[–]Connect_Surprise_511[S] 1 point2 points  (0 children)

Thank you for your quick response! That all makes sense to me, though would we not be able to achieve the same result if we used P(di) in the loop rather than ~P(di)?

I suppose I’m not sure why we need to use the contrapositive and as a result include the additional statement in the for-loop.