Last active
August 29, 2015 14:10
-
-
Save SerCeMan/f0f360bf543ad4523c55 to your computer and use it in GitHub Desktop.
LaTeX to logitext converter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Groovy | |
# For example, you can run it on groovyconsole.appspot.com | |
def s = /(\exists x P(x) \lor Q(x)) \to \exists x P(x) \lor \exists x Q(x)/ | |
s = s.replace(/\vdash/, '|-') | |
s = s.replace(/\exists x/, 'exists x,') | |
s = s.replace(/\exists y/, 'exists y,') | |
s = s.replace(/\forall x/, 'forall x,') | |
s = s.replace(/\forall y/, 'forall y,') | |
s = s.replace(/\lor/, $/\//$) | |
s = s.replace(/\land/, $//\/$) | |
s = s.replace(/\to/, /->/) | |
println s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment