diff options
| author | adelon <22380201+adelon@users.noreply.github.com> | 2025-07-16 12:36:32 +0200 |
|---|---|---|
| committer | adelon <22380201+adelon@users.noreply.github.com> | 2025-07-16 12:36:32 +0200 |
| commit | 9aac1a22c4ff4b4be16800b86e34a94d358b0deb (patch) | |
| tree | 4874bcad55c1a40d8776e367b1bba0ad6c80f46e /source/Syntax/Token.hs | |
| parent | 92efa0fe16152c0f42cb9d05d6ef127955b03a18 (diff) | |
Add quantified calcs and relax tokenization
Use an `\iff`-calc to speed up `union_as_unions`. Also remove `in_implies_neq` which seems to interact badly with the choice axiom used by superposition-based proofs like Vampire in cut-down problems.
Diffstat (limited to 'source/Syntax/Token.hs')
| -rw-r--r-- | source/Syntax/Token.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/Syntax/Token.hs b/source/Syntax/Token.hs index 53e1e6a..2dad049 100644 --- a/source/Syntax/Token.hs +++ b/source/Syntax/Token.hs @@ -321,14 +321,17 @@ var = guardM isMathMode *> lexeme (fmap Variable var') where var' = do alphabeticPart <- letter <|> bb <|> greek - variationPart <- subscriptNumber <|> ticked <|> pure "" + variationPart <- subscript <|> ticked <|> pure "" pure (alphabeticPart <> variationPart) - subscriptNumber :: Lexer Text - subscriptNumber = do + subscript :: Lexer Text + subscript = do Char.char '_' - n <- some Char.digitChar - pure (Text.pack n) + unbraced <|> braced <|> text + where + unbraced = Text.singleton <$> Char.alphaNumChar + braced = Text.pack <$> (Char.char '{' *> many Char.alphaNumChar <* Char.char '}') + text = Char.string "\\text" *> braced -- for rendering the subscript in roman type -- Temporary hack to fit the TPTP format. ticked :: Lexer Text |
