Is Peirce's law valid? Could anyone help me see how Peirce's law ((P→Q)→P)→P  is valid?
It seems to me that from (P→Q), P need not follow.
e.g: assume p=pigs can fly, q=1+1=2
Then if (if pigs can fly → 1+1=2) then pigs can fly
since the first part is a valid inference (1+1=2) is always true how can P follow?
 A: The wikipedia article on Peirce's law remarks that "it can be thought of as the law of excluded middle written in a form that involves only one sort of connective, namely implication." This may make it a little obscure. It's instructive, then, to examine it from the perspective of constructive versus nonconstructive reasoning.
Peirce's law seems to mainly about $P$, with $Q$ a sort of parameter, so investigate varying $Q$. 
Taking $Q = P$, Peirce's law takes the form:
$$
((P\to P)\to P)\to P \iff (\top \to P)\to P
$$
or, "if $\top$ implies $P$, then $P$", which seems intuitively clear and true, unobjectionable constructively. Similarly, if $Q$ is $\top$, then $P\to Q$ reduces to $\top$, and Peirce's law is again equivalent to $(\top \to P)\to P$.
Taking $Q = \bot$, Peirce's law becomes:
$$
((P\to \bot)\to P)\to P \iff (\neg P\to P)\to P
$$
"If the negation of $P$ implies $P$, then $P$." If $\neg P$ implies $P$, then $\neg P$ implies a contradiction, $P\land\neg P$, and therefore everything, so $\neg P$ must be false. Constructively, this shows only that $\neg \neg P$. Classically, however, by excluded middle alias $\neg \neg P\to P$, we can infer $P$.
Note that in intuitionistic logic, Peirce's law is not valid and not a theorem, though the following is:
$$
((P\to Q)\to P)\to \neg \neg P.
$$
If you add the law of excluded middle $P\lor\neg P$, double-negation elimination, or Peirce's law to intuitionistic logic, you get classical logic.
A: It is a tautology : thus we can use the truth-functional definition of the conditional.
When $P$ is true, then the conditional $A \to P$ is true, for $A$ whatever (because $? \to T$ is $T$); thus also when $A$ is $(P→Q)→P$.
When $P$ is false, then $(P→Q)→P$ is also false (because $F \to ?$ is $T$), and thus $((P→Q)→P)→P$ is true (because : $F \to F$ is $T$).

You are right :

from $(P→Q)$, $P$ does not follow (check with truth table).

But Peirce's law is : 

from $(P→Q)→P$, $P$ follows.

A: Your example seems to be about $(P\to Q)\to P$, which is not valid.  Peirce's Law is more complicated and is valid; read it carefully.  Peirce's Law says, in your example, that "pigs can fly" would be a consequence of the rather complicated hypothesis "If (if pigs can fly then $1+1=2$) then pigs can fly".  But that hypothesis is, as you noticed, false, so it does, indeed, imply everything, including "pigs can fly."
A: $$((P \implies Q) \implies P) \implies P$$
$$((\text{Pigs can fly} \implies 1+1=2) \implies \text{Pigs can fly}) \implies \text{Pigs can fly}$$
$$((\text{False} \implies \text{True}) \implies \text{False}) \implies \text{False}$$
$$(\text{True} \implies \text{False}) \implies \text{False}$$
$$\text{False} \implies \text{False}$$
$$\text{True}$$
