
Úpravy logických výrazů

Úpravy logických výrazů je vhodné provádět například tehdy, když chceme určit pravdivost daného výroku nebo porovnat, jestli jsou dva výroky shodné. K tomu se hodí základní přepisová pravidla.
Přepis základních logických spojek
| \text{not not } X | X | 
| \text{not } (X \text{ and } Y) | (\text{not } X) \text{ or (not } Y) | 
| \text{not }(X \text{ or }Y) | (\text{not } X) \text{ and (not } Y) | 
Přepis implikace, ekvivalence a operace xor
| X \Rightarrow Y | (\text{not } X) \text{ or } Y | 
| X \Rightarrow Y | (\text{not } Y) \Rightarrow (\text{not } X) | 
| X \Leftrightarrow Y | (X \Rightarrow Y) \text{ and } (Y \Rightarrow X) | 
| X \Leftrightarrow Y | (X \text{ and } Y) \text{ or (not } X \text{ and not } Y) | 
| X \text{ xor } Y | (X \text{ and not } Y) \text{ or (not } X \text{ and } Y) | 
| \text{not } (X \Rightarrow Y) | X \text{ and not } Y | 
| \text{not } (X \Leftrightarrow Y) | X \text{ xor } Y | 
| \text{not } (X \text{ xor } Y) | X \Leftrightarrow Y | 
Analogické zákony jako při počítání s čísly
Pro logické operace and a or také platí komutativní (1. a 2. řádek následující tabulky), asociativní (3. a 4. řádek) a distributivní zákony (5. a 6. řádek):
| X \text{ and } Y | Y \text{ and } X | 
| X \text{ or } Y | Y \text{ or } X | 
| (X \text{ and }Y) \text{ and } Z | X \text{ and } (Y \text{ and }Z) | 
| (X \text{ or } Y) \text{ or } Z | X \text{ or } (Y \text{ or } Z) | 
| X \text{ and } (Y \text{ or } Z) | (X \text{ and } Y) \text{ or } (X \text{ and } Z) | 
| X \text{ or } (Y \text{ and } Z) | (X \text{ or } Y) \text{ and } (X \text{ or } Z) | 
Další cvičení s trochu jinou notací najdete i na umíme matiku.
Zavřít