Advertisement
Guest User

scratch

a guest
May 9th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. theory Scratch
  2. imports Main
  3. begin
  4.  
  5. theorem ex1:
  6. assumes pq: "¬P ∨ Q"
  7. shows "P ⟶ Q"
  8. proof -
  9. have imppq: "P ⟹ Q"
  10. proof -
  11. assume p: "P"
  12. have qq: "Q ⟹ Q"
  13. proof -
  14. assume "Q" then show "Q" by this
  15. qed
  16. have npq: "¬P ⟹ Q"
  17. proof -
  18. assume np: "¬P"
  19. have nnq: "¬¬Q"
  20. proof -
  21. have nqfal: "¬Q ⟹ False"
  22. proof -
  23. assume nq: "¬Q"
  24. from np and p show "False" by (rule notE)
  25. qed
  26. from nqfal show "¬¬Q" by (rule notI)
  27. qed
  28. from nnq show "Q" by (rule notnotD)
  29. qed
  30. from pq and qq and npq show "Q" by (rule disjE)
  31. qed
  32. from imppq show "P ⟶ Q" by (rule impI)
  33. qed
  34.  
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement