Advertisement
Hppavilion1

Thoof Axioms/Theorems for Peano Arithmetic

Feb 24th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. succ :: s/(?P<x>[SP]*0)/S\g<x>/;
  2. pred :: s/(?P<x>[SP]*0/P\g<x>/;
  3.  
  4. RED_1 :: s/SP//;
  5. RED_2 :: s/PS//;
  6.  
  7. appz :: s/(?P<x>[SP]*0)/\g<x>+0/;
  8. incsnd :: s/(?P<x>[SP]*0)\+(?P<y>[SP]*0)/\g<x>+S\g<y>/;
  9.  
  10. ADD_ZER :: s/(?P<x>[SP]*0)\+0/\g<x>/;
  11. ADD_1 :: s/(?P<x>[SP]*0)\+(?P<y>[SP]*0)/S\g<x>+P\g<y>/;
  12.  
  13. 0 :: "0";
  14.  
  15. ==;
  16. --theo main;
  17. -str 0;
  18. succ;
  19. succ;
  20. succ;
  21. appz; # append +0
  22. incsnd; # Set the second argument to 1
  23. incsnd; # Set the second argument to 2
  24. add; # Set the output to 5
  25. PS; # Output the proof string("SSSSS0")
  26.  
  27. --lemm add;
  28. @add';
  29.  
  30. --lemm add';
  31. ADD_ZER;
  32. ADD_1;
  33. red_prim;
  34.  
  35. --lemm red_prim;
  36. RED_1;
  37. RED_2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement