Advertisement
Hppavilion1

Thoof proof

Feb 23rd, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. PAREN :: s/(?P<x>.*)/(\g<x>)/; # A substitution axiom, which tells the computer a way to transform a string (in this case, put it in parentheses)
  2. CARET :: s/^(?P<x>[^P].*)/^\g<x>/; # Another substitution axiom, this one conditional
  3. ST1 :: "walrus"; # A constant axiom- a string that exists by definition
  4. ST2 :: "PLATYPUS"; # Another constant axiom
  5. ==;
  6. --theo main; # The main section, which has the body of the proof (not lemmas (subroutines))
  7. -strs ST1 ST2; # Set the working string to the ST1 and ST2 axioms (the only strings known to exist by definition). Because there's more than one string, all axioms will be applied to every string available.
  8. aux;
  9. CARET; # Apply the CARET axiom again
  10. PS; # Output the proof state- currently, the strings "^(^walrus)" and "^(PLATYPUS)".
  11. --lemm aux; # An extra theorem used to simplify (well, not in this case, but generally simplify) proving
  12. CARET; # Apply the CARET axiom to the current string (or, more accurately, to both strings)
  13. PAREN; # Apply the PAREN axiom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement