Lógica

Propiedades y Equivalencias

Los operadores lógicos satisfacen diversas propiedades algebraicas que permiten simplificar y manipular expresiones. Estas propiedades se pueden verificar mediante tablas de verdad.

Propiedades de la equivalencia

Axioma 1 — Asociatividad de ⇔\Leftrightarrow

((p⇔q)⇔r)≡(p⇔(q⇔r))((p \Leftrightarrow q) \Leftrightarrow r) \equiv (p \Leftrightarrow (q \Leftrightarrow r))

Axioma 2 — Conmutatividad de ⇔\Leftrightarrow

p⇔q≡q⇔pp \Leftrightarrow q \equiv q \Leftrightarrow p

Axioma 3 — Identidad de ⇔\Leftrightarrow

⊤⇔q≡q\top \Leftrightarrow q \equiv q

De estos axiomas se siguen dos resultados inmediatos:

Teorema 1 — Verdad

⊤\top

es una tautología (se sigue de la identidad: ⊤≡q⇔q≡⊤\top \equiv q \Leftrightarrow q \equiv \top).

Teorema 2 — Reflexividad de ⇔\Leftrightarrow

p⇔p≡⊤p \Leftrightarrow p \equiv \top

Propiedades de la negación

Axioma 4 — Distributividad de ¬\neg sobre ⇔\Leftrightarrow

¬(p⇔q)≡¬p⇔q\neg(p \Leftrightarrow q) \equiv \neg p \Leftrightarrow q

Teorema 3 — Doble negación

¬¬p≡p\neg\neg p \equiv p

▶Demostración

Aplicamos la distributividad de ¬\neg sobre ⇔\Leftrightarrow dos veces. Primero, sustituyendo q:=¬pq := \neg p: ¬(p⇔¬p)≡¬p⇔¬p≡⊤\neg(p \Leftrightarrow \neg p) \equiv \neg p \Leftrightarrow \neg p \equiv \top. Luego p⇔¬p≡⊥p \Leftrightarrow \neg p \equiv \bot.

Por otro lado, sustituyendo q:=pq := p: ¬(p⇔p)≡¬p⇔p\neg(p \Leftrightarrow p) \equiv \neg p \Leftrightarrow p. Como p⇔p≡⊤p \Leftrightarrow p \equiv \top, tenemos ¬⊤≡¬p⇔p\neg \top \equiv \neg p \Leftrightarrow p, es decir ¬p⇔p≡⊥\neg p \Leftrightarrow p \equiv \bot.

Ahora: ¬¬p⇔p≡¬p⇔¬p≡⊤\neg\neg p \Leftrightarrow p \equiv \neg p \Leftrightarrow \neg p \equiv \top. Por lo tanto ¬¬p≡p\neg\neg p \equiv p.

QED
Teorema 4 — Negación de ⊥\bot

¬⊥≡⊤¬⊤≡⊥\neg \bot \equiv \top \qquad \neg \top \equiv \bot

Propiedades de la disyunción

Axioma 5 — Conmutatividad de ∨\lor

p∨q≡q∨pp \lor q \equiv q \lor p

Axioma 6 — Asociatividad de ∨\lor

(p∨q)∨r≡p∨(q∨r)(p \lor q) \lor r \equiv p \lor (q \lor r)

Axioma 7 — Idempotencia de ∨\lor

p∨p≡pp \lor p \equiv p

Axioma 8 — Identidad de ∨\lor

p∨⊥≡pp \lor \bot \equiv p

Axioma 9 — Distributividad de ∨\lor sobre ⇔\Leftrightarrow

p∨(q⇔r)≡(p∨q)⇔(p∨r)p \lor (q \Leftrightarrow r) \equiv (p \lor q) \Leftrightarrow (p \lor r)

Teorema 5 — Tercero excluido

p∨¬p≡⊤p \lor \neg p \equiv \top

▶Demostración

Usando la distributividad de ∨\lor sobre ⇔\Leftrightarrow con q:=pq := p y r:=¬pr := \neg p:

p∨(p⇔¬p)p \lor (p \Leftrightarrow \neg p)

Sabemos que p⇔¬p≡⊥p \Leftrightarrow \neg p \equiv \bot (de la doble negación). Entonces:

p∨⊥≡pp \lor \bot \equiv p

Pero también, expandiendo la distributividad:

(p∨p)⇔(p∨¬p)≡p⇔(p∨¬p)(p \lor p) \Leftrightarrow (p \lor \neg p) \equiv p \Leftrightarrow (p \lor \neg p)

Y por idempotencia, p∨p≡pp \lor p \equiv p, así que p≡p⇔(p∨¬p)p \equiv p \Leftrightarrow (p \lor \neg p). Por identidad de ⇔\Leftrightarrow, esto da p∨¬p≡⊤p \lor \neg p \equiv \top.

QED
Teorema 6 — Dominación de ∨\lor

p∨⊤≡⊤p \lor \top \equiv \top

Propiedades de la conjunción

Axioma 10 — Regla dorada

p∧q≡p⇔q⇔p∨qp \land q \equiv p \Leftrightarrow q \Leftrightarrow p \lor q

La regla dorada conecta los tres operadores ∧\land, ∨\lor y ⇔\Leftrightarrow. A partir de ella se pueden derivar todas las propiedades de la conjunción:

Teorema 7 — Conmutatividad de ∧\land

p∧q≡q∧pp \land q \equiv q \land p

Teorema 8 — Asociatividad de ∧\land

(p∧q)∧r≡p∧(q∧r)(p \land q) \land r \equiv p \land (q \land r)

Teorema 9 — Idempotencia de ∧\land

p∧p≡pp \land p \equiv p

Teorema 10 — Identidad de ∧\land

p∧⊤≡pp \land \top \equiv p

Teorema 11 — Dominación de ∧\land

p∧⊥≡⊥p \land \bot \equiv \bot

Teorema 12 — Absorción

p∧(p∨q)≡pp∨(p∧q)≡pp \land (p \lor q) \equiv p \qquad p \lor (p \land q) \equiv p

Distributividad

Teorema 13 — Distributividad de ∧\land sobre ∨\lor

p∧(q∨r)≡(p∧q)∨(p∧r)p \land (q \lor r) \equiv (p \land q) \lor (p \land r)

Teorema 14 — Distributividad de ∨\lor sobre ∧\land

p∨(q∧r)≡(p∨q)∧(p∨r)p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)

Leyes de De Morgan

Teorema 15 — Leyes de De Morgan

¬(p∧q)≡¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q ¬(p∨q)≡¬p∧¬q\neg(p \lor q) \equiv \neg p \land \neg q

▶Demostración

Para la primera ley, partimos de la regla dorada p∧q≡p⇔q⇔p∨qp \land q \equiv p \Leftrightarrow q \Leftrightarrow p \lor q y negamos ambos lados:

¬(p∧q)≡¬(p⇔q⇔p∨q)\neg(p \land q) \equiv \neg(p \Leftrightarrow q \Leftrightarrow p \lor q) ≡¬p⇔q⇔p∨q\equiv \neg p \Leftrightarrow q \Leftrightarrow p \lor q

Usando que ¬p⇔q≡¬p⇔q\neg p \Leftrightarrow q \equiv \neg p \Leftrightarrow q y manipulando con las propiedades de ⇔\Leftrightarrow, ∨\lor y la regla dorada, se obtiene ¬p∨¬q\neg p \lor \neg q.

La segunda ley se demuestra análogamente, o aplicando la primera a ¬p\neg p y ¬q\neg q y usando doble negación.

QED

Propiedades de la implicación

Teorema 16 — Definición de implicación

p⇒q≡¬p∨qp \Rightarrow q \equiv \neg p \lor q

▶Demostración

Partimos de la regla dorada y las propiedades de la equivalencia. La implicación en el cálculo proposicional se define como:

p⇒q≡p∨q⇔qp \Rightarrow q \equiv p \lor q \Leftrightarrow q

De aquí, usando que p∨q⇔qp \lor q \Leftrightarrow q tiene el mismo valor de verdad que ¬p∨q\neg p \lor q (verificable por tabla de verdad), obtenemos el resultado.

QED
Teorema 17 — Contrarrecíproco

p⇒q≡¬q⇒¬pp \Rightarrow q \equiv \neg q \Rightarrow \neg p

▶Demostración

p⇒q≡¬p∨qp \Rightarrow q \equiv \neg p \lor q ≡¬p∨¬¬q\equiv \neg p \lor \neg\neg q ≡¬¬q∨¬p\equiv \neg\neg q \lor \neg p ≡¬(¬q)∨¬p\equiv \neg(\neg q) \lor \neg p ≡¬q⇒¬p\equiv \neg q \Rightarrow \neg p

Usamos doble negación (¬¬q≡q\neg\neg q \equiv q), conmutatividad de ∨\lor y la definición de implicación.

QED
Teorema 18 — Shunting

p∧q⇒r≡p⇒(q⇒r)p \land q \Rightarrow r \equiv p \Rightarrow (q \Rightarrow r)

▶Demostración

p⇒(q⇒r)≡p⇒(¬q∨r)p \Rightarrow (q \Rightarrow r) \equiv p \Rightarrow (\neg q \lor r) ≡¬p∨(¬q∨r)\equiv \neg p \lor (\neg q \lor r) ≡(¬p∨¬q)∨r\equiv (\neg p \lor \neg q) \lor r ≡¬(p∧q)∨r\equiv \neg(p \land q) \lor r ≡p∧q⇒r\equiv p \land q \Rightarrow r

Usamos la definición de implicación, asociatividad de ∨\lor y De Morgan.

QED
Teorema 19 — Equivalencia como doble implicación

p⇔q≡(p⇒q)∧(q⇒p)p \Leftrightarrow q \equiv (p \Rightarrow q) \land (q \Rightarrow p)

Teorema 20 — Debilitamiento y fortalecimiento

p∧q⇒pp⇒p∨qp∧q⇒p∨qp \land q \Rightarrow p \qquad p \Rightarrow p \lor q \qquad p \land q \Rightarrow p \lor q

▶Demostración

Para p∧q⇒pp \land q \Rightarrow p: por definición de implicación, p∧q⇒p≡¬(p∧q)∨p≡(¬p∨¬q)∨p≡⊤∨¬q≡⊤p \land q \Rightarrow p \equiv \neg(p \land q) \lor p \equiv (\neg p \lor \neg q) \lor p \equiv \top \lor \neg q \equiv \top.

Para p⇒p∨qp \Rightarrow p \lor q: p⇒p∨q≡¬p∨(p∨q)≡(¬p∨p)∨q≡⊤∨q≡⊤p \Rightarrow p \lor q \equiv \neg p \lor (p \lor q) \equiv (\neg p \lor p) \lor q \equiv \top \lor q \equiv \top.

QED
Teorema 21 — Modus ponens

p∧(p⇒q)⇒qp \land (p \Rightarrow q) \Rightarrow q

▶Demostración

p∧(p⇒q)≡p∧(¬p∨q)p \land (p \Rightarrow q) \equiv p \land (\neg p \lor q) ≡(p∧¬p)∨(p∧q)\equiv (p \land \neg p) \lor (p \land q) ≡⊥∨(p∧q)\equiv \bot \lor (p \land q) ≡p∧q\equiv p \land q

Y como p∧q⇒qp \land q \Rightarrow q (debilitamiento), tenemos p∧(p⇒q)⇒qp \land (p \Rightarrow q) \Rightarrow q.

QED
Teorema 22 — Análisis de casos

(p⇒r)∧(q⇒r)≡p∨q⇒r(p \Rightarrow r) \land (q \Rightarrow r) \equiv p \lor q \Rightarrow r (p⇒r)∧(¬p⇒r)≡r(p \Rightarrow r) \land (\neg p \Rightarrow r) \equiv r

▶Demostración

Para la primera equivalencia:

p∨q⇒r≡¬(p∨q)∨rp \lor q \Rightarrow r \equiv \neg(p \lor q) \lor r ≡(¬p∧¬q)∨r\equiv (\neg p \land \neg q) \lor r ≡(¬p∨r)∧(¬q∨r)\equiv (\neg p \lor r) \land (\neg q \lor r) ≡(p⇒r)∧(q⇒r)\equiv (p \Rightarrow r) \land (q \Rightarrow r)

Para la segunda: es un caso particular con q:=¬pq := \neg p, donde p∨¬p≡⊤p \lor \neg p \equiv \top, así que ⊤⇒r≡r\top \Rightarrow r \equiv r.

QED