Question on Predicate Logic "If Then" and "$x$ if $y$" Here is the question I have:
“There exists a restaurant that, if it is midnight, then this restaurant would not be open.”
and
“Not all restaurant are open if it is midnight.”
Assume the set of all restaurant as the universe of discourse.
I assume $P(x)$ is the case that the restaurant will not be open
and $A$ is the event that it is midnight.
And I got $∃x(A → P(x))$ for both sentences. Is there anything I did wrong?
Since the question assumes there will be two individual answers for the statements, and have a sub-question requiring me to prove these two logic notation to be logically equivalent.
 A: You are correct.
The second sentence literally says $$A\to \lnot \forall x \lnot P(x),$$ which is logically equivalent to $$A\to \exists x P(x),$$ which is logically equivalent to $$\exists x \;\big(A\to P(x)\big),$$ which is literally what the first sentence says.
A: $p=\exists R :$time=midnight$\implies$ restaurant would not open.
$q=\exists R: R \ $not open at midnight.
$q\implies p$ and $p \implies q$ so $p\equiv q$.
A: 
And i got "∃x(A → P(x))" for both sentence, Is there anything i did wrong?

The first statement reads: “There exists a restaurant that, if it is midnight, then that restaurant would not open” which is indeed $\exists x~(A\to P(x))$ .
The second statement reads: “Not all restaurant open if it is midnight” which is also "If it is midnight, then not all restaurants open," which is slightly different.   The immediate translation is: $A\to(\lnot\forall x~\lnot P(x))$ .
Those are the distinct answers you were expected to obtain first, and then you may show equivalence by applying rules of equivalence.
