Skip to content
AI360Xpert
Beta

Propositional Logic

Propositional logic builds complex claims from simple true-or-false pieces with and, or, not, and implies, then derives conclusions mechanically.

From deployed-is-true and deployed-implies-monitored, modus ponens derives monitored, while the reverse inference stays invalid
From deployed-is-true and deployed-implies-monitored, modus ponens derives monitored, while the reverse inference stays invalid

Why Does This Exist?

Code is logic made executable: if deployed and not monitored: alert() decides by combining true-or-false pieces. Specifications, contracts, and correctness arguments all rest on saying exactly what follows from what. Propositional logic is the shared language for that: a small set of connectives with exact meanings, so "or" never wobbles between inclusive and exclusive and "if" never blurs into "if and only if."

Its ML footprint is everywhere conditions appear: data validation rules, guardrail policies, early-stopping criteria, and the preconditions inside every correctness proof. This page teaches the connectives and the two inferences that never fail. Tables of all combinations are in truth tables; the overview is sets, logic and proofs.

The one idea you need first

A proposition is a sentence with a definite truth value, true or false: "the model is deployed" qualifies, "deploy soon" does not. Lowercase letters PP, QQ, RR stand for propositions. Connectives build compound propositions whose truth depends only on their parts.

Think of It Like This

Lego bricks with studs that enforce fit

Each proposition is a brick stamped true or false. Connectives are connector pieces with fixed shapes: AND outputs true only when both studs are true, OR when at least one is, NOT flips its brick, and IMPLIES promises that a true left brick forces a true right one. Snap them together and the whole assembly's stamp is forced, no judgment involved.

The power is the enforcement: anyone assembling the same bricks gets the same stamp. The analogy stops at meaning: bricks ignore what PP says about the world, so garbage premises still assemble into validly derived garbage. Validity preserves truth; it cannot create it.

How It Actually Works

The four connectives, with PP and QQ as propositions (¬\lnot not, ∧\land and, ∨\lor or, →\to implies):

  • ¬P\lnot P: true exactly when PP is false. Flips the value.
  • P∧QP \land Q: true only when both are true. Strict gate.
  • P∨QP \lor Q: true when at least one is true. Inclusive, unlike everyday "either."
  • P→QP \to Q: false only when PP is true and QQ false; true in all three other cases. A promise broken only by kept premise plus failed conclusion.

Two inference patterns are always valid. Modus ponens: from PP and P→QP \to Q, conclude QQ. Modus tollens: from ¬Q\lnot Q and P→QP \to Q, conclude ¬P\lnot P. The trap: from QQ and P→QP \to Q, nothing follows about PP (affirming the consequent). Monitoring may run for other reasons; deployment is not proven.

Worked example

Let PP be "the model is deployed" and QQ be "monitoring is on," with the policy P→QP \to Q:

  • Observe PP true. By modus ponens, QQ is true: monitoring must be on. Derived, not checked.
  • Observe ¬Q\lnot Q (monitoring off). By modus tollens, ¬P\lnot P: the model is not deployed. Contrapositive in action.
  • Observe QQ true. Conclude nothing about PP: staging also runs monitoring. Affirming the consequent would wrongly "prove" deployment.

Three observations, three different verdicts, all mechanical. Write the policy once and the inferences run themselves.

Watch Out For

Reading implies as if-and-only-if

"If deployed then monitored" gets misremembered as "deployed exactly when monitored," adding a reverse promise nobody made. Alerts then fire on staging (monitored, not deployed) as if policy broke.

Treat →\to as one-directional until an explicit "if and only if" appears. If both directions hold, write both arrows; never smuggle the converse.

Affirming the consequent in evaluations

"Good models score above 0.9; this scores 0.92, so it is good" affirms the consequent: high score was necessary, not sufficient. A leaked or gamed metric satisfies QQ while PP (genuinely good) is false.

Check the direction before celebrating: does the metric follow from goodness, or does goodness follow from the metric? Only the second licenses the conclusion.

The Quick Version

  • Propositions are true-or-false sentences; connectives combine them exactly.
  • AND needs both, OR needs at least one, NOT flips, IMPLIES breaks only on true-premise plus false-conclusion.
  • Modus ponens (PP, P→QP \to Q gives QQ) and modus tollens (¬Q\lnot Q gives ¬P\lnot P) never fail.
  • From QQ alone nothing follows about PP.
  • Deployed plus deployed-implies-monitored derives monitoring mechanically.
  • Never upgrade a one-way rule into an if-and-only-if silently.