Intuition behind Lebesgue spaces: Lp, L^p, $\mathcal L^p$ or $L^p$ / $\ell^p$? I'm trying to learn some maths on my own, and this is a reach, but I'm hoping for a reader's digest explanation.
I have an idea of the need for a measure to be defined on sets, yet the definition of Lebesgue spaces on Wikipedia (if related at all) starts off with sequences and functions. Does it have anything to do, for instance with $\sigma$-algebras? Is it a solution to a problem at the crossroads of probability and topology? Where is it framed within the branches of mathematics? And what are the meanings of $\mathcal L^p$ and $\ell^p$ (the answers here being too advanced)?
 A: In short, it turns out that it is impossible to give a sensible meaning to $\int_X f \, dx$ for any function $f:X\to \mathbb{R}$, since $f$ could be pathological. Measurable functions are the most general class of functions for which it is possible to give a well-defined meaning to $\int  f\, dx$.  It is a very broad class, and it is rare to come across non-measurable functions (and it is not a trivial matter to construct nonmeasurable sets or functions). Notions of measurability, which lead to the Lebesgue integral, behave nicely under limits (compared to the Riemann integral), and are essential for constructing $L^p$ spaces that are complete.
Physicists, scientists and engineers who use $L^p$ space theory can often get by without understanding or worrying about measurability, and will often think of $L^p$ as simply all functions for which the $L^p$ norm is finite. While uncomfortable to mathematicians, this captures the essence of many applications of $L^p$ spaces, e.g., to PDEs, where the key issues are estimating the size of $L^p$ (or Sobolev) norms of smooth (hence measurable) functions.
A: You cannot expect to learn measure theory by asking a question online. 
The basic idea is that one wants to define a notion of integration that is better than Riemann's. Instead of subdividing the domain of the function, one subdivides the codomain. An integral is "limit of sum of value of the function times size of the region". If $f$ maps into $[0,1]$, say, this leads to 
$$\tag1
\lim_n\sum_{j=1}^n \frac jn\,\operatorname{size of}(f^{-1}([\frac {j-1}n,\frac jn]). 
$$
To make sense of $(1)$ one needs to make sense of "size of". That is, we need a measure on the domain of $f$. The spirit is that on the real line $m([a,b])=b-a$, but one wants to extend this to arbitrary subsets. 
The problem is that one can prove that it is impossible to define such a measure on all subsets of $\mathbb R$. But also one can prove that a big enough $\sigma$-algebra exists where it can be done. 
A second problem, now that one assumes that not every subset of the domain will be measurable, is that $(1)$ requires that preimages of intervals are measurable. Such functions, those such that preimages of open sets are measurable, and the measurable functions. 
In the end, one gets that $(1)$ defines a notion of integral for functions whenever the domain admits a $\sigma$-algebra and a measure on it. 
Given $1\leq p<\infty$ a measure space $X$ (which comes together with a $\sigma$-algebra and a measure $\mu$ on it), the corresponding $L^p$ space is a Banach space (complete normed vector space) given by those measurable functions $f$ such that $\int_X |f|^p\,d\mu<\infty$. The norm is $\|f\|_p=\left(\int_X|f|^p\,d\mu\right)^{1/p}$. There is also $L^\infty(X)$, which a different definition. 
It takes more than a month in an advanced math class (fourth year/graduate in North America) to do the above. 
A: Some notes for public scrutiny after trying to get some road map on the topic. Not a formal answer, or an attempt at, in any way, competing with the professional takes on other answers. Again, emphasis on intuition / satisfying layman's curiosity.


$\ell^p \text{   spaces}:$

Definition: set of all bounded infinite sequences of elements of the field of complex numbers (or real):
$$x=(x_1,x_2,\dots) \quad\ \vert \quad x_k\in \mathbb C, \quad k \in \mathbb N.$$
They form a vector space (or specifically, a sequence space). Formally,
$$\ell^p(\mathbb N):=\left\{\{x_k\}_{k=1}^\infty\quad\vert\quad \sum_{k=1}^\infty\vert x_k\vert^p <\infty\right\}$$
where $\mathbb N$ in the notation represents the index set for the sequence, emphasizing that a sequence space is a function space whose elements are functions from the natural numbers to the field $\mathbb C$
A $p$-norm is defined: $\displaystyle \Vert x_p\Vert=\left(\sum_{k=1}^\infty |x_k|^p\right)^{1/p}.$
In the case of $\ell^1,$
$$\ell^1(\mathbb N):=\left\{\{x_k\}_{k=1}^\infty\quad\vert\quad \sum_{k=1}^\infty\vert x_k| <\infty\right\}.$$ 
$\ell^{\infty}$ is the space of bounded sequences - its norm is $\Vert x\Vert_\infty = \sup \vert x_n \vert.$
These $\ell^p$ spaces are special cases of 

$L^p \text{  spaces}:$ 

On the other hand "capital LP" is the set of functions. It is just a particular instance of the prior concept of "lower-case l" because in that case we had functions from $\mathbb N \to \mathbb C,$ whereas what follows applies to continuous functions such that
$$L^p(\mathbb R) := \left \{f: \mathbb R \to \mathbb C \quad \vert \quad \int_{-\infty}^{+\infty }\vert f(x) \vert ^p \mathrm dx <\infty \right\}$$
The index set $\mathbb N$ has changed to $\mathbb R,$ although there is no reason why the function $f$ could not keep a discrete domain in the natural numbers.
$L^\infty$ is a function space of essentially bounded measurable functions.
The implication of the definition is that there is some decay in the function. Here is an example in $L^1,$ comparing $f(x)\in L^1,$ as compared to the function $g(x)\notin L^1:$

These are also vector spaces, and specifically function spaces. And further, they are normed spaces. The norm being defined (in general) as
$$\Vert f\Vert_p:= \left(\int_{-\infty}^{+\infty}\vert f(x)\vert^p \mathrm dx \right)^{1/p}$$

And what is the importance of this sets of functions:



*

*Form a Banach space with respect to the norm defined.

*Include functions that are not necessarily continuous (e.g. characteristic function).

*They are realistic for engineering applications because they don't blow up.

