Riemann integral (partitioning of the function domain): $$ \int_a^b fdx = \lim_{n\rightarrow\infty} \sum_{k=1}^n \inf_{[x_{i-1}, x_i]}f(x)d\mu([x_{i-1}, x_i]) $$
Lebesgue integral (partitioning of the function range): $$ \int_E fd\mu = \lim_{n\rightarrow\infty} \sum_{k=1}^n \inf_{E_k} f(x) \mu(E_k) $$
Questions:
1) Are the definitions above correct?
2) How to derive these definitions and what is the logic behind them?
Thank you for your help in advance!