« nazaj
Diskretne strukture (FiM) - vaje 11.11.2020
Sklepanje
Naloga 1
Kateri od naslednjih sklepov so veljavni? Dokaži jih ali pa navedi protiprimer.
- $(q \vee r) \Rightarrow \lnot p, s \vee p, q \models s$
- $p \land q,~\lnot p \Rightarrow q \models \lnot q$
- $p \lor q, p \Rightarrow r, q \Rightarrow s \models r \lor s$
- $(p \Rightarrow q) \Rightarrow (r \Rightarrow s),~\lnot(r \Rightarrow q) \models s$
Primer 1
- $(q \vee r) \Rightarrow \lnot p$ (predp.)
- $s \lor p$ (predp.)
- $q$ (predp.)
- $q \lor r$ (Pr(3))
- $\lnot p$ (MP(4, 1))
- $s$ (DS(2, 5))
Sklep je veljaven.
Primer 2
- Protiprimer: $p \sim 1, q \sim 1$
- Sklep je neveljaven.
Primer 3
- $p \lor q$ (predp.)
- $p \Rightarrow r$ (predp.)
- $q \Rightarrow s$ (predp.)
-
- $p$ (predp. AP(1))
- $r$ (MP(4.1, 2))
- $r \lor s$ (Pr(4.2))
-
- $q$ (predp. AP(1))
- $s$ (MP(5.1, 3))
- $r \lor s$ (Pr(5.2))
- $r \lor s$ (AP(1, 4.1-4.3, 5.1-5.3))
Sklep je veljaven.
Primer 4
- Protiprimer: $s \sim 0, r \sim 1, q \sim 0, p \sim 1$
- Sklep je neveljaven.
Naloga 2
Preveri pravilnost sklepov s pomočjo pogojnega sklepa.
- $s \land (p \Rightarrow t), t \Rightarrow (q \lor r) \models p \Rightarrow (\lnot q \Rightarrow r)$
- $p \lor q \Rightarrow r \land s, r \lor t \Rightarrow u \models p \Rightarrow u$
- $p \Rightarrow q \lor r, q \Rightarrow \lnot p, \lnot (s \land r) \models p \Rightarrow \lnot s$
- $\models (p \Rightarrow (q \Rightarrow r)) \Rightarrow ((p \Rightarrow q) \Rightarrow (p \Rightarrow r))$
Primer 1
- $s \land (p \Rightarrow t)$ (predp.)
- $t \Rightarrow (q \lor r)$ (predp.)
- $s$ (Po(1))
- $p \Rightarrow t$ (Po(1))
-
- $p$ (predp. PS)
- $t$ (MP(5.1, 4))
- $q \lor r \sim \lnot q \Rightarrow r$ (MP(5.2, 2))
-
- $\lnot q$ (predp. PS)
- $r$ (DS(3, 4.1))
- $\lnot q \Rightarrow r$ (PS(4.1-4.2))
- $p \Rightarrow (\lnot q \Rightarrow r)$ (PS(5.1-5.5 (-5.3)))
Primer 2
- $p \lor q \Rightarrow r \land s$ (predp.)
- $r \lor t \Rightarrow u$ (predp.)
-
- $p$ (predp. PS)
- $p \lor q$ (Pr(3.1))
- $r \land s$ (MP(3.2, 1))
- $r$ (Po(3.3))
- $r \lor t$ (Pr(3.4))
- $u$ (MP(3.5, 2))
- $p \Rightarrow u$ (PS(3.1-3.6))
Primer 3
- $p \Rightarrow q \lor r$ (predp.)
- $q \Rightarrow \lnot p$ (predp.)
- $\lnot (s \land r) \sim \lnot s \lor \lnot r$ (predp.)
-
- $p$ (predp. PS)
- $q \lor r$ (MP(4.1, 1))
- $\lnot q$ (MT(2, 4.1))
- $r$ (DS(4.2, 4.3))
-
- $s$ (predp. RA)
- $s \land r$ (Zd(5.1, 4))
- $0$ (Zd(3, 5.2))
- $\lnot s$ (RA(5.1-5.3))
- $p \Rightarrow \lnot s$ (PS(4.1-4.6))
Primer 4
- Dokazujemo tavtologijo
- $\models (p \Rightarrow (q \Rightarrow r)) \Rightarrow ((p \Rightarrow q) \Rightarrow (p \Rightarrow r))$
-
- $p \Rightarrow (q \Rightarrow r)$ (predp. PS)
-
- $p \Rightarrow q$ (predp. PS)
-
- $p$ (predp. PS)
- $q$ (MP(1.2.2.1, 1.2.1))
- $q \Rightarrow r$ (MP(1.2.2.1, 1.1))
- $r$ (MP(1.2.2.2, 1.2.2.3))
- $p \Rightarrow r$ (PS(1.2.2.1-1.2.2.4))
- $(p \Rightarrow q) \Rightarrow (p \Rightarrow r)$ (PS(1.2.1-1.2.3))
- $(p \Rightarrow (q \Rightarrow r)) \Rightarrow ((p \Rightarrow q) \Rightarrow (p \Rightarrow r))$ (PS(1.1-1.3))
Naloga 3
Preveri pravilnost sklepov s pomočjo dokaza s protislovjem (reductio ad absurdum).
- $(p \Rightarrow q) \land (r \Rightarrow s), s \land q \Rightarrow t, \lnot t \models \lnot (p \land r)$
- $p \lor q, p \Rightarrow r, q \Rightarrow s \models r \lor s$
- $p \Rightarrow r \land t, t \lor s \Rightarrow \lnot q \models \lnot (p \land q)$
- $p \Rightarrow q, r \lor s \Rightarrow p, s \lor t, \lnot t \lor r \models q$
Primer 1
- $(p \Rightarrow q) \land (r \Rightarrow s)$ (predp.)
- $s \land q \Rightarrow t$ (predp.)
- $\lnot t$ (predp.)
- $\lnot (s \land q)$ (MT(2, 3))
- $p \Rightarrow q$ (Po(1))
- $r \Rightarrow s$ (Po(1))
-
- $p \land r$ (predp. RA)
- $p$ (Po(7.1))
- $r$ (Po(7.2))
- $q$ (MP(7.2, 5))
- $s$ (MP(7.3, 6))
- $s \land q$ (Zd(7.5, 7.4))
- $0$ (Zd(4, 7.6))
- $\lnot (p \land r)$ (RA(7.1-7.7))
Primer 2
- $p \lor q$ (predp.)
- $p \Rightarrow r$ (predp.)
- $q \Rightarrow s$ (predp.)
-
- $\lnot (r \lor s) \sim \lnot r \land \lnot s$ (predp. RA)
- $\lnot r$ (Po(4.1))
- $\lnot s$ (Po(4.1))
- $\lnot p$ (MT(2, 4.2))
- $\lnot q$ (MT(3, 4.3))
- $q$ (DS(1, 4.4))
- $0$ (Zd(4.5, 4.6))
- $r \lor s$ (RA(4.1-4.7))
Primer 3
- $p \Rightarrow r \land t$ (predp.)
- $t \lor s \Rightarrow \lnot q$ (predp.)
-
- $p \land q$ (predp. RA)
- $p$ (Po(3.1))
- $q$ (Po(3.1))
- $r \land t$ (MP(3.2, 1))
- $t$ (Po(3.4))
- $t \lor s$ (Pr(3.5))
- $\lnot q$ (MP(3.6, 2))
- $0$ (Zd(3.3, 3.7))
- $\lnot (p \land q)$ (RA(3.1-3.8))
Primer 4
- $p \Rightarrow q$ (predp.)
- $r \lor s \Rightarrow p$ (predp.)
- $s \lor t$ (predp.)
- $\lnot t \lor r$ (predp.)
- $r \lor s \Rightarrow q$ (HS(2, 1))
-
- $\lnot q$ (predp. RA)
- $\lnot (r \lor s) \sim \lnot r \land \lnot s$ (MT(5, 6.1))
- $\lnot r$ (Po(6.2))
- $\lnot s$ (Po(6.2))
- $\lnot t$ (DS(4, 6.3))
- $t$ (DS(3, 6.4))
- $0$ (Zd(6.5, 6.6))
- $q$ (RA(6.1-6.7))