I can prove the following result.



> 
> **Theorem 1.** Let $f\_n:\mathbb{R}^n\to \mathbb{R}$ be a sequence of convex functions
> that converges almost everywhere to a function $f:\mathbb{R}^n\to\mathbb{R}$.
> Then $f$ is convex in the
> sense that there is a convex function $F:\mathbb{R}^n\to\mathbb{R}$
> such that $F=f$ a.e.
> 
> 
> 


I am sure, it must be known.



> 
> **Question 1.** Where can I find a proof?
> 
> 
> 


**Edit.** I added one more question (see below) and the answers published back in October 2022 apply to Question 1.


Theorem 1 implies the following fact that I could not find in any book:



> 
> **Theorem 2.** If $f\in W^{2,1}\_{\rm loc}(\mathbb{R}^n)$ (Sobolev space) satisfies
> $v^T D^2f(x)v\geq 0$ for almost all $x$ and all $v$, then $f$ is convex.
> 
> 
> 


Indeed, if $f\_\epsilon$ is an approximation by convolution (with a positive mollifier), then $v^T D^2f\_\epsilon(x)v\geq 0$ and hence $f\_\epsilon$ is convex since it is smooth. Now $f\_\epsilon\to f$ a.e. along with Theorem 1 implies that $f$ is convex.



> 
> **Question 2.** Has Theorem 2 been written somewhere?
> 
> 
> 


This is a simple result, but I am quite surprised I could not find it in any textbook.



Convergence of convex functions
It follows from Theorem 10.8 in


R. Tyrrell Rockafellar. Convex analysis. Princeton Mathematical Series, No.
28. Princeton University Press, Princeton, N.J., 1970.


This theorem essentially says the following: if $f\_n$ are convex functions on an open domain $\Omega\subset\mathbb{R}^n$ that converge pointwise (to a finite value) on a *dense* subset of $\Omega$, then the limit exists for every point of $\Omega$, this limit is a convex function, and the convergence is uniform on every compact set inside $\Omega$.


