TITLE: How or why does intutionistic logic proof negations from within the theory, constructively?
QUESTION [11 upvotes]: I'm having a little of a cognitive dissonance why, in intuitionistic logic, it's possible to show stentences like
$(\neg A \land \neg B) \implies \neg(A\lor B).$
In plain text: If 'A isn't true' as well as 'B isn't true', then neither is 'A or B'.
In terms of types, using the notation 
$A\implies B\equiv A\to B,\hspace{.5cm} \neg A\equiv A\to 0,\hspace{.5cm} A\land B\equiv A\times B,\hspace{.5cm} A\lor B\equiv A+ B,$ 
where $0$ is the empty type (it comes with no type constructors and is said to have no terms), that statement reads
$((A\to 0)\times (B\to 0))\to (A+B)\to 0.$

To demonstrate what I do understand about it, here how I understand the constructive proof of the above statement: 
Firstly, the "$(A\to 0)\times (B\to 0)$"-part: If we have $(A\to 0)$ and $(B\to 0)$, this means we have two functions $f:(A\to 0)$ and $g:(B\to 0)$ at hand, which demonstrate absurdness. E.g. if we would have $a:A$, then $f(a):0$, so $f(a)$ is a term of the empty type. More formally, we have a pair $p:=(f,g)$ of type $(A\to 0)\times (B\to 0)$, where we can project out the two absurd functions $\pi_1(p)=f$ and $\pi_2(p)=g$. 
Regarding the "$(A+B)$"-part, one possible definition of the type construction of "or" is given by case analysis. With $p$ and hence $f$ and $g$, we have one functions for each case $A$ and $B$, and so a function $h$ of type $(A+B)\to 0$ can readily be constructed. Say we use $a:A$ and $b:B$ as the generic terms, then we can set $h(a):=f(a)$ and $h(b):=g(b)$.
In total, we can give a proof of $((A\to 0)\times (B\to 0))\to (A+B)\to 0$ is a function $P$ which takes a $p$ and a $c$ (either $a$ or $b$) and computes a term of $0$.
$P:=\lambda p.\ \lambda c.\ \mathrm{if}\ (c:A)\ \mathrm{do}\ \pi_1(p)(c)\ \mathrm{else}\ \pi_2(p)(c)$.

Now a more simple example is the proof of $A\implies \neg\neg A$, or 
$A\to ((A\to 0)\to 0).$ 
If we have $A$, and hence a term $a:A$, then if we have a function $f:A\to 0$, we have that $f(a):0$ and so a function proving the above is 
$P:=\lambda a.\ \lambda f.\ f(a)$
and of type $A\to ((A\to 0)\to 0).$
Conversely, we can't without further information proof $\neg\neg A\implies A$, or  $((A\to 0)\to 0)\to A,$ because from a given function $f:((A\to 0)\to 0)$ we can't reach into its domain and say something about $A$.
Okay, now this this is out of the way, here is my problem: 
The proofs of a negation consists of showing a way of how having a term of the assumption type would lead to the result of $0$ being inhabited. And indeed, whenever we successfully proof a negation $\dots \to 0$, we did this by constructing a function which when evaluated would return a term of of type $0$. Now the type $0$ deliberately comes with no type construction rules and so to make the above constructions, we needed to use a function which was also of type $\dots \to 0$. Consequently and more concretely, in both cases above the eventual proofs are functions including a lambda abstraction over such an "absurd function". Now if hence every absurd function is a function of other absurd functions, we can at best concatenate these functions but we can never evaluate any such function. Indeed, if our theory is consistent this already means we can never end up with $f(\dots):0$. But if we can only construct function which can't be evaluated, how on earth is this a "constructive proof"? This isn't a function, it's something to concatenate. Or put differently, we didn't construct a proof, we constructed a line of thought. At best, we can flee to the meta-theory and judge "if we end up with this thing with the right type, then I accept it as proof". But is then completely removed from the semantic content of what was to proof and I also don't know if the meta-logic can be intuitionistic.
@CarlMummert: As I try to explain above, and what I feel two answer now don't adress, is that my problem does not lie in "I proof the absurd by using something absurd", i.e. I'm okay with $\neg A\equiv A\implies ⊥$, but in the representation of this in the Curry-Howard isomorphism and the lambda calculus. I thought about it more now, and my issue likely is in the fact that one defines $\neg A\equiv A\to 0$, although I see no good argument to express the negation using the already given function concept. It turns out to work, so that's one possible justification, but it's a little step that undermines the meaning of the function concept. The problem here is that, as I describe above, for a proof of a negation we describe or "construct" something, which isn't a function. It has the form $\lambda f.\ \mathrm{foo}$, but you can't even pass the totality of its arguments to it, as these arguments not constructable (which happens to be exactly what we want to demonstrate). The proof-object we hence constructed can only be used to have its type checked. The purpose of involving $0$, the type without constructors, in the definition of $\neg A$ here is seemingly only to guaranty we can't proof $A\to 0$ in any other accidental way. Can't we not make $\neg A$ a standalone type which represents the notion of proof of the absurd? Well anyway, if there is no reference other an appealing alternative, I'll just go with the top answer, because I the engineering answer "it just works" is an answer too, I guess.

