Business rules to propositional logic and truth tables

discrete mathematicslogicpredicate-logicpropositional-calculus

First I'm not a mathematician, (Ux designer), so please excuse the lack of technical terms.

I'm trying to convert the set of potentially conflicted business rules to propositional logic formulas then represent them in a truth table to identify the conflicted literals.

In a business production rules change all the time, to simulate this, I created the following conflicted rules:

  • R1: (if clients choose sport package then add Leather Seats and Black Console).
    This means if clients choose sport package then the leather seats and black console MUSt be true for this rule to true. Similarly, to get the Leather Seats and Black Console clients must select the sport package!.
  • R2: (if sport package is chosen don't add Leather Seats).
    This means if the client chooses sport package then the leather seats should be false!. This rule should be only true when the leather seats are false or not selected!

Here is what I did:

Truth table with equation

Truth table with equation

I'm not allowed to embed images yet :/ so sorry for the link.

(SportPackage -> (BlackConsole and LeatherSeats)) and (SportPackage -> (BlackConsole and not LeatherSeats))

Because the evaluation of rules is linear I put a logical "&" between R1 and R2.

Yet, Somehow the truth table generated from this equation is not making any sense to me.
I read somewhere that the "if…then" construction is supposed to be translated to implication -> yet the table shows the equation to be true even if the "Sport package" is not true! 🙁

The purpose:

I'm trying to show that the literal not LeatherSeats let's call it L2 from R1 and L2 from R1 are conflicted in a truth table.
What I expected to see is a total "falsum" or "contradiction" because rule one says the sport package provide the Leather Seats and rule two says clients can't have it. 🙁

As I have limited knowledge of this topic I wanted to ask for your help 🙂

Edit:

Is the formula that I wrote optimal? Or can it be shortened?

In attempt to isolate the conflict causing literal, I played around with the formula and came up with two versions please let me know if these are semantically as well syntactically correct:

  1. i tried to simplify the above mentioned formula to this (SportPackage -> ((BlackConsole and LeatherSeats) and (BlackConsole and not LeatherSeats)))
  2. then (SportPackage -> (BlackConsole and (LeatherSeats and not LeatherSeats)))

To my naive eye the table of these looked the same as above yet im not sure if this formula transformation change the semantic meaning. Could you please validate it?

Thanks in advance 😊.

Best Answer

Converting Comment to Answer format , because it is becoming too long & because OP has included additional query.


Opposite of tautology , your falsum , is $A \land (A \implies B) \land (A \implies \lnot B)$ , whereas $(A \implies B) \land (A \implies \lnot B)$ is not a falsum , it just indicates that $A$ can not be true.

In your Case , no Customer can select SPORT PACKAGE because it will indicate leather should be selected as well as unselected at the same time.
When Customer has not selected SPORT PACKAGE , there is no issue over what else was selected by Customer.
Here , to get a falsum, you have to add "Customer selected SPORT PACKAGE" , which is Contradicting the Criteria.

[[ BlackConsole is irrelevant here ]]


When you try to formulate it is Different ways , you should check whether you get Different truth values , because Equivalent formulations should have Equivalent truth values.

$(SportPackage \implies ((BlackConsole \land LeatherSeats) \land (BlackConsole \land \lnot LeatherSeats)))$

This is a Single Implication $A \implies B$ where $B$ is a falsum : Here $B$ is claiming that $LeatherSeats$ is true as well as false !

It is Equivalent to $(SportPackage \implies (BlackConsole \land (LeatherSeats \land \lnot LeatherSeats)))$ which is $(SportPackage \implies (BlackConsole \land (false)))$ which is eventually $(SportPackage \implies ( false))$
Thus $SportPackage$ can not be true.

Related Question