Conditional Logic Rule

(Redirected from If-Then Rule)
Jump to: navigation, search

A Conditional Logic Rule is a logic sentence that connects the truth of a rule consequent with the truth of an rule antecedent such that if the antecedent is true then the consequent is true.



    • Rule. A statement of the form: if <x> then <y> else <z>. The if part is the rule premise, and the then part is the consequent. The else component of the consequent is optional. The rule fires when the if part is determined to be true or false. Here is an example rule: If the credit rating is good and the amount of the sale is less than 10000; Then the decision is accept the sale; Else the decision is reject the sale.

    • Conditional Statement: A conditional statement is an if-then statement and consists of two parts, an antecedent and a consequent. The antecedent, or that which goes before, is preceded by the "if"; the consequent, or that which comes after, may be preceded by a "then". English sentences sometimes reverse the order: John studies hard if he thinks that he will do well in a class. But the logic of this sentence is: If John thinks that he will do well in a class, then he studies hard. Here the antecedent is "John thinks that he will do well in a class" and the consequent is "he studies hard".