Why is this logical expression using $P$, $Q$, $R$ logically equivalent to one using only $P$ and $Q$? Formula 1:
$$(¬P ∧ ¬Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R)$$
P   Q   R   F
0   0   0   1
0   0   1   1
0   1   0   0
0   1   1   0
1   0   0   0
1   0   1   0
1   1   0   1
1   1   1   1

Formula 2:
$$(¬P ∧ ¬Q) ∨ (P ∧ Q)$$
P   Q   ((¬P ∧ ¬Q) ∨ (P ∧ Q))
0   0              1
0   1              0
1   0              0
1   1              1

How are these two formulas logically equivalent? To my understanding when two formulas are logically equivalent, they have identical truth values under all interpretations, these 2 formulas produce completely different truth tables- formula 1 has 3 variables and formula 2 has 2 variables to start off with. I don't understand how they are logically equivalent?

Let the $3$-input function $F_1(P,Q,R)$ denote Formula 1's truth value, and likewise for Formula 2.

*

*The key insight is that in Formula 1, $R$ is a ‘bogus’
(propositional) variable: whatever $P$ and $Q$'s values are,
$F_1(P,Q,0)$ and $F_1(P,Q,1)$ are either both true or both false. So,
the input combination $(P,Q)$ fully determines the Formula 1's truth
value. To determine whether Formula 1 is true, there is never a need
to consider input $R$'s truth value. $$F_1(P,Q,R)=F_1(P,Q).$$

*And, since each choice of $(P,Q)$ returns the same truth value for
Formulae 1 and 2, these two formulae must therefore be logically
equivalent. $$F_2(P,Q)=F_1(P,Q)=F_1(P,Q,R).$$ In fact, Formula 2 is a
simplified version of Formula 1.

