Here is logical formula:

$$\bigwedge_{i=1}^{9} \bigwedge_{n=1}^{9} \bigvee_{j=1}^{9}~p(i,j,n)$$

To use it in Mathematica I [use][1] that code:


    X=Array[p[#1,#3,#2]&,{9,9,9}];a=Apply[And,Apply[And,Apply[Or,X,{2}],{1}],{0}];
    Y=Array[p,{9,9,9}];b=Apply[And,Apply[And,Apply[Or,Transpose[Y,{1,3,2}],{2}],{1}],{0}];
    c = 0

Two methods are used above. In the first one, I am putting the result in `a` variable and with the second method in `b` variable.

Now:

>In[82]:= MatchQ[a,b]

>Out[82]= True

>In[81]:= MatchQ[a,c]

>Out[81]= False

So, I conclude that the output of `a` and `b` are the same.

Now I want to check the *logical equivalence* of `a` and `b`.

I tried:

>In[74]:= TrueQ[Equivalent[a, b]]

>Out[74]= True

>In[76]:= TrueQ[Equivalent[a, c]]

>Out[76]= False

>In[77]:= TrueQ[Equal[a,b]]

>Out[77]= True

>In[78]:= TrueQ[Equal[a,c]]

>Out[78]= False

>In[72]:= SameQ[a,b]

>Out[72]= True

>In[73]:= SameQ[a,c]

>Out[73]= False

----

**Questions:**

1. What is called the content of `a` and  `b`? Logical formula? Function(s)? Normal expression? Object? Other?

2. Are the all ways of checking the *logical equivalence* of `a` and `b` that I have used above right?

3. Are there any other possible ways to check the *logical equivalence* of `a` and `b` that I have not used above?

4. Is there one best way to check the *logical equivalence* of `a` and `b` and if yes which one and why its is best one?

  [1]: https://mathematica.stackexchange.com/questions/180580/how-can-i-input-a-logical-proposition-using-a-compact-implicit-notation