Syntax


The input must be a formula of pure first-order logic. Do not use free variables, names, identity or mathematical functions. Expressions containing these symbols are accepted as well-formed but do not evaluate properly.

This is the key for Input Forms of Traditional Forms:

Traditional Form Input Form Alternative Input Form
∀var scope ForAll[var, scope] A[var, scope]
∃var scope Exists[var, scope] E[var, scope]
¬ p Not[p] !p, !(p)
pq And[p,q] p && q, (p && q)
pq Or[p,q] p || q, (p || q)
pq Implies[p,q]
pq Equivalent[p,q]
pq Nor[p,q]
pq Nand[p,q]
pq Xor[p,q]

The most convenient way is to use the alternative Input Form; do not use Traditional Form. If you use "!" instead of "Not", then use "!p" or "!(p)" but not "![p]". Be aware to use exactly 2 arguments in case of Implies and at least two arguments in case of And, Or, Equivalent, Nor, Nand and Xor. If you use only one argument, the respective formula is not well-formed but accepted by Mathematica. Be aware to use brackets of form "[" and "]" to signify the scope of quantifiers. Use "(" and ")" only in case of "!", "&&" and "||".

The following examples may help to get used to the syntax in the Mathematica style:

Traditional Form Input Form
p y z ¬ f ( z , y ) x f ( x , x ) p && E[y, E[z, !f[z,y]]] && A[x, f[x,x]]
x y A ( z , f ( x , y ) ¬ f ( z , z ) ) A[x, E[y, A[z, f[x,y] && !f[z,z]]]]
¬ ( y x f ( x , y ) x y f ( x , y ) ) Not[A[x, E[y, f[x,y]]] && E[y, A[x, f[x,y]]]]
x y ( f ( x , y ) f ( y , y ) ¬ f ( x , x ) ¬ f ( y , x ) ) A[x, E[y, f[x,y] && !f[y,x] && f[y,y] && !f[x,x]]]
x y z ( f ( x , y ) ¬ f ( x , x ) ( f ( x , z ) ¬ f ( y , z ) ) ) A[x, E[y, A[z, f[x,y] && !f[x,x] && (!f[y,z] || f[x,z])]]]
x ( 1 ) y ( 1 ) y ( 2 ) x ( 2 ) ( f ( x ( 1 ) , y ( 1 ) ) ¬ f ( y ( 2 ) , x ( 2 ) ) ) A[x[1], E[y[1], E[y[2],A[x[2],f[x[1],y[1]] && !f[y[2],x[2]]]]]]

Further examples:

Traditional Form: x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) x ( 5 ) ( f ( x ( 2 ) , x ( 1 ) , x ( 5 ) ) ¬ f ( x ( 4 ) , x ( 3 ) , x ( 5 ) ) )
Input Form: A[x[1], E[x[2], E[x[3], A[x[4], E[x[5], f[x[2], x[1], x[5]] && ! f[x[4], x[3], x[5]]]]]]]
Traditional Form: x ( 1 ) y ( 1 ) x ( 2 ) y ( 2 ) ( ( f ( x ( 1 ) , y ( 1 ) ) ¬ f ( y ( 2 ) , x ( 2 ) ) ) ( f ( x ( 1 ) , x ( 2 ) ) ¬ f ( y ( 1 ) , y ( 2 ) ) ) )
Input Form: A[x[1], E[y[1], A[x[2], E[y[2], ((f[x[1], y[1]] && !f[y[2], x[2]]) || (!f[y[1], y[2]] && f[x[1], x[2]]))]]]]
Traditional Form: x ( 1 ) y ( 1 ) y ( 2 ) x ( 2 ) y ( 3 ) ( f ( y ( 1 ) , x ( 1 ) , y ( 3 ) ) f ( y ( 1 ) , x ( 2 ) , y ( 3 ) ) ¬ f ( x ( 2 ) , y ( 2 ) , y ( 3 ) ) )
Input Form: A[x[1], E[y[1], E[y[2], A[x[2], E[y[3], (f[y[1],x[1],y[3]] && f[y[1],x[2],y[3]] && ! f[x[2],y[2],y[3]])]]]]]
Traditional Form: y ( 1 ) x y ( 2 ) ( ¬ Q ( y ( 1 ) , y ( 1 ) ) ( ¬ P ( y ( 1 ) , y ( 2 ) ) Q ( x , y ( 2 ) ) ) ( ¬ Q ( y ( 1 ) , y ( 2 ) ) Q ( x , y ( 2 ) ) ) P ( y ( 1 ) , y ( 1 ) ) )
Input Form: A[y[1],E[x,A[y[2],P[y[1], y[1]] && (!P[y[1], y[2]] || Q[x, y[2]]) && (!Q[y[1], y[2]] || Q[x, y[2]]) && !Q[y[1], y[1]]]]]
Traditional Form: y ( 1 ) ( y ( 2 ) ( y ( 3 ) ( g ( y ( 1 ) , y ( 3 ) ) g ( y ( 3 ) , y ( 2 ) ) ) ¬ f ( y ( 2 ) ) ) f ( y ( 1 ) ) ) x ( 1 ) ( x ( 2 ) ( f ( x ( 2 ) ) ¬ g ( x ( 1 ) , x ( 2 ) ) ) ¬ f ( x ( 1 ) ) )
Input Form: A[x[1], !f[x[1]] || A[x[2], f[x[2]] || !g[x[1],x[2]]]] && E[y[1], f[y[1]] && E[y[2], !f[y[2]] && E[y[3], g[y[1], y[3]] && g[y[3], y[2]]]]]
Traditional Form: y ( 1 ) y ( 2 ) x ( 1 ) ( y ( 3 ) ( f ( x ( 1 ) , y ( 3 ) ) x ( 2 ) h ( x ( 2 ) , y ( 3 ) ) ¬ f ( y ( 1 ) , y ( 3 ) ) ) y ( 4 ) ( x ( 3 ) ¬ h ( y ( 4 ) , x ( 3 ) ) g ( x ( 1 ) , y ( 4 ) ) ¬ g ( y ( 2 ) , y ( 4 ) ) ) )
Input Form: E[y[1], E[y[2], A[x[1], (E[y[3], f[x[1],y[3]] && !f[y[1], y[3]] && A[x[2], h[x[2], y[3]]]]) || (E[y[4], g[x[1], y[4]] && ! g[y[2], y[4]] && A[x[3], ! h[y[4], x[3]]]])]]]
Traditional Form: y ( 6 ) ( y ( 3 ) ( f ( y ( 3 ) , y ( 6 ) ) x ( 1 ) ( y ( 2 ) ( y ( 1 ) f ( y ( 2 ) , y ( 1 ) ) f ( y ( 2 ) , x ( 1 ) ) ) f ( y ( 3 ) , x ( 1 ) ) ) ) x ( 2 ) ( y ( 5 ) ( y ( 4 ) f ( y ( 5 ) , y ( 4 ) ) f ( y ( 5 ) , x ( 2 ) ) ) f ( y ( 6 ) , x ( 2 ) ) ) )
Input Form: E[y[6],E[y[3],f[y[3],y[6]] && A[x[1],E[y[2], E[y[1], f[y[2], y[1]]] && f[y[2], x[1]]] || f[y[3], x[1]]]] && A[x[2], E[y[5], E[y[4], f[y[5], y[4]]] && f[y[5], x[2]]] || f[y[6], x[2]]]]


Powered by webMathematica

Datenschutzerklaerung

© Timm Lampert / 2018-04-09