# Generated from tptp_v7_0_0_0.g4 by ANTLR 4.7.2
# encoding: utf-8
import sys
from io import StringIO
from typing.io import TextIO

from antlr4 import *


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3e")
        buf.write("\u0668\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write('\4\37\t\37\4 \t \4!\t!\4"\t"\4#\t#\4$\t$\4%\t%\4&\t')
        buf.write("&\4'\t'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64")
        buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t")
        buf.write(";\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\t")
        buf.write("D\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\t")
        buf.write("M\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\t")
        buf.write("V\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4")
        buf.write("_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4")
        buf.write("h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4")
        buf.write("q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4")
        buf.write("z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080")
        buf.write("\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084")
        buf.write("\t\u0084\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087")
        buf.write("\4\u0088\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a\4\u008b")
        buf.write("\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e\t\u008e")
        buf.write("\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092")
        buf.write("\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095")
        buf.write("\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099")
        buf.write("\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b\4\u009c\t\u009c")
        buf.write("\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f\4\u00a0")
        buf.write("\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3")
        buf.write("\4\u00a4\t\u00a4\4\u00a5\t\u00a5\4\u00a6\t\u00a6\4\u00a7")
        buf.write("\t\u00a7\4\u00a8\t\u00a8\4\u00a9\t\u00a9\4\u00aa\t\u00aa")
        buf.write("\4\u00ab\t\u00ab\4\u00ac\t\u00ac\4\u00ad\t\u00ad\4\u00ae")
        buf.write("\t\u00ae\4\u00af\t\u00af\4\u00b0\t\u00b0\4\u00b1\t\u00b1")
        buf.write("\4\u00b2\t\u00b2\4\u00b3\t\u00b3\4\u00b4\t\u00b4\4\u00b5")
        buf.write("\t\u00b5\4\u00b6\t\u00b6\4\u00b7\t\u00b7\4\u00b8\t\u00b8")
        buf.write("\4\u00b9\t\u00b9\4\u00ba\t\u00ba\4\u00bb\t\u00bb\4\u00bc")
        buf.write("\t\u00bc\4\u00bd\t\u00bd\4\u00be\t\u00be\4\u00bf\t\u00bf")
        buf.write("\4\u00c0\t\u00c0\4\u00c1\t\u00c1\4\u00c2\t\u00c2\4\u00c3")
        buf.write("\t\u00c3\4\u00c4\t\u00c4\4\u00c5\t\u00c5\4\u00c6\t\u00c6")
        buf.write("\4\u00c7\t\u00c7\4\u00c8\t\u00c8\4\u00c9\t\u00c9\4\u00ca")
        buf.write("\t\u00ca\3\2\7\2\u0196\n\2\f\2\16\2\u0199\13\2\3\2\3\2")
        buf.write("\3\3\3\3\5\3\u019f\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4")
        buf.write("\u01a8\n\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u01b1\n\5\3")
        buf.write("\5\3\5\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u01be\n")
        buf.write("\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\5\b\u01c9\n\b\3")
        buf.write("\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u01d4\n\t\3\t\3")
        buf.write("\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u01df\n\n\3\n\3\n\3")
        buf.write("\13\3\13\3\13\3\13\3\13\3\13\3\13\5\13\u01ea\n\13\3\13")
        buf.write("\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u01f5\n\f\3\f\3")
        buf.write("\f\3\r\3\r\3\r\5\r\u01fc\n\r\3\16\3\16\3\17\3\17\5\17")
        buf.write("\u0202\n\17\3\20\3\20\3\20\3\20\5\20\u0208\n\20\3\21\3")
        buf.write("\21\3\21\5\21\u020d\n\21\3\22\3\22\3\22\3\22\3\23\3\23")
        buf.write("\3\23\5\23\u0216\n\23\3\24\3\24\3\24\3\24\3\24\3\24\3")
        buf.write("\24\3\24\7\24\u0220\n\24\f\24\16\24\u0223\13\24\3\25\3")
        buf.write("\25\3\25\3\25\3\25\3\25\3\25\3\25\7\25\u022d\n\25\f\25")
        buf.write("\16\25\u0230\13\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26")
        buf.write("\3\26\7\26\u023a\n\26\f\26\16\26\u023d\13\26\3\27\3\27")
        buf.write("\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\5\27\u0249\n")
        buf.write("\27\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3\32")
        buf.write("\3\32\3\32\7\32\u0257\n\32\f\32\16\32\u025a\13\32\3\33")
        buf.write("\3\33\5\33\u025e\n\33\3\34\3\34\3\34\3\34\3\35\3\35\3")
        buf.write("\35\3\35\3\35\3\36\3\36\3\36\3\36\5\36\u026d\n\36\3\37")
        buf.write("\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37")
        buf.write("\3\37\3\37\3\37\3\37\5\37\u027f\n\37\3 \3 \3 \5 \u0284")
        buf.write('\n \3!\3!\3!\3!\3!\3!\3!\3!\3"\3"\3"\3"\3"\3"\3')
        buf.write("#\3#\3$\3$\3$\3$\3%\3%\3%\3%\3%\5%\u029f\n%\3&\3&\3&\3")
        buf.write("&\3'\3'\3'\5'\u02a8\n'\3(\3(\3)\3)\3*\3*\3*\5*\u02b1")
        buf.write("\n*\3+\3+\3+\3+\3+\3+\3+\3+\5+\u02bb\n+\3,\3,\3,\3,\3")
        buf.write(",\3,\3,\3,\7,\u02c5\n,\f,\16,\u02c8\13,\3-\3-\3-\3-\3")
        buf.write("-\3-\3-\3-\7-\u02d2\n-\f-\16-\u02d5\13-\3.\3.\3.\3.\3")
        buf.write(".\3.\3.\3.\5.\u02df\n.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\5")
        buf.write("/\u02eb\n/\3\60\3\60\3\60\7\60\u02f0\n\60\f\60\16\60\u02f3")
        buf.write("\13\60\3\61\3\61\5\61\u02f7\n\61\3\62\3\62\3\63\3\63\3")
        buf.write("\63\5\63\u02fe\n\63\3\64\3\64\3\64\5\64\u0303\n\64\3\65")
        buf.write("\3\65\5\65\u0307\n\65\3\66\3\66\3\66\3\66\3\67\3\67\5")
        buf.write("\67\u030f\n\67\38\38\38\38\38\38\38\38\78\u0319\n8\f8")
        buf.write("\168\u031c\138\39\39\39\39\39\39\39\39\79\u0326\n9\f9")
        buf.write("\169\u0329\139\3:\3:\3:\3:\3:\3:\3:\3:\3:\5:\u0334\n:")
        buf.write("\3;\3;\3;\3;\3;\3;\3;\3<\3<\3<\7<\u0340\n<\f<\16<\u0343")
        buf.write("\13<\3=\3=\5=\u0347\n=\3>\3>\3>\3>\3?\3?\3?\3?\5?\u0351")
        buf.write("\n?\3@\3@\3A\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3")
        buf.write("B\3B\3B\3B\3B\3B\5B\u0369\nB\3C\3C\3C\3C\3C\5C\u0370\n")
        buf.write("C\3D\3D\3D\7D\u0375\nD\fD\16D\u0378\13D\3E\3E\3E\3E\3")
        buf.write("E\3E\3E\3E\5E\u0382\nE\3F\3F\3F\3F\3F\3F\3F\3F\5F\u038c")
        buf.write("\nF\3G\3G\3G\3G\3G\5G\u0393\nG\3H\3H\3H\7H\u0398\nH\f")
        buf.write("H\16H\u039b\13H\3I\3I\3I\3I\3I\3I\3I\3I\5I\u03a5\nI\3")
        buf.write("J\3J\3J\3J\3J\3J\3J\3J\5J\u03af\nJ\3K\3K\3K\3K\3K\3K\3")
        buf.write("K\3K\5K\u03b9\nK\3L\3L\3L\3L\3L\5L\u03c0\nL\3M\3M\3M\7")
        buf.write("M\u03c5\nM\fM\16M\u03c8\13M\3N\3N\3N\3N\3N\3N\3N\3N\5")
        buf.write("N\u03d2\nN\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3P\5P\u03df\n")
        buf.write("P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\5R\u03ed\nR\3S\3")
        buf.write("S\3S\3S\3S\5S\u03f4\nS\3T\3T\3T\3T\3T\3T\3T\3T\5T\u03fe")
        buf.write("\nT\3U\3U\3U\7U\u0403\nU\fU\16U\u0406\13U\3V\3V\3V\3V")
        buf.write("\3W\3W\3W\3W\3W\3W\3W\3W\7W\u0414\nW\fW\16W\u0417\13W")
        buf.write("\3X\3X\5X\u041b\nX\3Y\3Y\5Y\u041f\nY\3Z\3Z\3Z\3Z\3Z\3")
        buf.write("Z\3Z\3[\3[\5[\u042a\n[\3\\\3\\\5\\\u042e\n\\\3]\3]\5]")
        buf.write("\u0432\n]\3^\3^\3^\3^\3_\3_\5_\u043a\n_\3`\3`\3`\3`\3")
        buf.write("`\3`\3`\3`\7`\u0444\n`\f`\16`\u0447\13`\3a\3a\3a\3a\3")
        buf.write("a\3a\3a\3a\7a\u0451\na\fa\16a\u0454\13a\3b\3b\3b\3b\3")
        buf.write("b\3b\3b\5b\u045d\nb\3c\3c\3c\3c\3c\3c\3c\3d\3d\3d\7d\u0469")
        buf.write("\nd\fd\16d\u046c\13d\3e\3e\3e\3e\5e\u0472\ne\3f\3f\3f")
        buf.write("\3f\3g\3g\3g\5g\u047b\ng\3h\3h\3i\3i\5i\u0481\ni\3j\3")
        buf.write("j\3k\3k\3k\3k\3l\3l\3m\3m\3m\3m\3m\3m\5m\u0491\nm\3n\3")
        buf.write("n\5n\u0495\nn\3o\3o\3p\3p\3p\3p\3p\3p\5p\u049f\np\3q\3")
        buf.write("q\3q\3q\3q\3q\5q\u04a7\nq\3r\3r\3r\7r\u04ac\nr\fr\16r")
        buf.write("\u04af\13r\3s\3s\3s\3s\3s\5s\u04b6\ns\3t\3t\3t\5t\u04bb")
        buf.write("\nt\3u\3u\3u\3u\3u\3u\3u\3u\3v\3v\3v\3v\3v\3v\3v\3v\3")
        buf.write("v\3v\3v\3v\5v\u04d1\nv\3w\3w\3w\3w\3w\5w\u04d8\nw\3x\3")
        buf.write("x\3x\3x\3x\3x\3x\3x\5x\u04e2\nx\3y\3y\3y\3y\3y\5y\u04e9")
        buf.write("\ny\3z\3z\3z\7z\u04ee\nz\fz\16z\u04f1\13z\3{\3{\3{\3{")
        buf.write("\3{\5{\u04f8\n{\3|\3|\3|\3|\3|\3|\7|\u0500\n|\f|\16|\u0503")
        buf.write("\13|\3}\3}\3}\3}\5}\u0509\n}\3~\3~\3~\5~\u050e\n~\3\177")
        buf.write("\3\177\3\u0080\3\u0080\3\u0081\3\u0081\3\u0081\3\u0081")
        buf.write("\5\u0081\u0518\n\u0081\3\u0082\3\u0082\5\u0082\u051c\n")
        buf.write("\u0082\3\u0083\3\u0083\3\u0084\3\u0084\5\u0084\u0522\n")
        buf.write("\u0084\3\u0085\3\u0085\3\u0086\3\u0086\3\u0087\3\u0087")
        buf.write("\3\u0088\3\u0088\3\u0089\3\u0089\3\u008a\3\u008a\3\u008b")
        buf.write("\3\u008b\3\u008c\3\u008c\3\u008d\3\u008d\5\u008d\u0536")
        buf.write("\n\u008d\3\u008e\3\u008e\5\u008e\u053a\n\u008e\3\u008f")
        buf.write("\3\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0092\3\u0092")
        buf.write("\3\u0093\3\u0093\3\u0094\3\u0094\3\u0095\3\u0095\3\u0096")
        buf.write("\3\u0096\3\u0097\3\u0097\3\u0098\3\u0098\5\u0098\u0550")
        buf.write("\n\u0098\3\u0099\3\u0099\3\u009a\3\u009a\3\u009a\3\u009a")
        buf.write("\3\u009a\3\u009a\3\u009a\3\u009a\5\u009a\u055c\n\u009a")
        buf.write("\3\u009b\3\u009b\3\u009b\7\u009b\u0561\n\u009b\f\u009b")
        buf.write("\16\u009b\u0564\13\u009b\3\u009c\3\u009c\5\u009c\u0568")
        buf.write("\n\u009c\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d")
        buf.write("\3\u009d\3\u009d\3\u009e\3\u009e\3\u009f\3\u009f\3\u009f")
        buf.write("\3\u009f\3\u009f\5\u009f\u0579\n\u009f\3\u00a0\3\u00a0")
        buf.write("\3\u00a0\7\u00a0\u057e\n\u00a0\f\u00a0\16\u00a0\u0581")
        buf.write("\13\u00a0\3\u00a1\3\u00a1\5\u00a1\u0585\n\u00a1\3\u00a2")
        buf.write("\3\u00a2\3\u00a2\3\u00a3\3\u00a3\3\u00a3\5\u00a3\u058d")
        buf.write("\n\u00a3\3\u00a3\3\u00a3\3\u00a4\3\u00a4\3\u00a5\3\u00a5")
        buf.write("\3\u00a5\5\u00a5\u0596\n\u00a5\3\u00a6\3\u00a6\3\u00a6")
        buf.write("\5\u00a6\u059b\n\u00a6\3\u00a6\3\u00a6\3\u00a7\3\u00a7")
        buf.write("\3\u00a7\3\u00a8\3\u00a8\3\u00a8\5\u00a8\u05a5\n\u00a8")
        buf.write("\3\u00a8\3\u00a8\3\u00a9\3\u00a9\3\u00aa\3\u00aa\3\u00aa")
        buf.write("\5\u00aa\u05ae\n\u00aa\3\u00aa\3\u00aa\3\u00ab\3\u00ab")
        buf.write("\3\u00ac\3\u00ac\3\u00ac\3\u00ad\3\u00ad\3\u00ad\3\u00ad")
        buf.write("\3\u00ad\3\u00ad\5\u00ad\u05bd\n\u00ad\3\u00ae\3\u00ae")
        buf.write("\3\u00ae\7\u00ae\u05c2\n\u00ae\f\u00ae\16\u00ae\u05c5")
        buf.write("\13\u00ae\3\u00af\3\u00af\3\u00af\5\u00af\u05ca\n\u00af")
        buf.write("\3\u00b0\3\u00b0\5\u00b0\u05ce\n\u00b0\3\u00b1\3\u00b1")
        buf.write("\3\u00b1\3\u00b1\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b3")
        buf.write("\3\u00b3\3\u00b3\3\u00b3\5\u00b3\u05dc\n\u00b3\3\u00b4")
        buf.write("\3\u00b4\3\u00b4\3\u00b4\3\u00b4\5\u00b4\u05e3\n\u00b4")
        buf.write("\3\u00b5\3\u00b5\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6")
        buf.write("\3\u00b6\3\u00b6\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7")
        buf.write("\3\u00b7\3\u00b8\3\u00b8\3\u00b8\3\u00b8\3\u00b9\3\u00b9")
        buf.write("\3\u00b9\3\u00b9\3\u00b9\3\u00b9\3\u00b9\3\u00b9\3\u00ba")
        buf.write("\3\u00ba\3\u00ba\7\u00ba\u0603\n\u00ba\f\u00ba\16\u00ba")
        buf.write("\u0606\13\u00ba\3\u00bb\3\u00bb\5\u00bb\u060a\n\u00bb")
        buf.write("\3\u00bc\3\u00bc\3\u00bc\5\u00bc\u060f\n\u00bc\3\u00bc")
        buf.write("\3\u00bc\3\u00bd\3\u00bd\3\u00bd\3\u00bd\3\u00bd\3\u00be")
        buf.write("\3\u00be\3\u00be\7\u00be\u061b\n\u00be\f\u00be\16\u00be")
        buf.write("\u061e\13\u00be\3\u00bf\3\u00bf\3\u00bf\3\u00bf\3\u00bf")
        buf.write("\3\u00bf\5\u00bf\u0626\n\u00bf\3\u00c0\3\u00c0\3\u00c0")
        buf.write("\3\u00c0\3\u00c0\3\u00c0\5\u00c0\u062e\n\u00c0\3\u00c1")
        buf.write("\3\u00c1\3\u00c1\3\u00c1\3\u00c1\3\u00c2\3\u00c2\3\u00c2")
        buf.write("\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2")
        buf.write("\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c2")
        buf.write("\3\u00c2\3\u00c2\3\u00c2\5\u00c2\u0649\n\u00c2\3\u00c3")
        buf.write("\3\u00c3\3\u00c3\3\u00c3\3\u00c3\5\u00c3\u0650\n\u00c3")
        buf.write("\3\u00c4\3\u00c4\3\u00c4\7\u00c4\u0655\n\u00c4\f\u00c4")
        buf.write("\16\u00c4\u0658\13\u00c4\3\u00c5\3\u00c5\5\u00c5\u065c")
        buf.write("\n\u00c5\3\u00c6\3\u00c6\3\u00c7\3\u00c7\3\u00c8\3\u00c8")
        buf.write("\3\u00c9\3\u00c9\3\u00ca\3\u00ca\3\u00ca\2\r&(*VXnp\u00ac")
        buf.write("\u00be\u00c0\u00f6\u00cb\2\4\6\b\n\f\16\20\22\24\26\30")
        buf.write('\32\34\36 "$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`b')
        buf.write("dfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c")
        buf.write("\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e")
        buf.write("\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0")
        buf.write("\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2")
        buf.write("\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4")
        buf.write("\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4\u00e6")
        buf.write("\u00e8\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8")
        buf.write("\u00fa\u00fc\u00fe\u0100\u0102\u0104\u0106\u0108\u010a")
        buf.write("\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c")
        buf.write("\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e")
        buf.write("\u0130\u0132\u0134\u0136\u0138\u013a\u013c\u013e\u0140")
        buf.write("\u0142\u0144\u0146\u0148\u014a\u014c\u014e\u0150\u0152")
        buf.write("\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164")
        buf.write("\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176")
        buf.write("\u0178\u017a\u017c\u017e\u0180\u0182\u0184\u0186\u0188")
        buf.write("\u018a\u018c\u018e\u0190\u0192\2\13\5\2??AACC\4\288==")
        buf.write("\7\2\67\67<<@@BBDD\4\2;;>>\3\2\60\65\3\2./\4\2::FF\3\2")
        buf.write("`a\5\2LLOORR\2\u0657\2\u0197\3\2\2\2\4\u019e\3\2\2\2\6")
        buf.write("\u01a7\3\2\2\2\b\u01a9\3\2\2\2\n\u01b4\3\2\2\2\f\u01b6")
        buf.write("\3\2\2\2\16\u01c1\3\2\2\2\20\u01cc\3\2\2\2\22\u01d7\3")
        buf.write("\2\2\2\24\u01e2\3\2\2\2\26\u01ed\3\2\2\2\30\u01f8\3\2")
        buf.write("\2\2\32\u01fd\3\2\2\2\34\u0201\3\2\2\2\36\u0207\3\2\2")
        buf.write('\2 \u020c\3\2\2\2"\u020e\3\2\2\2$\u0215\3\2\2\2&\u0217')
        buf.write("\3\2\2\2(\u0224\3\2\2\2*\u0231\3\2\2\2,\u0248\3\2\2\2")
        buf.write(".\u024a\3\2\2\2\60\u024d\3\2\2\2\62\u0253\3\2\2\2\64\u025d")
        buf.write("\3\2\2\2\66\u025f\3\2\2\28\u0263\3\2\2\2:\u026c\3\2\2")
        buf.write("\2<\u027e\3\2\2\2>\u0283\3\2\2\2@\u0285\3\2\2\2B\u028d")
        buf.write("\3\2\2\2D\u0293\3\2\2\2F\u0295\3\2\2\2H\u029e\3\2\2\2")
        buf.write("J\u02a0\3\2\2\2L\u02a7\3\2\2\2N\u02a9\3\2\2\2P\u02ab\3")
        buf.write("\2\2\2R\u02b0\3\2\2\2T\u02ba\3\2\2\2V\u02bc\3\2\2\2X\u02c9")
        buf.write("\3\2\2\2Z\u02de\3\2\2\2\\\u02ea\3\2\2\2^\u02ec\3\2\2\2")
        buf.write("`\u02f6\3\2\2\2b\u02f8\3\2\2\2d\u02fd\3\2\2\2f\u0302\3")
        buf.write("\2\2\2h\u0306\3\2\2\2j\u0308\3\2\2\2l\u030e\3\2\2\2n\u0310")
        buf.write("\3\2\2\2p\u031d\3\2\2\2r\u0333\3\2\2\2t\u0335\3\2\2\2")
        buf.write("v\u033c\3\2\2\2x\u0346\3\2\2\2z\u0348\3\2\2\2|\u0350\3")
        buf.write("\2\2\2~\u0352\3\2\2\2\u0080\u0354\3\2\2\2\u0082\u0368")
        buf.write("\3\2\2\2\u0084\u036f\3\2\2\2\u0086\u0371\3\2\2\2\u0088")
        buf.write("\u0381\3\2\2\2\u008a\u038b\3\2\2\2\u008c\u0392\3\2\2\2")
        buf.write("\u008e\u0394\3\2\2\2\u0090\u03a4\3\2\2\2\u0092\u03ae\3")
        buf.write("\2\2\2\u0094\u03b8\3\2\2\2\u0096\u03bf\3\2\2\2\u0098\u03c1")
        buf.write("\3\2\2\2\u009a\u03d1\3\2\2\2\u009c\u03d3\3\2\2\2\u009e")
        buf.write("\u03de\3\2\2\2\u00a0\u03e0\3\2\2\2\u00a2\u03ec\3\2\2\2")
        buf.write("\u00a4\u03f3\3\2\2\2\u00a6\u03fd\3\2\2\2\u00a8\u03ff\3")
        buf.write("\2\2\2\u00aa\u0407\3\2\2\2\u00ac\u040b\3\2\2\2\u00ae\u041a")
        buf.write("\3\2\2\2\u00b0\u041e\3\2\2\2\u00b2\u0420\3\2\2\2\u00b4")
        buf.write("\u0429\3\2\2\2\u00b6\u042d\3\2\2\2\u00b8\u0431\3\2\2\2")
        buf.write("\u00ba\u0433\3\2\2\2\u00bc\u0439\3\2\2\2\u00be\u043b\3")
        buf.write("\2\2\2\u00c0\u0448\3\2\2\2\u00c2\u045c\3\2\2\2\u00c4\u045e")
        buf.write("\3\2\2\2\u00c6\u0465\3\2\2\2\u00c8\u0471\3\2\2\2\u00ca")
        buf.write("\u0473\3\2\2\2\u00cc\u047a\3\2\2\2\u00ce\u047c\3\2\2\2")
        buf.write("\u00d0\u0480\3\2\2\2\u00d2\u0482\3\2\2\2\u00d4\u0484\3")
        buf.write("\2\2\2\u00d6\u0488\3\2\2\2\u00d8\u0490\3\2\2\2\u00da\u0494")
        buf.write("\3\2\2\2\u00dc\u0496\3\2\2\2\u00de\u049e\3\2\2\2\u00e0")
        buf.write("\u04a6\3\2\2\2\u00e2\u04a8\3\2\2\2\u00e4\u04b5\3\2\2\2")
        buf.write("\u00e6\u04ba\3\2\2\2\u00e8\u04bc\3\2\2\2\u00ea\u04d0\3")
        buf.write("\2\2\2\u00ec\u04d7\3\2\2\2\u00ee\u04e1\3\2\2\2\u00f0\u04e8")
        buf.write("\3\2\2\2\u00f2\u04ea\3\2\2\2\u00f4\u04f7\3\2\2\2\u00f6")
        buf.write("\u04f9\3\2\2\2\u00f8\u0508\3\2\2\2\u00fa\u050d\3\2\2\2")
        buf.write("\u00fc\u050f\3\2\2\2\u00fe\u0511\3\2\2\2\u0100\u0517\3")
        buf.write("\2\2\2\u0102\u051b\3\2\2\2\u0104\u051d\3\2\2\2\u0106\u0521")
        buf.write("\3\2\2\2\u0108\u0523\3\2\2\2\u010a\u0525\3\2\2\2\u010c")
        buf.write("\u0527\3\2\2\2\u010e\u0529\3\2\2\2\u0110\u052b\3\2\2\2")
        buf.write("\u0112\u052d\3\2\2\2\u0114\u052f\3\2\2\2\u0116\u0531\3")
        buf.write("\2\2\2\u0118\u0535\3\2\2\2\u011a\u0539\3\2\2\2\u011c\u053b")
        buf.write("\3\2\2\2\u011e\u053d\3\2\2\2\u0120\u053f\3\2\2\2\u0122")
        buf.write("\u0541\3\2\2\2\u0124\u0543\3\2\2\2\u0126\u0545\3\2\2\2")
        buf.write("\u0128\u0547\3\2\2\2\u012a\u0549\3\2\2\2\u012c\u054b\3")
        buf.write("\2\2\2\u012e\u054f\3\2\2\2\u0130\u0551\3\2\2\2\u0132\u055b")
        buf.write("\3\2\2\2\u0134\u055d\3\2\2\2\u0136\u0567\3\2\2\2\u0138")
        buf.write("\u0569\3\2\2\2\u013a\u0571\3\2\2\2\u013c\u0578\3\2\2\2")
        buf.write("\u013e\u057a\3\2\2\2\u0140\u0582\3\2\2\2\u0142\u0586\3")
        buf.write("\2\2\2\u0144\u0589\3\2\2\2\u0146\u0590\3\2\2\2\u0148\u0595")
        buf.write("\3\2\2\2\u014a\u0597\3\2\2\2\u014c\u059e\3\2\2\2\u014e")
        buf.write("\u05a1\3\2\2\2\u0150\u05a8\3\2\2\2\u0152\u05aa\3\2\2\2")
        buf.write("\u0154\u05b1\3\2\2\2\u0156\u05b3\3\2\2\2\u0158\u05bc\3")
        buf.write("\2\2\2\u015a\u05be\3\2\2\2\u015c\u05c9\3\2\2\2\u015e\u05cd")
        buf.write("\3\2\2\2\u0160\u05cf\3\2\2\2\u0162\u05d3\3\2\2\2\u0164")
        buf.write("\u05db\3\2\2\2\u0166\u05e2\3\2\2\2\u0168\u05e4\3\2\2\2")
        buf.write("\u016a\u05e6\3\2\2\2\u016c\u05ed\3\2\2\2\u016e\u05f3\3")
        buf.write("\2\2\2\u0170\u05f7\3\2\2\2\u0172\u05ff\3\2\2\2\u0174\u0609")
        buf.write("\3\2\2\2\u0176\u060b\3\2\2\2\u0178\u0612\3\2\2\2\u017a")
        buf.write("\u0617\3\2\2\2\u017c\u0625\3\2\2\2\u017e\u062d\3\2\2\2")
        buf.write("\u0180\u062f\3\2\2\2\u0182\u0648\3\2\2\2\u0184\u064f\3")
        buf.write("\2\2\2\u0186\u0651\3\2\2\2\u0188\u065b\3\2\2\2\u018a\u065d")
        buf.write("\3\2\2\2\u018c\u065f\3\2\2\2\u018e\u0661\3\2\2\2\u0190")
        buf.write("\u0663\3\2\2\2\u0192\u0665\3\2\2\2\u0194\u0196\5\4\3\2")
        buf.write("\u0195\u0194\3\2\2\2\u0196\u0199\3\2\2\2\u0197\u0195\3")
        buf.write("\2\2\2\u0197\u0198\3\2\2\2\u0198\u019a\3\2\2\2\u0199\u0197")
        buf.write("\3\2\2\2\u019a\u019b\7\2\2\3\u019b\3\3\2\2\2\u019c\u019f")
        buf.write("\5\6\4\2\u019d\u019f\5\u0176\u00bc\2\u019e\u019c\3\2\2")
        buf.write("\2\u019e\u019d\3\2\2\2\u019f\5\3\2\2\2\u01a0\u01a8\5\f")
        buf.write("\7\2\u01a1\u01a8\5\16\b\2\u01a2\u01a8\5\20\t\2\u01a3\u01a8")
        buf.write("\5\22\n\2\u01a4\u01a8\5\24\13\2\u01a5\u01a8\5\26\f\2\u01a6")
        buf.write("\u01a8\5\b\5\2\u01a7\u01a0\3\2\2\2\u01a7\u01a1\3\2\2\2")
        buf.write("\u01a7\u01a2\3\2\2\2\u01a7\u01a3\3\2\2\2\u01a7\u01a4\3")
        buf.write("\2\2\2\u01a7\u01a5\3\2\2\2\u01a7\u01a6\3\2\2\2\u01a8\7")
        buf.write("\3\2\2\2\u01a9\u01aa\7\3\2\2\u01aa\u01ab\5\u0188\u00c5")
        buf.write("\2\u01ab\u01ac\7\4\2\2\u01ac\u01ad\5\32\16\2\u01ad\u01ae")
        buf.write("\7\4\2\2\u01ae\u01b0\5\n\6\2\u01af\u01b1\5\30\r\2\u01b0")
        buf.write("\u01af\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b2\3\2\2\2")
        buf.write("\u01b2\u01b3\7\5\2\2\u01b3\t\3\2\2\2\u01b4\u01b5\5\u00b4")
        buf.write("[\2\u01b5\13\3\2\2\2\u01b6\u01b7\7\6\2\2\u01b7\u01b8\5")
        buf.write("\u0188\u00c5\2\u01b8\u01b9\7\4\2\2\u01b9\u01ba\5\32\16")
        buf.write("\2\u01ba\u01bb\7\4\2\2\u01bb\u01bd\5\34\17\2\u01bc\u01be")
        buf.write("\5\30\r\2\u01bd\u01bc\3\2\2\2\u01bd\u01be\3\2\2\2\u01be")
        buf.write("\u01bf\3\2\2\2\u01bf\u01c0\7\5\2\2\u01c0\r\3\2\2\2\u01c1")
        buf.write("\u01c2\7\7\2\2\u01c2\u01c3\5\u0188\u00c5\2\u01c3\u01c4")
        buf.write("\7\4\2\2\u01c4\u01c5\5\32\16\2\u01c5\u01c6\7\4\2\2\u01c6")
        buf.write("\u01c8\5`\61\2\u01c7\u01c9\5\30\r\2\u01c8\u01c7\3\2\2")
        buf.write("\2\u01c8\u01c9\3\2\2\2\u01c9\u01ca\3\2\2\2\u01ca\u01cb")
        buf.write("\7\5\2\2\u01cb\17\3\2\2\2\u01cc\u01cd\7\b\2\2\u01cd\u01ce")
        buf.write("\5\u0188\u00c5\2\u01ce\u01cf\7\4\2\2\u01cf\u01d0\5\32")
        buf.write("\16\2\u01d0\u01d1\7\4\2\2\u01d1\u01d3\5d\63\2\u01d2\u01d4")
        buf.write("\5\30\r\2\u01d3\u01d2\3\2\2\2\u01d3\u01d4\3\2\2\2\u01d4")
        buf.write("\u01d5\3\2\2\2\u01d5\u01d6\7\5\2\2\u01d6\21\3\2\2\2\u01d7")
        buf.write("\u01d8\7\t\2\2\u01d8\u01d9\5\u0188\u00c5\2\u01d9\u01da")
        buf.write("\7\4\2\2\u01da\u01db\5\32\16\2\u01db\u01dc\7\4\2\2\u01dc")
        buf.write("\u01de\5\u00aeX\2\u01dd\u01df\5\30\r\2\u01de\u01dd\3\2")
        buf.write("\2\2\u01de\u01df\3\2\2\2\u01df\u01e0\3\2\2\2\u01e0\u01e1")
        buf.write("\7\5\2\2\u01e1\23\3\2\2\2\u01e2\u01e3\7\n\2\2\u01e3\u01e4")
        buf.write("\5\u0188\u00c5\2\u01e4\u01e5\7\4\2\2\u01e5\u01e6\5\32")
        buf.write("\16\2\u01e6\u01e7\7\4\2\2\u01e7\u01e9\5\u00b4[\2\u01e8")
        buf.write("\u01ea\5\30\r\2\u01e9\u01e8\3\2\2\2\u01e9\u01ea\3\2\2")
        buf.write("\2\u01ea\u01eb\3\2\2\2\u01eb\u01ec\7\5\2\2\u01ec\25\3")
        buf.write("\2\2\2\u01ed\u01ee\7\13\2\2\u01ee\u01ef\5\u0188\u00c5")
        buf.write("\2\u01ef\u01f0\7\4\2\2\u01f0\u01f1\5\32\16\2\u01f1\u01f2")
        buf.write("\7\4\2\2\u01f2\u01f4\5\u00f4{\2\u01f3\u01f5\5\30\r\2\u01f4")
        buf.write("\u01f3\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5\u01f6\3\2\2\2")
        buf.write("\u01f6\u01f7\7\5\2\2\u01f7\27\3\2\2\2\u01f8\u01f9\7\4")
        buf.write("\2\2\u01f9\u01fb\5\u0132\u009a\2\u01fa\u01fc\5\u0156\u00ac")
        buf.write("\2\u01fb\u01fa\3\2\2\2\u01fb\u01fc\3\2\2\2\u01fc\31\3")
        buf.write("\2\2\2\u01fd\u01fe\7`\2\2\u01fe\33\3\2\2\2\u01ff\u0202")
        buf.write("\5\36\20\2\u0200\u0202\5Z.\2\u0201\u01ff\3\2\2\2\u0201")
        buf.write("\u0200\3\2\2\2\u0202\35\3\2\2\2\u0203\u0208\5 \21\2\u0204")
        buf.write("\u0208\5,\27\2\u0205\u0208\5F$\2\u0206\u0208\5J&\2\u0207")
        buf.write("\u0203\3\2\2\2\u0207\u0204\3\2\2\2\u0207\u0205\3\2\2\2")
        buf.write('\u0207\u0206\3\2\2\2\u0208\37\3\2\2\2\u0209\u020d\5"')
        buf.write("\22\2\u020a\u020d\5$\23\2\u020b\u020d\5R*\2\u020c\u0209")
        buf.write("\3\2\2\2\u020c\u020a\3\2\2\2\u020c\u020b\3\2\2\2\u020d")
        buf.write("!\3\2\2\2\u020e\u020f\5,\27\2\u020f\u0210\5\u0100\u0081")
        buf.write("\2\u0210\u0211\5,\27\2\u0211#\3\2\2\2\u0212\u0216\5&\24")
        buf.write("\2\u0213\u0216\5(\25\2\u0214\u0216\5*\26\2\u0215\u0212")
        buf.write("\3\2\2\2\u0215\u0213\3\2\2\2\u0215\u0214\3\2\2\2\u0216")
        buf.write("%\3\2\2\2\u0217\u0218\b\24\1\2\u0218\u0219\5,\27\2\u0219")
        buf.write("\u021a\7.\2\2\u021a\u021b\5,\27\2\u021b\u0221\3\2\2\2")
        buf.write("\u021c\u021d\f\3\2\2\u021d\u021e\7.\2\2\u021e\u0220\5")
        buf.write(",\27\2\u021f\u021c\3\2\2\2\u0220\u0223\3\2\2\2\u0221\u021f")
        buf.write("\3\2\2\2\u0221\u0222\3\2\2\2\u0222'\3\2\2\2\u0223\u0221")
        buf.write("\3\2\2\2\u0224\u0225\b\25\1\2\u0225\u0226\5,\27\2\u0226")
        buf.write("\u0227\7/\2\2\u0227\u0228\5,\27\2\u0228\u022e\3\2\2\2")
        buf.write("\u0229\u022a\f\3\2\2\u022a\u022b\7/\2\2\u022b\u022d\5")
        buf.write(",\27\2\u022c\u0229\3\2\2\2\u022d\u0230\3\2\2\2\u022e\u022c")
        buf.write("\3\2\2\2\u022e\u022f\3\2\2\2\u022f)\3\2\2\2\u0230\u022e")
        buf.write("\3\2\2\2\u0231\u0232\b\26\1\2\u0232\u0233\5,\27\2\u0233")
        buf.write("\u0234\7E\2\2\u0234\u0235\5,\27\2\u0235\u023b\3\2\2\2")
        buf.write("\u0236\u0237\f\3\2\2\u0237\u0238\7E\2\2\u0238\u023a\5")
        buf.write(",\27\2\u0239\u0236\3\2\2\2\u023a\u023d\3\2\2\2\u023b\u0239")
        buf.write("\3\2\2\2\u023b\u023c\3\2\2\2\u023c+\3\2\2\2\u023d\u023b")
        buf.write("\3\2\2\2\u023e\u0249\5.\30\2\u023f\u0249\58\35\2\u0240")
        buf.write('\u0249\5:\36\2\u0241\u0249\5@!\2\u0242\u0249\5B"\2\u0243')
        buf.write("\u0249\5\\/\2\u0244\u0245\7\f\2\2\u0245\u0246\5\36\20")
        buf.write("\2\u0246\u0247\7\r\2\2\u0247\u0249\3\2\2\2\u0248\u023e")
        buf.write("\3\2\2\2\u0248\u023f\3\2\2\2\u0248\u0240\3\2\2\2\u0248")
        buf.write("\u0241\3\2\2\2\u0248\u0242\3\2\2\2\u0248\u0243\3\2\2\2")
        buf.write("\u0248\u0244\3\2\2\2\u0249-\3\2\2\2\u024a\u024b\5\60\31")
        buf.write("\2\u024b\u024c\5,\27\2\u024c/\3\2\2\2\u024d\u024e\5\u00fa")
        buf.write("~\2\u024e\u024f\7\16\2\2\u024f\u0250\5\62\32\2\u0250\u0251")
        buf.write("\7\17\2\2\u0251\u0252\7\20\2\2\u0252\61\3\2\2\2\u0253")
        buf.write("\u0258\5\64\33\2\u0254\u0255\7\4\2\2\u0255\u0257\5\64")
        buf.write("\33\2\u0256\u0254\3\2\2\2\u0257\u025a\3\2\2\2\u0258\u0256")
        buf.write("\3\2\2\2\u0258\u0259\3\2\2\2\u0259\63\3\2\2\2\u025a\u0258")
        buf.write("\3\2\2\2\u025b\u025e\5\66\34\2\u025c\u025e\5\u0130\u0099")
        buf.write("\2\u025d\u025b\3\2\2\2\u025d\u025c\3\2\2\2\u025e\65\3")
        buf.write("\2\2\2\u025f\u0260\5\u0130\u0099\2\u0260\u0261\7\20\2")
        buf.write("\2\u0261\u0262\5L'\2\u0262\67\3\2\2\2\u0263\u0264\5\u0102")
        buf.write("\u0082\2\u0264\u0265\7\f\2\2\u0265\u0266\5\36\20\2\u0266")
        buf.write("\u0267\7\r\2\2\u02679\3\2\2\2\u0268\u026d\5<\37\2\u0269")
        buf.write("\u026d\5\u0130\u0099\2\u026a\u026d\5\u012e\u0098\2\u026b")
        buf.write("\u026d\5> \2\u026c\u0268\3\2\2\2\u026c\u0269\3\2\2\2\u026c")
        buf.write("\u026a\3\2\2\2\u026c\u026b\3\2\2\2\u026d;\3\2\2\2\u026e")
        buf.write("\u027f\5\u0118\u008d\2\u026f\u0270\5\u0124\u0093\2\u0270")
        buf.write("\u0271\7\f\2\2\u0271\u0272\5D#\2\u0272\u0273\7\r\2\2\u0273")
        buf.write("\u027f\3\2\2\2\u0274\u0275\5\u012c\u0097\2\u0275\u0276")
        buf.write("\7\f\2\2\u0276\u0277\5D#\2\u0277\u0278\7\r\2\2\u0278\u027f")
        buf.write("\3\2\2\2\u0279\u027a\5\u0128\u0095\2\u027a\u027b\7\f\2")
        buf.write("\2\u027b\u027c\5D#\2\u027c\u027d\7\r\2\2\u027d\u027f\3")
        buf.write("\2\2\2\u027e\u026e\3\2\2\2\u027e\u026f\3\2\2\2\u027e\u0274")
        buf.write("\3\2\2\2\u027e\u0279\3\2\2\2\u027f=\3\2\2\2\u0280\u0284")
        buf.write("\5\u0100\u0081\2\u0281\u0284\5\u010c\u0087\2\u0282\u0284")
        buf.write("\5\u0102\u0082\2\u0283\u0280\3\2\2\2\u0283\u0281\3\2\2")
        buf.write("\2\u0283\u0282\3\2\2\2\u0284?\3\2\2\2\u0285\u0286\7\21")
        buf.write("\2\2\u0286\u0287\5\36\20\2\u0287\u0288\7\4\2\2\u0288\u0289")
        buf.write("\5\36\20\2\u0289\u028a\7\4\2\2\u028a\u028b\5\36\20\2\u028b")
        buf.write("\u028c\7\r\2\2\u028cA\3\2\2\2\u028d\u028e\7\22\2\2\u028e")
        buf.write("\u028f\5,\27\2\u028f\u0290\7\4\2\2\u0290\u0291\5\34\17")
        buf.write("\2\u0291\u0292\7\r\2\2\u0292C\3\2\2\2\u0293\u0294\5^\60")
        buf.write("\2\u0294E\3\2\2\2\u0295\u0296\5H%\2\u0296\u0297\7\20\2")
        buf.write("\2\u0297\u0298\5L'\2\u0298G\3\2\2\2\u0299\u029f\5:\36")
        buf.write("\2\u029a\u029b\7\f\2\2\u029b\u029c\5\36\20\2\u029c\u029d")
        buf.write("\7\r\2\2\u029d\u029f\3\2\2\2\u029e\u0299\3\2\2\2\u029e")
        buf.write("\u029a\3\2\2\2\u029fI\3\2\2\2\u02a0\u02a1\5:\36\2\u02a1")
        buf.write("\u02a2\7J\2\2\u02a2\u02a3\5:\36\2\u02a3K\3\2\2\2\u02a4")
        buf.write("\u02a8\5N(\2\u02a5\u02a8\5T+\2\u02a6\u02a8\5P)\2\u02a7")
        buf.write("\u02a4\3\2\2\2\u02a7\u02a5\3\2\2\2\u02a7\u02a6\3\2\2\2")
        buf.write("\u02a8M\3\2\2\2\u02a9\u02aa\5,\27\2\u02aaO\3\2\2\2\u02ab")
        buf.write("\u02ac\5*\26\2\u02acQ\3\2\2\2\u02ad\u02b1\5T+\2\u02ae")
        buf.write("\u02b1\5V,\2\u02af\u02b1\5X-\2\u02b0\u02ad\3\2\2\2\u02b0")
        buf.write("\u02ae\3\2\2\2\u02b0\u02af\3\2\2\2\u02b1S\3\2\2\2\u02b2")
        buf.write("\u02b3\5N(\2\u02b3\u02b4\7G\2\2\u02b4\u02b5\5N(\2\u02b5")
        buf.write("\u02bb\3\2\2\2\u02b6\u02b7\5N(\2\u02b7\u02b8\7G\2\2\u02b8")
        buf.write("\u02b9\5T+\2\u02b9\u02bb\3\2\2\2\u02ba\u02b2\3\2\2\2\u02ba")
        buf.write("\u02b6\3\2\2\2\u02bbU\3\2\2\2\u02bc\u02bd\b,\1\2\u02bd")
        buf.write("\u02be\5N(\2\u02be\u02bf\7H\2\2\u02bf\u02c0\5N(\2\u02c0")
        buf.write("\u02c6\3\2\2\2\u02c1\u02c2\f\3\2\2\u02c2\u02c3\7H\2\2")
        buf.write("\u02c3\u02c5\5N(\2\u02c4\u02c1\3\2\2\2\u02c5\u02c8\3\2")
        buf.write("\2\2\u02c6\u02c4\3\2\2\2\u02c6\u02c7\3\2\2\2\u02c7W\3")
        buf.write("\2\2\2\u02c8\u02c6\3\2\2\2\u02c9\u02ca\b-\1\2\u02ca\u02cb")
        buf.write("\5N(\2\u02cb\u02cc\7I\2\2\u02cc\u02cd\5N(\2\u02cd\u02d3")
        buf.write("\3\2\2\2\u02ce\u02cf\f\3\2\2\u02cf\u02d0\7I\2\2\u02d0")
        buf.write("\u02d2\5N(\2\u02d1\u02ce\3\2\2\2\u02d2\u02d5\3\2\2\2\u02d3")
        buf.write("\u02d1\3\2\2\2\u02d3\u02d4\3\2\2\2\u02d4Y\3\2\2\2\u02d5")
        buf.write("\u02d3\3\2\2\2\u02d6\u02d7\5\\/\2\u02d7\u02d8\7K\2\2\u02d8")
        buf.write("\u02d9\5\\/\2\u02d9\u02df\3\2\2\2\u02da\u02db\7\f\2\2")
        buf.write("\u02db\u02dc\5Z.\2\u02dc\u02dd\7\r\2\2\u02dd\u02df\3\2")
        buf.write("\2\2\u02de\u02d6\3\2\2\2\u02de\u02da\3\2\2\2\u02df[\3")
        buf.write("\2\2\2\u02e0\u02eb\7\23\2\2\u02e1\u02e2\7\16\2\2\u02e2")
        buf.write("\u02e3\5^\60\2\u02e3\u02e4\7\17\2\2\u02e4\u02eb\3\2\2")
        buf.write("\2\u02e5\u02eb\7\24\2\2\u02e6\u02e7\7\25\2\2\u02e7\u02e8")
        buf.write("\5^\60\2\u02e8\u02e9\7\26\2\2\u02e9\u02eb\3\2\2\2\u02ea")
        buf.write("\u02e0\3\2\2\2\u02ea\u02e1\3\2\2\2\u02ea\u02e5\3\2\2\2")
        buf.write("\u02ea\u02e6\3\2\2\2\u02eb]\3\2\2\2\u02ec\u02f1\5\36\20")
        buf.write("\2\u02ed\u02ee\7\4\2\2\u02ee\u02f0\5\36\20\2\u02ef\u02ed")
        buf.write("\3\2\2\2\u02f0\u02f3\3\2\2\2\u02f1\u02ef\3\2\2\2\u02f1")
        buf.write("\u02f2\3\2\2\2\u02f2_\3\2\2\2\u02f3\u02f1\3\2\2\2\u02f4")
        buf.write("\u02f7\5b\62\2\u02f5\u02f7\5Z.\2\u02f6\u02f4\3\2\2\2\u02f6")
        buf.write("\u02f5\3\2\2\2\u02f7a\3\2\2\2\u02f8\u02f9\5\36\20\2\u02f9")
        buf.write("c\3\2\2\2\u02fa\u02fe\5f\64\2\u02fb\u02fe\5\u009aN\2\u02fc")
        buf.write("\u02fe\5\u0094K\2\u02fd\u02fa\3\2\2\2\u02fd\u02fb\3\2")
        buf.write("\2\2\u02fd\u02fc\3\2\2\2\u02fee\3\2\2\2\u02ff\u0303\5")
        buf.write("h\65\2\u0300\u0303\5r:\2\u0301\u0303\5\u009cO\2\u0302")
        buf.write("\u02ff\3\2\2\2\u0302\u0300\3\2\2\2\u0302\u0301\3\2\2\2")
        buf.write("\u0303g\3\2\2\2\u0304\u0307\5j\66\2\u0305\u0307\5l\67")
        buf.write("\2\u0306\u0304\3\2\2\2\u0306\u0305\3\2\2\2\u0307i\3\2")
        buf.write("\2\2\u0308\u0309\5r:\2\u0309\u030a\5\u010a\u0086\2\u030a")
        buf.write("\u030b\5r:\2\u030bk\3\2\2\2\u030c\u030f\5n8\2\u030d\u030f")
        buf.write("\5p9\2\u030e\u030c\3\2\2\2\u030e\u030d\3\2\2\2\u030fm")
        buf.write("\3\2\2\2\u0310\u0311\b8\1\2\u0311\u0312\5r:\2\u0312\u0313")
        buf.write("\7.\2\2\u0313\u0314\5r:\2\u0314\u031a\3\2\2\2\u0315\u0316")
        buf.write("\f\3\2\2\u0316\u0317\7.\2\2\u0317\u0319\5r:\2\u0318\u0315")
        buf.write("\3\2\2\2\u0319\u031c\3\2\2\2\u031a\u0318\3\2\2\2\u031a")
        buf.write("\u031b\3\2\2\2\u031bo\3\2\2\2\u031c\u031a\3\2\2\2\u031d")
        buf.write("\u031e\b9\1\2\u031e\u031f\5r:\2\u031f\u0320\7/\2\2\u0320")
        buf.write("\u0321\5r:\2\u0321\u0327\3\2\2\2\u0322\u0323\f\3\2\2\u0323")
        buf.write("\u0324\7/\2\2\u0324\u0326\5r:\2\u0325\u0322\3\2\2\2\u0326")
        buf.write("\u0329\3\2\2\2\u0327\u0325\3\2\2\2\u0327\u0328\3\2\2\2")
        buf.write("\u0328q\3\2\2\2\u0329\u0327\3\2\2\2\u032a\u0334\5t;\2")
        buf.write("\u032b\u0334\5|?\2\u032c\u0334\5~@\2\u032d\u0334\5\u0080")
        buf.write("A\2\u032e\u0334\5\u0082B\2\u032f\u0330\7\f\2\2\u0330\u0331")
        buf.write("\5f\64\2\u0331\u0332\7\r\2\2\u0332\u0334\3\2\2\2\u0333")
        buf.write("\u032a\3\2\2\2\u0333\u032b\3\2\2\2\u0333\u032c\3\2\2\2")
        buf.write("\u0333\u032d\3\2\2\2\u0333\u032e\3\2\2\2\u0333\u032f\3")
        buf.write("\2\2\2\u0334s\3\2\2\2\u0335\u0336\5\u0108\u0085\2\u0336")
        buf.write("\u0337\7\16\2\2\u0337\u0338\5v<\2\u0338\u0339\7\17\2\2")
        buf.write("\u0339\u033a\7\20\2\2\u033a\u033b\5r:\2\u033bu\3\2\2\2")
        buf.write("\u033c\u0341\5x=\2\u033d\u033e\7\4\2\2\u033e\u0340\5x")
        buf.write("=\2\u033f\u033d\3\2\2\2\u0340\u0343\3\2\2\2\u0341\u033f")
        buf.write("\3\2\2\2\u0341\u0342\3\2\2\2\u0342w\3\2\2\2\u0343\u0341")
        buf.write("\3\2\2\2\u0344\u0347\5z>\2\u0345\u0347\5\u0130\u0099\2")
        buf.write("\u0346\u0344\3\2\2\2\u0346\u0345\3\2\2\2\u0347y\3\2\2")
        buf.write("\2\u0348\u0349\5\u0130\u0099\2\u0349\u034a\7\20\2\2\u034a")
        buf.write("\u034b\5\u00a6T\2\u034b{\3\2\2\2\u034c\u034d\5\u010e\u0088")
        buf.write("\2\u034d\u034e\5r:\2\u034e\u0351\3\2\2\2\u034f\u0351\5")
        buf.write("\u00caf\2\u0350\u034c\3\2\2\2\u0350\u034f\3\2\2\2\u0351")
        buf.write("}\3\2\2\2\u0352\u0353\5\u00ccg\2\u0353\177\3\2\2\2\u0354")
        buf.write("\u0355\7\27\2\2\u0355\u0356\5f\64\2\u0356\u0357\7\4\2")
        buf.write("\2\u0357\u0358\5f\64\2\u0358\u0359\7\4\2\2\u0359\u035a")
        buf.write("\5f\64\2\u035a\u035b\7\r\2\2\u035b\u0081\3\2\2\2\u035c")
        buf.write("\u035d\7\30\2\2\u035d\u035e\5\u0084C\2\u035e\u035f\7\4")
        buf.write("\2\2\u035f\u0360\5d\63\2\u0360\u0361\7\r\2\2\u0361\u0369")
        buf.write("\3\2\2\2\u0362\u0363\7\31\2\2\u0363\u0364\5\u008cG\2\u0364")
        buf.write("\u0365\7\4\2\2\u0365\u0366\5d\63\2\u0366\u0367\7\r\2\2")
        buf.write("\u0367\u0369\3\2\2\2\u0368\u035c\3\2\2\2\u0368\u0362\3")
        buf.write("\2\2\2\u0369\u0083\3\2\2\2\u036a\u0370\5\u0088E\2\u036b")
        buf.write("\u036c\7\16\2\2\u036c\u036d\5\u0086D\2\u036d\u036e\7\17")
        buf.write("\2\2\u036e\u0370\3\2\2\2\u036f\u036a\3\2\2\2\u036f\u036b")
        buf.write("\3\2\2\2\u0370\u0085\3\2\2\2\u0371\u0376\5\u0088E\2\u0372")
        buf.write("\u0373\7\4\2\2\u0373\u0375\5\u0088E\2\u0374\u0372\3\2")
        buf.write("\2\2\u0375\u0378\3\2\2\2\u0376\u0374\3\2\2\2\u0376\u0377")
        buf.write("\3\2\2\2\u0377\u0087\3\2\2\2\u0378\u0376\3\2\2\2\u0379")
        buf.write("\u037a\7;\2\2\u037a\u037b\7\16\2\2\u037b\u037c\5v<\2\u037c")
        buf.write("\u037d\7\17\2\2\u037d\u037e\7\20\2\2\u037e\u037f\5\u0088")
        buf.write("E\2\u037f\u0382\3\2\2\2\u0380\u0382\5\u008aF\2\u0381\u0379")
        buf.write("\3\2\2\2\u0381\u0380\3\2\2\2\u0382\u0089\3\2\2\2\u0383")
        buf.write("\u0384\5\u00d8m\2\u0384\u0385\7:\2\2\u0385\u0386\5\u00e4")
        buf.write("s\2\u0386\u038c\3\2\2\2\u0387\u0388\7\f\2\2\u0388\u0389")
        buf.write("\5\u008aF\2\u0389\u038a\7\r\2\2\u038a\u038c\3\2\2\2\u038b")
        buf.write("\u0383\3\2\2\2\u038b\u0387\3\2\2\2\u038c\u008b\3\2\2\2")
        buf.write("\u038d\u0393\5\u0090I\2\u038e\u038f\7\16\2\2\u038f\u0390")
        buf.write("\5\u008eH\2\u0390\u0391\7\17\2\2\u0391\u0393\3\2\2\2\u0392")
        buf.write("\u038d\3\2\2\2\u0392\u038e\3\2\2\2\u0393\u008d\3\2\2\2")
        buf.write("\u0394\u0399\5\u0090I\2\u0395\u0396\7\4\2\2\u0396\u0398")
        buf.write("\5\u0090I\2\u0397\u0395\3\2\2\2\u0398\u039b\3\2\2\2\u0399")
        buf.write("\u0397\3\2\2\2\u0399\u039a\3\2\2\2\u039a\u008f\3\2\2\2")
        buf.write("\u039b\u0399\3\2\2\2\u039c\u039d\7;\2\2\u039d\u039e\7")
        buf.write("\16\2\2\u039e\u039f\5v<\2\u039f\u03a0\7\17\2\2\u03a0\u03a1")
        buf.write("\7\20\2\2\u03a1\u03a2\5\u0090I\2\u03a2\u03a5\3\2\2\2\u03a3")
        buf.write("\u03a5\5\u0092J\2\u03a4\u039c\3\2\2\2\u03a4\u03a3\3\2")
        buf.write("\2\2\u03a5\u0091\3\2\2\2\u03a6\u03a7\5\u00ceh\2\u03a7")
        buf.write("\u03a8\7\60\2\2\u03a8\u03a9\5r:\2\u03a9\u03af\3\2\2\2")
        buf.write("\u03aa\u03ab\7\f\2\2\u03ab\u03ac\5\u0092J\2\u03ac\u03ad")
        buf.write("\7\r\2\2\u03ad\u03af\3\2\2\2\u03ae\u03a6\3\2\2\2\u03ae")
        buf.write("\u03aa\3\2\2\2\u03af\u0093\3\2\2\2\u03b0\u03b1\5\u0096")
        buf.write("L\2\u03b1\u03b2\7K\2\2\u03b2\u03b3\5\u0096L\2\u03b3\u03b9")
        buf.write("\3\2\2\2\u03b4\u03b5\7\f\2\2\u03b5\u03b6\5\u0094K\2\u03b6")
        buf.write("\u03b7\7\r\2\2\u03b7\u03b9\3\2\2\2\u03b8\u03b0\3\2\2\2")
        buf.write("\u03b8\u03b4\3\2\2\2\u03b9\u0095\3\2\2\2\u03ba\u03c0\7")
        buf.write("\23\2\2\u03bb\u03bc\7\16\2\2\u03bc\u03bd\5\u0098M\2\u03bd")
        buf.write("\u03be\7\17\2\2\u03be\u03c0\3\2\2\2\u03bf\u03ba\3\2\2")
        buf.write("\2\u03bf\u03bb\3\2\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6")
        buf.write("\5f\64\2\u03c2\u03c3\7\4\2\2\u03c3\u03c5\5f\64\2\u03c4")
        buf.write("\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6\u03c4\3\2\2\2")
        buf.write("\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3")
        buf.write("\2\2\2\u03c9\u03ca\5\u011a\u008e\2\u03ca\u03cb\7\20\2")
        buf.write("\2\u03cb\u03cc\5\u009eP\2\u03cc\u03d2\3\2\2\2\u03cd\u03ce")
        buf.write("\7\f\2\2\u03ce\u03cf\5\u009aN\2\u03cf\u03d0\7\r\2\2\u03d0")
        buf.write("\u03d2\3\2\2\2\u03d1\u03c9\3\2\2\2\u03d1\u03cd\3\2\2\2")
        buf.write("\u03d2\u009b\3\2\2\2\u03d3\u03d4\5\u011a\u008e\2\u03d4")
        buf.write("\u03d5\7J\2\2\u03d5\u03d6\5\u0118\u008d\2\u03d6\u009d")
        buf.write("\3\2\2\2\u03d7\u03df\5\u00a6T\2\u03d8\u03df\5\u00aaV\2")
        buf.write("\u03d9\u03df\5\u00a0Q\2\u03da\u03db\7\f\2\2\u03db\u03dc")
        buf.write("\5\u009eP\2\u03dc\u03dd\7\r\2\2\u03dd\u03df\3\2\2\2\u03de")
        buf.write("\u03d7\3\2\2\2\u03de\u03d8\3\2\2\2\u03de\u03d9\3\2\2\2")
        buf.write("\u03de\u03da\3\2\2\2\u03df\u009f\3\2\2\2\u03e0\u03e1\7")
        buf.write("8\2\2\u03e1\u03e2\7\16\2\2\u03e2\u03e3\5v<\2\u03e3\u03e4")
        buf.write("\7\17\2\2\u03e4\u03e5\7\20\2\2\u03e5\u03e6\5\u00a2R\2")
        buf.write("\u03e6\u00a1\3\2\2\2\u03e7\u03ed\5\u00a6T\2\u03e8\u03e9")
        buf.write("\7\f\2\2\u03e9\u03ea\5\u00aaV\2\u03ea\u03eb\7\r\2\2\u03eb")
        buf.write("\u03ed\3\2\2\2\u03ec\u03e7\3\2\2\2\u03ec\u03e8\3\2\2\2")
        buf.write("\u03ed\u00a3\3\2\2\2\u03ee\u03f4\5\u00a6T\2\u03ef\u03f0")
        buf.write("\7\f\2\2\u03f0\u03f1\5\u00acW\2\u03f1\u03f2\7\r\2\2\u03f2")
        buf.write("\u03f4\3\2\2\2\u03f3\u03ee\3\2\2\2\u03f3\u03ef\3\2\2\2")
        buf.write("\u03f4\u00a5\3\2\2\2\u03f5\u03fe\5\u0110\u0089\2\u03f6")
        buf.write("\u03fe\5\u0114\u008b\2\u03f7\u03f8\5\u0112\u008a\2\u03f8")
        buf.write("\u03f9\7\f\2\2\u03f9\u03fa\5\u00a8U\2\u03fa\u03fb\7\r")
        buf.write("\2\2\u03fb\u03fe\3\2\2\2\u03fc\u03fe\5\u0130\u0099\2\u03fd")
        buf.write("\u03f5\3\2\2\2\u03fd\u03f6\3\2\2\2\u03fd\u03f7\3\2\2\2")
        buf.write("\u03fd\u03fc\3\2\2\2\u03fe\u00a7\3\2\2\2\u03ff\u0404\5")
        buf.write("\u00a6T\2\u0400\u0401\7\4\2\2\u0401\u0403\5\u00a6T\2\u0402")
        buf.write("\u0400\3\2\2\2\u0403\u0406\3\2\2\2\u0404\u0402\3\2\2\2")
        buf.write("\u0404\u0405\3\2\2\2\u0405\u00a9\3\2\2\2\u0406\u0404\3")
        buf.write("\2\2\2\u0407\u0408\5\u00a4S\2\u0408\u0409\7G\2\2\u0409")
        buf.write("\u040a\5\u00a6T\2\u040a\u00ab\3\2\2\2\u040b\u040c\bW\1")
        buf.write("\2\u040c\u040d\5\u00a4S\2\u040d\u040e\7H\2\2\u040e\u040f")
        buf.write("\5\u00a6T\2\u040f\u0415\3\2\2\2\u0410\u0411\f\3\2\2\u0411")
        buf.write("\u0412\7H\2\2\u0412\u0414\5\u00a6T\2\u0413\u0410\3\2\2")
        buf.write("\2\u0414\u0417\3\2\2\2\u0415\u0413\3\2\2\2\u0415\u0416")
        buf.write("\3\2\2\2\u0416\u00ad\3\2\2\2\u0417\u0415\3\2\2\2\u0418")
        buf.write("\u041b\5\u00b0Y\2\u0419\u041b\5\u009aN\2\u041a\u0418\3")
        buf.write("\2\2\2\u041a\u0419\3\2\2\2\u041b\u00af\3\2\2\2\u041c\u041f")
        buf.write("\5\u00b2Z\2\u041d\u041f\5\u00f4{\2\u041e\u041c\3\2\2\2")
        buf.write("\u041e\u041d\3\2\2\2\u041f\u00b1\3\2\2\2\u0420\u0421\7")
        buf.write(";\2\2\u0421\u0422\7\16\2\2\u0422\u0423\5v<\2\u0423\u0424")
        buf.write("\7\17\2\2\u0424\u0425\7\20\2\2\u0425\u0426\5\u00f4{\2")
        buf.write("\u0426\u00b3\3\2\2\2\u0427\u042a\5\u00b6\\\2\u0428\u042a")
        buf.write("\5\u00eex\2\u0429\u0427\3\2\2\2\u0429\u0428\3\2\2\2\u042a")
        buf.write("\u00b5\3\2\2\2\u042b\u042e\5\u00b8]\2\u042c\u042e\5\u00c2")
        buf.write("b\2\u042d\u042b\3\2\2\2\u042d\u042c\3\2\2\2\u042e\u00b7")
        buf.write("\3\2\2\2\u042f\u0432\5\u00ba^\2\u0430\u0432\5\u00bc_\2")
        buf.write("\u0431\u042f\3\2\2\2\u0431\u0430\3\2\2\2\u0432\u00b9\3")
        buf.write("\2\2\2\u0433\u0434\5\u00c2b\2\u0434\u0435\5\u010a\u0086")
        buf.write("\2\u0435\u0436\5\u00c2b\2\u0436\u00bb\3\2\2\2\u0437\u043a")
        buf.write("\5\u00be`\2\u0438\u043a\5\u00c0a\2\u0439\u0437\3\2\2\2")
        buf.write("\u0439\u0438\3\2\2\2\u043a\u00bd\3\2\2\2\u043b\u043c\b")
        buf.write("`\1\2\u043c\u043d\5\u00c2b\2\u043d\u043e\7.\2\2\u043e")
        buf.write("\u043f\5\u00c2b\2\u043f\u0445\3\2\2\2\u0440\u0441\f\3")
        buf.write("\2\2\u0441\u0442\7.\2\2\u0442\u0444\5\u00c2b\2\u0443\u0440")
        buf.write("\3\2\2\2\u0444\u0447\3\2\2\2\u0445\u0443\3\2\2\2\u0445")
        buf.write("\u0446\3\2\2\2\u0446\u00bf\3\2\2\2\u0447\u0445\3\2\2\2")
        buf.write("\u0448\u0449\ba\1\2\u0449\u044a\5\u00c2b\2\u044a\u044b")
        buf.write("\7/\2\2\u044b\u044c\5\u00c2b\2\u044c\u0452\3\2\2\2\u044d")
        buf.write("\u044e\f\3\2\2\u044e\u044f\7/\2\2\u044f\u0451\5\u00c2")
        buf.write("b\2\u0450\u044d\3\2\2\2\u0451\u0454\3\2\2\2\u0452\u0450")
        buf.write("\3\2\2\2\u0452\u0453\3\2\2\2\u0453\u00c1\3\2\2\2\u0454")
        buf.write("\u0452\3\2\2\2\u0455\u045d\5\u00c4c\2\u0456\u045d\5\u00c8")
        buf.write("e\2\u0457\u045d\5\u00ccg\2\u0458\u0459\7\f\2\2\u0459\u045a")
        buf.write("\5\u00b6\\\2\u045a\u045b\7\r\2\2\u045b\u045d\3\2\2\2\u045c")
        buf.write("\u0455\3\2\2\2\u045c\u0456\3\2\2\2\u045c\u0457\3\2\2\2")
        buf.write("\u045c\u0458\3\2\2\2\u045d\u00c3\3\2\2\2\u045e\u045f\5")
        buf.write("\u0108\u0085\2\u045f\u0460\7\16\2\2\u0460\u0461\5\u00c6")
        buf.write("d\2\u0461\u0462\7\17\2\2\u0462\u0463\7\20\2\2\u0463\u0464")
        buf.write("\5\u00c2b\2\u0464\u00c5\3\2\2\2\u0465\u046a\5\u0130\u0099")
        buf.write("\2\u0466\u0467\7\4\2\2\u0467\u0469\5\u0130\u0099\2\u0468")
        buf.write("\u0466\3\2\2\2\u0469\u046c\3\2\2\2\u046a\u0468\3\2\2\2")
        buf.write("\u046a\u046b\3\2\2\2\u046b\u00c7\3\2\2\2\u046c\u046a\3")
        buf.write("\2\2\2\u046d\u046e\5\u010e\u0088\2\u046e\u046f\5\u00c2")
        buf.write("b\2\u046f\u0472\3\2\2\2\u0470\u0472\5\u00caf\2\u0471\u046d")
        buf.write("\3\2\2\2\u0471\u0470\3\2\2\2\u0472\u00c9\3\2\2\2\u0473")
        buf.write("\u0474\5\u00e4s\2\u0474\u0475\79\2\2\u0475\u0476\5\u00e4")
        buf.write("s\2\u0476\u00cb\3\2\2\2\u0477\u047b\5\u00ceh\2\u0478\u047b")
        buf.write("\5\u00d0i\2\u0479\u047b\5\u00d6l\2\u047a\u0477\3\2\2\2")
        buf.write("\u047a\u0478\3\2\2\2\u047a\u0479\3\2\2\2\u047b\u00cd\3")
        buf.write("\2\2\2\u047c\u047d\5\u00d8m\2\u047d\u00cf\3\2\2\2\u047e")
        buf.write("\u0481\5\u00d2j\2\u047f\u0481\5\u00d4k\2\u0480\u047e\3")
        buf.write("\2\2\2\u0480\u047f\3\2\2\2\u0481\u00d1\3\2\2\2\u0482\u0483")
        buf.write("\5\u00dan\2\u0483\u00d3\3\2\2\2\u0484\u0485\5\u00e4s\2")
        buf.write("\u0485\u0486\5\u0120\u0091\2\u0486\u0487\5\u00e4s\2\u0487")
        buf.write("\u00d5\3\2\2\2\u0488\u0489\5\u00e0q\2\u0489\u00d7\3\2")
        buf.write("\2\2\u048a\u0491\5\u0122\u0092\2\u048b\u048c\5\u0124\u0093")
        buf.write("\2\u048c\u048d\7\f\2\2\u048d\u048e\5\u00e2r\2\u048e\u048f")
        buf.write("\7\r\2\2\u048f\u0491\3\2\2\2\u0490\u048a\3\2\2\2\u0490")
        buf.write("\u048b\3\2\2\2\u0491\u00d9\3\2\2\2\u0492\u0495\5\u012e")
        buf.write("\u0098\2\u0493\u0495\5\u00dco\2\u0494\u0492\3\2\2\2\u0494")
        buf.write("\u0493\3\2\2\2\u0495\u00db\3\2\2\2\u0496\u0497\5\u00de")
        buf.write("p\2\u0497\u00dd\3\2\2\2\u0498\u049f\5\u012a\u0096\2\u0499")
        buf.write("\u049a\5\u012c\u0097\2\u049a\u049b\7\f\2\2\u049b\u049c")
        buf.write("\5\u00e2r\2\u049c\u049d\7\r\2\2\u049d\u049f\3\2\2\2\u049e")
        buf.write("\u0498\3\2\2\2\u049e\u0499\3\2\2\2\u049f\u00df\3\2\2\2")
        buf.write("\u04a0\u04a7\5\u0126\u0094\2\u04a1\u04a2\5\u0128\u0095")
        buf.write("\2\u04a2\u04a3\7\f\2\2\u04a3\u04a4\5\u00e2r\2\u04a4\u04a5")
        buf.write("\7\r\2\2\u04a5\u04a7\3\2\2\2\u04a6\u04a0\3\2\2\2\u04a6")
        buf.write("\u04a1\3\2\2\2\u04a7\u00e1\3\2\2\2\u04a8\u04ad\5\u00e4")
        buf.write("s\2\u04a9\u04aa\7\4\2\2\u04aa\u04ac\5\u00e4s\2\u04ab\u04a9")
        buf.write("\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad")
        buf.write("\u04ae\3\2\2\2\u04ae\u00e3\3\2\2\2\u04af\u04ad\3\2\2\2")
        buf.write("\u04b0\u04b6\5\u00e6t\2\u04b1\u04b6\5\u0130\u0099\2\u04b2")
        buf.write("\u04b6\5\u00e8u\2\u04b3\u04b6\5\u00eav\2\u04b4\u04b6\5")
        buf.write("\u00ecw\2\u04b5\u04b0\3\2\2\2\u04b5\u04b1\3\2\2\2\u04b5")
        buf.write("\u04b2\3\2\2\2\u04b5\u04b3\3\2\2\2\u04b5\u04b4\3\2\2\2")
        buf.write("\u04b6\u00e5\3\2\2\2\u04b7\u04bb\5\u00d8m\2\u04b8\u04bb")
        buf.write("\5\u00dan\2\u04b9\u04bb\5\u00e0q\2\u04ba\u04b7\3\2\2\2")
        buf.write("\u04ba\u04b8\3\2\2\2\u04ba\u04b9\3\2\2\2\u04bb\u00e7\3")
        buf.write("\2\2\2\u04bc\u04bd\7\32\2\2\u04bd\u04be\5f\64\2\u04be")
        buf.write("\u04bf\7\4\2\2\u04bf\u04c0\5\u00e4s\2\u04c0\u04c1\7\4")
        buf.write("\2\2\u04c1\u04c2\5\u00e4s\2\u04c2\u04c3\7\r\2\2\u04c3")
        buf.write("\u00e9\3\2\2\2\u04c4\u04c5\7\33\2\2\u04c5\u04c6\5\u008c")
        buf.write("G\2\u04c6\u04c7\7\4\2\2\u04c7\u04c8\5\u00e4s\2\u04c8\u04c9")
        buf.write("\7\r\2\2\u04c9\u04d1\3\2\2\2\u04ca\u04cb\7\34\2\2\u04cb")
        buf.write("\u04cc\5\u0084C\2\u04cc\u04cd\7\4\2\2\u04cd\u04ce\5\u00e4")
        buf.write("s\2\u04ce\u04cf\7\r\2\2\u04cf\u04d1\3\2\2\2\u04d0\u04c4")
        buf.write("\3\2\2\2\u04d0\u04ca\3\2\2\2\u04d1\u00eb\3\2\2\2\u04d2")
        buf.write("\u04d8\7\24\2\2\u04d3\u04d4\7\25\2\2\u04d4\u04d5\5\u00e2")
        buf.write("r\2\u04d5\u04d6\7\26\2\2\u04d6\u04d8\3\2\2\2\u04d7\u04d2")
        buf.write("\3\2\2\2\u04d7\u04d3\3\2\2\2\u04d8\u00ed\3\2\2\2\u04d9")
        buf.write("\u04da\5\u00f0y\2\u04da\u04db\7K\2\2\u04db\u04dc\5\u00f0")
        buf.write("y\2\u04dc\u04e2\3\2\2\2\u04dd\u04de\7\f\2\2\u04de\u04df")
        buf.write("\5\u00eex\2\u04df\u04e0\7\r\2\2\u04e0\u04e2\3\2\2\2\u04e1")
        buf.write("\u04d9\3\2\2\2\u04e1\u04dd\3\2\2\2\u04e2\u00ef\3\2\2\2")
        buf.write("\u04e3\u04e9\7\23\2\2\u04e4\u04e5\7\16\2\2\u04e5\u04e6")
        buf.write("\5\u00f2z\2\u04e6\u04e7\7\17\2\2\u04e7\u04e9\3\2\2\2\u04e8")
        buf.write("\u04e3\3\2\2\2\u04e8\u04e4\3\2\2\2\u04e9\u00f1\3\2\2\2")
        buf.write("\u04ea\u04ef\5\u00b6\\\2\u04eb\u04ec\7\4\2\2\u04ec\u04ee")
        buf.write("\5\u00b6\\\2\u04ed\u04eb\3\2\2\2\u04ee\u04f1\3\2\2\2\u04ef")
        buf.write("\u04ed\3\2\2\2\u04ef\u04f0\3\2\2\2\u04f0\u00f3\3\2\2\2")
        buf.write("\u04f1\u04ef\3\2\2\2\u04f2\u04f8\5\u00f6|\2\u04f3\u04f4")
        buf.write("\7\f\2\2\u04f4\u04f5\5\u00f6|\2\u04f5\u04f6\7\r\2\2\u04f6")
        buf.write("\u04f8\3\2\2\2\u04f7\u04f2\3\2\2\2\u04f7\u04f3\3\2\2\2")
        buf.write("\u04f8\u00f5\3\2\2\2\u04f9\u04fa\b|\1\2\u04fa\u04fb\5")
        buf.write("\u00f8}\2\u04fb\u0501\3\2\2\2\u04fc\u04fd\f\3\2\2\u04fd")
        buf.write("\u04fe\7.\2\2\u04fe\u0500\5\u00f8}\2\u04ff\u04fc\3\2\2")
        buf.write("\2\u0500\u0503\3\2\2\2\u0501\u04ff\3\2\2\2\u0501\u0502")
        buf.write("\3\2\2\2\u0502\u00f7\3\2\2\2\u0503\u0501\3\2\2\2\u0504")
        buf.write("\u0509\5\u00ccg\2\u0505\u0506\7\66\2\2\u0506\u0509\5\u00cc")
        buf.write("g\2\u0507\u0509\5\u00caf\2\u0508\u0504\3\2\2\2\u0508\u0505")
        buf.write("\3\2\2\2\u0508\u0507\3\2\2\2\u0509\u00f9\3\2\2\2\u050a")
        buf.write("\u050e\5\u0108\u0085\2\u050b\u050e\5\u00fc\177\2\u050c")
        buf.write("\u050e\5\u00fe\u0080\2\u050d\u050a\3\2\2\2\u050d\u050b")
        buf.write("\3\2\2\2\u050d\u050c\3\2\2\2\u050e\u00fb\3\2\2\2\u050f")
        buf.write("\u0510\t\2\2\2\u0510\u00fd\3\2\2\2\u0511\u0512\t\3\2\2")
        buf.write("\u0512\u00ff\3\2\2\2\u0513\u0518\7:\2\2\u0514\u0518\7")
        buf.write("9\2\2\u0515\u0518\5\u010a\u0086\2\u0516\u0518\7F\2\2\u0517")
        buf.write("\u0513\3\2\2\2\u0517\u0514\3\2\2\2\u0517\u0515\3\2\2\2")
        buf.write("\u0517\u0516\3\2\2\2\u0518\u0101\3\2\2\2\u0519\u051c\5")
        buf.write("\u010e\u0088\2\u051a\u051c\5\u0104\u0083\2\u051b\u0519")
        buf.write("\3\2\2\2\u051b\u051a\3\2\2\2\u051c\u0103\3\2\2\2\u051d")
        buf.write("\u051e\t\4\2\2\u051e\u0105\3\2\2\2\u051f\u0522\5\u010a")
        buf.write("\u0086\2\u0520\u0522\7F\2\2\u0521\u051f\3\2\2\2\u0521")
        buf.write("\u0520\3\2\2\2\u0522\u0107\3\2\2\2\u0523\u0524\t\5\2\2")
        buf.write("\u0524\u0109\3\2\2\2\u0525\u0526\t\6\2\2\u0526\u010b\3")
        buf.write("\2\2\2\u0527\u0528\t\7\2\2\u0528\u010d\3\2\2\2\u0529\u052a")
        buf.write("\7\66\2\2\u052a\u010f\3\2\2\2\u052b\u052c\5\u0112\u008a")
        buf.write("\2\u052c\u0111\3\2\2\2\u052d\u052e\5\u018a\u00c6\2\u052e")
        buf.write("\u0113\3\2\2\2\u052f\u0530\7]\2\2\u0530\u0115\3\2\2\2")
        buf.write("\u0531\u0532\5\u018e\u00c8\2\u0532\u0117\3\2\2\2\u0533")
        buf.write("\u0536\5\u011a\u008e\2\u0534\u0536\5\u012a\u0096\2\u0535")
        buf.write("\u0533\3\2\2\2\u0535\u0534\3\2\2\2\u0536\u0119\3\2\2\2")
        buf.write("\u0537\u053a\5\u0122\u0092\2\u0538\u053a\5\u0126\u0094")
        buf.write("\2\u0539\u0537\3\2\2\2\u0539\u0538\3\2\2\2\u053a\u011b")
        buf.write("\3\2\2\2\u053b\u053c\7]\2\2\u053c\u011d\3\2\2\2\u053d")
        buf.write("\u053e\7]\2\2\u053e\u011f\3\2\2\2\u053f\u0540\t\b\2\2")
        buf.write("\u0540\u0121\3\2\2\2\u0541\u0542\5\u0124\u0093\2\u0542")
        buf.write("\u0123\3\2\2\2\u0543\u0544\5\u018a\u00c6\2\u0544\u0125")
        buf.write("\3\2\2\2\u0545\u0546\5\u0128\u0095\2\u0546\u0127\3\2\2")
        buf.write("\2\u0547\u0548\5\u018e\u00c8\2\u0548\u0129\3\2\2\2\u0549")
        buf.write("\u054a\5\u012c\u0097\2\u054a\u012b\3\2\2\2\u054b\u054c")
        buf.write("\5\u018c\u00c7\2\u054c\u012d\3\2\2\2\u054d\u0550\5\u0190")
        buf.write("\u00c9\2\u054e\u0550\7b\2\2\u054f\u054d\3\2\2\2\u054f")
        buf.write("\u054e\3\2\2\2\u0550\u012f\3\2\2\2\u0551\u0552\7_\2\2")
        buf.write("\u0552\u0131\3\2\2\2\u0553\u055c\5\u0136\u009c\2\u0554")
        buf.write("\u055c\5\u0144\u00a3\2\u0555\u055c\5\u0148\u00a5\2\u0556")
        buf.write("\u055c\7`\2\2\u0557\u0558\7\16\2\2\u0558\u0559\5\u0134")
        buf.write("\u009b\2\u0559\u055a\7\17\2\2\u055a\u055c\3\2\2\2\u055b")
        buf.write("\u0553\3\2\2\2\u055b\u0554\3\2\2\2\u055b\u0555\3\2\2\2")
        buf.write("\u055b\u0556\3\2\2\2\u055b\u0557\3\2\2\2\u055c\u0133\3")
        buf.write("\2\2\2\u055d\u0562\5\u0132\u009a\2\u055e\u055f\7\4\2\2")
        buf.write("\u055f\u0561\5\u0132\u009a\2\u0560\u055e\3\2\2\2\u0561")
        buf.write("\u0564\3\2\2\2\u0562\u0560\3\2\2\2\u0562\u0563\3\2\2\2")
        buf.write("\u0563\u0135\3\2\2\2\u0564\u0562\3\2\2\2\u0565\u0568\5")
        buf.write("\u0188\u00c5\2\u0566\u0568\5\u0138\u009d\2\u0567\u0565")
        buf.write("\3\2\2\2\u0567\u0566\3\2\2\2\u0568\u0137\3\2\2\2\u0569")
        buf.write("\u056a\7\35\2\2\u056a\u056b\5\u013a\u009e\2\u056b\u056c")
        buf.write("\7\4\2\2\u056c\u056d\5\u0158\u00ad\2\u056d\u056e\7\4\2")
        buf.write("\2\u056e\u056f\5\u013c\u009f\2\u056f\u0570\7\r\2\2\u0570")
        buf.write("\u0139\3\2\2\2\u0571\u0572\5\u018a\u00c6\2\u0572\u013b")
        buf.write("\3\2\2\2\u0573\u0579\7\23\2\2\u0574\u0575\7\16\2\2\u0575")
        buf.write("\u0576\5\u013e\u00a0\2\u0576\u0577\7\17\2\2\u0577\u0579")
        buf.write("\3\2\2\2\u0578\u0573\3\2\2\2\u0578\u0574\3\2\2\2\u0579")
        buf.write("\u013d\3\2\2\2\u057a\u057f\5\u0140\u00a1\2\u057b\u057c")
        buf.write("\7\4\2\2\u057c\u057e\5\u0140\u00a1\2\u057d\u057b\3\2\2")
        buf.write("\2\u057e\u0581\3\2\2\2\u057f\u057d\3\2\2\2\u057f\u0580")
        buf.write("\3\2\2\2\u0580\u013f\3\2\2\2\u0581\u057f\3\2\2\2\u0582")
        buf.write("\u0584\5\u0132\u009a\2\u0583\u0585\5\u0142\u00a2\2\u0584")
        buf.write("\u0583\3\2\2\2\u0584\u0585\3\2\2\2\u0585\u0141\3\2\2\2")
        buf.write("\u0586\u0587\7\20\2\2\u0587\u0588\5\u0184\u00c3\2\u0588")
        buf.write("\u0143\3\2\2\2\u0589\u058a\7\36\2\2\u058a\u058c\5\u0146")
        buf.write("\u00a4\2\u058b\u058d\5\u0156\u00ac\2\u058c\u058b\3\2\2")
        buf.write("\2\u058c\u058d\3\2\2\2\u058d\u058e\3\2\2\2\u058e\u058f")
        buf.write("\7\r\2\2\u058f\u0145\3\2\2\2\u0590\u0591\7`\2\2\u0591")
        buf.write("\u0147\3\2\2\2\u0592\u0596\5\u014a\u00a6\2\u0593\u0596")
        buf.write("\5\u014e\u00a8\2\u0594\u0596\5\u0152\u00aa\2\u0595\u0592")
        buf.write("\3\2\2\2\u0595\u0593\3\2\2\2\u0595\u0594\3\2\2\2\u0596")
        buf.write("\u0149\3\2\2\2\u0597\u0598\7\37\2\2\u0598\u059a\5\u0192")
        buf.write("\u00ca\2\u0599\u059b\5\u014c\u00a7\2\u059a\u0599\3\2\2")
        buf.write("\2\u059a\u059b\3\2\2\2\u059b\u059c\3\2\2\2\u059c\u059d")
        buf.write("\7\r\2\2\u059d\u014b\3\2\2\2\u059e\u059f\7\4\2\2\u059f")
        buf.write("\u05a0\5\u0188\u00c5\2\u05a0\u014d\3\2\2\2\u05a1\u05a2")
        buf.write("\7 \2\2\u05a2\u05a4\5\u0150\u00a9\2\u05a3\u05a5\5\u0156")
        buf.write("\u00ac\2\u05a4\u05a3\3\2\2\2\u05a4\u05a5\3\2\2\2\u05a5")
        buf.write("\u05a6\3\2\2\2\u05a6\u05a7\7\r\2\2\u05a7\u014f\3\2\2\2")
        buf.write("\u05a8\u05a9\7`\2\2\u05a9\u0151\3\2\2\2\u05aa\u05ab\7")
        buf.write("!\2\2\u05ab\u05ad\5\u0154\u00ab\2\u05ac\u05ae\5\u0156")
        buf.write("\u00ac\2\u05ad\u05ac\3\2\2\2\u05ad\u05ae\3\2\2\2\u05ae")
        buf.write("\u05af\3\2\2\2\u05af\u05b0\7\r\2\2\u05b0\u0153\3\2\2\2")
        buf.write("\u05b1\u05b2\5\u018a\u00c6\2\u05b2\u0155\3\2\2\2\u05b3")
        buf.write("\u05b4\7\4\2\2\u05b4\u05b5\5\u0158\u00ad\2\u05b5\u0157")
        buf.write("\3\2\2\2\u05b6\u05bd\7\23\2\2\u05b7\u05b8\7\16\2\2\u05b8")
        buf.write("\u05b9\5\u015a\u00ae\2\u05b9\u05ba\7\17\2\2\u05ba\u05bd")
        buf.write("\3\2\2\2\u05bb\u05bd\5\u0184\u00c3\2\u05bc\u05b6\3\2\2")
        buf.write("\2\u05bc\u05b7\3\2\2\2\u05bc\u05bb\3\2\2\2\u05bd\u0159")
        buf.write("\3\2\2\2\u05be\u05c3\5\u015c\u00af\2\u05bf\u05c0\7\4\2")
        buf.write("\2\u05c0\u05c2\5\u015c\u00af\2\u05c1\u05bf\3\2\2\2\u05c2")
        buf.write("\u05c5\3\2\2\2\u05c3\u05c1\3\2\2\2\u05c3\u05c4\3\2\2\2")
        buf.write("\u05c4\u015b\3\2\2\2\u05c5\u05c3\3\2\2\2\u05c6\u05ca\5")
        buf.write("\u015e\u00b0\2\u05c7\u05ca\5\u0164\u00b3\2\u05c8\u05ca")
        buf.write("\5\u0180\u00c1\2\u05c9\u05c6\3\2\2\2\u05c9\u05c7\3\2\2")
        buf.write("\2\u05c9\u05c8\3\2\2\2\u05ca\u015d\3\2\2\2\u05cb\u05ce")
        buf.write("\5\u0160\u00b1\2\u05cc\u05ce\5\u0162\u00b2\2\u05cd\u05cb")
        buf.write("\3\2\2\2\u05cd\u05cc\3\2\2\2\u05ce\u015f\3\2\2\2\u05cf")
        buf.write('\u05d0\7"\2\2\u05d0\u05d1\5\u018a\u00c6\2\u05d1\u05d2')
        buf.write("\7\r\2\2\u05d2\u0161\3\2\2\2\u05d3\u05d4\7#\2\2\u05d4")
        buf.write("\u05d5\5\u018a\u00c6\2\u05d5\u05d6\7\r\2\2\u05d6\u0163")
        buf.write("\3\2\2\2\u05d7\u05dc\5\u0166\u00b4\2\u05d8\u05dc\5\u016c")
        buf.write("\u00b7\2\u05d9\u05dc\5\u0170\u00b9\2\u05da\u05dc\5\u016e")
        buf.write("\u00b8\2\u05db\u05d7\3\2\2\2\u05db\u05d8\3\2\2\2\u05db")
        buf.write("\u05d9\3\2\2\2\u05db\u05da\3\2\2\2\u05dc\u0165\3\2\2\2")
        buf.write("\u05dd\u05de\7$\2\2\u05de\u05df\5\u0168\u00b5\2\u05df")
        buf.write("\u05e0\7\r\2\2\u05e0\u05e3\3\2\2\2\u05e1\u05e3\5\u016a")
        buf.write("\u00b6\2\u05e2\u05dd\3\2\2\2\u05e2\u05e1\3\2\2\2\u05e3")
        buf.write("\u0167\3\2\2\2\u05e4\u05e5\7`\2\2\u05e5\u0169\3\2\2\2")
        buf.write("\u05e6\u05e7\5\u013a\u009e\2\u05e7\u05e8\7\f\2\2\u05e8")
        buf.write("\u05e9\5\u018a\u00c6\2\u05e9\u05ea\7\4\2\2\u05ea\u05eb")
        buf.write("\5\u0184\u00c3\2\u05eb\u05ec\7\r\2\2\u05ec\u016b\3\2\2")
        buf.write("\2\u05ed\u05ee\7%\2\2\u05ee\u05ef\7\16\2\2\u05ef\u05f0")
        buf.write("\5\u017a\u00be\2\u05f0\u05f1\7\17\2\2\u05f1\u05f2\7\r")
        buf.write("\2\2\u05f2\u016d\3\2\2\2\u05f3\u05f4\7&\2\2\u05f4\u05f5")
        buf.write("\5\u014a\u00a6\2\u05f5\u05f6\7\r\2\2\u05f6\u016f\3\2\2")
        buf.write("\2\u05f7\u05f8\7'\2\2\u05f8\u05f9\5\u018a\u00c6\2\u05f9")
        buf.write("\u05fa\7\4\2\2\u05fa\u05fb\7\16\2\2\u05fb\u05fc\5\u0172")
        buf.write("\u00ba\2\u05fc\u05fd\7\17\2\2\u05fd\u05fe\7\r\2\2\u05fe")
        buf.write("\u0171\3\2\2\2\u05ff\u0604\5\u0174\u00bb\2\u0600\u0601")
        buf.write("\7\4\2\2\u0601\u0603\5\u0174\u00bb\2\u0602\u0600\3\2\2")
        buf.write("\2\u0603\u0606\3\2\2\2\u0604\u0602\3\2\2\2\u0604\u0605")
        buf.write("\3\2\2\2\u0605\u0173\3\2\2\2\u0606\u0604\3\2\2\2\u0607")
        buf.write("\u060a\5\u0124\u0093\2\u0608\u060a\5\u0130\u0099\2\u0609")
        buf.write("\u0607\3\2\2\2\u0609\u0608\3\2\2\2\u060a\u0175\3\2\2\2")
        buf.write("\u060b\u060c\7(\2\2\u060c\u060e\5\u0192\u00ca\2\u060d")
        buf.write("\u060f\5\u0178\u00bd\2\u060e\u060d\3\2\2\2\u060e\u060f")
        buf.write("\3\2\2\2\u060f\u0610\3\2\2\2\u0610\u0611\7\5\2\2\u0611")
        buf.write("\u0177\3\2\2\2\u0612\u0613\7\4\2\2\u0613\u0614\7\16\2")
        buf.write("\2\u0614\u0615\5\u017a\u00be\2\u0615\u0616\7\17\2\2\u0616")
        buf.write("\u0179\3\2\2\2\u0617\u061c\5\u0188\u00c5\2\u0618\u0619")
        buf.write("\7\4\2\2\u0619\u061b\5\u0188\u00c5\2\u061a\u0618\3\2\2")
        buf.write("\2\u061b\u061e\3\2\2\2\u061c\u061a\3\2\2\2\u061c\u061d")
        buf.write("\3\2\2\2\u061d\u017b\3\2\2\2\u061e\u061c\3\2\2\2\u061f")
        buf.write("\u0626\5\u017e\u00c0\2\u0620\u0621\5\u017e\u00c0\2\u0621")
        buf.write("\u0622\7\20\2\2\u0622\u0623\5\u017c\u00bf\2\u0623\u0626")
        buf.write("\3\2\2\2\u0624\u0626\5\u0184\u00c3\2\u0625\u061f\3\2\2")
        buf.write("\2\u0625\u0620\3\2\2\2\u0625\u0624\3\2\2\2\u0626\u017d")
        buf.write("\3\2\2\2\u0627\u062e\5\u018a\u00c6\2\u0628\u062e\5\u0180")
        buf.write("\u00c1\2\u0629\u062e\5\u0130\u0099\2\u062a\u062e\5\u0190")
        buf.write("\u00c9\2\u062b\u062e\7b\2\2\u062c\u062e\5\u0182\u00c2")
        buf.write("\2\u062d\u0627\3\2\2\2\u062d\u0628\3\2\2\2\u062d\u0629")
        buf.write("\3\2\2\2\u062d\u062a\3\2\2\2\u062d\u062b\3\2\2\2\u062d")
        buf.write("\u062c\3\2\2\2\u062e\u017f\3\2\2\2\u062f\u0630\5\u018a")
        buf.write("\u00c6\2\u0630\u0631\7\f\2\2\u0631\u0632\5\u0186\u00c4")
        buf.write("\2\u0632\u0633\7\r\2\2\u0633\u0181\3\2\2\2\u0634\u0635")
        buf.write("\7)\2\2\u0635\u0636\5\34\17\2\u0636\u0637\7\r\2\2\u0637")
        buf.write("\u0649\3\2\2\2\u0638\u0639\7*\2\2\u0639\u063a\5d\63\2")
        buf.write("\u063a\u063b\7\r\2\2\u063b\u0649\3\2\2\2\u063c\u063d\7")
        buf.write("+\2\2\u063d\u063e\5\u00b4[\2\u063e\u063f\7\r\2\2\u063f")
        buf.write("\u0649\3\2\2\2\u0640\u0641\7,\2\2\u0641\u0642\5\u00f4")
        buf.write("{\2\u0642\u0643\7\r\2\2\u0643\u0649\3\2\2\2\u0644\u0645")
        buf.write("\7-\2\2\u0645\u0646\5\u00e4s\2\u0646\u0647\7\r\2\2\u0647")
        buf.write("\u0649\3\2\2\2\u0648\u0634\3\2\2\2\u0648\u0638\3\2\2\2")
        buf.write("\u0648\u063c\3\2\2\2\u0648\u0640\3\2\2\2\u0648\u0644\3")
        buf.write("\2\2\2\u0649\u0183\3\2\2\2\u064a\u0650\7\23\2\2\u064b")
        buf.write("\u064c\7\16\2\2\u064c\u064d\5\u0186\u00c4\2\u064d\u064e")
        buf.write("\7\17\2\2\u064e\u0650\3\2\2\2\u064f\u064a\3\2\2\2\u064f")
        buf.write("\u064b\3\2\2\2\u0650\u0185\3\2\2\2\u0651\u0656\5\u017c")
        buf.write("\u00bf\2\u0652\u0653\7\4\2\2\u0653\u0655\5\u017c\u00bf")
        buf.write("\2\u0654\u0652\3\2\2\2\u0655\u0658\3\2\2\2\u0656\u0654")
        buf.write("\3\2\2\2\u0656\u0657\3\2\2\2\u0657\u0187\3\2\2\2\u0658")
        buf.write("\u0656\3\2\2\2\u0659\u065c\5\u018a\u00c6\2\u065a\u065c")
        buf.write("\7R\2\2\u065b\u0659\3\2\2\2\u065b\u065a\3\2\2\2\u065c")
        buf.write("\u0189\3\2\2\2\u065d\u065e\t\t\2\2\u065e\u018b\3\2\2\2")
        buf.write("\u065f\u0660\7]\2\2\u0660\u018d\3\2\2\2\u0661\u0662\7")
        buf.write("^\2\2\u0662\u018f\3\2\2\2\u0663\u0664\t\n\2\2\u0664\u0191")
        buf.write("\3\2\2\2\u0665\u0666\7a\2\2\u0666\u0193\3\2\2\2\177\u0197")
        buf.write("\u019e\u01a7\u01b0\u01bd\u01c8\u01d3\u01de\u01e9\u01f4")
        buf.write("\u01fb\u0201\u0207\u020c\u0215\u0221\u022e\u023b\u0248")
        buf.write("\u0258\u025d\u026c\u027e\u0283\u029e\u02a7\u02b0\u02ba")
        buf.write("\u02c6\u02d3\u02de\u02ea\u02f1\u02f6\u02fd\u0302\u0306")
        buf.write("\u030e\u031a\u0327\u0333\u0341\u0346\u0350\u0368\u036f")
        buf.write("\u0376\u0381\u038b\u0392\u0399\u03a4\u03ae\u03b8\u03bf")
        buf.write("\u03c6\u03d1\u03de\u03ec\u03f3\u03fd\u0404\u0415\u041a")
        buf.write("\u041e\u0429\u042d\u0431\u0439\u0445\u0452\u045c\u046a")
        buf.write("\u0471\u047a\u0480\u0490\u0494\u049e\u04a6\u04ad\u04b5")
        buf.write("\u04ba\u04d0\u04d7\u04e1\u04e8\u04ef\u04f7\u0501\u0508")
        buf.write("\u050d\u0517\u051b\u0521\u0535\u0539\u054f\u055b\u0562")
        buf.write("\u0567\u0578\u057f\u0584\u058c\u0595\u059a\u05a4\u05ad")
        buf.write("\u05bc\u05c3\u05c9\u05cd\u05db\u05e2\u0604\u0609\u060e")
        buf.write("\u061c\u0625\u062d\u0648\u064f\u0656\u065b")
        return buf.getvalue()


class tptp_v7_0_0_0Parser(Parser):

    grammarFileName = "tptp_v7_0_0_0.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)]

    sharedContextCache = PredictionContextCache()

    literalNames = [
        "<INVALID>",
        "'tpi('",
        "','",
        "').'",
        "'thf('",
        "'tfx('",
        "'tff('",
        "'tcf('",
        "'fof('",
        "'cnf('",
        "'('",
        "')'",
        "'['",
        "']'",
        "':'",
        "'$ite('",
        "'$let('",
        "'[]'",
        "'{}'",
        "'{'",
        "'}'",
        "'$ite_f('",
        "'$let_tf('",
        "'$let_ff('",
        "'$ite_t('",
        "'$let_ft('",
        "'$let_tt('",
        "'inference('",
        "'introduced('",
        "'file('",
        "'theory('",
        "'creator('",
        "'description('",
        "'iquote('",
        "'status('",
        "'assumptions('",
        "'refutation('",
        "'new_symbols('",
        "'include('",
        "'$thf('",
        "'$tff('",
        "'$fof('",
        "'$cnf('",
        "'$fot('",
        "'|'",
        "'&'",
        "'<=>'",
        "'=>'",
        "'<='",
        "'<~>'",
        "'~|'",
        "'~&'",
        "'~'",
        "'!!'",
        "'!>'",
        "'!='",
        "'='",
        "'!'",
        "'??'",
        "'?*'",
        "'?'",
        "'^'",
        "'@@+'",
        "'@+'",
        "'@@-'",
        "'@-'",
        "'@='",
        "'@'",
        "':='",
        "'>'",
        "'*'",
        "'+'",
        "'<<'",
        "'-->'",
    ]

    symbolicNames = [
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "Or",
        "And",
        "Iff",
        "Impl",
        "If",
        "Niff",
        "Nor",
        "Nand",
        "Not",
        "ForallComb",
        "TyForall",
        "Infix_inequality",
        "Infix_equality",
        "Forall",
        "ExistsComb",
        "TyExists",
        "Exists",
        "Lambda",
        "ChoiceComb",
        "Choice",
        "DescriptionComb",
        "Description",
        "EqComb",
        "App",
        "Assignment",
        "Arrow",
        "Star",
        "Plus",
        "Subtype_sign",
        "Gentzen_arrow",
        "Real",
        "Signed_real",
        "Unsigned_real",
        "Rational",
        "Signed_rational",
        "Unsigned_rational",
        "Integer",
        "Signed_integer",
        "Unsigned_integer",
        "Decimal",
        "Positive_decimal",
        "Decimal_exponent",
        "Decimal_fraction",
        "Dot_decimal",
        "Exp_integer",
        "Signed_exp_integer",
        "Unsigned_exp_integer",
        "Dollar_word",
        "Dollar_dollar_word",
        "Upper_word",
        "Lower_word",
        "Single_quoted",
        "Distinct_object",
        "WS",
        "Line_comment",
        "Block_comment",
    ]

    RULE_tptp_file = 0
    RULE_tptp_input = 1
    RULE_annotated_formula = 2
    RULE_tpi_annotated = 3
    RULE_tpi_formula = 4
    RULE_thf_annotated = 5
    RULE_tfx_annotated = 6
    RULE_tff_annotated = 7
    RULE_tcf_annotated = 8
    RULE_fof_annotated = 9
    RULE_cnf_annotated = 10
    RULE_annotations = 11
    RULE_formula_role = 12
    RULE_thf_formula = 13
    RULE_thf_logic_formula = 14
    RULE_thf_binary_formula = 15
    RULE_thf_binary_pair = 16
    RULE_thf_binary_tuple = 17
    RULE_thf_or_formula = 18
    RULE_thf_and_formula = 19
    RULE_thf_apply_formula = 20
    RULE_thf_unitary_formula = 21
    RULE_thf_quantified_formula = 22
    RULE_thf_quantification = 23
    RULE_thf_variable_list = 24
    RULE_thf_variable = 25
    RULE_thf_typed_variable = 26
    RULE_thf_unary_formula = 27
    RULE_thf_atom = 28
    RULE_thf_function = 29
    RULE_thf_conn_term = 30
    RULE_thf_conditional = 31
    RULE_thf_let = 32
    RULE_thf_arguments = 33
    RULE_thf_type_formula = 34
    RULE_thf_typeable_formula = 35
    RULE_thf_subtype = 36
    RULE_thf_top_level_type = 37
    RULE_thf_unitary_type = 38
    RULE_thf_apply_type = 39
    RULE_thf_binary_type = 40
    RULE_thf_mapping_type = 41
    RULE_thf_xprod_type = 42
    RULE_thf_union_type = 43
    RULE_thf_sequent = 44
    RULE_thf_tuple = 45
    RULE_thf_formula_list = 46
    RULE_tfx_formula = 47
    RULE_tfx_logic_formula = 48
    RULE_tff_formula = 49
    RULE_tff_logic_formula = 50
    RULE_tff_binary_formula = 51
    RULE_tff_binary_nonassoc = 52
    RULE_tff_binary_assoc = 53
    RULE_tff_or_formula = 54
    RULE_tff_and_formula = 55
    RULE_tff_unitary_formula = 56
    RULE_tff_quantified_formula = 57
    RULE_tff_variable_list = 58
    RULE_tff_variable = 59
    RULE_tff_typed_variable = 60
    RULE_tff_unary_formula = 61
    RULE_tff_atomic_formula = 62
    RULE_tff_conditional = 63
    RULE_tff_let = 64
    RULE_tff_let_term_defns = 65
    RULE_tff_let_term_list = 66
    RULE_tff_let_term_defn = 67
    RULE_tff_let_term_binding = 68
    RULE_tff_let_formula_defns = 69
    RULE_tff_let_formula_list = 70
    RULE_tff_let_formula_defn = 71
    RULE_tff_let_formula_binding = 72
    RULE_tff_sequent = 73
    RULE_tff_formula_tuple = 74
    RULE_tff_formula_tuple_list = 75
    RULE_tff_typed_atom = 76
    RULE_tff_subtype = 77
    RULE_tff_top_level_type = 78
    RULE_tf1_quantified_type = 79
    RULE_tff_monotype = 80
    RULE_tff_unitary_type = 81
    RULE_tff_atomic_type = 82
    RULE_tff_type_arguments = 83
    RULE_tff_mapping_type = 84
    RULE_tff_xprod_type = 85
    RULE_tcf_formula = 86
    RULE_tcf_logic_formula = 87
    RULE_tcf_quantified_formula = 88
    RULE_fof_formula = 89
    RULE_fof_logic_formula = 90
    RULE_fof_binary_formula = 91
    RULE_fof_binary_nonassoc = 92
    RULE_fof_binary_assoc = 93
    RULE_fof_or_formula = 94
    RULE_fof_and_formula = 95
    RULE_fof_unitary_formula = 96
    RULE_fof_quantified_formula = 97
    RULE_fof_variable_list = 98
    RULE_fof_unary_formula = 99
    RULE_fof_infix_unary = 100
    RULE_fof_atomic_formula = 101
    RULE_fof_plain_atomic_formula = 102
    RULE_fof_defined_atomic_formula = 103
    RULE_fof_defined_plain_formula = 104
    RULE_fof_defined_infix_formula = 105
    RULE_fof_system_atomic_formula = 106
    RULE_fof_plain_term = 107
    RULE_fof_defined_term = 108
    RULE_fof_defined_atomic_term = 109
    RULE_fof_defined_plain_term = 110
    RULE_fof_system_term = 111
    RULE_fof_arguments = 112
    RULE_fof_term = 113
    RULE_fof_function_term = 114
    RULE_tff_conditional_term = 115
    RULE_tff_let_term = 116
    RULE_tff_tuple_term = 117
    RULE_fof_sequent = 118
    RULE_fof_formula_tuple = 119
    RULE_fof_formula_tuple_list = 120
    RULE_cnf_formula = 121
    RULE_cnf_disjunction = 122
    RULE_cnf_literal = 123
    RULE_thf_quantifier = 124
    RULE_th0_quantifier = 125
    RULE_th1_quantifier = 126
    RULE_thf_pair_connective = 127
    RULE_thf_unary_connective = 128
    RULE_th1_unary_connective = 129
    RULE_tff_pair_connective = 130
    RULE_fof_quantifier = 131
    RULE_binary_connective = 132
    RULE_assoc_connective = 133
    RULE_unary_connective = 134
    RULE_type_constant = 135
    RULE_type_functor = 136
    RULE_defined_type = 137
    RULE_system_type = 138
    RULE_atom = 139
    RULE_untyped_atom = 140
    RULE_defined_proposition = 141
    RULE_defined_predicate = 142
    RULE_defined_infix_pred = 143
    RULE_constant = 144
    RULE_functor = 145
    RULE_system_constant = 146
    RULE_system_functor = 147
    RULE_defined_constant = 148
    RULE_defined_functor = 149
    RULE_defined_term = 150
    RULE_variable = 151
    RULE_source = 152
    RULE_sources = 153
    RULE_dag_source = 154
    RULE_inference_record = 155
    RULE_inference_rule = 156
    RULE_inference_parents = 157
    RULE_parent_list = 158
    RULE_parent_info = 159
    RULE_parent_details = 160
    RULE_internal_source = 161
    RULE_intro_type = 162
    RULE_external_source = 163
    RULE_file_source = 164
    RULE_file_info = 165
    RULE_theory = 166
    RULE_theory_name = 167
    RULE_creator_source = 168
    RULE_creator_name = 169
    RULE_optional_info = 170
    RULE_useful_info = 171
    RULE_info_items = 172
    RULE_info_item = 173
    RULE_formula_item = 174
    RULE_description_item = 175
    RULE_iquote_item = 176
    RULE_inference_item = 177
    RULE_inference_status = 178
    RULE_status_value = 179
    RULE_inference_info = 180
    RULE_assumptions_record = 181
    RULE_refutation = 182
    RULE_new_symbol_record = 183
    RULE_new_symbol_list = 184
    RULE_principal_symbol = 185
    RULE_include = 186
    RULE_formula_selection = 187
    RULE_name_list = 188
    RULE_general_term = 189
    RULE_general_data = 190
    RULE_general_function = 191
    RULE_formula_data = 192
    RULE_general_list = 193
    RULE_general_terms = 194
    RULE_name = 195
    RULE_atomic_word = 196
    RULE_atomic_defined_word = 197
    RULE_atomic_system_word = 198
    RULE_number = 199
    RULE_file_name = 200

    ruleNames = [
        "tptp_file",
        "tptp_input",
        "annotated_formula",
        "tpi_annotated",
        "tpi_formula",
        "thf_annotated",
        "tfx_annotated",
        "tff_annotated",
        "tcf_annotated",
        "fof_annotated",
        "cnf_annotated",
        "annotations",
        "formula_role",
        "thf_formula",
        "thf_logic_formula",
        "thf_binary_formula",
        "thf_binary_pair",
        "thf_binary_tuple",
        "thf_or_formula",
        "thf_and_formula",
        "thf_apply_formula",
        "thf_unitary_formula",
        "thf_quantified_formula",
        "thf_quantification",
        "thf_variable_list",
        "thf_variable",
        "thf_typed_variable",
        "thf_unary_formula",
        "thf_atom",
        "thf_function",
        "thf_conn_term",
        "thf_conditional",
        "thf_let",
        "thf_arguments",
        "thf_type_formula",
        "thf_typeable_formula",
        "thf_subtype",
        "thf_top_level_type",
        "thf_unitary_type",
        "thf_apply_type",
        "thf_binary_type",
        "thf_mapping_type",
        "thf_xprod_type",
        "thf_union_type",
        "thf_sequent",
        "thf_tuple",
        "thf_formula_list",
        "tfx_formula",
        "tfx_logic_formula",
        "tff_formula",
        "tff_logic_formula",
        "tff_binary_formula",
        "tff_binary_nonassoc",
        "tff_binary_assoc",
        "tff_or_formula",
        "tff_and_formula",
        "tff_unitary_formula",
        "tff_quantified_formula",
        "tff_variable_list",
        "tff_variable",
        "tff_typed_variable",
        "tff_unary_formula",
        "tff_atomic_formula",
        "tff_conditional",
        "tff_let",
        "tff_let_term_defns",
        "tff_let_term_list",
        "tff_let_term_defn",
        "tff_let_term_binding",
        "tff_let_formula_defns",
        "tff_let_formula_list",
        "tff_let_formula_defn",
        "tff_let_formula_binding",
        "tff_sequent",
        "tff_formula_tuple",
        "tff_formula_tuple_list",
        "tff_typed_atom",
        "tff_subtype",
        "tff_top_level_type",
        "tf1_quantified_type",
        "tff_monotype",
        "tff_unitary_type",
        "tff_atomic_type",
        "tff_type_arguments",
        "tff_mapping_type",
        "tff_xprod_type",
        "tcf_formula",
        "tcf_logic_formula",
        "tcf_quantified_formula",
        "fof_formula",
        "fof_logic_formula",
        "fof_binary_formula",
        "fof_binary_nonassoc",
        "fof_binary_assoc",
        "fof_or_formula",
        "fof_and_formula",
        "fof_unitary_formula",
        "fof_quantified_formula",
        "fof_variable_list",
        "fof_unary_formula",
        "fof_infix_unary",
        "fof_atomic_formula",
        "fof_plain_atomic_formula",
        "fof_defined_atomic_formula",
        "fof_defined_plain_formula",
        "fof_defined_infix_formula",
        "fof_system_atomic_formula",
        "fof_plain_term",
        "fof_defined_term",
        "fof_defined_atomic_term",
        "fof_defined_plain_term",
        "fof_system_term",
        "fof_arguments",
        "fof_term",
        "fof_function_term",
        "tff_conditional_term",
        "tff_let_term",
        "tff_tuple_term",
        "fof_sequent",
        "fof_formula_tuple",
        "fof_formula_tuple_list",
        "cnf_formula",
        "cnf_disjunction",
        "cnf_literal",
        "thf_quantifier",
        "th0_quantifier",
        "th1_quantifier",
        "thf_pair_connective",
        "thf_unary_connective",
        "th1_unary_connective",
        "tff_pair_connective",
        "fof_quantifier",
        "binary_connective",
        "assoc_connective",
        "unary_connective",
        "type_constant",
        "type_functor",
        "defined_type",
        "system_type",
        "atom",
        "untyped_atom",
        "defined_proposition",
        "defined_predicate",
        "defined_infix_pred",
        "constant",
        "functor",
        "system_constant",
        "system_functor",
        "defined_constant",
        "defined_functor",
        "defined_term",
        "variable",
        "source",
        "sources",
        "dag_source",
        "inference_record",
        "inference_rule",
        "inference_parents",
        "parent_list",
        "parent_info",
        "parent_details",
        "internal_source",
        "intro_type",
        "external_source",
        "file_source",
        "file_info",
        "theory",
        "theory_name",
        "creator_source",
        "creator_name",
        "optional_info",
        "useful_info",
        "info_items",
        "info_item",
        "formula_item",
        "description_item",
        "iquote_item",
        "inference_item",
        "inference_status",
        "status_value",
        "inference_info",
        "assumptions_record",
        "refutation",
        "new_symbol_record",
        "new_symbol_list",
        "principal_symbol",
        "include",
        "formula_selection",
        "name_list",
        "general_term",
        "general_data",
        "general_function",
        "formula_data",
        "general_list",
        "general_terms",
        "name",
        "atomic_word",
        "atomic_defined_word",
        "atomic_system_word",
        "number",
        "file_name",
    ]

    EOF = Token.EOF
    T__0 = 1
    T__1 = 2
    T__2 = 3
    T__3 = 4
    T__4 = 5
    T__5 = 6
    T__6 = 7
    T__7 = 8
    T__8 = 9
    T__9 = 10
    T__10 = 11
    T__11 = 12
    T__12 = 13
    T__13 = 14
    T__14 = 15
    T__15 = 16
    T__16 = 17
    T__17 = 18
    T__18 = 19
    T__19 = 20
    T__20 = 21
    T__21 = 22
    T__22 = 23
    T__23 = 24
    T__24 = 25
    T__25 = 26
    T__26 = 27
    T__27 = 28
    T__28 = 29
    T__29 = 30
    T__30 = 31
    T__31 = 32
    T__32 = 33
    T__33 = 34
    T__34 = 35
    T__35 = 36
    T__36 = 37
    T__37 = 38
    T__38 = 39
    T__39 = 40
    T__40 = 41
    T__41 = 42
    T__42 = 43
    Or = 44
    And = 45
    Iff = 46
    Impl = 47
    If = 48
    Niff = 49
    Nor = 50
    Nand = 51
    Not = 52
    ForallComb = 53
    TyForall = 54
    Infix_inequality = 55
    Infix_equality = 56
    Forall = 57
    ExistsComb = 58
    TyExists = 59
    Exists = 60
    Lambda = 61
    ChoiceComb = 62
    Choice = 63
    DescriptionComb = 64
    Description = 65
    EqComb = 66
    App = 67
    Assignment = 68
    Arrow = 69
    Star = 70
    Plus = 71
    Subtype_sign = 72
    Gentzen_arrow = 73
    Real = 74
    Signed_real = 75
    Unsigned_real = 76
    Rational = 77
    Signed_rational = 78
    Unsigned_rational = 79
    Integer = 80
    Signed_integer = 81
    Unsigned_integer = 82
    Decimal = 83
    Positive_decimal = 84
    Decimal_exponent = 85
    Decimal_fraction = 86
    Dot_decimal = 87
    Exp_integer = 88
    Signed_exp_integer = 89
    Unsigned_exp_integer = 90
    Dollar_word = 91
    Dollar_dollar_word = 92
    Upper_word = 93
    Lower_word = 94
    Single_quoted = 95
    Distinct_object = 96
    WS = 97
    Line_comment = 98
    Block_comment = 99

    def __init__(self, input: TokenStream, output: TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.7.2")
        self._interp = ParserATNSimulator(
            self, self.atn, self.decisionsToDFA, self.sharedContextCache
        )
        self._predicates = None

    class Tptp_fileContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(tptp_v7_0_0_0Parser.EOF, 0)

        def tptp_input(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Tptp_inputContext)
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tptp_inputContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tptp_file

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTptp_file"):
                listener.enterTptp_file(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTptp_file"):
                listener.exitTptp_file(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTptp_file"):
                return visitor.visitTptp_file(self)
            else:
                return visitor.visitChildren(self)

    def tptp_file(self):

        localctx = tptp_v7_0_0_0Parser.Tptp_fileContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_tptp_file)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3F) == 0 and (
                (1 << _la)
                & (
                    (1 << tptp_v7_0_0_0Parser.T__0)
                    | (1 << tptp_v7_0_0_0Parser.T__3)
                    | (1 << tptp_v7_0_0_0Parser.T__4)
                    | (1 << tptp_v7_0_0_0Parser.T__5)
                    | (1 << tptp_v7_0_0_0Parser.T__6)
                    | (1 << tptp_v7_0_0_0Parser.T__7)
                    | (1 << tptp_v7_0_0_0Parser.T__8)
                    | (1 << tptp_v7_0_0_0Parser.T__37)
                )
            ) != 0:
                self.state = 402
                self.tptp_input()
                self.state = 407
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 408
            self.match(tptp_v7_0_0_0Parser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tptp_inputContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def annotated_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Annotated_formulaContext, 0
            )

        def include(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.IncludeContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tptp_input

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTptp_input"):
                listener.enterTptp_input(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTptp_input"):
                listener.exitTptp_input(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTptp_input"):
                return visitor.visitTptp_input(self)
            else:
                return visitor.visitChildren(self)

    def tptp_input(self):

        localctx = tptp_v7_0_0_0Parser.Tptp_inputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_tptp_input)
        try:
            self.state = 412
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__0,
                tptp_v7_0_0_0Parser.T__3,
                tptp_v7_0_0_0Parser.T__4,
                tptp_v7_0_0_0Parser.T__5,
                tptp_v7_0_0_0Parser.T__6,
                tptp_v7_0_0_0Parser.T__7,
                tptp_v7_0_0_0Parser.T__8,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 410
                self.annotated_formula()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__37]:
                self.enterOuterAlt(localctx, 2)
                self.state = 411
                self.include()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Annotated_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_annotatedContext, 0)

        def tfx_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tfx_annotatedContext, 0)

        def tff_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_annotatedContext, 0)

        def tcf_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tcf_annotatedContext, 0)

        def fof_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_annotatedContext, 0)

        def cnf_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_annotatedContext, 0)

        def tpi_annotated(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tpi_annotatedContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_annotated_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAnnotated_formula"):
                listener.enterAnnotated_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAnnotated_formula"):
                listener.exitAnnotated_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAnnotated_formula"):
                return visitor.visitAnnotated_formula(self)
            else:
                return visitor.visitChildren(self)

    def annotated_formula(self):

        localctx = tptp_v7_0_0_0Parser.Annotated_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 4, self.RULE_annotated_formula)
        try:
            self.state = 421
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__3]:
                self.enterOuterAlt(localctx, 1)
                self.state = 414
                self.thf_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__4]:
                self.enterOuterAlt(localctx, 2)
                self.state = 415
                self.tfx_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__5]:
                self.enterOuterAlt(localctx, 3)
                self.state = 416
                self.tff_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__6]:
                self.enterOuterAlt(localctx, 4)
                self.state = 417
                self.tcf_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__7]:
                self.enterOuterAlt(localctx, 5)
                self.state = 418
                self.fof_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__8]:
                self.enterOuterAlt(localctx, 6)
                self.state = 419
                self.cnf_annotated()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__0]:
                self.enterOuterAlt(localctx, 7)
                self.state = 420
                self.tpi_annotated()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tpi_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def tpi_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tpi_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tpi_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTpi_annotated"):
                listener.enterTpi_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTpi_annotated"):
                listener.exitTpi_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTpi_annotated"):
                return visitor.visitTpi_annotated(self)
            else:
                return visitor.visitChildren(self)

    def tpi_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Tpi_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_tpi_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.match(tptp_v7_0_0_0Parser.T__0)
            self.state = 424
            self.name()
            self.state = 425
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 426
            self.formula_role()
            self.state = 427
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 428
            self.tpi_formula()
            self.state = 430
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 429
                self.annotations()

            self.state = 432
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tpi_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_formulaContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tpi_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTpi_formula"):
                listener.enterTpi_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTpi_formula"):
                listener.exitTpi_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTpi_formula"):
                return visitor.visitTpi_formula(self)
            else:
                return visitor.visitChildren(self)

    def tpi_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tpi_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_tpi_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self.fof_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def thf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_annotated"):
                listener.enterThf_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_annotated"):
                listener.exitThf_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_annotated"):
                return visitor.visitThf_annotated(self)
            else:
                return visitor.visitChildren(self)

    def thf_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Thf_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_thf_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 436
            self.match(tptp_v7_0_0_0Parser.T__3)
            self.state = 437
            self.name()
            self.state = 438
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 439
            self.formula_role()
            self.state = 440
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 441
            self.thf_formula()
            self.state = 443
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 442
                self.annotations()

            self.state = 445
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tfx_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def tfx_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tfx_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tfx_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTfx_annotated"):
                listener.enterTfx_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTfx_annotated"):
                listener.exitTfx_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTfx_annotated"):
                return visitor.visitTfx_annotated(self)
            else:
                return visitor.visitChildren(self)

    def tfx_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Tfx_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_tfx_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 447
            self.match(tptp_v7_0_0_0Parser.T__4)
            self.state = 448
            self.name()
            self.state = 449
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 450
            self.formula_role()
            self.state = 451
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 452
            self.tfx_formula()
            self.state = 454
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 453
                self.annotations()

            self.state = 456
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def tff_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_annotated"):
                listener.enterTff_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_annotated"):
                listener.exitTff_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_annotated"):
                return visitor.visitTff_annotated(self)
            else:
                return visitor.visitChildren(self)

    def tff_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Tff_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_tff_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 458
            self.match(tptp_v7_0_0_0Parser.T__5)
            self.state = 459
            self.name()
            self.state = 460
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 461
            self.formula_role()
            self.state = 462
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 463
            self.tff_formula()
            self.state = 465
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 464
                self.annotations()

            self.state = 467
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tcf_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def tcf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tcf_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tcf_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTcf_annotated"):
                listener.enterTcf_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTcf_annotated"):
                listener.exitTcf_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTcf_annotated"):
                return visitor.visitTcf_annotated(self)
            else:
                return visitor.visitChildren(self)

    def tcf_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Tcf_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_tcf_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 469
            self.match(tptp_v7_0_0_0Parser.T__6)
            self.state = 470
            self.name()
            self.state = 471
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 472
            self.formula_role()
            self.state = 473
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 474
            self.tcf_formula()
            self.state = 476
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 475
                self.annotations()

            self.state = 478
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def fof_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_annotated"):
                listener.enterFof_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_annotated"):
                listener.exitFof_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_annotated"):
                return visitor.visitFof_annotated(self)
            else:
                return visitor.visitChildren(self)

    def fof_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Fof_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_fof_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 480
            self.match(tptp_v7_0_0_0Parser.T__7)
            self.state = 481
            self.name()
            self.state = 482
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 483
            self.formula_role()
            self.state = 484
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 485
            self.fof_formula()
            self.state = 487
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 486
                self.annotations()

            self.state = 489
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Cnf_annotatedContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def formula_role(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_roleContext, 0)

        def cnf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_formulaContext, 0)

        def annotations(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AnnotationsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_cnf_annotated

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCnf_annotated"):
                listener.enterCnf_annotated(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCnf_annotated"):
                listener.exitCnf_annotated(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCnf_annotated"):
                return visitor.visitCnf_annotated(self)
            else:
                return visitor.visitChildren(self)

    def cnf_annotated(self):

        localctx = tptp_v7_0_0_0Parser.Cnf_annotatedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_cnf_annotated)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 491
            self.match(tptp_v7_0_0_0Parser.T__8)
            self.state = 492
            self.name()
            self.state = 493
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 494
            self.formula_role()
            self.state = 495
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 496
            self.cnf_formula()
            self.state = 498
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 497
                self.annotations()

            self.state = 500
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class AnnotationsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def source(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.SourceContext, 0)

        def optional_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Optional_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_annotations

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAnnotations"):
                listener.enterAnnotations(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAnnotations"):
                listener.exitAnnotations(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAnnotations"):
                return visitor.visitAnnotations(self)
            else:
                return visitor.visitChildren(self)

    def annotations(self):

        localctx = tptp_v7_0_0_0Parser.AnnotationsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_annotations)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 502
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 503
            self.source()
            self.state = 505
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 504
                self.optional_info()

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Formula_roleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_formula_role

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFormula_role"):
                listener.enterFormula_role(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFormula_role"):
                listener.exitFormula_role(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFormula_role"):
                return visitor.visitFormula_role(self)
            else:
                return visitor.visitChildren(self)

    def formula_role(self):

        localctx = tptp_v7_0_0_0Parser.Formula_roleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_formula_role)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 507
            self.match(tptp_v7_0_0_0Parser.Lower_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_logic_formulaContext, 0
            )

        def thf_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_formula"):
                listener.enterThf_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_formula"):
                listener.exitThf_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_formula"):
                return visitor.visitThf_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_thf_formula)
        try:
            self.state = 511
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 11, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 509
                self.thf_logic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 510
                self.thf_sequent()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_logic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_binary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_binary_formulaContext, 0
            )

        def thf_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, 0
            )

        def thf_type_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_type_formulaContext, 0
            )

        def thf_subtype(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_subtypeContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_logic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_logic_formula"):
                listener.enterThf_logic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_logic_formula"):
                listener.exitThf_logic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_logic_formula"):
                return visitor.visitThf_logic_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_logic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_logic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 28, self.RULE_thf_logic_formula)
        try:
            self.state = 517
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 12, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 513
                self.thf_binary_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 514
                self.thf_unitary_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 515
                self.thf_type_formula()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 516
                self.thf_subtype()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_binary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_binary_pair(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_binary_pairContext, 0
            )

        def thf_binary_tuple(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_binary_tupleContext, 0
            )

        def thf_binary_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_binary_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_binary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_binary_formula"):
                listener.enterThf_binary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_binary_formula"):
                listener.exitThf_binary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_binary_formula"):
                return visitor.visitThf_binary_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_binary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_binary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 30, self.RULE_thf_binary_formula)
        try:
            self.state = 522
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 13, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 519
                self.thf_binary_pair()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 520
                self.thf_binary_tuple()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 521
                self.thf_binary_type()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_binary_pairContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, i
                )

        def thf_pair_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_pair_connectiveContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_binary_pair

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_binary_pair"):
                listener.enterThf_binary_pair(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_binary_pair"):
                listener.exitThf_binary_pair(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_binary_pair"):
                return visitor.visitThf_binary_pair(self)
            else:
                return visitor.visitChildren(self)

    def thf_binary_pair(self):

        localctx = tptp_v7_0_0_0Parser.Thf_binary_pairContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 32, self.RULE_thf_binary_pair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 524
            self.thf_unitary_formula()
            self.state = 525
            self.thf_pair_connective()
            self.state = 526
            self.thf_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_binary_tupleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_or_formulaContext, 0
            )

        def thf_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_and_formulaContext, 0
            )

        def thf_apply_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_apply_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_binary_tuple

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_binary_tuple"):
                listener.enterThf_binary_tuple(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_binary_tuple"):
                listener.exitThf_binary_tuple(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_binary_tuple"):
                return visitor.visitThf_binary_tuple(self)
            else:
                return visitor.visitChildren(self)

    def thf_binary_tuple(self):

        localctx = tptp_v7_0_0_0Parser.Thf_binary_tupleContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 34, self.RULE_thf_binary_tuple)
        try:
            self.state = 531
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 14, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 528
                self.thf_or_formula(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 529
                self.thf_and_formula(0)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 530
                self.thf_apply_formula(0)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_or_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, i
                )

        def Or(self):
            return self.getToken(tptp_v7_0_0_0Parser.Or, 0)

        def thf_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_or_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_or_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_or_formula"):
                listener.enterThf_or_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_or_formula"):
                listener.exitThf_or_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_or_formula"):
                return visitor.visitThf_or_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_or_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Thf_or_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 36
        self.enterRecursionRule(localctx, 36, self.RULE_thf_or_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 534
            self.thf_unitary_formula()
            self.state = 535
            self.match(tptp_v7_0_0_0Parser.Or)
            self.state = 536
            self.thf_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 543
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 15, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Thf_or_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_thf_or_formula
                    )
                    self.state = 538
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 539
                    self.match(tptp_v7_0_0_0Parser.Or)
                    self.state = 540
                    self.thf_unitary_formula()
                self.state = 545
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 15, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Thf_and_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, i
                )

        def And(self):
            return self.getToken(tptp_v7_0_0_0Parser.And, 0)

        def thf_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_and_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_and_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_and_formula"):
                listener.enterThf_and_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_and_formula"):
                listener.exitThf_and_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_and_formula"):
                return visitor.visitThf_and_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_and_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Thf_and_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 38
        self.enterRecursionRule(localctx, 38, self.RULE_thf_and_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 547
            self.thf_unitary_formula()
            self.state = 548
            self.match(tptp_v7_0_0_0Parser.And)
            self.state = 549
            self.thf_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 556
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 16, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Thf_and_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_thf_and_formula
                    )
                    self.state = 551
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 552
                    self.match(tptp_v7_0_0_0Parser.And)
                    self.state = 553
                    self.thf_unitary_formula()
                self.state = 558
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 16, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Thf_apply_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, i
                )

        def App(self):
            return self.getToken(tptp_v7_0_0_0Parser.App, 0)

        def thf_apply_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_apply_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_apply_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_apply_formula"):
                listener.enterThf_apply_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_apply_formula"):
                listener.exitThf_apply_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_apply_formula"):
                return visitor.visitThf_apply_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_apply_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Thf_apply_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 40
        self.enterRecursionRule(localctx, 40, self.RULE_thf_apply_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 560
            self.thf_unitary_formula()
            self.state = 561
            self.match(tptp_v7_0_0_0Parser.App)
            self.state = 562
            self.thf_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 569
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 17, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Thf_apply_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_thf_apply_formula
                    )
                    self.state = 564
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 565
                    self.match(tptp_v7_0_0_0Parser.App)
                    self.state = 566
                    self.thf_unitary_formula()
                self.state = 571
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 17, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Thf_unitary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_quantified_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_quantified_formulaContext, 0
            )

        def thf_unary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unary_formulaContext, 0
            )

        def thf_atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_atomContext, 0)

        def thf_conditional(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_conditionalContext, 0
            )

        def thf_let(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_letContext, 0)

        def thf_tuple(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_tupleContext, 0)

        def thf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_unitary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_unitary_formula"):
                listener.enterThf_unitary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_unitary_formula"):
                listener.exitThf_unitary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_unitary_formula"):
                return visitor.visitThf_unitary_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_unitary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_unitary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 42, self.RULE_thf_unitary_formula)
        try:
            self.state = 582
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 18, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 572
                self.thf_quantified_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 573
                self.thf_unary_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 574
                self.thf_atom()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 575
                self.thf_conditional()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 576
                self.thf_let()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 577
                self.thf_tuple()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 578
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 579
                self.thf_logic_formula()
                self.state = 580
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_quantified_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_quantification(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_quantificationContext, 0
            )

        def thf_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_quantified_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_quantified_formula"):
                listener.enterThf_quantified_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_quantified_formula"):
                listener.exitThf_quantified_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_quantified_formula"):
                return visitor.visitThf_quantified_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_quantified_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_quantified_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 44, self.RULE_thf_quantified_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 584
            self.thf_quantification()
            self.state = 585
            self.thf_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_quantificationContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_quantifierContext, 0
            )

        def thf_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_variable_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_quantification

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_quantification"):
                listener.enterThf_quantification(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_quantification"):
                listener.exitThf_quantification(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_quantification"):
                return visitor.visitThf_quantification(self)
            else:
                return visitor.visitChildren(self)

    def thf_quantification(self):

        localctx = tptp_v7_0_0_0Parser.Thf_quantificationContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 46, self.RULE_thf_quantification)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 587
            self.thf_quantifier()
            self.state = 588
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 589
            self.thf_variable_list()
            self.state = 590
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 591
            self.match(tptp_v7_0_0_0Parser.T__13)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_variable_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_variable(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_variableContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_variableContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_variable_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_variable_list"):
                listener.enterThf_variable_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_variable_list"):
                listener.exitThf_variable_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_variable_list"):
                return visitor.visitThf_variable_list(self)
            else:
                return visitor.visitChildren(self)

    def thf_variable_list(self):

        localctx = tptp_v7_0_0_0Parser.Thf_variable_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 48, self.RULE_thf_variable_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 593
            self.thf_variable()
            self.state = 598
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 594
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 595
                self.thf_variable()
                self.state = 600
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_variableContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_typed_variable(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_typed_variableContext, 0
            )

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_variable

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_variable"):
                listener.enterThf_variable(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_variable"):
                listener.exitThf_variable(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_variable"):
                return visitor.visitThf_variable(self)
            else:
                return visitor.visitChildren(self)

    def thf_variable(self):

        localctx = tptp_v7_0_0_0Parser.Thf_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_thf_variable)
        try:
            self.state = 603
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 20, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 601
                self.thf_typed_variable()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 602
                self.variable()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_typed_variableContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def thf_top_level_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_top_level_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_typed_variable

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_typed_variable"):
                listener.enterThf_typed_variable(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_typed_variable"):
                listener.exitThf_typed_variable(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_typed_variable"):
                return visitor.visitThf_typed_variable(self)
            else:
                return visitor.visitChildren(self)

    def thf_typed_variable(self):

        localctx = tptp_v7_0_0_0Parser.Thf_typed_variableContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 52, self.RULE_thf_typed_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 605
            self.variable()
            self.state = 606
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 607
            self.thf_top_level_type()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_unary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unary_connectiveContext, 0
            )

        def thf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_unary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_unary_formula"):
                listener.enterThf_unary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_unary_formula"):
                listener.exitThf_unary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_unary_formula"):
                return visitor.visitThf_unary_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_unary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_unary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 54, self.RULE_thf_unary_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 609
            self.thf_unary_connective()
            self.state = 610
            self.match(tptp_v7_0_0_0Parser.T__9)
            self.state = 611
            self.thf_logic_formula()
            self.state = 612
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_atomContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_function(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_functionContext, 0)

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def defined_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Defined_termContext, 0)

        def thf_conn_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_conn_termContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_atom

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_atom"):
                listener.enterThf_atom(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_atom"):
                listener.exitThf_atom(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_atom"):
                return visitor.visitThf_atom(self)
            else:
                return visitor.visitChildren(self)

    def thf_atom(self):

        localctx = tptp_v7_0_0_0Parser.Thf_atomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_thf_atom)
        try:
            self.state = 618
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 614
                self.thf_function()
                pass
            elif token in [tptp_v7_0_0_0Parser.Upper_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 615
                self.variable()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 3)
                self.state = 616
                self.defined_term()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Or,
                tptp_v7_0_0_0Parser.And,
                tptp_v7_0_0_0Parser.Iff,
                tptp_v7_0_0_0Parser.Impl,
                tptp_v7_0_0_0Parser.If,
                tptp_v7_0_0_0Parser.Niff,
                tptp_v7_0_0_0Parser.Nor,
                tptp_v7_0_0_0Parser.Nand,
                tptp_v7_0_0_0Parser.Not,
                tptp_v7_0_0_0Parser.ForallComb,
                tptp_v7_0_0_0Parser.Infix_inequality,
                tptp_v7_0_0_0Parser.Infix_equality,
                tptp_v7_0_0_0Parser.ExistsComb,
                tptp_v7_0_0_0Parser.ChoiceComb,
                tptp_v7_0_0_0Parser.DescriptionComb,
                tptp_v7_0_0_0Parser.EqComb,
                tptp_v7_0_0_0Parser.Assignment,
            ]:
                self.enterOuterAlt(localctx, 4)
                self.state = 617
                self.thf_conn_term()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_functionContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AtomContext, 0)

        def functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.FunctorContext, 0)

        def thf_arguments(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_argumentsContext, 0)

        def defined_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_functorContext, 0
            )

        def system_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.System_functorContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_function

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_function"):
                listener.enterThf_function(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_function"):
                listener.exitThf_function(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_function"):
                return visitor.visitThf_function(self)
            else:
                return visitor.visitChildren(self)

    def thf_function(self):

        localctx = tptp_v7_0_0_0Parser.Thf_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_thf_function)
        try:
            self.state = 636
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 22, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 620
                self.atom()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 621
                self.functor()
                self.state = 622
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 623
                self.thf_arguments()
                self.state = 624
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 626
                self.defined_functor()
                self.state = 627
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 628
                self.thf_arguments()
                self.state = 629
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 631
                self.system_functor()
                self.state = 632
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 633
                self.thf_arguments()
                self.state = 634
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_conn_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_pair_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_pair_connectiveContext, 0
            )

        def assoc_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Assoc_connectiveContext, 0
            )

        def thf_unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unary_connectiveContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_conn_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_conn_term"):
                listener.enterThf_conn_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_conn_term"):
                listener.exitThf_conn_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_conn_term"):
                return visitor.visitThf_conn_term(self)
            else:
                return visitor.visitChildren(self)

    def thf_conn_term(self):

        localctx = tptp_v7_0_0_0Parser.Thf_conn_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_thf_conn_term)
        try:
            self.state = 641
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Iff,
                tptp_v7_0_0_0Parser.Impl,
                tptp_v7_0_0_0Parser.If,
                tptp_v7_0_0_0Parser.Niff,
                tptp_v7_0_0_0Parser.Nor,
                tptp_v7_0_0_0Parser.Nand,
                tptp_v7_0_0_0Parser.Infix_inequality,
                tptp_v7_0_0_0Parser.Infix_equality,
                tptp_v7_0_0_0Parser.Assignment,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 638
                self.thf_pair_connective()
                pass
            elif token in [tptp_v7_0_0_0Parser.Or, tptp_v7_0_0_0Parser.And]:
                self.enterOuterAlt(localctx, 2)
                self.state = 639
                self.assoc_connective()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Not,
                tptp_v7_0_0_0Parser.ForallComb,
                tptp_v7_0_0_0Parser.ExistsComb,
                tptp_v7_0_0_0Parser.ChoiceComb,
                tptp_v7_0_0_0Parser.DescriptionComb,
                tptp_v7_0_0_0Parser.EqComb,
            ]:
                self.enterOuterAlt(localctx, 3)
                self.state = 640
                self.thf_unary_connective()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_conditionalContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_logic_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_logic_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_logic_formulaContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_conditional

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_conditional"):
                listener.enterThf_conditional(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_conditional"):
                listener.exitThf_conditional(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_conditional"):
                return visitor.visitThf_conditional(self)
            else:
                return visitor.visitChildren(self)

    def thf_conditional(self):

        localctx = tptp_v7_0_0_0Parser.Thf_conditionalContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 62, self.RULE_thf_conditional)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 643
            self.match(tptp_v7_0_0_0Parser.T__14)
            self.state = 644
            self.thf_logic_formula()
            self.state = 645
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 646
            self.thf_logic_formula()
            self.state = 647
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 648
            self.thf_logic_formula()
            self.state = 649
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_letContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, 0
            )

        def thf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_formulaContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_let

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_let"):
                listener.enterThf_let(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_let"):
                listener.exitThf_let(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_let"):
                return visitor.visitThf_let(self)
            else:
                return visitor.visitChildren(self)

    def thf_let(self):

        localctx = tptp_v7_0_0_0Parser.Thf_letContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_thf_let)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 651
            self.match(tptp_v7_0_0_0Parser.T__15)
            self.state = 652
            self.thf_unitary_formula()
            self.state = 653
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 654
            self.thf_formula()
            self.state = 655
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_argumentsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_formula_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_formula_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_arguments

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_arguments"):
                listener.enterThf_arguments(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_arguments"):
                listener.exitThf_arguments(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_arguments"):
                return visitor.visitThf_arguments(self)
            else:
                return visitor.visitChildren(self)

    def thf_arguments(self):

        localctx = tptp_v7_0_0_0Parser.Thf_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_thf_arguments)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 657
            self.thf_formula_list()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_type_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_typeable_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_typeable_formulaContext, 0
            )

        def thf_top_level_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_top_level_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_type_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_type_formula"):
                listener.enterThf_type_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_type_formula"):
                listener.exitThf_type_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_type_formula"):
                return visitor.visitThf_type_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_type_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_type_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 68, self.RULE_thf_type_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 659
            self.thf_typeable_formula()
            self.state = 660
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 661
            self.thf_top_level_type()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_typeable_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_atomContext, 0)

        def thf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_typeable_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_typeable_formula"):
                listener.enterThf_typeable_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_typeable_formula"):
                listener.exitThf_typeable_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_typeable_formula"):
                return visitor.visitThf_typeable_formula(self)
            else:
                return visitor.visitChildren(self)

    def thf_typeable_formula(self):

        localctx = tptp_v7_0_0_0Parser.Thf_typeable_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 70, self.RULE_thf_typeable_formula)
        try:
            self.state = 668
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Or,
                tptp_v7_0_0_0Parser.And,
                tptp_v7_0_0_0Parser.Iff,
                tptp_v7_0_0_0Parser.Impl,
                tptp_v7_0_0_0Parser.If,
                tptp_v7_0_0_0Parser.Niff,
                tptp_v7_0_0_0Parser.Nor,
                tptp_v7_0_0_0Parser.Nand,
                tptp_v7_0_0_0Parser.Not,
                tptp_v7_0_0_0Parser.ForallComb,
                tptp_v7_0_0_0Parser.Infix_inequality,
                tptp_v7_0_0_0Parser.Infix_equality,
                tptp_v7_0_0_0Parser.ExistsComb,
                tptp_v7_0_0_0Parser.ChoiceComb,
                tptp_v7_0_0_0Parser.DescriptionComb,
                tptp_v7_0_0_0Parser.EqComb,
                tptp_v7_0_0_0Parser.Assignment,
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 663
                self.thf_atom()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 664
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 665
                self.thf_logic_formula()
                self.state = 666
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_subtypeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_atom(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Thf_atomContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_atomContext, i)

        def Subtype_sign(self):
            return self.getToken(tptp_v7_0_0_0Parser.Subtype_sign, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_subtype

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_subtype"):
                listener.enterThf_subtype(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_subtype"):
                listener.exitThf_subtype(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_subtype"):
                return visitor.visitThf_subtype(self)
            else:
                return visitor.visitChildren(self)

    def thf_subtype(self):

        localctx = tptp_v7_0_0_0Parser.Thf_subtypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_thf_subtype)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 670
            self.thf_atom()
            self.state = 671
            self.match(tptp_v7_0_0_0Parser.Subtype_sign)
            self.state = 672
            self.thf_atom()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_top_level_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unitary_typeContext, 0
            )

        def thf_mapping_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_mapping_typeContext, 0
            )

        def thf_apply_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_apply_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_top_level_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_top_level_type"):
                listener.enterThf_top_level_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_top_level_type"):
                listener.exitThf_top_level_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_top_level_type"):
                return visitor.visitThf_top_level_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_top_level_type(self):

        localctx = tptp_v7_0_0_0Parser.Thf_top_level_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 74, self.RULE_thf_top_level_type)
        try:
            self.state = 677
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 25, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 674
                self.thf_unitary_type()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 675
                self.thf_mapping_type()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 676
                self.thf_apply_type()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_unitary_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_unitary_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_unitary_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_unitary_type"):
                listener.enterThf_unitary_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_unitary_type"):
                listener.exitThf_unitary_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_unitary_type"):
                return visitor.visitThf_unitary_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_unitary_type(self):

        localctx = tptp_v7_0_0_0Parser.Thf_unitary_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 76, self.RULE_thf_unitary_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 679
            self.thf_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_apply_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_apply_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_apply_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_apply_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_apply_type"):
                listener.enterThf_apply_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_apply_type"):
                listener.exitThf_apply_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_apply_type"):
                return visitor.visitThf_apply_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_apply_type(self):

        localctx = tptp_v7_0_0_0Parser.Thf_apply_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 78, self.RULE_thf_apply_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 681
            self.thf_apply_formula(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_binary_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_mapping_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_mapping_typeContext, 0
            )

        def thf_xprod_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_xprod_typeContext, 0
            )

        def thf_union_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_union_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_binary_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_binary_type"):
                listener.enterThf_binary_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_binary_type"):
                listener.exitThf_binary_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_binary_type"):
                return visitor.visitThf_binary_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_binary_type(self):

        localctx = tptp_v7_0_0_0Parser.Thf_binary_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 80, self.RULE_thf_binary_type)
        try:
            self.state = 686
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 26, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 683
                self.thf_mapping_type()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 684
                self.thf_xprod_type(0)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 685
                self.thf_union_type(0)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_mapping_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_type(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext, i
                )

        def Arrow(self):
            return self.getToken(tptp_v7_0_0_0Parser.Arrow, 0)

        def thf_mapping_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_mapping_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_mapping_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_mapping_type"):
                listener.enterThf_mapping_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_mapping_type"):
                listener.exitThf_mapping_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_mapping_type"):
                return visitor.visitThf_mapping_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_mapping_type(self):

        localctx = tptp_v7_0_0_0Parser.Thf_mapping_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 82, self.RULE_thf_mapping_type)
        try:
            self.state = 696
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 27, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 688
                self.thf_unitary_type()
                self.state = 689
                self.match(tptp_v7_0_0_0Parser.Arrow)
                self.state = 690
                self.thf_unitary_type()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 692
                self.thf_unitary_type()
                self.state = 693
                self.match(tptp_v7_0_0_0Parser.Arrow)
                self.state = 694
                self.thf_mapping_type()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_xprod_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_type(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext, i
                )

        def Star(self):
            return self.getToken(tptp_v7_0_0_0Parser.Star, 0)

        def thf_xprod_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_xprod_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_xprod_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_xprod_type"):
                listener.enterThf_xprod_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_xprod_type"):
                listener.exitThf_xprod_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_xprod_type"):
                return visitor.visitThf_xprod_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_xprod_type(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Thf_xprod_typeContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 84
        self.enterRecursionRule(localctx, 84, self.RULE_thf_xprod_type, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 699
            self.thf_unitary_type()
            self.state = 700
            self.match(tptp_v7_0_0_0Parser.Star)
            self.state = 701
            self.thf_unitary_type()
            self._ctx.stop = self._input.LT(-1)
            self.state = 708
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 28, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Thf_xprod_typeContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_thf_xprod_type
                    )
                    self.state = 703
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 704
                    self.match(tptp_v7_0_0_0Parser.Star)
                    self.state = 705
                    self.thf_unitary_type()
                self.state = 710
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 28, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Thf_union_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_unitary_type(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_unitary_typeContext, i
                )

        def Plus(self):
            return self.getToken(tptp_v7_0_0_0Parser.Plus, 0)

        def thf_union_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_union_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_union_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_union_type"):
                listener.enterThf_union_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_union_type"):
                listener.exitThf_union_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_union_type"):
                return visitor.visitThf_union_type(self)
            else:
                return visitor.visitChildren(self)

    def thf_union_type(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Thf_union_typeContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 86
        self.enterRecursionRule(localctx, 86, self.RULE_thf_union_type, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 712
            self.thf_unitary_type()
            self.state = 713
            self.match(tptp_v7_0_0_0Parser.Plus)
            self.state = 714
            self.thf_unitary_type()
            self._ctx.stop = self._input.LT(-1)
            self.state = 721
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 29, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Thf_union_typeContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_thf_union_type
                    )
                    self.state = 716
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 717
                    self.match(tptp_v7_0_0_0Parser.Plus)
                    self.state = 718
                    self.thf_unitary_type()
                self.state = 723
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 29, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Thf_sequentContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_tuple(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Thf_tupleContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_tupleContext, i)

        def Gentzen_arrow(self):
            return self.getToken(tptp_v7_0_0_0Parser.Gentzen_arrow, 0)

        def thf_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_sequent

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_sequent"):
                listener.enterThf_sequent(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_sequent"):
                listener.exitThf_sequent(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_sequent"):
                return visitor.visitThf_sequent(self)
            else:
                return visitor.visitChildren(self)

    def thf_sequent(self):

        localctx = tptp_v7_0_0_0Parser.Thf_sequentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_thf_sequent)
        try:
            self.state = 732
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__11,
                tptp_v7_0_0_0Parser.T__16,
                tptp_v7_0_0_0Parser.T__17,
                tptp_v7_0_0_0Parser.T__18,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 724
                self.thf_tuple()
                self.state = 725
                self.match(tptp_v7_0_0_0Parser.Gentzen_arrow)
                self.state = 726
                self.thf_tuple()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 728
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 729
                self.thf_sequent()
                self.state = 730
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_tupleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_formula_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_formula_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_tuple

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_tuple"):
                listener.enterThf_tuple(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_tuple"):
                listener.exitThf_tuple(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_tuple"):
                return visitor.visitThf_tuple(self)
            else:
                return visitor.visitChildren(self)

    def thf_tuple(self):

        localctx = tptp_v7_0_0_0Parser.Thf_tupleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_thf_tuple)
        try:
            self.state = 744
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 734
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 735
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 736
                self.thf_formula_list()
                self.state = 737
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__17]:
                self.enterOuterAlt(localctx, 3)
                self.state = 739
                self.match(tptp_v7_0_0_0Parser.T__17)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__18]:
                self.enterOuterAlt(localctx, 4)
                self.state = 740
                self.match(tptp_v7_0_0_0Parser.T__18)
                self.state = 741
                self.thf_formula_list()
                self.state = 742
                self.match(tptp_v7_0_0_0Parser.T__19)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_formula_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_logic_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Thf_logic_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Thf_logic_formulaContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_formula_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_formula_list"):
                listener.enterThf_formula_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_formula_list"):
                listener.exitThf_formula_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_formula_list"):
                return visitor.visitThf_formula_list(self)
            else:
                return visitor.visitChildren(self)

    def thf_formula_list(self):

        localctx = tptp_v7_0_0_0Parser.Thf_formula_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 92, self.RULE_thf_formula_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 746
            self.thf_logic_formula()
            self.state = 751
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 747
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 748
                self.thf_logic_formula()
                self.state = 753
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tfx_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tfx_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tfx_logic_formulaContext, 0
            )

        def thf_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tfx_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTfx_formula"):
                listener.enterTfx_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTfx_formula"):
                listener.exitTfx_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTfx_formula"):
                return visitor.visitTfx_formula(self)
            else:
                return visitor.visitChildren(self)

    def tfx_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tfx_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_tfx_formula)
        try:
            self.state = 756
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 33, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 754
                self.tfx_logic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 755
                self.thf_sequent()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tfx_logic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Thf_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tfx_logic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTfx_logic_formula"):
                listener.enterTfx_logic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTfx_logic_formula"):
                listener.exitTfx_logic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTfx_logic_formula"):
                return visitor.visitTfx_logic_formula(self)
            else:
                return visitor.visitChildren(self)

    def tfx_logic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tfx_logic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 96, self.RULE_tfx_logic_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 758
            self.thf_logic_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_logic_formulaContext, 0
            )

        def tff_typed_atom(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_typed_atomContext, 0
            )

        def tff_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_formula"):
                listener.enterTff_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_formula"):
                listener.exitTff_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_formula"):
                return visitor.visitTff_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_tff_formula)
        try:
            self.state = 763
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 34, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 760
                self.tff_logic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 761
                self.tff_typed_atom()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 762
                self.tff_sequent()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_logic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_binary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_binary_formulaContext, 0
            )

        def tff_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, 0
            )

        def tff_subtype(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_subtypeContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_logic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_logic_formula"):
                listener.enterTff_logic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_logic_formula"):
                listener.exitTff_logic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_logic_formula"):
                return visitor.visitTff_logic_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_logic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_logic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 100, self.RULE_tff_logic_formula)
        try:
            self.state = 768
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 35, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 765
                self.tff_binary_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 766
                self.tff_unitary_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 767
                self.tff_subtype()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_binary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_binary_nonassoc(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_binary_nonassocContext, 0
            )

        def tff_binary_assoc(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_binary_assocContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_binary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_binary_formula"):
                listener.enterTff_binary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_binary_formula"):
                listener.exitTff_binary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_binary_formula"):
                return visitor.visitTff_binary_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_binary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_binary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 102, self.RULE_tff_binary_formula)
        try:
            self.state = 772
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 36, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 770
                self.tff_binary_nonassoc()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 771
                self.tff_binary_assoc()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_binary_nonassocContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, i
                )

        def binary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Binary_connectiveContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_binary_nonassoc

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_binary_nonassoc"):
                listener.enterTff_binary_nonassoc(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_binary_nonassoc"):
                listener.exitTff_binary_nonassoc(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_binary_nonassoc"):
                return visitor.visitTff_binary_nonassoc(self)
            else:
                return visitor.visitChildren(self)

    def tff_binary_nonassoc(self):

        localctx = tptp_v7_0_0_0Parser.Tff_binary_nonassocContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 104, self.RULE_tff_binary_nonassoc)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 774
            self.tff_unitary_formula()
            self.state = 775
            self.binary_connective()
            self.state = 776
            self.tff_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_binary_assocContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_or_formulaContext, 0
            )

        def tff_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_and_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_binary_assoc

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_binary_assoc"):
                listener.enterTff_binary_assoc(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_binary_assoc"):
                listener.exitTff_binary_assoc(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_binary_assoc"):
                return visitor.visitTff_binary_assoc(self)
            else:
                return visitor.visitChildren(self)

    def tff_binary_assoc(self):

        localctx = tptp_v7_0_0_0Parser.Tff_binary_assocContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 106, self.RULE_tff_binary_assoc)
        try:
            self.state = 780
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 37, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 778
                self.tff_or_formula(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 779
                self.tff_and_formula(0)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_or_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, i
                )

        def Or(self):
            return self.getToken(tptp_v7_0_0_0Parser.Or, 0)

        def tff_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_or_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_or_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_or_formula"):
                listener.enterTff_or_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_or_formula"):
                listener.exitTff_or_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_or_formula"):
                return visitor.visitTff_or_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_or_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Tff_or_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 108
        self.enterRecursionRule(localctx, 108, self.RULE_tff_or_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 783
            self.tff_unitary_formula()
            self.state = 784
            self.match(tptp_v7_0_0_0Parser.Or)
            self.state = 785
            self.tff_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 792
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 38, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Tff_or_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_tff_or_formula
                    )
                    self.state = 787
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 788
                    self.match(tptp_v7_0_0_0Parser.Or)
                    self.state = 789
                    self.tff_unitary_formula()
                self.state = 794
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 38, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Tff_and_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, i
                )

        def And(self):
            return self.getToken(tptp_v7_0_0_0Parser.And, 0)

        def tff_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_and_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_and_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_and_formula"):
                listener.enterTff_and_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_and_formula"):
                listener.exitTff_and_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_and_formula"):
                return visitor.visitTff_and_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_and_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Tff_and_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 110
        self.enterRecursionRule(localctx, 110, self.RULE_tff_and_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 796
            self.tff_unitary_formula()
            self.state = 797
            self.match(tptp_v7_0_0_0Parser.And)
            self.state = 798
            self.tff_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 805
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 39, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Tff_and_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_tff_and_formula
                    )
                    self.state = 800
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 801
                    self.match(tptp_v7_0_0_0Parser.And)
                    self.state = 802
                    self.tff_unitary_formula()
                self.state = 807
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 39, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Tff_unitary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_quantified_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_quantified_formulaContext, 0
            )

        def tff_unary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unary_formulaContext, 0
            )

        def tff_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_formulaContext, 0
            )

        def tff_conditional(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_conditionalContext, 0
            )

        def tff_let(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_letContext, 0)

        def tff_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_unitary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_unitary_formula"):
                listener.enterTff_unitary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_unitary_formula"):
                listener.exitTff_unitary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_unitary_formula"):
                return visitor.visitTff_unitary_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_unitary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_unitary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 112, self.RULE_tff_unitary_formula)
        try:
            self.state = 817
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 40, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 808
                self.tff_quantified_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 809
                self.tff_unary_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 810
                self.tff_atomic_formula()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 811
                self.tff_conditional()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 812
                self.tff_let()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 813
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 814
                self.tff_logic_formula()
                self.state = 815
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_quantified_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_quantifierContext, 0
            )

        def tff_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_variable_listContext, 0
            )

        def tff_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_quantified_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_quantified_formula"):
                listener.enterTff_quantified_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_quantified_formula"):
                listener.exitTff_quantified_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_quantified_formula"):
                return visitor.visitTff_quantified_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_quantified_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_quantified_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 114, self.RULE_tff_quantified_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 819
            self.fof_quantifier()
            self.state = 820
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 821
            self.tff_variable_list()
            self.state = 822
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 823
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 824
            self.tff_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_variable_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_variable(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_variableContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_variableContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_variable_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_variable_list"):
                listener.enterTff_variable_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_variable_list"):
                listener.exitTff_variable_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_variable_list"):
                return visitor.visitTff_variable_list(self)
            else:
                return visitor.visitChildren(self)

    def tff_variable_list(self):

        localctx = tptp_v7_0_0_0Parser.Tff_variable_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 116, self.RULE_tff_variable_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 826
            self.tff_variable()
            self.state = 831
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 827
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 828
                self.tff_variable()
                self.state = 833
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_variableContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_typed_variable(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_typed_variableContext, 0
            )

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_variable

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_variable"):
                listener.enterTff_variable(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_variable"):
                listener.exitTff_variable(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_variable"):
                return visitor.visitTff_variable(self)
            else:
                return visitor.visitChildren(self)

    def tff_variable(self):

        localctx = tptp_v7_0_0_0Parser.Tff_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_tff_variable)
        try:
            self.state = 836
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 42, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 834
                self.tff_typed_variable()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 835
                self.variable()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_typed_variableContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_typed_variable

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_typed_variable"):
                listener.enterTff_typed_variable(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_typed_variable"):
                listener.exitTff_typed_variable(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_typed_variable"):
                return visitor.visitTff_typed_variable(self)
            else:
                return visitor.visitChildren(self)

    def tff_typed_variable(self):

        localctx = tptp_v7_0_0_0Parser.Tff_typed_variableContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 120, self.RULE_tff_typed_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 838
            self.variable()
            self.state = 839
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 840
            self.tff_atomic_type()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_unary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Unary_connectiveContext, 0
            )

        def tff_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, 0
            )

        def fof_infix_unary(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_infix_unaryContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_unary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_unary_formula"):
                listener.enterTff_unary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_unary_formula"):
                listener.exitTff_unary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_unary_formula"):
                return visitor.visitTff_unary_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_unary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_unary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 122, self.RULE_tff_unary_formula)
        try:
            self.state = 846
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Not]:
                self.enterOuterAlt(localctx, 1)
                self.state = 842
                self.unary_connective()
                self.state = 843
                self.tff_unitary_formula()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.T__17,
                tptp_v7_0_0_0Parser.T__18,
                tptp_v7_0_0_0Parser.T__23,
                tptp_v7_0_0_0Parser.T__24,
                tptp_v7_0_0_0Parser.T__25,
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 845
                self.fof_infix_unary()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_atomic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_atomic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_atomic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_atomic_formula"):
                listener.enterTff_atomic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_atomic_formula"):
                listener.exitTff_atomic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_atomic_formula"):
                return visitor.visitTff_atomic_formula(self)
            else:
                return visitor.visitChildren(self)

    def tff_atomic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tff_atomic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 124, self.RULE_tff_atomic_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 848
            self.fof_atomic_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_conditionalContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_logic_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_logic_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_logic_formulaContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_conditional

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_conditional"):
                listener.enterTff_conditional(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_conditional"):
                listener.exitTff_conditional(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_conditional"):
                return visitor.visitTff_conditional(self)
            else:
                return visitor.visitChildren(self)

    def tff_conditional(self):

        localctx = tptp_v7_0_0_0Parser.Tff_conditionalContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 126, self.RULE_tff_conditional)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 850
            self.match(tptp_v7_0_0_0Parser.T__20)
            self.state = 851
            self.tff_logic_formula()
            self.state = 852
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 853
            self.tff_logic_formula()
            self.state = 854
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 855
            self.tff_logic_formula()
            self.state = 856
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_letContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_term_defns(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_defnsContext, 0
            )

        def tff_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_formulaContext, 0)

        def tff_let_formula_defns(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_defnsContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let"):
                listener.enterTff_let(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let"):
                listener.exitTff_let(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let"):
                return visitor.visitTff_let(self)
            else:
                return visitor.visitChildren(self)

    def tff_let(self):

        localctx = tptp_v7_0_0_0Parser.Tff_letContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_tff_let)
        try:
            self.state = 870
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__21]:
                self.enterOuterAlt(localctx, 1)
                self.state = 858
                self.match(tptp_v7_0_0_0Parser.T__21)
                self.state = 859
                self.tff_let_term_defns()
                self.state = 860
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 861
                self.tff_formula()
                self.state = 862
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__22]:
                self.enterOuterAlt(localctx, 2)
                self.state = 864
                self.match(tptp_v7_0_0_0Parser.T__22)
                self.state = 865
                self.tff_let_formula_defns()
                self.state = 866
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 867
                self.tff_formula()
                self.state = 868
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_term_defnsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_term_defn(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_defnContext, 0
            )

        def tff_let_term_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_term_defns

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_term_defns"):
                listener.enterTff_let_term_defns(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_term_defns"):
                listener.exitTff_let_term_defns(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_term_defns"):
                return visitor.visitTff_let_term_defns(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_term_defns(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_term_defnsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 130, self.RULE_tff_let_term_defns)
        try:
            self.state = 877
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__9,
                tptp_v7_0_0_0Parser.Forall,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 872
                self.tff_let_term_defn()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 873
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 874
                self.tff_let_term_list()
                self.state = 875
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_term_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_term_defn(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_let_term_defnContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_let_term_defnContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_term_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_term_list"):
                listener.enterTff_let_term_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_term_list"):
                listener.exitTff_let_term_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_term_list"):
                return visitor.visitTff_let_term_list(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_term_list(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_term_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 132, self.RULE_tff_let_term_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 879
            self.tff_let_term_defn()
            self.state = 884
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 880
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 881
                self.tff_let_term_defn()
                self.state = 886
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_term_defnContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Forall(self):
            return self.getToken(tptp_v7_0_0_0Parser.Forall, 0)

        def tff_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_variable_listContext, 0
            )

        def tff_let_term_defn(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_defnContext, 0
            )

        def tff_let_term_binding(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_bindingContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_term_defn

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_term_defn"):
                listener.enterTff_let_term_defn(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_term_defn"):
                listener.exitTff_let_term_defn(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_term_defn"):
                return visitor.visitTff_let_term_defn(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_term_defn(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_term_defnContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 134, self.RULE_tff_let_term_defn)
        try:
            self.state = 895
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Forall]:
                self.enterOuterAlt(localctx, 1)
                self.state = 887
                self.match(tptp_v7_0_0_0Parser.Forall)
                self.state = 888
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 889
                self.tff_variable_list()
                self.state = 890
                self.match(tptp_v7_0_0_0Parser.T__12)
                self.state = 891
                self.match(tptp_v7_0_0_0Parser.T__13)
                self.state = 892
                self.tff_let_term_defn()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.T__9,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 894
                self.tff_let_term_binding()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_term_bindingContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_plain_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_plain_termContext, 0
            )

        def Infix_equality(self):
            return self.getToken(tptp_v7_0_0_0Parser.Infix_equality, 0)

        def fof_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, 0)

        def tff_let_term_binding(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_bindingContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_term_binding

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_term_binding"):
                listener.enterTff_let_term_binding(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_term_binding"):
                listener.exitTff_let_term_binding(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_term_binding"):
                return visitor.visitTff_let_term_binding(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_term_binding(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_term_bindingContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 136, self.RULE_tff_let_term_binding)
        try:
            self.state = 905
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 897
                self.fof_plain_term()
                self.state = 898
                self.match(tptp_v7_0_0_0Parser.Infix_equality)
                self.state = 899
                self.fof_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 901
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 902
                self.tff_let_term_binding()
                self.state = 903
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_formula_defnsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_formula_defn(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_defnContext, 0
            )

        def tff_let_formula_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_formula_defns

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_formula_defns"):
                listener.enterTff_let_formula_defns(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_formula_defns"):
                listener.exitTff_let_formula_defns(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_formula_defns"):
                return visitor.visitTff_let_formula_defns(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_formula_defns(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_formula_defnsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 138, self.RULE_tff_let_formula_defns)
        try:
            self.state = 912
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__9,
                tptp_v7_0_0_0Parser.Forall,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 907
                self.tff_let_formula_defn()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 908
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 909
                self.tff_let_formula_list()
                self.state = 910
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_formula_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_formula_defn(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_let_formula_defnContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_let_formula_defnContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_formula_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_formula_list"):
                listener.enterTff_let_formula_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_formula_list"):
                listener.exitTff_let_formula_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_formula_list"):
                return visitor.visitTff_let_formula_list(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_formula_list(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_formula_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 140, self.RULE_tff_let_formula_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 914
            self.tff_let_formula_defn()
            self.state = 919
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 915
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 916
                self.tff_let_formula_defn()
                self.state = 921
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_formula_defnContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Forall(self):
            return self.getToken(tptp_v7_0_0_0Parser.Forall, 0)

        def tff_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_variable_listContext, 0
            )

        def tff_let_formula_defn(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_defnContext, 0
            )

        def tff_let_formula_binding(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_bindingContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_formula_defn

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_formula_defn"):
                listener.enterTff_let_formula_defn(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_formula_defn"):
                listener.exitTff_let_formula_defn(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_formula_defn"):
                return visitor.visitTff_let_formula_defn(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_formula_defn(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_formula_defnContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 142, self.RULE_tff_let_formula_defn)
        try:
            self.state = 930
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Forall]:
                self.enterOuterAlt(localctx, 1)
                self.state = 922
                self.match(tptp_v7_0_0_0Parser.Forall)
                self.state = 923
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 924
                self.tff_variable_list()
                self.state = 925
                self.match(tptp_v7_0_0_0Parser.T__12)
                self.state = 926
                self.match(tptp_v7_0_0_0Parser.T__13)
                self.state = 927
                self.tff_let_formula_defn()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.T__9,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 929
                self.tff_let_formula_binding()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_formula_bindingContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_plain_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_plain_atomic_formulaContext, 0
            )

        def Iff(self):
            return self.getToken(tptp_v7_0_0_0Parser.Iff, 0)

        def tff_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_formulaContext, 0
            )

        def tff_let_formula_binding(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_bindingContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_formula_binding

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_formula_binding"):
                listener.enterTff_let_formula_binding(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_formula_binding"):
                listener.exitTff_let_formula_binding(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_formula_binding"):
                return visitor.visitTff_let_formula_binding(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_formula_binding(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_formula_bindingContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 144, self.RULE_tff_let_formula_binding)
        try:
            self.state = 940
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 932
                self.fof_plain_atomic_formula()
                self.state = 933
                self.match(tptp_v7_0_0_0Parser.Iff)
                self.state = 934
                self.tff_unitary_formula()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 936
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 937
                self.tff_let_formula_binding()
                self.state = 938
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_sequentContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_formula_tuple(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_formula_tupleContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_formula_tupleContext, i
                )

        def Gentzen_arrow(self):
            return self.getToken(tptp_v7_0_0_0Parser.Gentzen_arrow, 0)

        def tff_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_sequent

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_sequent"):
                listener.enterTff_sequent(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_sequent"):
                listener.exitTff_sequent(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_sequent"):
                return visitor.visitTff_sequent(self)
            else:
                return visitor.visitChildren(self)

    def tff_sequent(self):

        localctx = tptp_v7_0_0_0Parser.Tff_sequentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_tff_sequent)
        try:
            self.state = 950
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__11, tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 942
                self.tff_formula_tuple()
                self.state = 943
                self.match(tptp_v7_0_0_0Parser.Gentzen_arrow)
                self.state = 944
                self.tff_formula_tuple()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 946
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 947
                self.tff_sequent()
                self.state = 948
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_formula_tupleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_formula_tuple_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_formula_tuple_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_formula_tuple

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_formula_tuple"):
                listener.enterTff_formula_tuple(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_formula_tuple"):
                listener.exitTff_formula_tuple(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_formula_tuple"):
                return visitor.visitTff_formula_tuple(self)
            else:
                return visitor.visitChildren(self)

    def tff_formula_tuple(self):

        localctx = tptp_v7_0_0_0Parser.Tff_formula_tupleContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 148, self.RULE_tff_formula_tuple)
        try:
            self.state = 957
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 952
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 953
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 954
                self.tff_formula_tuple_list()
                self.state = 955
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_formula_tuple_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_logic_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_logic_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_logic_formulaContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_formula_tuple_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_formula_tuple_list"):
                listener.enterTff_formula_tuple_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_formula_tuple_list"):
                listener.exitTff_formula_tuple_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_formula_tuple_list"):
                return visitor.visitTff_formula_tuple_list(self)
            else:
                return visitor.visitChildren(self)

    def tff_formula_tuple_list(self):

        localctx = tptp_v7_0_0_0Parser.Tff_formula_tuple_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 150, self.RULE_tff_formula_tuple_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 959
            self.tff_logic_formula()
            self.state = 964
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 960
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 961
                self.tff_logic_formula()
                self.state = 966
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_typed_atomContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def untyped_atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Untyped_atomContext, 0)

        def tff_top_level_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_top_level_typeContext, 0
            )

        def tff_typed_atom(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_typed_atomContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_typed_atom

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_typed_atom"):
                listener.enterTff_typed_atom(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_typed_atom"):
                listener.exitTff_typed_atom(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_typed_atom"):
                return visitor.visitTff_typed_atom(self)
            else:
                return visitor.visitChildren(self)

    def tff_typed_atom(self):

        localctx = tptp_v7_0_0_0Parser.Tff_typed_atomContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 152, self.RULE_tff_typed_atom)
        try:
            self.state = 975
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 967
                self.untyped_atom()
                self.state = 968
                self.match(tptp_v7_0_0_0Parser.T__13)
                self.state = 969
                self.tff_top_level_type()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 971
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 972
                self.tff_typed_atom()
                self.state = 973
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_subtypeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def untyped_atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Untyped_atomContext, 0)

        def Subtype_sign(self):
            return self.getToken(tptp_v7_0_0_0Parser.Subtype_sign, 0)

        def atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.AtomContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_subtype

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_subtype"):
                listener.enterTff_subtype(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_subtype"):
                listener.exitTff_subtype(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_subtype"):
                return visitor.visitTff_subtype(self)
            else:
                return visitor.visitChildren(self)

    def tff_subtype(self):

        localctx = tptp_v7_0_0_0Parser.Tff_subtypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_tff_subtype)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 977
            self.untyped_atom()
            self.state = 978
            self.match(tptp_v7_0_0_0Parser.Subtype_sign)
            self.state = 979
            self.atom()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_top_level_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def tff_mapping_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_mapping_typeContext, 0
            )

        def tf1_quantified_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tf1_quantified_typeContext, 0
            )

        def tff_top_level_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_top_level_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_top_level_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_top_level_type"):
                listener.enterTff_top_level_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_top_level_type"):
                listener.exitTff_top_level_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_top_level_type"):
                return visitor.visitTff_top_level_type(self)
            else:
                return visitor.visitChildren(self)

    def tff_top_level_type(self):

        localctx = tptp_v7_0_0_0Parser.Tff_top_level_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 156, self.RULE_tff_top_level_type)
        try:
            self.state = 988
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 57, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 981
                self.tff_atomic_type()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 982
                self.tff_mapping_type()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 983
                self.tf1_quantified_type()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 984
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 985
                self.tff_top_level_type()
                self.state = 986
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tf1_quantified_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def TyForall(self):
            return self.getToken(tptp_v7_0_0_0Parser.TyForall, 0)

        def tff_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_variable_listContext, 0
            )

        def tff_monotype(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_monotypeContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tf1_quantified_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTf1_quantified_type"):
                listener.enterTf1_quantified_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTf1_quantified_type"):
                listener.exitTf1_quantified_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTf1_quantified_type"):
                return visitor.visitTf1_quantified_type(self)
            else:
                return visitor.visitChildren(self)

    def tf1_quantified_type(self):

        localctx = tptp_v7_0_0_0Parser.Tf1_quantified_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 158, self.RULE_tf1_quantified_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 990
            self.match(tptp_v7_0_0_0Parser.TyForall)
            self.state = 991
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 992
            self.tff_variable_list()
            self.state = 993
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 994
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 995
            self.tff_monotype()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_monotypeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def tff_mapping_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_mapping_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_monotype

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_monotype"):
                listener.enterTff_monotype(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_monotype"):
                listener.exitTff_monotype(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_monotype"):
                return visitor.visitTff_monotype(self)
            else:
                return visitor.visitChildren(self)

    def tff_monotype(self):

        localctx = tptp_v7_0_0_0Parser.Tff_monotypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_tff_monotype)
        try:
            self.state = 1002
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 997
                self.tff_atomic_type()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 998
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 999
                self.tff_mapping_type()
                self.state = 1000
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_unitary_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def tff_xprod_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_xprod_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_unitary_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_unitary_type"):
                listener.enterTff_unitary_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_unitary_type"):
                listener.exitTff_unitary_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_unitary_type"):
                return visitor.visitTff_unitary_type(self)
            else:
                return visitor.visitChildren(self)

    def tff_unitary_type(self):

        localctx = tptp_v7_0_0_0Parser.Tff_unitary_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 162, self.RULE_tff_unitary_type)
        try:
            self.state = 1009
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1004
                self.tff_atomic_type()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1005
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1006
                self.tff_xprod_type(0)
                self.state = 1007
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_atomic_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def type_constant(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Type_constantContext, 0)

        def defined_type(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Defined_typeContext, 0)

        def type_functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Type_functorContext, 0)

        def tff_type_arguments(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_type_argumentsContext, 0
            )

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_atomic_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_atomic_type"):
                listener.enterTff_atomic_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_atomic_type"):
                listener.exitTff_atomic_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_atomic_type"):
                return visitor.visitTff_atomic_type(self)
            else:
                return visitor.visitChildren(self)

    def tff_atomic_type(self):

        localctx = tptp_v7_0_0_0Parser.Tff_atomic_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 164, self.RULE_tff_atomic_type)
        try:
            self.state = 1019
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 60, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1011
                self.type_constant()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1012
                self.defined_type()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1013
                self.type_functor()
                self.state = 1014
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1015
                self.tff_type_arguments()
                self.state = 1016
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1018
                self.variable()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_type_argumentsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_atomic_type(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Tff_atomic_typeContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Tff_atomic_typeContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_type_arguments

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_type_arguments"):
                listener.enterTff_type_arguments(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_type_arguments"):
                listener.exitTff_type_arguments(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_type_arguments"):
                return visitor.visitTff_type_arguments(self)
            else:
                return visitor.visitChildren(self)

    def tff_type_arguments(self):

        localctx = tptp_v7_0_0_0Parser.Tff_type_argumentsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 166, self.RULE_tff_type_arguments)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1021
            self.tff_atomic_type()
            self.state = 1026
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1022
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1023
                self.tff_atomic_type()
                self.state = 1028
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_mapping_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_unitary_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_typeContext, 0
            )

        def Arrow(self):
            return self.getToken(tptp_v7_0_0_0Parser.Arrow, 0)

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_mapping_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_mapping_type"):
                listener.enterTff_mapping_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_mapping_type"):
                listener.exitTff_mapping_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_mapping_type"):
                return visitor.visitTff_mapping_type(self)
            else:
                return visitor.visitChildren(self)

    def tff_mapping_type(self):

        localctx = tptp_v7_0_0_0Parser.Tff_mapping_typeContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 168, self.RULE_tff_mapping_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1029
            self.tff_unitary_type()
            self.state = 1030
            self.match(tptp_v7_0_0_0Parser.Arrow)
            self.state = 1031
            self.tff_atomic_type()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_xprod_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_unitary_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_unitary_typeContext, 0
            )

        def Star(self):
            return self.getToken(tptp_v7_0_0_0Parser.Star, 0)

        def tff_atomic_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_atomic_typeContext, 0
            )

        def tff_xprod_type(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_xprod_typeContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_xprod_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_xprod_type"):
                listener.enterTff_xprod_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_xprod_type"):
                listener.exitTff_xprod_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_xprod_type"):
                return visitor.visitTff_xprod_type(self)
            else:
                return visitor.visitChildren(self)

    def tff_xprod_type(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Tff_xprod_typeContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 170
        self.enterRecursionRule(localctx, 170, self.RULE_tff_xprod_type, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1034
            self.tff_unitary_type()
            self.state = 1035
            self.match(tptp_v7_0_0_0Parser.Star)
            self.state = 1036
            self.tff_atomic_type()
            self._ctx.stop = self._input.LT(-1)
            self.state = 1043
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 62, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Tff_xprod_typeContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_tff_xprod_type
                    )
                    self.state = 1038
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 1039
                    self.match(tptp_v7_0_0_0Parser.Star)
                    self.state = 1040
                    self.tff_atomic_type()
                self.state = 1045
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 62, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Tcf_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tcf_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tcf_logic_formulaContext, 0
            )

        def tff_typed_atom(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_typed_atomContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tcf_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTcf_formula"):
                listener.enterTcf_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTcf_formula"):
                listener.exitTcf_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTcf_formula"):
                return visitor.visitTcf_formula(self)
            else:
                return visitor.visitChildren(self)

    def tcf_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tcf_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_tcf_formula)
        try:
            self.state = 1048
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 63, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1046
                self.tcf_logic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1047
                self.tff_typed_atom()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tcf_logic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tcf_quantified_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tcf_quantified_formulaContext, 0
            )

        def cnf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_formulaContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tcf_logic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTcf_logic_formula"):
                listener.enterTcf_logic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTcf_logic_formula"):
                listener.exitTcf_logic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTcf_logic_formula"):
                return visitor.visitTcf_logic_formula(self)
            else:
                return visitor.visitChildren(self)

    def tcf_logic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tcf_logic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 174, self.RULE_tcf_logic_formula)
        try:
            self.state = 1052
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Forall]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1050
                self.tcf_quantified_formula()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.T__9,
                tptp_v7_0_0_0Parser.T__17,
                tptp_v7_0_0_0Parser.T__18,
                tptp_v7_0_0_0Parser.T__23,
                tptp_v7_0_0_0Parser.T__24,
                tptp_v7_0_0_0Parser.T__25,
                tptp_v7_0_0_0Parser.Not,
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1051
                self.cnf_formula()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tcf_quantified_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Forall(self):
            return self.getToken(tptp_v7_0_0_0Parser.Forall, 0)

        def tff_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_variable_listContext, 0
            )

        def cnf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_formulaContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tcf_quantified_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTcf_quantified_formula"):
                listener.enterTcf_quantified_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTcf_quantified_formula"):
                listener.exitTcf_quantified_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTcf_quantified_formula"):
                return visitor.visitTcf_quantified_formula(self)
            else:
                return visitor.visitChildren(self)

    def tcf_quantified_formula(self):

        localctx = tptp_v7_0_0_0Parser.Tcf_quantified_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 176, self.RULE_tcf_quantified_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1054
            self.match(tptp_v7_0_0_0Parser.Forall)
            self.state = 1055
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 1056
            self.tff_variable_list()
            self.state = 1057
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 1058
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 1059
            self.cnf_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_logic_formulaContext, 0
            )

        def fof_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_formula"):
                listener.enterFof_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_formula"):
                listener.exitFof_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_formula"):
                return visitor.visitFof_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_fof_formula)
        try:
            self.state = 1063
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 65, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1061
                self.fof_logic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1062
                self.fof_sequent()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_logic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_binary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_binary_formulaContext, 0
            )

        def fof_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_logic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_logic_formula"):
                listener.enterFof_logic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_logic_formula"):
                listener.exitFof_logic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_logic_formula"):
                return visitor.visitFof_logic_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_logic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_logic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 180, self.RULE_fof_logic_formula)
        try:
            self.state = 1067
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 66, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1065
                self.fof_binary_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1066
                self.fof_unitary_formula()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_binary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_binary_nonassoc(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_binary_nonassocContext, 0
            )

        def fof_binary_assoc(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_binary_assocContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_binary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_binary_formula"):
                listener.enterFof_binary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_binary_formula"):
                listener.exitFof_binary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_binary_formula"):
                return visitor.visitFof_binary_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_binary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_binary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 182, self.RULE_fof_binary_formula)
        try:
            self.state = 1071
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 67, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1069
                self.fof_binary_nonassoc()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1070
                self.fof_binary_assoc()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_binary_nonassocContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, i
                )

        def binary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Binary_connectiveContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_binary_nonassoc

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_binary_nonassoc"):
                listener.enterFof_binary_nonassoc(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_binary_nonassoc"):
                listener.exitFof_binary_nonassoc(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_binary_nonassoc"):
                return visitor.visitFof_binary_nonassoc(self)
            else:
                return visitor.visitChildren(self)

    def fof_binary_nonassoc(self):

        localctx = tptp_v7_0_0_0Parser.Fof_binary_nonassocContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 184, self.RULE_fof_binary_nonassoc)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1073
            self.fof_unitary_formula()
            self.state = 1074
            self.binary_connective()
            self.state = 1075
            self.fof_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_binary_assocContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_or_formulaContext, 0
            )

        def fof_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_and_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_binary_assoc

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_binary_assoc"):
                listener.enterFof_binary_assoc(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_binary_assoc"):
                listener.exitFof_binary_assoc(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_binary_assoc"):
                return visitor.visitFof_binary_assoc(self)
            else:
                return visitor.visitChildren(self)

    def fof_binary_assoc(self):

        localctx = tptp_v7_0_0_0Parser.Fof_binary_assocContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 186, self.RULE_fof_binary_assoc)
        try:
            self.state = 1079
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 68, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1077
                self.fof_or_formula(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1078
                self.fof_and_formula(0)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_or_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, i
                )

        def Or(self):
            return self.getToken(tptp_v7_0_0_0Parser.Or, 0)

        def fof_or_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_or_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_or_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_or_formula"):
                listener.enterFof_or_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_or_formula"):
                listener.exitFof_or_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_or_formula"):
                return visitor.visitFof_or_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_or_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Fof_or_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 188
        self.enterRecursionRule(localctx, 188, self.RULE_fof_or_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1082
            self.fof_unitary_formula()
            self.state = 1083
            self.match(tptp_v7_0_0_0Parser.Or)
            self.state = 1084
            self.fof_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 1091
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 69, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Fof_or_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_fof_or_formula
                    )
                    self.state = 1086
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 1087
                    self.match(tptp_v7_0_0_0Parser.Or)
                    self.state = 1088
                    self.fof_unitary_formula()
                self.state = 1093
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 69, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Fof_and_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_unitary_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, i
                )

        def And(self):
            return self.getToken(tptp_v7_0_0_0Parser.And, 0)

        def fof_and_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_and_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_and_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_and_formula"):
                listener.enterFof_and_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_and_formula"):
                listener.exitFof_and_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_and_formula"):
                return visitor.visitFof_and_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_and_formula(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Fof_and_formulaContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 190
        self.enterRecursionRule(localctx, 190, self.RULE_fof_and_formula, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1095
            self.fof_unitary_formula()
            self.state = 1096
            self.match(tptp_v7_0_0_0Parser.And)
            self.state = 1097
            self.fof_unitary_formula()
            self._ctx.stop = self._input.LT(-1)
            self.state = 1104
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 70, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Fof_and_formulaContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_fof_and_formula
                    )
                    self.state = 1099
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 1100
                    self.match(tptp_v7_0_0_0Parser.And)
                    self.state = 1101
                    self.fof_unitary_formula()
                self.state = 1106
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 70, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Fof_unitary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_quantified_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_quantified_formulaContext, 0
            )

        def fof_unary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_unary_formulaContext, 0
            )

        def fof_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_atomic_formulaContext, 0
            )

        def fof_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_logic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_unitary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_unitary_formula"):
                listener.enterFof_unitary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_unitary_formula"):
                listener.exitFof_unitary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_unitary_formula"):
                return visitor.visitFof_unitary_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_unitary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_unitary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 192, self.RULE_fof_unitary_formula)
        try:
            self.state = 1114
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 71, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1107
                self.fof_quantified_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1108
                self.fof_unary_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1109
                self.fof_atomic_formula()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1110
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1111
                self.fof_logic_formula()
                self.state = 1112
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_quantified_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_quantifierContext, 0
            )

        def fof_variable_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_variable_listContext, 0
            )

        def fof_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_quantified_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_quantified_formula"):
                listener.enterFof_quantified_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_quantified_formula"):
                listener.exitFof_quantified_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_quantified_formula"):
                return visitor.visitFof_quantified_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_quantified_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_quantified_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 194, self.RULE_fof_quantified_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1116
            self.fof_quantifier()
            self.state = 1117
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 1118
            self.fof_variable_list()
            self.state = 1119
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 1120
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 1121
            self.fof_unitary_formula()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_variable_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def variable(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.VariableContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_variable_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_variable_list"):
                listener.enterFof_variable_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_variable_list"):
                listener.exitFof_variable_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_variable_list"):
                return visitor.visitFof_variable_list(self)
            else:
                return visitor.visitChildren(self)

    def fof_variable_list(self):

        localctx = tptp_v7_0_0_0Parser.Fof_variable_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 196, self.RULE_fof_variable_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1123
            self.variable()
            self.state = 1128
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1124
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1125
                self.variable()
                self.state = 1130
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_unary_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Unary_connectiveContext, 0
            )

        def fof_unitary_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_unitary_formulaContext, 0
            )

        def fof_infix_unary(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_infix_unaryContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_unary_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_unary_formula"):
                listener.enterFof_unary_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_unary_formula"):
                listener.exitFof_unary_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_unary_formula"):
                return visitor.visitFof_unary_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_unary_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_unary_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 198, self.RULE_fof_unary_formula)
        try:
            self.state = 1135
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Not]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1131
                self.unary_connective()
                self.state = 1132
                self.fof_unitary_formula()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.T__17,
                tptp_v7_0_0_0Parser.T__18,
                tptp_v7_0_0_0Parser.T__23,
                tptp_v7_0_0_0Parser.T__24,
                tptp_v7_0_0_0Parser.T__25,
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1134
                self.fof_infix_unary()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_infix_unaryContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Fof_termContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, i)

        def Infix_inequality(self):
            return self.getToken(tptp_v7_0_0_0Parser.Infix_inequality, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_infix_unary

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_infix_unary"):
                listener.enterFof_infix_unary(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_infix_unary"):
                listener.exitFof_infix_unary(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_infix_unary"):
                return visitor.visitFof_infix_unary(self)
            else:
                return visitor.visitChildren(self)

    def fof_infix_unary(self):

        localctx = tptp_v7_0_0_0Parser.Fof_infix_unaryContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 200, self.RULE_fof_infix_unary)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1137
            self.fof_term()
            self.state = 1138
            self.match(tptp_v7_0_0_0Parser.Infix_inequality)
            self.state = 1139
            self.fof_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_atomic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_plain_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_plain_atomic_formulaContext, 0
            )

        def fof_defined_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_atomic_formulaContext, 0
            )

        def fof_system_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_system_atomic_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_atomic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_atomic_formula"):
                listener.enterFof_atomic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_atomic_formula"):
                listener.exitFof_atomic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_atomic_formula"):
                return visitor.visitFof_atomic_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_atomic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_atomic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 202, self.RULE_fof_atomic_formula)
        try:
            self.state = 1144
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 74, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1141
                self.fof_plain_atomic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1142
                self.fof_defined_atomic_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1143
                self.fof_system_atomic_formula()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_plain_atomic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_plain_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_plain_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_plain_atomic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_plain_atomic_formula"):
                listener.enterFof_plain_atomic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_plain_atomic_formula"):
                listener.exitFof_plain_atomic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_plain_atomic_formula"):
                return visitor.visitFof_plain_atomic_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_plain_atomic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_plain_atomic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 204, self.RULE_fof_plain_atomic_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1146
            self.fof_plain_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_atomic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_defined_plain_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_plain_formulaContext, 0
            )

        def fof_defined_infix_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_infix_formulaContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_atomic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_atomic_formula"):
                listener.enterFof_defined_atomic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_atomic_formula"):
                listener.exitFof_defined_atomic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_atomic_formula"):
                return visitor.visitFof_defined_atomic_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_atomic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_atomic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 206, self.RULE_fof_defined_atomic_formula)
        try:
            self.state = 1150
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 75, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1148
                self.fof_defined_plain_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1149
                self.fof_defined_infix_formula()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_plain_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_defined_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_plain_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_plain_formula"):
                listener.enterFof_defined_plain_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_plain_formula"):
                listener.exitFof_defined_plain_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_plain_formula"):
                return visitor.visitFof_defined_plain_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_plain_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_plain_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 208, self.RULE_fof_defined_plain_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1152
            self.fof_defined_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_infix_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Fof_termContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, i)

        def defined_infix_pred(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_infix_predContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_infix_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_infix_formula"):
                listener.enterFof_defined_infix_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_infix_formula"):
                listener.exitFof_defined_infix_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_infix_formula"):
                return visitor.visitFof_defined_infix_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_infix_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_infix_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 210, self.RULE_fof_defined_infix_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1154
            self.fof_term()
            self.state = 1155
            self.defined_infix_pred()
            self.state = 1156
            self.fof_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_system_atomic_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_system_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_system_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_system_atomic_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_system_atomic_formula"):
                listener.enterFof_system_atomic_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_system_atomic_formula"):
                listener.exitFof_system_atomic_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_system_atomic_formula"):
                return visitor.visitFof_system_atomic_formula(self)
            else:
                return visitor.visitChildren(self)

    def fof_system_atomic_formula(self):

        localctx = tptp_v7_0_0_0Parser.Fof_system_atomic_formulaContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 212, self.RULE_fof_system_atomic_formula)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1158
            self.fof_system_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_plain_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def constant(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.ConstantContext, 0)

        def functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.FunctorContext, 0)

        def fof_arguments(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_argumentsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_plain_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_plain_term"):
                listener.enterFof_plain_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_plain_term"):
                listener.exitFof_plain_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_plain_term"):
                return visitor.visitFof_plain_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_plain_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_plain_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 214, self.RULE_fof_plain_term)
        try:
            self.state = 1166
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 76, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1160
                self.constant()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1161
                self.functor()
                self.state = 1162
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1163
                self.fof_arguments()
                self.state = 1164
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def defined_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Defined_termContext, 0)

        def fof_defined_atomic_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_atomic_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_term"):
                listener.enterFof_defined_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_term"):
                listener.exitFof_defined_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_term"):
                return visitor.visitFof_defined_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 216, self.RULE_fof_defined_term)
        try:
            self.state = 1170
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1168
                self.defined_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.Dollar_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1169
                self.fof_defined_atomic_term()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_atomic_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_defined_plain_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_plain_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_atomic_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_atomic_term"):
                listener.enterFof_defined_atomic_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_atomic_term"):
                listener.exitFof_defined_atomic_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_atomic_term"):
                return visitor.visitFof_defined_atomic_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_atomic_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_atomic_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 218, self.RULE_fof_defined_atomic_term)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1172
            self.fof_defined_plain_term()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_defined_plain_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def defined_constant(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_constantContext, 0
            )

        def defined_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_functorContext, 0
            )

        def fof_arguments(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_argumentsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_defined_plain_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_defined_plain_term"):
                listener.enterFof_defined_plain_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_defined_plain_term"):
                listener.exitFof_defined_plain_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_defined_plain_term"):
                return visitor.visitFof_defined_plain_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_defined_plain_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_defined_plain_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 220, self.RULE_fof_defined_plain_term)
        try:
            self.state = 1180
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 78, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1174
                self.defined_constant()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1175
                self.defined_functor()
                self.state = 1176
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1177
                self.fof_arguments()
                self.state = 1178
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_system_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def system_constant(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.System_constantContext, 0
            )

        def system_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.System_functorContext, 0
            )

        def fof_arguments(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_argumentsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_system_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_system_term"):
                listener.enterFof_system_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_system_term"):
                listener.exitFof_system_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_system_term"):
                return visitor.visitFof_system_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_system_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_system_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 222, self.RULE_fof_system_term)
        try:
            self.state = 1188
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 79, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1182
                self.system_constant()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1183
                self.system_functor()
                self.state = 1184
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1185
                self.fof_arguments()
                self.state = 1186
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_argumentsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Fof_termContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_arguments

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_arguments"):
                listener.enterFof_arguments(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_arguments"):
                listener.exitFof_arguments(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_arguments"):
                return visitor.visitFof_arguments(self)
            else:
                return visitor.visitChildren(self)

    def fof_arguments(self):

        localctx = tptp_v7_0_0_0Parser.Fof_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 224, self.RULE_fof_arguments)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1190
            self.fof_term()
            self.state = 1195
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1191
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1192
                self.fof_term()
                self.state = 1197
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_function_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_function_termContext, 0
            )

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def tff_conditional_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_conditional_termContext, 0
            )

        def tff_let_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_let_termContext, 0)

        def tff_tuple_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_tuple_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_term"):
                listener.enterFof_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_term"):
                listener.exitFof_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_term"):
                return visitor.visitFof_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 226, self.RULE_fof_term)
        try:
            self.state = 1203
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1198
                self.fof_function_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.Upper_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1199
                self.variable()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__23]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1200
                self.tff_conditional_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__24, tptp_v7_0_0_0Parser.T__25]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1201
                self.tff_let_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__17, tptp_v7_0_0_0Parser.T__18]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1202
                self.tff_tuple_term()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_function_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_plain_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_plain_termContext, 0
            )

        def fof_defined_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_defined_termContext, 0
            )

        def fof_system_term(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_system_termContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_function_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_function_term"):
                listener.enterFof_function_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_function_term"):
                listener.exitFof_function_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_function_term"):
                return visitor.visitFof_function_term(self)
            else:
                return visitor.visitChildren(self)

    def fof_function_term(self):

        localctx = tptp_v7_0_0_0Parser.Fof_function_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 228, self.RULE_fof_function_term)
        try:
            self.state = 1208
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1205
                self.fof_plain_term()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1206
                self.fof_defined_term()
                pass
            elif token in [tptp_v7_0_0_0Parser.Dollar_dollar_word]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1207
                self.fof_system_term()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_conditional_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_logic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_logic_formulaContext, 0
            )

        def fof_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Fof_termContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_conditional_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_conditional_term"):
                listener.enterTff_conditional_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_conditional_term"):
                listener.exitTff_conditional_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_conditional_term"):
                return visitor.visitTff_conditional_term(self)
            else:
                return visitor.visitChildren(self)

    def tff_conditional_term(self):

        localctx = tptp_v7_0_0_0Parser.Tff_conditional_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 230, self.RULE_tff_conditional_term)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1210
            self.match(tptp_v7_0_0_0Parser.T__23)
            self.state = 1211
            self.tff_logic_formula()
            self.state = 1212
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1213
            self.fof_term()
            self.state = 1214
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1215
            self.fof_term()
            self.state = 1216
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_let_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def tff_let_formula_defns(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_formula_defnsContext, 0
            )

        def fof_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, 0)

        def tff_let_term_defns(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Tff_let_term_defnsContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_let_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_let_term"):
                listener.enterTff_let_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_let_term"):
                listener.exitTff_let_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_let_term"):
                return visitor.visitTff_let_term(self)
            else:
                return visitor.visitChildren(self)

    def tff_let_term(self):

        localctx = tptp_v7_0_0_0Parser.Tff_let_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 232, self.RULE_tff_let_term)
        try:
            self.state = 1230
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__24]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1218
                self.match(tptp_v7_0_0_0Parser.T__24)
                self.state = 1219
                self.tff_let_formula_defns()
                self.state = 1220
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1221
                self.fof_term()
                self.state = 1222
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__25]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1224
                self.match(tptp_v7_0_0_0Parser.T__25)
                self.state = 1225
                self.tff_let_term_defns()
                self.state = 1226
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1227
                self.fof_term()
                self.state = 1228
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_tuple_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_arguments(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_argumentsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_tuple_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_tuple_term"):
                listener.enterTff_tuple_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_tuple_term"):
                listener.exitTff_tuple_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_tuple_term"):
                return visitor.visitTff_tuple_term(self)
            else:
                return visitor.visitChildren(self)

    def tff_tuple_term(self):

        localctx = tptp_v7_0_0_0Parser.Tff_tuple_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 234, self.RULE_tff_tuple_term)
        try:
            self.state = 1237
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__17]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1232
                self.match(tptp_v7_0_0_0Parser.T__17)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__18]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1233
                self.match(tptp_v7_0_0_0Parser.T__18)
                self.state = 1234
                self.fof_arguments()
                self.state = 1235
                self.match(tptp_v7_0_0_0Parser.T__19)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_sequentContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_formula_tuple(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Fof_formula_tupleContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Fof_formula_tupleContext, i
                )

        def Gentzen_arrow(self):
            return self.getToken(tptp_v7_0_0_0Parser.Gentzen_arrow, 0)

        def fof_sequent(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_sequentContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_sequent

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_sequent"):
                listener.enterFof_sequent(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_sequent"):
                listener.exitFof_sequent(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_sequent"):
                return visitor.visitFof_sequent(self)
            else:
                return visitor.visitChildren(self)

    def fof_sequent(self):

        localctx = tptp_v7_0_0_0Parser.Fof_sequentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 236, self.RULE_fof_sequent)
        try:
            self.state = 1247
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__11, tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1239
                self.fof_formula_tuple()
                self.state = 1240
                self.match(tptp_v7_0_0_0Parser.Gentzen_arrow)
                self.state = 1241
                self.fof_formula_tuple()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1243
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1244
                self.fof_sequent()
                self.state = 1245
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_formula_tupleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_formula_tuple_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_formula_tuple_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_formula_tuple

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_formula_tuple"):
                listener.enterFof_formula_tuple(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_formula_tuple"):
                listener.exitFof_formula_tuple(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_formula_tuple"):
                return visitor.visitFof_formula_tuple(self)
            else:
                return visitor.visitChildren(self)

    def fof_formula_tuple(self):

        localctx = tptp_v7_0_0_0Parser.Fof_formula_tupleContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 238, self.RULE_fof_formula_tuple)
        try:
            self.state = 1254
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1249
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1250
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 1251
                self.fof_formula_tuple_list()
                self.state = 1252
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_formula_tuple_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_logic_formula(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Fof_logic_formulaContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Fof_logic_formulaContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_formula_tuple_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_formula_tuple_list"):
                listener.enterFof_formula_tuple_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_formula_tuple_list"):
                listener.exitFof_formula_tuple_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_formula_tuple_list"):
                return visitor.visitFof_formula_tuple_list(self)
            else:
                return visitor.visitChildren(self)

    def fof_formula_tuple_list(self):

        localctx = tptp_v7_0_0_0Parser.Fof_formula_tuple_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 240, self.RULE_fof_formula_tuple_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1256
            self.fof_logic_formula()
            self.state = 1261
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1257
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1258
                self.fof_logic_formula()
                self.state = 1263
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Cnf_formulaContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def cnf_disjunction(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Cnf_disjunctionContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_cnf_formula

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCnf_formula"):
                listener.enterCnf_formula(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCnf_formula"):
                listener.exitCnf_formula(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCnf_formula"):
                return visitor.visitCnf_formula(self)
            else:
                return visitor.visitChildren(self)

    def cnf_formula(self):

        localctx = tptp_v7_0_0_0Parser.Cnf_formulaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 242, self.RULE_cnf_formula)
        try:
            self.state = 1269
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__17,
                tptp_v7_0_0_0Parser.T__18,
                tptp_v7_0_0_0Parser.T__23,
                tptp_v7_0_0_0Parser.T__24,
                tptp_v7_0_0_0Parser.T__25,
                tptp_v7_0_0_0Parser.Not,
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Dollar_word,
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Upper_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
                tptp_v7_0_0_0Parser.Distinct_object,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1264
                self.cnf_disjunction(0)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1265
                self.match(tptp_v7_0_0_0Parser.T__9)
                self.state = 1266
                self.cnf_disjunction(0)
                self.state = 1267
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Cnf_disjunctionContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def cnf_literal(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_literalContext, 0)

        def cnf_disjunction(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Cnf_disjunctionContext, 0
            )

        def Or(self):
            return self.getToken(tptp_v7_0_0_0Parser.Or, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_cnf_disjunction

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCnf_disjunction"):
                listener.enterCnf_disjunction(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCnf_disjunction"):
                listener.exitCnf_disjunction(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCnf_disjunction"):
                return visitor.visitCnf_disjunction(self)
            else:
                return visitor.visitChildren(self)

    def cnf_disjunction(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = tptp_v7_0_0_0Parser.Cnf_disjunctionContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 244
        self.enterRecursionRule(localctx, 244, self.RULE_cnf_disjunction, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1272
            self.cnf_literal()
            self._ctx.stop = self._input.LT(-1)
            self.state = 1279
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 89, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = tptp_v7_0_0_0Parser.Cnf_disjunctionContext(
                        self, _parentctx, _parentState
                    )
                    self.pushNewRecursionContext(
                        localctx, _startState, self.RULE_cnf_disjunction
                    )
                    self.state = 1274
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException

                        raise FailedPredicateException(
                            self, "self.precpred(self._ctx, 1)"
                        )
                    self.state = 1275
                    self.match(tptp_v7_0_0_0Parser.Or)
                    self.state = 1276
                    self.cnf_literal()
                self.state = 1281
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 89, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class Cnf_literalContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_atomic_formula(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_atomic_formulaContext, 0
            )

        def Not(self):
            return self.getToken(tptp_v7_0_0_0Parser.Not, 0)

        def fof_infix_unary(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_infix_unaryContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_cnf_literal

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCnf_literal"):
                listener.enterCnf_literal(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCnf_literal"):
                listener.exitCnf_literal(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCnf_literal"):
                return visitor.visitCnf_literal(self)
            else:
                return visitor.visitChildren(self)

    def cnf_literal(self):

        localctx = tptp_v7_0_0_0Parser.Cnf_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 246, self.RULE_cnf_literal)
        try:
            self.state = 1286
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 90, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1282
                self.fof_atomic_formula()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1283
                self.match(tptp_v7_0_0_0Parser.Not)
                self.state = 1284
                self.fof_atomic_formula()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1285
                self.fof_infix_unary()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_quantifierContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fof_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Fof_quantifierContext, 0
            )

        def th0_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Th0_quantifierContext, 0
            )

        def th1_quantifier(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Th1_quantifierContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_quantifier

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_quantifier"):
                listener.enterThf_quantifier(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_quantifier"):
                listener.exitThf_quantifier(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_quantifier"):
                return visitor.visitThf_quantifier(self)
            else:
                return visitor.visitChildren(self)

    def thf_quantifier(self):

        localctx = tptp_v7_0_0_0Parser.Thf_quantifierContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 248, self.RULE_thf_quantifier)
        try:
            self.state = 1291
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Forall, tptp_v7_0_0_0Parser.Exists]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1288
                self.fof_quantifier()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Lambda,
                tptp_v7_0_0_0Parser.Choice,
                tptp_v7_0_0_0Parser.Description,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1289
                self.th0_quantifier()
                pass
            elif token in [tptp_v7_0_0_0Parser.TyForall, tptp_v7_0_0_0Parser.TyExists]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1290
                self.th1_quantifier()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Th0_quantifierContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lambda(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lambda, 0)

        def Choice(self):
            return self.getToken(tptp_v7_0_0_0Parser.Choice, 0)

        def Description(self):
            return self.getToken(tptp_v7_0_0_0Parser.Description, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_th0_quantifier

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTh0_quantifier"):
                listener.enterTh0_quantifier(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTh0_quantifier"):
                listener.exitTh0_quantifier(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTh0_quantifier"):
                return visitor.visitTh0_quantifier(self)
            else:
                return visitor.visitChildren(self)

    def th0_quantifier(self):

        localctx = tptp_v7_0_0_0Parser.Th0_quantifierContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 250, self.RULE_th0_quantifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1293
            _la = self._input.LA(1)
            if not (
                (
                    (((_la - 61)) & ~0x3F) == 0
                    and (
                        (1 << (_la - 61))
                        & (
                            (1 << (tptp_v7_0_0_0Parser.Lambda - 61))
                            | (1 << (tptp_v7_0_0_0Parser.Choice - 61))
                            | (1 << (tptp_v7_0_0_0Parser.Description - 61))
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Th1_quantifierContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def TyForall(self):
            return self.getToken(tptp_v7_0_0_0Parser.TyForall, 0)

        def TyExists(self):
            return self.getToken(tptp_v7_0_0_0Parser.TyExists, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_th1_quantifier

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTh1_quantifier"):
                listener.enterTh1_quantifier(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTh1_quantifier"):
                listener.exitTh1_quantifier(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTh1_quantifier"):
                return visitor.visitTh1_quantifier(self)
            else:
                return visitor.visitChildren(self)

    def th1_quantifier(self):

        localctx = tptp_v7_0_0_0Parser.Th1_quantifierContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 252, self.RULE_th1_quantifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1295
            _la = self._input.LA(1)
            if not (
                _la == tptp_v7_0_0_0Parser.TyForall
                or _la == tptp_v7_0_0_0Parser.TyExists
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_pair_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Infix_equality(self):
            return self.getToken(tptp_v7_0_0_0Parser.Infix_equality, 0)

        def Infix_inequality(self):
            return self.getToken(tptp_v7_0_0_0Parser.Infix_inequality, 0)

        def binary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Binary_connectiveContext, 0
            )

        def Assignment(self):
            return self.getToken(tptp_v7_0_0_0Parser.Assignment, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_pair_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_pair_connective"):
                listener.enterThf_pair_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_pair_connective"):
                listener.exitThf_pair_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_pair_connective"):
                return visitor.visitThf_pair_connective(self)
            else:
                return visitor.visitChildren(self)

    def thf_pair_connective(self):

        localctx = tptp_v7_0_0_0Parser.Thf_pair_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 254, self.RULE_thf_pair_connective)
        try:
            self.state = 1301
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Infix_equality]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1297
                self.match(tptp_v7_0_0_0Parser.Infix_equality)
                pass
            elif token in [tptp_v7_0_0_0Parser.Infix_inequality]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1298
                self.match(tptp_v7_0_0_0Parser.Infix_inequality)
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Iff,
                tptp_v7_0_0_0Parser.Impl,
                tptp_v7_0_0_0Parser.If,
                tptp_v7_0_0_0Parser.Niff,
                tptp_v7_0_0_0Parser.Nor,
                tptp_v7_0_0_0Parser.Nand,
            ]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1299
                self.binary_connective()
                pass
            elif token in [tptp_v7_0_0_0Parser.Assignment]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1300
                self.match(tptp_v7_0_0_0Parser.Assignment)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Thf_unary_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Unary_connectiveContext, 0
            )

        def th1_unary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Th1_unary_connectiveContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_thf_unary_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterThf_unary_connective"):
                listener.enterThf_unary_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitThf_unary_connective"):
                listener.exitThf_unary_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitThf_unary_connective"):
                return visitor.visitThf_unary_connective(self)
            else:
                return visitor.visitChildren(self)

    def thf_unary_connective(self):

        localctx = tptp_v7_0_0_0Parser.Thf_unary_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 256, self.RULE_thf_unary_connective)
        try:
            self.state = 1305
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.Not]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1303
                self.unary_connective()
                pass
            elif token in [
                tptp_v7_0_0_0Parser.ForallComb,
                tptp_v7_0_0_0Parser.ExistsComb,
                tptp_v7_0_0_0Parser.ChoiceComb,
                tptp_v7_0_0_0Parser.DescriptionComb,
                tptp_v7_0_0_0Parser.EqComb,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1304
                self.th1_unary_connective()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Th1_unary_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ForallComb(self):
            return self.getToken(tptp_v7_0_0_0Parser.ForallComb, 0)

        def ExistsComb(self):
            return self.getToken(tptp_v7_0_0_0Parser.ExistsComb, 0)

        def ChoiceComb(self):
            return self.getToken(tptp_v7_0_0_0Parser.ChoiceComb, 0)

        def DescriptionComb(self):
            return self.getToken(tptp_v7_0_0_0Parser.DescriptionComb, 0)

        def EqComb(self):
            return self.getToken(tptp_v7_0_0_0Parser.EqComb, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_th1_unary_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTh1_unary_connective"):
                listener.enterTh1_unary_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTh1_unary_connective"):
                listener.exitTh1_unary_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTh1_unary_connective"):
                return visitor.visitTh1_unary_connective(self)
            else:
                return visitor.visitChildren(self)

    def th1_unary_connective(self):

        localctx = tptp_v7_0_0_0Parser.Th1_unary_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 258, self.RULE_th1_unary_connective)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1307
            _la = self._input.LA(1)
            if not (
                (
                    (((_la - 53)) & ~0x3F) == 0
                    and (
                        (1 << (_la - 53))
                        & (
                            (1 << (tptp_v7_0_0_0Parser.ForallComb - 53))
                            | (1 << (tptp_v7_0_0_0Parser.ExistsComb - 53))
                            | (1 << (tptp_v7_0_0_0Parser.ChoiceComb - 53))
                            | (1 << (tptp_v7_0_0_0Parser.DescriptionComb - 53))
                            | (1 << (tptp_v7_0_0_0Parser.EqComb - 53))
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Tff_pair_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def binary_connective(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Binary_connectiveContext, 0
            )

        def Assignment(self):
            return self.getToken(tptp_v7_0_0_0Parser.Assignment, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_tff_pair_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTff_pair_connective"):
                listener.enterTff_pair_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTff_pair_connective"):
                listener.exitTff_pair_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTff_pair_connective"):
                return visitor.visitTff_pair_connective(self)
            else:
                return visitor.visitChildren(self)

    def tff_pair_connective(self):

        localctx = tptp_v7_0_0_0Parser.Tff_pair_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 260, self.RULE_tff_pair_connective)
        try:
            self.state = 1311
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Iff,
                tptp_v7_0_0_0Parser.Impl,
                tptp_v7_0_0_0Parser.If,
                tptp_v7_0_0_0Parser.Niff,
                tptp_v7_0_0_0Parser.Nor,
                tptp_v7_0_0_0Parser.Nand,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1309
                self.binary_connective()
                pass
            elif token in [tptp_v7_0_0_0Parser.Assignment]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1310
                self.match(tptp_v7_0_0_0Parser.Assignment)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Fof_quantifierContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Forall(self):
            return self.getToken(tptp_v7_0_0_0Parser.Forall, 0)

        def Exists(self):
            return self.getToken(tptp_v7_0_0_0Parser.Exists, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_fof_quantifier

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFof_quantifier"):
                listener.enterFof_quantifier(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFof_quantifier"):
                listener.exitFof_quantifier(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFof_quantifier"):
                return visitor.visitFof_quantifier(self)
            else:
                return visitor.visitChildren(self)

    def fof_quantifier(self):

        localctx = tptp_v7_0_0_0Parser.Fof_quantifierContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 262, self.RULE_fof_quantifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1313
            _la = self._input.LA(1)
            if not (
                _la == tptp_v7_0_0_0Parser.Forall or _la == tptp_v7_0_0_0Parser.Exists
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Binary_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Iff(self):
            return self.getToken(tptp_v7_0_0_0Parser.Iff, 0)

        def Impl(self):
            return self.getToken(tptp_v7_0_0_0Parser.Impl, 0)

        def If(self):
            return self.getToken(tptp_v7_0_0_0Parser.If, 0)

        def Niff(self):
            return self.getToken(tptp_v7_0_0_0Parser.Niff, 0)

        def Nor(self):
            return self.getToken(tptp_v7_0_0_0Parser.Nor, 0)

        def Nand(self):
            return self.getToken(tptp_v7_0_0_0Parser.Nand, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_binary_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterBinary_connective"):
                listener.enterBinary_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitBinary_connective"):
                listener.exitBinary_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitBinary_connective"):
                return visitor.visitBinary_connective(self)
            else:
                return visitor.visitChildren(self)

    def binary_connective(self):

        localctx = tptp_v7_0_0_0Parser.Binary_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 264, self.RULE_binary_connective)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1315
            _la = self._input.LA(1)
            if not (
                (
                    ((_la) & ~0x3F) == 0
                    and (
                        (1 << _la)
                        & (
                            (1 << tptp_v7_0_0_0Parser.Iff)
                            | (1 << tptp_v7_0_0_0Parser.Impl)
                            | (1 << tptp_v7_0_0_0Parser.If)
                            | (1 << tptp_v7_0_0_0Parser.Niff)
                            | (1 << tptp_v7_0_0_0Parser.Nor)
                            | (1 << tptp_v7_0_0_0Parser.Nand)
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Assoc_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Or(self):
            return self.getToken(tptp_v7_0_0_0Parser.Or, 0)

        def And(self):
            return self.getToken(tptp_v7_0_0_0Parser.And, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_assoc_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAssoc_connective"):
                listener.enterAssoc_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAssoc_connective"):
                listener.exitAssoc_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAssoc_connective"):
                return visitor.visitAssoc_connective(self)
            else:
                return visitor.visitChildren(self)

    def assoc_connective(self):

        localctx = tptp_v7_0_0_0Parser.Assoc_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 266, self.RULE_assoc_connective)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1317
            _la = self._input.LA(1)
            if not (_la == tptp_v7_0_0_0Parser.Or or _la == tptp_v7_0_0_0Parser.And):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Unary_connectiveContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Not(self):
            return self.getToken(tptp_v7_0_0_0Parser.Not, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_unary_connective

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterUnary_connective"):
                listener.enterUnary_connective(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitUnary_connective"):
                listener.exitUnary_connective(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitUnary_connective"):
                return visitor.visitUnary_connective(self)
            else:
                return visitor.visitChildren(self)

    def unary_connective(self):

        localctx = tptp_v7_0_0_0Parser.Unary_connectiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 268, self.RULE_unary_connective)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1319
            self.match(tptp_v7_0_0_0Parser.Not)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Type_constantContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def type_functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Type_functorContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_type_constant

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterType_constant"):
                listener.enterType_constant(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitType_constant"):
                listener.exitType_constant(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitType_constant"):
                return visitor.visitType_constant(self)
            else:
                return visitor.visitChildren(self)

    def type_constant(self):

        localctx = tptp_v7_0_0_0Parser.Type_constantContext(self, self._ctx, self.state)
        self.enterRule(localctx, 270, self.RULE_type_constant)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1321
            self.type_functor()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Type_functorContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_type_functor

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterType_functor"):
                listener.enterType_functor(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitType_functor"):
                listener.exitType_functor(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitType_functor"):
                return visitor.visitType_functor(self)
            else:
                return visitor.visitChildren(self)

    def type_functor(self):

        localctx = tptp_v7_0_0_0Parser.Type_functorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 272, self.RULE_type_functor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1323
            self.atomic_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dollar_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Dollar_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_type"):
                listener.enterDefined_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_type"):
                listener.exitDefined_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_type"):
                return visitor.visitDefined_type(self)
            else:
                return visitor.visitChildren(self)

    def defined_type(self):

        localctx = tptp_v7_0_0_0Parser.Defined_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 274, self.RULE_defined_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1325
            self.match(tptp_v7_0_0_0Parser.Dollar_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class System_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_system_word(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Atomic_system_wordContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_system_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterSystem_type"):
                listener.enterSystem_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitSystem_type"):
                listener.exitSystem_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitSystem_type"):
                return visitor.visitSystem_type(self)
            else:
                return visitor.visitChildren(self)

    def system_type(self):

        localctx = tptp_v7_0_0_0Parser.System_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 276, self.RULE_system_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1327
            self.atomic_system_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class AtomContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def untyped_atom(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Untyped_atomContext, 0)

        def defined_constant(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_constantContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_atom

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAtom"):
                listener.enterAtom(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAtom"):
                listener.exitAtom(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAtom"):
                return visitor.visitAtom(self)
            else:
                return visitor.visitChildren(self)

    def atom(self):

        localctx = tptp_v7_0_0_0Parser.AtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 278, self.RULE_atom)
        try:
            self.state = 1331
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Dollar_dollar_word,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1329
                self.untyped_atom()
                pass
            elif token in [tptp_v7_0_0_0Parser.Dollar_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1330
                self.defined_constant()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Untyped_atomContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def constant(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.ConstantContext, 0)

        def system_constant(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.System_constantContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_untyped_atom

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterUntyped_atom"):
                listener.enterUntyped_atom(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitUntyped_atom"):
                listener.exitUntyped_atom(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitUntyped_atom"):
                return visitor.visitUntyped_atom(self)
            else:
                return visitor.visitChildren(self)

    def untyped_atom(self):

        localctx = tptp_v7_0_0_0Parser.Untyped_atomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 280, self.RULE_untyped_atom)
        try:
            self.state = 1335
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1333
                self.constant()
                pass
            elif token in [tptp_v7_0_0_0Parser.Dollar_dollar_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1334
                self.system_constant()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_propositionContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dollar_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Dollar_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_proposition

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_proposition"):
                listener.enterDefined_proposition(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_proposition"):
                listener.exitDefined_proposition(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_proposition"):
                return visitor.visitDefined_proposition(self)
            else:
                return visitor.visitChildren(self)

    def defined_proposition(self):

        localctx = tptp_v7_0_0_0Parser.Defined_propositionContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 282, self.RULE_defined_proposition)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1337
            self.match(tptp_v7_0_0_0Parser.Dollar_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_predicateContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dollar_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Dollar_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_predicate

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_predicate"):
                listener.enterDefined_predicate(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_predicate"):
                listener.exitDefined_predicate(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_predicate"):
                return visitor.visitDefined_predicate(self)
            else:
                return visitor.visitChildren(self)

    def defined_predicate(self):

        localctx = tptp_v7_0_0_0Parser.Defined_predicateContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 284, self.RULE_defined_predicate)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1339
            self.match(tptp_v7_0_0_0Parser.Dollar_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_infix_predContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Infix_equality(self):
            return self.getToken(tptp_v7_0_0_0Parser.Infix_equality, 0)

        def Assignment(self):
            return self.getToken(tptp_v7_0_0_0Parser.Assignment, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_infix_pred

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_infix_pred"):
                listener.enterDefined_infix_pred(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_infix_pred"):
                listener.exitDefined_infix_pred(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_infix_pred"):
                return visitor.visitDefined_infix_pred(self)
            else:
                return visitor.visitChildren(self)

    def defined_infix_pred(self):

        localctx = tptp_v7_0_0_0Parser.Defined_infix_predContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 286, self.RULE_defined_infix_pred)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1341
            _la = self._input.LA(1)
            if not (
                _la == tptp_v7_0_0_0Parser.Infix_equality
                or _la == tptp_v7_0_0_0Parser.Assignment
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ConstantContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.FunctorContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_constant

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterConstant"):
                listener.enterConstant(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitConstant"):
                listener.exitConstant(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitConstant"):
                return visitor.visitConstant(self)
            else:
                return visitor.visitChildren(self)

    def constant(self):

        localctx = tptp_v7_0_0_0Parser.ConstantContext(self, self._ctx, self.state)
        self.enterRule(localctx, 288, self.RULE_constant)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1343
            self.functor()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FunctorContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_functor

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFunctor"):
                listener.enterFunctor(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFunctor"):
                listener.exitFunctor(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFunctor"):
                return visitor.visitFunctor(self)
            else:
                return visitor.visitChildren(self)

    def functor(self):

        localctx = tptp_v7_0_0_0Parser.FunctorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 290, self.RULE_functor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1345
            self.atomic_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class System_constantContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def system_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.System_functorContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_system_constant

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterSystem_constant"):
                listener.enterSystem_constant(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitSystem_constant"):
                listener.exitSystem_constant(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitSystem_constant"):
                return visitor.visitSystem_constant(self)
            else:
                return visitor.visitChildren(self)

    def system_constant(self):

        localctx = tptp_v7_0_0_0Parser.System_constantContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 292, self.RULE_system_constant)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1347
            self.system_functor()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class System_functorContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_system_word(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Atomic_system_wordContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_system_functor

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterSystem_functor"):
                listener.enterSystem_functor(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitSystem_functor"):
                listener.exitSystem_functor(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitSystem_functor"):
                return visitor.visitSystem_functor(self)
            else:
                return visitor.visitChildren(self)

    def system_functor(self):

        localctx = tptp_v7_0_0_0Parser.System_functorContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 294, self.RULE_system_functor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1349
            self.atomic_system_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_constantContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def defined_functor(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Defined_functorContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_constant

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_constant"):
                listener.enterDefined_constant(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_constant"):
                listener.exitDefined_constant(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_constant"):
                return visitor.visitDefined_constant(self)
            else:
                return visitor.visitChildren(self)

    def defined_constant(self):

        localctx = tptp_v7_0_0_0Parser.Defined_constantContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 296, self.RULE_defined_constant)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1351
            self.defined_functor()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_functorContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_defined_word(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Atomic_defined_wordContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_functor

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_functor"):
                listener.enterDefined_functor(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_functor"):
                listener.exitDefined_functor(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_functor"):
                return visitor.visitDefined_functor(self)
            else:
                return visitor.visitChildren(self)

    def defined_functor(self):

        localctx = tptp_v7_0_0_0Parser.Defined_functorContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 298, self.RULE_defined_functor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1353
            self.atomic_defined_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Defined_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def number(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NumberContext, 0)

        def Distinct_object(self):
            return self.getToken(tptp_v7_0_0_0Parser.Distinct_object, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_defined_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDefined_term"):
                listener.enterDefined_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDefined_term"):
                listener.exitDefined_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDefined_term"):
                return visitor.visitDefined_term(self)
            else:
                return visitor.visitChildren(self)

    def defined_term(self):

        localctx = tptp_v7_0_0_0Parser.Defined_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 300, self.RULE_defined_term)
        try:
            self.state = 1357
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Real,
                tptp_v7_0_0_0Parser.Rational,
                tptp_v7_0_0_0Parser.Integer,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1355
                self.number()
                pass
            elif token in [tptp_v7_0_0_0Parser.Distinct_object]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1356
                self.match(tptp_v7_0_0_0Parser.Distinct_object)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class VariableContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Upper_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Upper_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_variable

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterVariable"):
                listener.enterVariable(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitVariable"):
                listener.exitVariable(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitVariable"):
                return visitor.visitVariable(self)
            else:
                return visitor.visitChildren(self)

    def variable(self):

        localctx = tptp_v7_0_0_0Parser.VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 302, self.RULE_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1359
            self.match(tptp_v7_0_0_0Parser.Upper_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def dag_source(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Dag_sourceContext, 0)

        def internal_source(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Internal_sourceContext, 0
            )

        def external_source(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.External_sourceContext, 0
            )

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def sources(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.SourcesContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterSource"):
                listener.enterSource(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitSource"):
                listener.exitSource(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitSource"):
                return visitor.visitSource(self)
            else:
                return visitor.visitChildren(self)

    def source(self):

        localctx = tptp_v7_0_0_0Parser.SourceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 304, self.RULE_source)
        try:
            self.state = 1369
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 98, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1361
                self.dag_source()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1362
                self.internal_source()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1363
                self.external_source()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1364
                self.match(tptp_v7_0_0_0Parser.Lower_word)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 1365
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 1366
                self.sources()
                self.state = 1367
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SourcesContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def source(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.SourceContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.SourceContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_sources

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterSources"):
                listener.enterSources(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitSources"):
                listener.exitSources(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitSources"):
                return visitor.visitSources(self)
            else:
                return visitor.visitChildren(self)

    def sources(self):

        localctx = tptp_v7_0_0_0Parser.SourcesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 306, self.RULE_sources)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1371
            self.source()
            self.state = 1376
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1372
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1373
                self.source()
                self.state = 1378
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Dag_sourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def inference_record(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_recordContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_dag_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDag_source"):
                listener.enterDag_source(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDag_source"):
                listener.exitDag_source(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDag_source"):
                return visitor.visitDag_source(self)
            else:
                return visitor.visitChildren(self)

    def dag_source(self):

        localctx = tptp_v7_0_0_0Parser.Dag_sourceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 308, self.RULE_dag_source)
        try:
            self.state = 1381
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Integer,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1379
                self.name()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__26]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1380
                self.inference_record()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_recordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def inference_rule(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_ruleContext, 0
            )

        def useful_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Useful_infoContext, 0)

        def inference_parents(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_parentsContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_record

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_record"):
                listener.enterInference_record(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_record"):
                listener.exitInference_record(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_record"):
                return visitor.visitInference_record(self)
            else:
                return visitor.visitChildren(self)

    def inference_record(self):

        localctx = tptp_v7_0_0_0Parser.Inference_recordContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 310, self.RULE_inference_record)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1383
            self.match(tptp_v7_0_0_0Parser.T__26)
            self.state = 1384
            self.inference_rule()
            self.state = 1385
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1386
            self.useful_info()
            self.state = 1387
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1388
            self.inference_parents()
            self.state = 1389
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_ruleContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_rule

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_rule"):
                listener.enterInference_rule(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_rule"):
                listener.exitInference_rule(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_rule"):
                return visitor.visitInference_rule(self)
            else:
                return visitor.visitChildren(self)

    def inference_rule(self):

        localctx = tptp_v7_0_0_0Parser.Inference_ruleContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 312, self.RULE_inference_rule)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1391
            self.atomic_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_parentsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def parent_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Parent_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_parents

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_parents"):
                listener.enterInference_parents(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_parents"):
                listener.exitInference_parents(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_parents"):
                return visitor.visitInference_parents(self)
            else:
                return visitor.visitChildren(self)

    def inference_parents(self):

        localctx = tptp_v7_0_0_0Parser.Inference_parentsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 314, self.RULE_inference_parents)
        try:
            self.state = 1398
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1393
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1394
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 1395
                self.parent_list()
                self.state = 1396
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parent_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def parent_info(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Parent_infoContext)
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Parent_infoContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_parent_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterParent_list"):
                listener.enterParent_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitParent_list"):
                listener.exitParent_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitParent_list"):
                return visitor.visitParent_list(self)
            else:
                return visitor.visitChildren(self)

    def parent_list(self):

        localctx = tptp_v7_0_0_0Parser.Parent_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 316, self.RULE_parent_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1400
            self.parent_info()
            self.state = 1405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1401
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1402
                self.parent_info()
                self.state = 1407
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parent_infoContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def source(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.SourceContext, 0)

        def parent_details(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Parent_detailsContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_parent_info

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterParent_info"):
                listener.enterParent_info(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitParent_info"):
                listener.exitParent_info(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitParent_info"):
                return visitor.visitParent_info(self)
            else:
                return visitor.visitChildren(self)

    def parent_info(self):

        localctx = tptp_v7_0_0_0Parser.Parent_infoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 318, self.RULE_parent_info)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1408
            self.source()
            self.state = 1410
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__13:
                self.state = 1409
                self.parent_details()

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parent_detailsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def general_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_parent_details

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterParent_details"):
                listener.enterParent_details(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitParent_details"):
                listener.exitParent_details(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitParent_details"):
                return visitor.visitParent_details(self)
            else:
                return visitor.visitChildren(self)

    def parent_details(self):

        localctx = tptp_v7_0_0_0Parser.Parent_detailsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 320, self.RULE_parent_details)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1412
            self.match(tptp_v7_0_0_0Parser.T__13)
            self.state = 1413
            self.general_list()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Internal_sourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def intro_type(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Intro_typeContext, 0)

        def optional_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Optional_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_internal_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInternal_source"):
                listener.enterInternal_source(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInternal_source"):
                listener.exitInternal_source(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInternal_source"):
                return visitor.visitInternal_source(self)
            else:
                return visitor.visitChildren(self)

    def internal_source(self):

        localctx = tptp_v7_0_0_0Parser.Internal_sourceContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 322, self.RULE_internal_source)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1415
            self.match(tptp_v7_0_0_0Parser.T__27)
            self.state = 1416
            self.intro_type()
            self.state = 1418
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1417
                self.optional_info()

            self.state = 1420
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Intro_typeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_intro_type

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterIntro_type"):
                listener.enterIntro_type(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitIntro_type"):
                listener.exitIntro_type(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitIntro_type"):
                return visitor.visitIntro_type(self)
            else:
                return visitor.visitChildren(self)

    def intro_type(self):

        localctx = tptp_v7_0_0_0Parser.Intro_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 324, self.RULE_intro_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1422
            self.match(tptp_v7_0_0_0Parser.Lower_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class External_sourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def file_source(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.File_sourceContext, 0)

        def theory(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.TheoryContext, 0)

        def creator_source(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Creator_sourceContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_external_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterExternal_source"):
                listener.enterExternal_source(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitExternal_source"):
                listener.exitExternal_source(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitExternal_source"):
                return visitor.visitExternal_source(self)
            else:
                return visitor.visitChildren(self)

    def external_source(self):

        localctx = tptp_v7_0_0_0Parser.External_sourceContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 326, self.RULE_external_source)
        try:
            self.state = 1427
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__28]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1424
                self.file_source()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__29]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1425
                self.theory()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__30]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1426
                self.creator_source()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class File_sourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def file_name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.File_nameContext, 0)

        def file_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.File_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_file_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFile_source"):
                listener.enterFile_source(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFile_source"):
                listener.exitFile_source(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFile_source"):
                return visitor.visitFile_source(self)
            else:
                return visitor.visitChildren(self)

    def file_source(self):

        localctx = tptp_v7_0_0_0Parser.File_sourceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 328, self.RULE_file_source)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1429
            self.match(tptp_v7_0_0_0Parser.T__28)
            self.state = 1430
            self.file_name()
            self.state = 1432
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1431
                self.file_info()

            self.state = 1434
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class File_infoContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_file_info

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFile_info"):
                listener.enterFile_info(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFile_info"):
                listener.exitFile_info(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFile_info"):
                return visitor.visitFile_info(self)
            else:
                return visitor.visitChildren(self)

    def file_info(self):

        localctx = tptp_v7_0_0_0Parser.File_infoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 330, self.RULE_file_info)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1436
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1437
            self.name()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TheoryContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def theory_name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Theory_nameContext, 0)

        def optional_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Optional_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_theory

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTheory"):
                listener.enterTheory(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTheory"):
                listener.exitTheory(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTheory"):
                return visitor.visitTheory(self)
            else:
                return visitor.visitChildren(self)

    def theory(self):

        localctx = tptp_v7_0_0_0Parser.TheoryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 332, self.RULE_theory)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1439
            self.match(tptp_v7_0_0_0Parser.T__29)
            self.state = 1440
            self.theory_name()
            self.state = 1442
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1441
                self.optional_info()

            self.state = 1444
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Theory_nameContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_theory_name

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterTheory_name"):
                listener.enterTheory_name(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitTheory_name"):
                listener.exitTheory_name(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitTheory_name"):
                return visitor.visitTheory_name(self)
            else:
                return visitor.visitChildren(self)

    def theory_name(self):

        localctx = tptp_v7_0_0_0Parser.Theory_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 334, self.RULE_theory_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1446
            self.match(tptp_v7_0_0_0Parser.Lower_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Creator_sourceContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def creator_name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Creator_nameContext, 0)

        def optional_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Optional_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_creator_source

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCreator_source"):
                listener.enterCreator_source(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCreator_source"):
                listener.exitCreator_source(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCreator_source"):
                return visitor.visitCreator_source(self)
            else:
                return visitor.visitChildren(self)

    def creator_source(self):

        localctx = tptp_v7_0_0_0Parser.Creator_sourceContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 336, self.RULE_creator_source)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1448
            self.match(tptp_v7_0_0_0Parser.T__30)
            self.state = 1449
            self.creator_name()
            self.state = 1451
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1450
                self.optional_info()

            self.state = 1453
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Creator_nameContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_creator_name

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCreator_name"):
                listener.enterCreator_name(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCreator_name"):
                listener.exitCreator_name(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCreator_name"):
                return visitor.visitCreator_name(self)
            else:
                return visitor.visitChildren(self)

    def creator_name(self):

        localctx = tptp_v7_0_0_0Parser.Creator_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 338, self.RULE_creator_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1455
            self.atomic_word()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Optional_infoContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def useful_info(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Useful_infoContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_optional_info

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterOptional_info"):
                listener.enterOptional_info(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitOptional_info"):
                listener.exitOptional_info(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitOptional_info"):
                return visitor.visitOptional_info(self)
            else:
                return visitor.visitChildren(self)

    def optional_info(self):

        localctx = tptp_v7_0_0_0Parser.Optional_infoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 340, self.RULE_optional_info)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1457
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1458
            self.useful_info()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Useful_infoContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def info_items(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Info_itemsContext, 0)

        def general_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_useful_info

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterUseful_info"):
                listener.enterUseful_info(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitUseful_info"):
                listener.exitUseful_info(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitUseful_info"):
                return visitor.visitUseful_info(self)
            else:
                return visitor.visitChildren(self)

    def useful_info(self):

        localctx = tptp_v7_0_0_0Parser.Useful_infoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 342, self.RULE_useful_info)
        try:
            self.state = 1466
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 109, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1460
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1461
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 1462
                self.info_items()
                self.state = 1463
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1465
                self.general_list()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Info_itemsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def info_item(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.Info_itemContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Info_itemContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_info_items

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInfo_items"):
                listener.enterInfo_items(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInfo_items"):
                listener.exitInfo_items(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInfo_items"):
                return visitor.visitInfo_items(self)
            else:
                return visitor.visitChildren(self)

    def info_items(self):

        localctx = tptp_v7_0_0_0Parser.Info_itemsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 344, self.RULE_info_items)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1468
            self.info_item()
            self.state = 1473
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1469
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1470
                self.info_item()
                self.state = 1475
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Info_itemContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def formula_item(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_itemContext, 0)

        def inference_item(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_itemContext, 0
            )

        def general_function(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.General_functionContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_info_item

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInfo_item"):
                listener.enterInfo_item(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInfo_item"):
                listener.exitInfo_item(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInfo_item"):
                return visitor.visitInfo_item(self)
            else:
                return visitor.visitChildren(self)

    def info_item(self):

        localctx = tptp_v7_0_0_0Parser.Info_itemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 346, self.RULE_info_item)
        try:
            self.state = 1479
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 111, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1476
                self.formula_item()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1477
                self.inference_item()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1478
                self.general_function()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Formula_itemContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def description_item(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Description_itemContext, 0
            )

        def iquote_item(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Iquote_itemContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_formula_item

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFormula_item"):
                listener.enterFormula_item(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFormula_item"):
                listener.exitFormula_item(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFormula_item"):
                return visitor.visitFormula_item(self)
            else:
                return visitor.visitChildren(self)

    def formula_item(self):

        localctx = tptp_v7_0_0_0Parser.Formula_itemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 348, self.RULE_formula_item)
        try:
            self.state = 1483
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__31]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1481
                self.description_item()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__32]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1482
                self.iquote_item()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Description_itemContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_description_item

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDescription_item"):
                listener.enterDescription_item(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDescription_item"):
                listener.exitDescription_item(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDescription_item"):
                return visitor.visitDescription_item(self)
            else:
                return visitor.visitChildren(self)

    def description_item(self):

        localctx = tptp_v7_0_0_0Parser.Description_itemContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 350, self.RULE_description_item)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1485
            self.match(tptp_v7_0_0_0Parser.T__31)
            self.state = 1486
            self.atomic_word()
            self.state = 1487
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Iquote_itemContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_iquote_item

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterIquote_item"):
                listener.enterIquote_item(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitIquote_item"):
                listener.exitIquote_item(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitIquote_item"):
                return visitor.visitIquote_item(self)
            else:
                return visitor.visitChildren(self)

    def iquote_item(self):

        localctx = tptp_v7_0_0_0Parser.Iquote_itemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 352, self.RULE_iquote_item)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1489
            self.match(tptp_v7_0_0_0Parser.T__32)
            self.state = 1490
            self.atomic_word()
            self.state = 1491
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_itemContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def inference_status(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_statusContext, 0
            )

        def assumptions_record(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Assumptions_recordContext, 0
            )

        def new_symbol_record(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.New_symbol_recordContext, 0
            )

        def refutation(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.RefutationContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_item

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_item"):
                listener.enterInference_item(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_item"):
                listener.exitInference_item(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_item"):
                return visitor.visitInference_item(self)
            else:
                return visitor.visitChildren(self)

    def inference_item(self):

        localctx = tptp_v7_0_0_0Parser.Inference_itemContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 354, self.RULE_inference_item)
        try:
            self.state = 1497
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.T__33,
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1493
                self.inference_status()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__34]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1494
                self.assumptions_record()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__36]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1495
                self.new_symbol_record()
                pass
            elif token in [tptp_v7_0_0_0Parser.T__35]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1496
                self.refutation()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_statusContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def status_value(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Status_valueContext, 0)

        def inference_info(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_infoContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_status

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_status"):
                listener.enterInference_status(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_status"):
                listener.exitInference_status(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_status"):
                return visitor.visitInference_status(self)
            else:
                return visitor.visitChildren(self)

    def inference_status(self):

        localctx = tptp_v7_0_0_0Parser.Inference_statusContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 356, self.RULE_inference_status)
        try:
            self.state = 1504
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__33]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1499
                self.match(tptp_v7_0_0_0Parser.T__33)
                self.state = 1500
                self.status_value()
                self.state = 1501
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1503
                self.inference_info()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Status_valueContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_status_value

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterStatus_value"):
                listener.enterStatus_value(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitStatus_value"):
                listener.exitStatus_value(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitStatus_value"):
                return visitor.visitStatus_value(self)
            else:
                return visitor.visitChildren(self)

    def status_value(self):

        localctx = tptp_v7_0_0_0Parser.Status_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 358, self.RULE_status_value)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1506
            self.match(tptp_v7_0_0_0Parser.Lower_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Inference_infoContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def inference_rule(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Inference_ruleContext, 0
            )

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def general_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_inference_info

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInference_info"):
                listener.enterInference_info(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInference_info"):
                listener.exitInference_info(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInference_info"):
                return visitor.visitInference_info(self)
            else:
                return visitor.visitChildren(self)

    def inference_info(self):

        localctx = tptp_v7_0_0_0Parser.Inference_infoContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 360, self.RULE_inference_info)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1508
            self.inference_rule()
            self.state = 1509
            self.match(tptp_v7_0_0_0Parser.T__9)
            self.state = 1510
            self.atomic_word()
            self.state = 1511
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1512
            self.general_list()
            self.state = 1513
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Assumptions_recordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Name_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_assumptions_record

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAssumptions_record"):
                listener.enterAssumptions_record(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAssumptions_record"):
                listener.exitAssumptions_record(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAssumptions_record"):
                return visitor.visitAssumptions_record(self)
            else:
                return visitor.visitChildren(self)

    def assumptions_record(self):

        localctx = tptp_v7_0_0_0Parser.Assumptions_recordContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 362, self.RULE_assumptions_record)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1515
            self.match(tptp_v7_0_0_0Parser.T__34)
            self.state = 1516
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 1517
            self.name_list()
            self.state = 1518
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 1519
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RefutationContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def file_source(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.File_sourceContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_refutation

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterRefutation"):
                listener.enterRefutation(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitRefutation"):
                listener.exitRefutation(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitRefutation"):
                return visitor.visitRefutation(self)
            else:
                return visitor.visitChildren(self)

    def refutation(self):

        localctx = tptp_v7_0_0_0Parser.RefutationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 364, self.RULE_refutation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1521
            self.match(tptp_v7_0_0_0Parser.T__35)
            self.state = 1522
            self.file_source()
            self.state = 1523
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class New_symbol_recordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def new_symbol_list(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.New_symbol_listContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_new_symbol_record

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterNew_symbol_record"):
                listener.enterNew_symbol_record(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitNew_symbol_record"):
                listener.exitNew_symbol_record(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitNew_symbol_record"):
                return visitor.visitNew_symbol_record(self)
            else:
                return visitor.visitChildren(self)

    def new_symbol_record(self):

        localctx = tptp_v7_0_0_0Parser.New_symbol_recordContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 366, self.RULE_new_symbol_record)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1525
            self.match(tptp_v7_0_0_0Parser.T__36)
            self.state = 1526
            self.atomic_word()
            self.state = 1527
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1528
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 1529
            self.new_symbol_list()
            self.state = 1530
            self.match(tptp_v7_0_0_0Parser.T__12)
            self.state = 1531
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class New_symbol_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def principal_symbol(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.Principal_symbolContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.Principal_symbolContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_new_symbol_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterNew_symbol_list"):
                listener.enterNew_symbol_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitNew_symbol_list"):
                listener.exitNew_symbol_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitNew_symbol_list"):
                return visitor.visitNew_symbol_list(self)
            else:
                return visitor.visitChildren(self)

    def new_symbol_list(self):

        localctx = tptp_v7_0_0_0Parser.New_symbol_listContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 368, self.RULE_new_symbol_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1533
            self.principal_symbol()
            self.state = 1538
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1534
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1535
                self.principal_symbol()
                self.state = 1540
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Principal_symbolContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def functor(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.FunctorContext, 0)

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_principal_symbol

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterPrincipal_symbol"):
                listener.enterPrincipal_symbol(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitPrincipal_symbol"):
                listener.exitPrincipal_symbol(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitPrincipal_symbol"):
                return visitor.visitPrincipal_symbol(self)
            else:
                return visitor.visitChildren(self)

    def principal_symbol(self):

        localctx = tptp_v7_0_0_0Parser.Principal_symbolContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 370, self.RULE_principal_symbol)
        try:
            self.state = 1543
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1541
                self.functor()
                pass
            elif token in [tptp_v7_0_0_0Parser.Upper_word]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1542
                self.variable()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class IncludeContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def file_name(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.File_nameContext, 0)

        def formula_selection(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.Formula_selectionContext, 0
            )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_include

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterInclude"):
                listener.enterInclude(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitInclude"):
                listener.exitInclude(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitInclude"):
                return visitor.visitInclude(self)
            else:
                return visitor.visitChildren(self)

    def include(self):

        localctx = tptp_v7_0_0_0Parser.IncludeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 372, self.RULE_include)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1545
            self.match(tptp_v7_0_0_0Parser.T__37)
            self.state = 1546
            self.file_name()
            self.state = 1548
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1547
                self.formula_selection()

            self.state = 1550
            self.match(tptp_v7_0_0_0Parser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Formula_selectionContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Name_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_formula_selection

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFormula_selection"):
                listener.enterFormula_selection(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFormula_selection"):
                listener.exitFormula_selection(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFormula_selection"):
                return visitor.visitFormula_selection(self)
            else:
                return visitor.visitChildren(self)

    def formula_selection(self):

        localctx = tptp_v7_0_0_0Parser.Formula_selectionContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 374, self.RULE_formula_selection)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1552
            self.match(tptp_v7_0_0_0Parser.T__1)
            self.state = 1553
            self.match(tptp_v7_0_0_0Parser.T__11)
            self.state = 1554
            self.name_list()
            self.state = 1555
            self.match(tptp_v7_0_0_0Parser.T__12)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Name_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def name(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(tptp_v7_0_0_0Parser.NameContext)
            else:
                return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NameContext, i)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_name_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterName_list"):
                listener.enterName_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitName_list"):
                listener.exitName_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitName_list"):
                return visitor.visitName_list(self)
            else:
                return visitor.visitChildren(self)

    def name_list(self):

        localctx = tptp_v7_0_0_0Parser.Name_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 376, self.RULE_name_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1557
            self.name()
            self.state = 1562
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1558
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1559
                self.name()
                self.state = 1564
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class General_termContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def general_data(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_dataContext, 0)

        def general_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_termContext, 0)

        def general_list(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_listContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_general_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterGeneral_term"):
                listener.enterGeneral_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitGeneral_term"):
                listener.exitGeneral_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitGeneral_term"):
                return visitor.visitGeneral_term(self)
            else:
                return visitor.visitChildren(self)

    def general_term(self):

        localctx = tptp_v7_0_0_0Parser.General_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 378, self.RULE_general_term)
        try:
            self.state = 1571
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 119, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1565
                self.general_data()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1566
                self.general_data()
                self.state = 1567
                self.match(tptp_v7_0_0_0Parser.T__13)
                self.state = 1568
                self.general_term()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1570
                self.general_list()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class General_dataContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def general_function(self):
            return self.getTypedRuleContext(
                tptp_v7_0_0_0Parser.General_functionContext, 0
            )

        def variable(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.VariableContext, 0)

        def number(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.NumberContext, 0)

        def Distinct_object(self):
            return self.getToken(tptp_v7_0_0_0Parser.Distinct_object, 0)

        def formula_data(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Formula_dataContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_general_data

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterGeneral_data"):
                listener.enterGeneral_data(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitGeneral_data"):
                listener.exitGeneral_data(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitGeneral_data"):
                return visitor.visitGeneral_data(self)
            else:
                return visitor.visitChildren(self)

    def general_data(self):

        localctx = tptp_v7_0_0_0Parser.General_dataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 380, self.RULE_general_data)
        try:
            self.state = 1579
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 120, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1573
                self.atomic_word()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1574
                self.general_function()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1575
                self.variable()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1576
                self.number()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 1577
                self.match(tptp_v7_0_0_0Parser.Distinct_object)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 1578
                self.formula_data()
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class General_functionContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def general_terms(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_termsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_general_function

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterGeneral_function"):
                listener.enterGeneral_function(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitGeneral_function"):
                listener.exitGeneral_function(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitGeneral_function"):
                return visitor.visitGeneral_function(self)
            else:
                return visitor.visitChildren(self)

    def general_function(self):

        localctx = tptp_v7_0_0_0Parser.General_functionContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 382, self.RULE_general_function)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1581
            self.atomic_word()
            self.state = 1582
            self.match(tptp_v7_0_0_0Parser.T__9)
            self.state = 1583
            self.general_terms()
            self.state = 1584
            self.match(tptp_v7_0_0_0Parser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Formula_dataContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def thf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Thf_formulaContext, 0)

        def tff_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Tff_formulaContext, 0)

        def fof_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_formulaContext, 0)

        def cnf_formula(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Cnf_formulaContext, 0)

        def fof_term(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Fof_termContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_formula_data

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFormula_data"):
                listener.enterFormula_data(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFormula_data"):
                listener.exitFormula_data(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFormula_data"):
                return visitor.visitFormula_data(self)
            else:
                return visitor.visitChildren(self)

    def formula_data(self):

        localctx = tptp_v7_0_0_0Parser.Formula_dataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 384, self.RULE_formula_data)
        try:
            self.state = 1606
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__38]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1586
                self.match(tptp_v7_0_0_0Parser.T__38)
                self.state = 1587
                self.thf_formula()
                self.state = 1588
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__39]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1590
                self.match(tptp_v7_0_0_0Parser.T__39)
                self.state = 1591
                self.tff_formula()
                self.state = 1592
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__40]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1594
                self.match(tptp_v7_0_0_0Parser.T__40)
                self.state = 1595
                self.fof_formula()
                self.state = 1596
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__41]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1598
                self.match(tptp_v7_0_0_0Parser.T__41)
                self.state = 1599
                self.cnf_formula()
                self.state = 1600
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__42]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1602
                self.match(tptp_v7_0_0_0Parser.T__42)
                self.state = 1603
                self.fof_term()
                self.state = 1604
                self.match(tptp_v7_0_0_0Parser.T__10)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class General_listContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def general_terms(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.General_termsContext, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_general_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterGeneral_list"):
                listener.enterGeneral_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitGeneral_list"):
                listener.exitGeneral_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitGeneral_list"):
                return visitor.visitGeneral_list(self)
            else:
                return visitor.visitChildren(self)

    def general_list(self):

        localctx = tptp_v7_0_0_0Parser.General_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 386, self.RULE_general_list)
        try:
            self.state = 1613
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [tptp_v7_0_0_0Parser.T__16]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1608
                self.match(tptp_v7_0_0_0Parser.T__16)
                pass
            elif token in [tptp_v7_0_0_0Parser.T__11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1609
                self.match(tptp_v7_0_0_0Parser.T__11)
                self.state = 1610
                self.general_terms()
                self.state = 1611
                self.match(tptp_v7_0_0_0Parser.T__12)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class General_termsContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def general_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    tptp_v7_0_0_0Parser.General_termContext
                )
            else:
                return self.getTypedRuleContext(
                    tptp_v7_0_0_0Parser.General_termContext, i
                )

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_general_terms

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterGeneral_terms"):
                listener.enterGeneral_terms(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitGeneral_terms"):
                listener.exitGeneral_terms(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitGeneral_terms"):
                return visitor.visitGeneral_terms(self)
            else:
                return visitor.visitChildren(self)

    def general_terms(self):

        localctx = tptp_v7_0_0_0Parser.General_termsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 388, self.RULE_general_terms)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1615
            self.general_term()
            self.state = 1620
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == tptp_v7_0_0_0Parser.T__1:
                self.state = 1616
                self.match(tptp_v7_0_0_0Parser.T__1)
                self.state = 1617
                self.general_term()
                self.state = 1622
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NameContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atomic_word(self):
            return self.getTypedRuleContext(tptp_v7_0_0_0Parser.Atomic_wordContext, 0)

        def Integer(self):
            return self.getToken(tptp_v7_0_0_0Parser.Integer, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_name

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterName"):
                listener.enterName(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitName"):
                listener.exitName(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitName"):
                return visitor.visitName(self)
            else:
                return visitor.visitChildren(self)

    def name(self):

        localctx = tptp_v7_0_0_0Parser.NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 390, self.RULE_name)
        try:
            self.state = 1625
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                tptp_v7_0_0_0Parser.Lower_word,
                tptp_v7_0_0_0Parser.Single_quoted,
            ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1623
                self.atomic_word()
                pass
            elif token in [tptp_v7_0_0_0Parser.Integer]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1624
                self.match(tptp_v7_0_0_0Parser.Integer)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Atomic_wordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Lower_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Lower_word, 0)

        def Single_quoted(self):
            return self.getToken(tptp_v7_0_0_0Parser.Single_quoted, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_atomic_word

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAtomic_word"):
                listener.enterAtomic_word(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAtomic_word"):
                listener.exitAtomic_word(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAtomic_word"):
                return visitor.visitAtomic_word(self)
            else:
                return visitor.visitChildren(self)

    def atomic_word(self):

        localctx = tptp_v7_0_0_0Parser.Atomic_wordContext(self, self._ctx, self.state)
        self.enterRule(localctx, 392, self.RULE_atomic_word)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1627
            _la = self._input.LA(1)
            if not (
                _la == tptp_v7_0_0_0Parser.Lower_word
                or _la == tptp_v7_0_0_0Parser.Single_quoted
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Atomic_defined_wordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dollar_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Dollar_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_atomic_defined_word

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAtomic_defined_word"):
                listener.enterAtomic_defined_word(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAtomic_defined_word"):
                listener.exitAtomic_defined_word(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAtomic_defined_word"):
                return visitor.visitAtomic_defined_word(self)
            else:
                return visitor.visitChildren(self)

    def atomic_defined_word(self):

        localctx = tptp_v7_0_0_0Parser.Atomic_defined_wordContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 394, self.RULE_atomic_defined_word)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1629
            self.match(tptp_v7_0_0_0Parser.Dollar_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Atomic_system_wordContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dollar_dollar_word(self):
            return self.getToken(tptp_v7_0_0_0Parser.Dollar_dollar_word, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_atomic_system_word

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterAtomic_system_word"):
                listener.enterAtomic_system_word(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitAtomic_system_word"):
                listener.exitAtomic_system_word(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitAtomic_system_word"):
                return visitor.visitAtomic_system_word(self)
            else:
                return visitor.visitChildren(self)

    def atomic_system_word(self):

        localctx = tptp_v7_0_0_0Parser.Atomic_system_wordContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 396, self.RULE_atomic_system_word)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1631
            self.match(tptp_v7_0_0_0Parser.Dollar_dollar_word)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NumberContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Integer(self):
            return self.getToken(tptp_v7_0_0_0Parser.Integer, 0)

        def Rational(self):
            return self.getToken(tptp_v7_0_0_0Parser.Rational, 0)

        def Real(self):
            return self.getToken(tptp_v7_0_0_0Parser.Real, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_number

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterNumber"):
                listener.enterNumber(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitNumber"):
                listener.exitNumber(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitNumber"):
                return visitor.visitNumber(self)
            else:
                return visitor.visitChildren(self)

    def number(self):

        localctx = tptp_v7_0_0_0Parser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 398, self.RULE_number)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1633
            _la = self._input.LA(1)
            if not (
                (
                    (((_la - 74)) & ~0x3F) == 0
                    and (
                        (1 << (_la - 74))
                        & (
                            (1 << (tptp_v7_0_0_0Parser.Real - 74))
                            | (1 << (tptp_v7_0_0_0Parser.Rational - 74))
                            | (1 << (tptp_v7_0_0_0Parser.Integer - 74))
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class File_nameContext(ParserRuleContext):
        def __init__(
            self, parser, parent: ParserRuleContext = None, invokingState: int = -1
        ):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Single_quoted(self):
            return self.getToken(tptp_v7_0_0_0Parser.Single_quoted, 0)

        def getRuleIndex(self):
            return tptp_v7_0_0_0Parser.RULE_file_name

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterFile_name"):
                listener.enterFile_name(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitFile_name"):
                listener.exitFile_name(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitFile_name"):
                return visitor.visitFile_name(self)
            else:
                return visitor.visitChildren(self)

    def file_name(self):

        localctx = tptp_v7_0_0_0Parser.File_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 400, self.RULE_file_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1635
            self.match(tptp_v7_0_0_0Parser.Single_quoted)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    def sempred(self, localctx: RuleContext, ruleIndex: int, predIndex: int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[18] = self.thf_or_formula_sempred
        self._predicates[19] = self.thf_and_formula_sempred
        self._predicates[20] = self.thf_apply_formula_sempred
        self._predicates[42] = self.thf_xprod_type_sempred
        self._predicates[43] = self.thf_union_type_sempred
        self._predicates[54] = self.tff_or_formula_sempred
        self._predicates[55] = self.tff_and_formula_sempred
        self._predicates[85] = self.tff_xprod_type_sempred
        self._predicates[94] = self.fof_or_formula_sempred
        self._predicates[95] = self.fof_and_formula_sempred
        self._predicates[122] = self.cnf_disjunction_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def thf_or_formula_sempred(self, localctx: Thf_or_formulaContext, predIndex: int):
        if predIndex == 0:
            return self.precpred(self._ctx, 1)

    def thf_and_formula_sempred(self, localctx: Thf_and_formulaContext, predIndex: int):
        if predIndex == 1:
            return self.precpred(self._ctx, 1)

    def thf_apply_formula_sempred(
        self, localctx: Thf_apply_formulaContext, predIndex: int
    ):
        if predIndex == 2:
            return self.precpred(self._ctx, 1)

    def thf_xprod_type_sempred(self, localctx: Thf_xprod_typeContext, predIndex: int):
        if predIndex == 3:
            return self.precpred(self._ctx, 1)

    def thf_union_type_sempred(self, localctx: Thf_union_typeContext, predIndex: int):
        if predIndex == 4:
            return self.precpred(self._ctx, 1)

    def tff_or_formula_sempred(self, localctx: Tff_or_formulaContext, predIndex: int):
        if predIndex == 5:
            return self.precpred(self._ctx, 1)

    def tff_and_formula_sempred(self, localctx: Tff_and_formulaContext, predIndex: int):
        if predIndex == 6:
            return self.precpred(self._ctx, 1)

    def tff_xprod_type_sempred(self, localctx: Tff_xprod_typeContext, predIndex: int):
        if predIndex == 7:
            return self.precpred(self._ctx, 1)

    def fof_or_formula_sempred(self, localctx: Fof_or_formulaContext, predIndex: int):
        if predIndex == 8:
            return self.precpred(self._ctx, 1)

    def fof_and_formula_sempred(self, localctx: Fof_and_formulaContext, predIndex: int):
        if predIndex == 9:
            return self.precpred(self._ctx, 1)

    def cnf_disjunction_sempred(self, localctx: Cnf_disjunctionContext, predIndex: int):
        if predIndex == 10:
            return self.precpred(self._ctx, 1)
