I am trying to solve an exercise that gives me a set $A$ of formulas such that
$A = \{ p, (r → q) → ¬p, (r ∨ p) → q, r\}$
and wants me to compute $Cn(A)$, knowing that in the textbook $Cn$ (Consequence) is defined as the set of logical consequences of the set $A$ in classical propositional logic, that is $Cn(A) = \{x: A ⊢ x\}$ with $A ⊢ x$ read as "$A$ proves $x$".
In the beginning, I thought that $Cn$ should contain $p ∨ r$ as if $p$ is true then $p ∨ r$ and other similar formulas that can be proven by the set $A$ such $p ∨ ¬q$ ... but I am not so sure as a friend of mine told me that the answer is
$Cn(A) = \{p, r, q, ¬p\}$
Can anyone explain why or how to calculate the answer? I am totally lost, I tried drawing a truth table with the formulas of A and I ended up having $Cn(A) = \{r ∨ p, r → q, p, r, q, ¬p\} $ and I think it is wrong as $Cn$ has the inclusion property, so $A ⊆ Cn(A)$
Both you and your friend are wrong.
The right answer is: $Cn(A)$ is the set of all formulas! That is, from the assumption $A$ you can derive everything, since the set $A$ of formulas is contradictory.
Indeed, you can easily show that $p, \lnot p \in Cn(A)$. It means that from $A$ you can derive a contradiction $p \land \lnot p$. According to the principle of explosion (also known as ex falso quodlibet), from a contradiction any formula can be derived.
The fact that from $A$ you can derive a contradiction means that the set $A$ of formulas is unsatisfiable: it is impossible to make all the formulas in $A$ simultaneously true. This is something that you can wasily check through truth tables.