Discussion:
FOPL syntax of Minimal Type Theory (MTT)
(too old to reply)
Pete Olcott
2017-07-01 17:24:51 UTC
Permalink
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</p>
<p>
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 10">
<meta name="Originator" content="Microsoft Word 10">
<link rel="File-List"
href="file:///C:%5CUsers%5CPETEOL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:ApplyBreakingRules/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"MS 明朝";
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:宋体;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
{font-family:"Segoe UI Symbol";
panose-1:2 11 5 2 4 2 4 2 2 3;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-2147483165 302055407 262144 0 1 0;}
@font-face
{font-family:"Lucida Console";
panose-1:2 11 6 9 4 5 4 2 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-2147482993 6144 0 0 31 0;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:none;
mso-hyphenate:none;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
mso-bidi-font-family:Arial;
mso-font-kerning:.5pt;
mso-fareast-language:HI;
mso-bidi-language:HI;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
</style>
<![endif]-->
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:&quot;Segoe UI
Symbol&quot;;
mso-fareast-font-family:&quot;MS
Mincho&quot;;mso-bidi-font-family:&quot;Segoe UI
Symbol&quot;;
background:yellow;mso-highlight:yellow">First Order
Predicate Logic Syntax used
as the basis for the Minimal Type Theory Language:</span></b><b><span
style="font-size:11.0pt;font-family:&quot;Segoe UI
Symbol&quot;;mso-fareast-font-family:
&quot;MS Mincho&quot;;mso-bidi-font-family:&quot;Segoe UI
Symbol&quot;"> <span style="mso-spacerun:yes"> </span><o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:&quot;Segoe UI
Symbol&quot;;
mso-fareast-font-family:&quot;MS
Mincho&quot;;mso-bidi-font-family:&quot;Segoe UI
Symbol&quot;"><o:p> </o:p></span></b></p>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;">sentence<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>: atomic_sentence<span
style="mso-spacerun:yes">             </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| sentence
IMPLIES sentence<span style="mso-spacerun:yes">   </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| sentence IFF
sentence<span style="mso-spacerun:yes">       </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| sentence AND
sentence<span style="mso-spacerun:yes">       </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| sentence OR
sentence<span style="mso-spacerun:yes">        </span><span
style="mso-spacerun:yes">  </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| sentence PROVES
sentence<span style="mso-spacerun:yes">     </span><b><span
style="mso-spacerun:yes"></span></b><b>//
</b><b><span style="background:yellow;mso-highlight:yellow">enhancement</span></b>
<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| quantifier
IDENTIFIER sentence<span style="mso-spacerun:yes">  </span><b>//
</b><b><span style="background:yellow;mso-highlight:
yellow">MTT syntax is different</span></b> <o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| '~' sentence
%prec NOT<span style="mso-spacerun:yes">        </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| '(' sentence
')'<span style="mso-spacerun:yes">              </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>;<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;">atomic_sentence<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>: IDENTIFIER '('
term_list ')'<span style="mso-spacerun:yes">  </span>//
ATOMIC PREDICATE<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">       </span><span
style="mso-spacerun:yes"> </span>|
IDENTIFIER<span style="mso-spacerun:yes">                  
  </span>//
SENTENTIAL VARIABLE <b>(</b><b><span
style="background:yellow;mso-highlight:yellow">enhancement</span></b><b>)
</b><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>;<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;">term<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>: IDENTIFIER '('
term_list ')'<span style="mso-spacerun:yes">  </span>//
FUNCTION <o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| IDENTIFIER<span
style="mso-spacerun:yes">                     </span>//
CONSTANT or VARIABLE<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>;<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;">term_list<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>: term_list ','
term<span style="mso-spacerun:yes">    </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| term<span
style="mso-spacerun:yes">                    </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>;<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;">quantifier<o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>: THERE_EXISTS<span
style="mso-spacerun:yes">                  </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>| FOR_ALL<span
style="mso-spacerun:yes">            </span><o:p></o:p></span></font></p>
<font face="Arial">
</font>
<p class="MsoNormal"
style="mso-pagination:widow-orphan;mso-hyphenate:auto;
mso-layout-grid-align:none;text-autospace:none"><font
face="Arial"><span style="font-size: 10pt;"><span
style="mso-spacerun:yes">        </span>;<o:p></o:p></span></font></p>
<font face="Arial">
</font></p>
<br>
<div class="moz-signature"><b>-- </b><b><br>
</b>
<p class="western" style="margin-bottom: 0in"><b><font
face="Arial, sans-serif"><font style="font-size: 12pt"
size="2">(Γ
</font><font style="font-size: 12pt" size="2">⊨ </font><sub><font
style="font-size: 8pt" size="2">FS</font></sub><font
style="font-size: 12pt" size="2">
A) ≡ (</font><font style="font-size: 12pt" size="2">Γ </font><font
style="font-size: 12pt" size="2">⊢
</font><sub><font style="font-size: 8pt" size="2">FS</font></sub><font
style="font-size: 12pt" size="2">
A)</font></font></b></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
</div>
</body>
</html>
Pete Olcott
2017-07-01 17:36:02 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<b>First Order Predicate Logic Syntax used as the basis for the
Minimal Type Theory Language:  </b><br>
<br>
sentence<br>
        : atomic_sentence             <br>
        | sentence IMPLIES sentence   <br>
        | sentence IFF sentence       <br>
        | sentence AND sentence       <br>
        | sentence OR sentence          <br>
        | sentence PROVES sentence        <b>// enhancement</b> <br>
        | quantifier IDENTIFIER sentence  <b>// MTT syntax is
different</b> <br>
        | '~' sentence %prec NOT        <br>
        | '(' sentence ')'              <br>
        ;<br>
        <br>
atomic_sentence<br>
        : IDENTIFIER '(' term_list ')'  // ATOMIC PREDICATE<br>
        | IDENTIFIER                          <b>// SENTENTIAL
VARIABLE (enhancement)</b> <br>
        ;<br>
        <br>
term<br>
        : IDENTIFIER '(' term_list ')'  // FUNCTION <br>
        | IDENTIFIER                          // CONSTANT or
VARIABLE<br>
        ;<br>
        <br>
term_list<br>
        : term_list ',' term    <br>
        | term                    <br>
        ;<br>
        <br>
quantifier<br>
        : THERE_EXISTS                  <br>
        | FOR_ALL            <br>
        ;<br>
<br>
</body>
</html>
DKleinecke
2017-07-01 17:46:05 UTC
Permalink
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
Minimal Type Theory Language: 
sentence
        : atomic_sentence            
        | sentence IMPLIES sentence  
        | sentence IFF sentence      
        | sentence AND sentence      
        | sentence OR sentence         
        | sentence PROVES sentence        // enhancement
        | quantifier IDENTIFIER sentence  // MTT syntax is
different
        | '~' sentence %prec NOT       
        | '(' sentence ')'             
        ;
       
atomic_sentence
        : IDENTIFIER '(' term_list ')'  // ATOMIC PREDICATE
        | IDENTIFIER                          // SENTENTIAL
VARIABLE (enhancement)
        ;
       
term
        : IDENTIFIER '(' term_list ')'  // FUNCTION
        | IDENTIFIER                          // CONSTANT or
VARIABLE
        ;
       
term_list
        : term_list ',' term   
        | term                   
        ;
       
quantifier
        : THERE_EXISTS                 
        | FOR_ALL           
        ;
Is "%prec" perhaps a typo for '//'?
DKleinecke
2017-07-01 17:50:48 UTC
Permalink
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
Minimal Type Theory Language: 
sentence
        : atomic_sentence            
        | sentence IMPLIES sentence  
        | sentence IFF sentence      
        | sentence AND sentence      
        | sentence OR sentence         
        | sentence PROVES sentence        // enhancement
        | quantifier IDENTIFIER sentence  // MTT syntax is
different
        | '~' sentence %prec NOT       
        | '(' sentence ')'             
        ;
       
atomic_sentence
        : IDENTIFIER '(' term_list ')'  // ATOMIC PREDICATE
        | IDENTIFIER                          // SENTENTIAL
VARIABLE (enhancement)
        ;
       
term
        : IDENTIFIER '(' term_list ')'  // FUNCTION
        | IDENTIFIER                          // CONSTANT or
VARIABLE
        ;
       
term_list
        : term_list ',' term   
        | term                   
        ;
       
quantifier
        : THERE_EXISTS                 
        | FOR_ALL           
        ;
AS stated there must be at least one term in a term-list.
Hence
IDENTIFIER ( )
is not allowed. If it were
Pete Olcott
2017-07-01 18:13:05 UTC
Permalink
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
AS stated there must be at least one term in a term-list.
Hence
IDENTIFIER ( )
is not allowed. If it were allowed would it differ from bare
IDENTIFIER ?
It parses correctly therefore it is correct. You just don't know YACC.
--
(Γ ⊨ _FS A) ≡ (Γ ⊢ _FS A)
DKleinecke
2017-07-01 20:33:52 UTC
Permalink
Post by Pete Olcott
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
AS stated there must be at least one term in a term-list.
Hence
IDENTIFIER ( )
is not allowed. If it were allowed would it differ from bare
IDENTIFIER ?
It parses correctly therefore it is correct. You just don't know YACC.
I admit to not knowing much about and never using YACC but
do you mean by the first "It" IDENTIFIER ()? If your YACC
accepts that under your given BNF then your YACC is broken.
Pete Olcott
2017-07-01 22:04:38 UTC
Permalink
Post by DKleinecke
Post by Pete Olcott
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
AS stated there must be at least one term in a term-list.
Hence
IDENTIFIER ( )
is not allowed. If it were allowed would it differ from bare
IDENTIFIER ?
It parses correctly therefore it is correct. You just don't know YACC.
I admit to not knowing much about and never using YACC but
do you mean by the first "It" IDENTIFIER ()? If your YACC
accepts that under your given BNF then your YACC is broken.
https://groups.google.com/forum/#!original/comp.compilers/Qalayu9h3xw/gaTrXbbRd7AJ
Here is the original unmodified source on a newsgroup moderated by the famous author of a book about YACC and LEX.

If it was wrong he would have said something. Besides that YACC itself is smart enough to report all errors.
--
(Γ ⊨ _FS A) ≡ (Γ ⊢ _FS A)
Pete Olcott
2017-07-01 18:11:31 UTC
Permalink
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
Is "%prec" perhaps a typo for '//'?
If not what does it signify?
Precedence in YACC. The above grammar is the verbatim YACC BNF specification for the FOPL subset of MTT.
--
(Γ ⊨ _FS A) ≡ (Γ ⊢ _FS A)
DKleinecke
2017-07-01 20:48:51 UTC
Permalink
Post by Pete Olcott
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
Is "%prec" perhaps a typo for '//'?
If not what does it signify?
Precedence in YACC. The above grammar is the verbatim YACC BNF specification for the FOPL subset of MTT.
I see. You left out the declarations part where NOT must turn
up and here you are stating that '~' has the same precedence
as NOT. But it seems to me that NOT is never generated by your
rules. Yet you say YACC accepts this. I wonder.
Pete Olcott
2017-07-01 22:08:07 UTC
Permalink
Post by DKleinecke
Post by Pete Olcott
Post by DKleinecke
Post by Pete Olcott
First Order Predicate Logic Syntax used as the basis for the
sentence
: atomic_sentence
| sentence IMPLIES sentence
| sentence IFF sentence
| sentence AND sentence
| sentence OR sentence
| sentence PROVES sentence // enhancement
| quantifier IDENTIFIER sentence // MTT syntax is
different
| '~' sentence %prec NOT
| '(' sentence ')'
;
atomic_sentence
: IDENTIFIER '(' term_list ')' // ATOMIC PREDICATE
| IDENTIFIER // SENTENTIAL
VARIABLE (enhancement)
;
term
: IDENTIFIER '(' term_list ')' // FUNCTION
| IDENTIFIER // CONSTANT or
VARIABLE
;
term_list
: term_list ',' term
| term
;
quantifier
: THERE_EXISTS
| FOR_ALL
;
Is "%prec" perhaps a typo for '//'?
If not what does it signify?
Precedence in YACC. The above grammar is the verbatim YACC BNF specification for the FOPL subset of MTT.
I see. You left out the declarations part where NOT must turn
up and here you are stating that '~' has the same precedence
as NOT. But it seems to me that NOT is never generated by your
rules. Yet you say YACC accepts this. I wonder.
I left out everything besides the unequivocal proof that MTT really is fundamentally based on FOPL syntax.
--
(Γ ⊨ _FS A) ≡ (Γ ⊢ _FS A)
Peter Percival
2017-07-01 23:15:23 UTC
Permalink
Post by Pete Olcott
I left out everything besides the unequivocal proof that MTT really is
fundamentally based on FOPL syntax.
Even though you post formulae that clearly use second order quantifiers?
--
Do, as a concession to my poor wits, Lord Darlington, just explain
to me what you really mean.
I think I had better not, Duchess. Nowadays to be intelligible is
to be found out. -- Oscar Wilde, Lady Windermere's Fan
Loading...