|
1. "x"y(¬(R(x)→¬S(x,y))) Premisa |
2. "x$y(P(x)→Q(x,y)) Premisa |
3. $x"y(R(x)ÙQ(x,y)→¬S(x,y)) Premisa |
| 4. (z) "y(R(z)ÙQ(z,y)→¬S(z,y)) Supuesto | 5. $y(P(z)→Q(z,y)) "E 2 | | 6. (t) P(z)→Q(z,t) Supuesto | 7. R(z)ÙQ(z,t)→¬S(z,t) "E 4 | 8. "y (¬R(z)→¬S(z,y)) "E 1 | 9. ¬(R(z)→¬S(z,t)) "E 8 | | 10. P(z) Supuesto | 11. Q(z,t) →E 6 | | 12. R(z) Supuesto | 13. Q(z,t)ÙR(z) ÙI 11,12 | 14. ¬S(z,t) →E 7,13 |
| 15. R(z)→¬S(z,t) →I 12-14 | 16. (R(z)→¬S(z,t))Ù¬(R(z)→¬S(z,t)) ÙI 9,15 |
| 17. ¬P(z) ¬I 10-16 | 18. $x¬P(x) $I 17 |
| 19. $x¬P(x) $E 5,6-18 |
|
20. $x¬P(x) $E 3,4-19 |
|
1. "x($y(B(y)ÙA(y)ÙR(x,y))→$y(B(y)ÙS(y)ÙC(y,x))) P. |
2. $x(B(x)ÙA(x)ÙR(j,x)) Premisa |
| 3. (z) R(j,z)ÙB(z)ÙA(z) Supuesto | 4. $y(B(y)ÙA(y)ÙR(j,y))→$y(B(y)ÙS(y)ÙC(y,j)) "E 1 | 5. $y(B(y)ÙA(y)ÙR(j,y)) $I 3 | 6. $y(B(y)ÙS(y)ÙC(y,j)) →E 4,5 | | 7. (t)B(t)ÙS(t)ÙC(t,j) Supuesto | 8. B(t) ÙE 7 | 9. S(t) ÙE 7 | 10. B(t)ÙS(t) ÙI 8,9 | 11. $x(B(x)ÙS(x)) $I 10 |
| 12. $x(B(x)ÙS(x)) $E 6,7-11 |
|
13. $x(B(x)ÙS(x)) $E 2, 3-12 |
suma(0,Y,Y).suma(s(X),Y,s(Z)):-suma(X,Y,Z).prod(0,Y,0).prod(s(X),Y,Z):-prod(X,Y,P),suma(P,Y,Z).pot(X,0,s(0)).pot(X,s(Y),Z):-pot(X,Y,P),prod(P,X,Z).fact(0,s(0)).fact(s(X),Y):-fact(X,F),prod(s(X),F,Y).mayor(s(X),0).mayor(s(X),s(Y)):-mayor(X,Y).mcd(X,X,X).mcd(X,Y,M):-mayor(X,Y),suma(R,Y,X),mcd(R,Y,M).mcd(X,Y,M):-mayor(Y,X),suma(R,X,Y),mcd(R,X,M).
junta([],L,L).junta([X|L],M,[X|N]):-junta(L,M,N)./* De forma recursiva */ultimo([X],X).ultimo([Y|L],X):-ultimo(L,X)./* usando el predicado "junta" */ultimo(L,X):-junta(M,[X],L).seguidos(X,Y,L):-junta(M,[X,Y|N],L).