REPLY [2 votes]: I'd say this proof is more easily understood if you generalize it by replacing $\bot$ with an arbitrary proposition $C$:
$$\left((A\Rightarrow C)\land (B\Rightarrow C)\right)\Rightarrow \left((A\lor B)\Rightarrow C\right)$$
But this is just the elimination rule for $\lor$ in disguise in natural deduction:
$$\underline{\Gamma\vdash A\lor B \quad \Gamma,A\vdash C \quad \Gamma,B\vdash C}\\ \Gamma\vdash C$$
The proof can be also easily demonstrated  in Haskell:
proof :: ((a -> c), (b -> c)) -> (Either a b -> c)
proof (f, _) (Left  x) = f x
proof (_, g) (Right y) = g y

or just (relating to the elimination of Either):
proof :: ((a -> c), (b -> c)) -> (Either a b -> c)
proof = uncurry either


Update: I good way how to interpret $A\to\bot$ is as "terminate current evaluation and start somewhere else while transferring $A$ there".
This isn't very meaningful in pure intuitionistic settings, but becomes much more interesting when we introduce the call-with-current-continuation operator (AKA call/cc).
A language with call/cc allows to capture a particular state of the evaluation process of a term and resume the state, even repeatedly. One of the ways how to embed call/cc into the type system is to create a primitive operator of type corresponding to the double negation elimination:
$$\mbox{call/cc} : ((A\to\bot)\to\bot)\to A$$
(and now the type system now corresponds to the classical logic).
A function given as an argument to call/cc is of type $(A\to\bot)\to\bot$. This means it can never compute a result, the only thing it can do is escape the evaluation by taking a value of type $A$ and calling an "escape function" of type $A\to\bot$ on it.
What gives call/cc its strength is that one can use an "escape function" anywhere, in particular outside of the scope of a call/cc function, to "reset" the evaluation to a particular point.
As an example, consider the proof of the law of excluded middle in intuitionistic logic plus the double negation elimination. Let me use the Haskell language to demonstrate it, assuming we have a hypothetical call/cc implementation:
import Data.Void

type Neg a = a -> Void

callcc :: Neg (Neg a) -> a
callcc = undefined

doubleNeg :: Either a (Neg a)
doubleNeg = callcc $ \esc -> esc (Right (\x -> esc (Left x)))

Of course doubleNeg has no way of knowing if a is inhabited or not, so it sort of "cheats". It returns Right, as if claiming that a is uninhabited, with a special escape function crafted for Neg a. If someone ever constructs a value x of a and applies this function to it, the whole computation beyond the point of the call to doubleNeg is thrown away and the evaluation resumes from that saved point, returning Left x.