1. Socrates is a man and that 2. all men are motal,
(A & A => B) => B
Or given that,
1. Either Denis is programming or Denis is sad and 2. Denis is not sad,
we can infer that Denis is programming. This rule can be written
((A OR B) & not B) => A
(If either A is true or B is true (or both), and B is false, then A must be true).