Do you have any idea how can i write this with prolog?

Test the validity of:

For my husband’s a birthday, I bring him gifts. Either it is my husband’s birthday or I work late in office. I did not bring my husband gifts today. Therefore, today I worked late.

Now I will write it with propositions to make it easy to modify for prolog:


p:My husband's a birthday. q:I bring him gifts. r:I work late in office

For my husband's a birthday,I bring him gifts. (p->q)

Either it is my husband's birthday or I work late in office.(p v r)

I did not bring my husband gifts today.(-q)

Therefore,today I worked late.(.:.r)

By using Modus tollens

p->q

-q
----------------
.:. -p

By using Disjunctive syllogism

-p

p v r
-----------------
.:.r