\documentclass[JEP,XML,SOM,Unicode,NoEqCountersInSection,NoFloatCountersInSection]{cedram}
\datereceived{2016-09-13}
\dateaccepted{2017-12-04}
\dateepreuves{2017-12-08}
\usepackage{tikz}
\usepackage{mathrsfs}
\let\mathcal\mathscr
\newenvironment{enumeratei}
{\bgroup\def\theenumi{\roman{enumi}}\def\theenumii{\arabic{enumii}}\begin{enumerate}}
{\end{enumerate}\egroup}
\multlinegap0pt
\let\sep\mid
\newcommand{\implique}{\mathchoice{\Longrightarrow}{\Rightarrow}{\Rightarrow}{\Rightarrow}}
\newcommand{\spfrac}[2]{\sfrac{#1}{(#2)}}
\newcommand{\RedefinitSymbole}[1]{%
\expandafter\let\csname old\string#1\endcsname=#1
\let#1=\relax
\newcommand{#1}{\csname old\string#1\endcsname\,}%
}
\RedefinitSymbole{\forall} \RedefinitSymbole{\exists}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\theoremstyle{definition}
\newtheorem{rem}{Remark}
\newcommand\subsetsim{\mathrel{%
\ooalign{\raise0.2ex\hbox{$\subset$}\cr\hidewidth\raise-0.9ex\hbox{\scalebox{0.9}{$\sim$}}\hidewidth\cr}}}
\newcommand{\NN}{{\mathbb N}}
\newcommand{\ZZ}{{\mathbb Z}}
\newcommand{\RR}{{\mathbb R}}
\newcommand{\Tor}{{\mathbb T}}
\DeclareMathOperator\diam{diam}
\begin{document}
\frontmatter
\title[Small sumsets in $\mathbb{R}$]{Small sumsets in $\mathbb{R}$: \\full continuous $3k-4$ theorem, critical sets}
\author[\initial{A.} \lastname{de Roton}]{\firstname{Anne} \lastname{de Roton}}
\address{Université de Lorraine, CNRS, Institut Elie Cartan de Lorraine, UMR 7502\\
B.P. 70239, 54506 Vandoeuvre-lès-Nancy Cedex, France}
\email{anne.de-roton@univ-lorraine.fr}
\urladdr{http://www.iecl.univ-lorraine.fr/~Anne.de-Roton/}
\thanks{Soutien de l'ANR C\ae sar, ANR12-BS01-0011}
\begin{abstract}
We prove a full continuous Freiman's $3k-4$ theorem for small sumsets in $\mathbb{R}$ by using some ideas from Ruzsa's work on measure of sumsets in $\mathbb{R}$ as well as some graphic representation of density functions of sets. We thereby get some structural properties of $A$, $B$ and $A+B$ when $\lambda(A+B)<\lambda(A)+2\lambda(B)$ and either $\lambda(A)\geq\lambda(B)$ or $A$ has larger diameter than $B$. We also give some structural information for sets of large density according to the size of their sumset, a result so far unknown in the discrete and the continuous setting. Finally, we characterise the critical sets for which equality holds in the lower bounds for $\lambda(A+B)$.
\end{abstract}
\keywords{Sumsets, critical sets, Lebesgue measure, inverse theorems in additive combinatorics}
\subjclass{28A75, 11B13, 05B10}
\alttitle{Ensembles de réels de petite somme: une version continue du théorème 3k-4, structure des ensembles critiques}
\altkeywords{Ensembles sommes, ensembles critiques, mesure de Lebesgue, théorèmes inverses en combinatoire additive}
\begin{altabstract}
Nous démontrons un théorème $3k-4$, dans sa version la plus complète, pour les ensembles de réels en utilisant des idées issues du travail de Ruzsa sur les mesures des sommes d'ensembles de réels et une représentation graphique liée à la densité des ensembles. Nous obtenons ainsi des informations sur les structures des ensembles $A$, $B$ et $A+B$ lorsque $\lambda(A+B)<\lambda(A)+2\lambda(B)$ et soit la mesure de $A$ est supérieure à celle de $B$, soit le diamètre de $A$ est supérieur à celui de~$B$. Nous obtenons aussi des informations sur la structure des ensembles de grande densité en fonction de la taille de leur somme, ce qui représente un résultat n'ayant pas d'analogue discret. Nous caractérisons enfin les ensembles de réels critiques pour lesquels la mesure de l'ensemble somme atteint le minorant que nous avons obtenu.\end{altabstract}
\maketitle
\tableofcontents
\mainmatter
\section{Introduction}
Inverse problems for small sumsets study the structural properties of sets $A$ and~$B$ when their sumset $A+B=\{a+b,\, a\in A, \, b\in B\}$ is small (see \cite{Tao-Vu} or \cite{Nathanson} for an overview on this subject).
In 1959, Freiman \cite{Freiman1959} proved that a set $A$ of integers such that $|A+A|\leq 3|A|-4$, where $|A|$ denotes the number of elements in~$A$, is contained in an arithmetic progression of length $|A+A|-|A|+1$. This result is usually referred to as Freiman's $(3k-4)$ theorem. It has been refined in many ways and generalised to finite sets in other groups or semi-groups. The most complete version of this theorem for integers can be found in \cite{Gr}, chapter 7. We shall call this theorem the full Freiman's $(3k-4)$ theorem.
In this paper, we consider the addition of two bounded sets $A$ and $B$ of real numbers. We establish a continuous analogue of the full Freiman's $(3k-4)$ theorem and study the structures of the critical sets for which the lower bounds are attained. We also prove some results on sets of real numbers so far unknown for sets of integers. Our first main result can be read as follows ($\lambda$ is the inner Lebesgue measure on $\RR$ and $\diam(A)=\sup(A)-\inf(A)$ is the diameter of $A$).
\begin{thm}\label{intro_3k-4}
Let $A$ and $B$ be bounded subsets of $\mathbb{R}$ such that $\lambda(A),\lambda(B)\not=0$.
If
\begin{enumeratei}
\item
either $\lambda(A+B)< \lambda(A)+\lambda(B)+\min(\lambda(A),\lambda(B))$,
\item
or $\diam(B)\leq \diam(A)$ and $\lambda(A+B)< \lambda(A)+2\lambda(B)$,
\end{enumeratei}
\noindent
then
\begin{enumerate}
\item $\diam(A)\leq \lambda(A+B)-\lambda(B)$,
\item $\diam(B)\leq \lambda(A+B)-\lambda(A)$,
\item there exists an interval $I$ of length at least $\lambda(A)+\lambda(B)$ included in $A+B$.
\end{enumerate}
\end{thm}
\begin{rem}
As a consequence of our proof, for $A$ and $B$ subsets of $\mathbb{R}$ such that $0=\inf{A}=\inf{B}$ and $D_A=\diam(A)$, $D_B=\diam(B)$ bounded, we can derive, as in the discrete case, that the interval $I$ included in $A+B$ we found has lower bound $b:=\sup\{x\in [0,D_A], x\not\in A+B\}$ and upper bound
\[
c:=\inf\{x\sep x\in[D_A,D_A+D_B],\, x\not\in A+B\}.
\]
Furthermore we get that
\[
\lambda(A\cap[0,x])+\lambda(B\cap[0,x])> x
\]
for $x>b$ and
\[
\lambda(A\cap[0,x+D_A-D_B])+\lambda(B\cap[0,x])< x+\lambda(A)+\lambda(B)-D_B
\]
for $x0$. Let $m$ be a non negative integer.
If $$\lambda(A+B)< D_A+\lambda(B)+(m+1)(D_A-D_B+\Delta),$$ then the sum $A+B$ contains a union of at most $2m+1$ disjoint intervals $K_1, K_2, \dots, K_{2n+1}$ ($n\leq m$), each of length at least $2\Delta+D_A-D_B$, such that the measure of this union of intervals is at least $D_A+(2n+1)\Delta+n(D_A-D_B)$.
\end{thm}
With the weak hypothesis in Theorem \ref{intro_relaxed_3k-4}, a description of the sets $A$ and $B$ can be given. This is nevertheless a rather vague description. On the contrary, we get a precise description of critical sets $A$ and $B$ for which the lower bound for the measure of $A+B$ is attained.
\begin{thm}\label{intro_equalarge}
Let $A$ and $B$ be some bounded closed sets of real numbers such that $D_B\leq D_A$ and $\lambda(A+B)=D_B+\lambda(A)< \lambda(A)+2\lambda(B)$.
Then there exist two positive real numbers $b$ and $c$ such that $b,c\leq D_B$, the interval $I=(b,D_A-c)$ has size at least $\lambda(A)+\lambda(B)-D_B=\Delta+D_A-D_B$ and
the sets $A$, $B$ and $A+B$ may each be partitioned into three parts as follows
$$A=\min(A)+\left(A_1\cup A_I\cup (D_A-A_2)\right), \quad B=\min(B)+(B_1\cup B_I\cup (D_B-B_2)),$$
$$A+B=\min(A+B)+\left(S_1\cup [b,D_A+D_B-c]\cup(D_A+D_B-S_2)\right),$$
with $A_1, B_1,S_1\subset [0,b]$, $A_2,B_2,S_2\subset [0,c]$ and
\begin{enumeratei}
\item
$A_1\subsetsim S_1$, $A_2\subsetsim S_2$, $A_I\subsetsim[b,D_A-c]$,
\item
$\lambda(B_1\setminus A_1)=\lambda(B_2\setminus A_2)=0$, $B_I\subset[b,D_B-c]$.
\end{enumeratei}
\end{thm}
Here, we used the notation $C\subsetsim D$ for $C\subset D$ and $\lambda(D\setminus C)=0$ (thus $C=D$ up to a set of measure $0$). This result is a consequence of our previous observations on function graphs.
\begin{rem}
The hypothesis $\lambda(A+B)=D_B+\lambda(A)< \lambda(A)+2\lambda(B)$ can be replaced by $\lambda(A+B)=D_A+\lambda(B)< \lambda(A)+2\lambda(B)$ and we get the same conclusions with the roles of $A$ and $B$ interchanged.
\end{rem}
Theorems \ref{intro_3k-4}, \ref{intro_relaxed_3k-4} and \ref{intro_equalarge} describe the structure of sets $A$, $B$ and $A+B$ such that $\lambda(A)+\lambda(B)\geq\diam(B)$. If this last inequality does not hold, Ruzsa proved a lower bound (in \cite{Ruz}) for the sum $A+B$ in terms of the ratio $\lambda(A)/\lambda(B)$. Precisely, Ruzsa proved the following theorem \cite{Ruz}
\begin{thm}[Ruzsa]\label{intro_cor_ruzsa}
Let $A$ and $B$ be bounded subsets of $\mathbb{R}$ such that $\lambda(B)\not=0$. Write $D_B=\diam(B)$ and define $K\in\NN^*$ and $\delta\in \RR$ such that
\begin{equation*}
\frac{\lambda(A)}{\lambda(B)} =\frac{K(K-1)}{2}+K\delta, \quad 0\leq\delta<1.
\end{equation*}
Then we have
\begin{equation*}
\lambda(A+B)\geq \lambda(A)+\min(\diam(B),(K+\delta)\lambda(B)).
\end{equation*}
\end{thm}
A simple remark yields an improvement of this lower bound when
\[
\diam(A)/\diam(B)\leq K
\]
and a partial result on sets $B$ such that $\lambda(A+B)<\lambda(A)+(K+\delta)\lambda(B)$.
The extremal sets in this context can also be described, in a very precise way.
\begin{thm}\label{small_equa}
Let $A$ and $B$ be bounded closed subsets of $\mathbb{R}$ such that $\lambda(A),\lambda(B)\not=0$.
Let $K\in\NN$ and $\delta\in[0,1)$ be such that
$$\frac{\lambda(A)}{\lambda(B)} =\frac{K(K-1)}{2}+K\delta \quad\mbox{ and }\quad \lambda(A+B)=\lambda(A)+(K+\delta)\lambda(B)<\lambda(A)+ D_B,$$
where $D_B=\diam(B)$.
Then $A$ and $B$ are subsets of full measure in translates of sets~$A'$ and $B'$ of the form
\begin{align*}
B'&=[0,b_+]\cup[D_B-b_-, D_B], \\
A'&=\bigcup_{k=1}^K \left[(k-1)(D_B-b_-),(k-1)D_B+(K-k)b_++\delta b\right],
\end{align*}
with $b_+,b_-\geq 0$ and $b_++b_-=b=\lambda(B)$.
\end{thm}
In Section \ref{ruz}, we recall and discuss Ruzsa's results that we use in this paper. In Section \ref{secswitch}, we present the method of switches that leads to the third statement in Theorem \ref{intro_3k-4} and to Theorem \ref{intro_relaxed_3k-4}. We prove Theorem \ref{intro_3k-4} in Section \ref{sec:4} and Theorem \ref{intro_relaxed_3k-4} in Section \ref{sec:5}. We describe in Section \ref{sec:6} the large critical sets for which the lower bound in Ruzsa's inequality is attained. Finally, the last section is devoted to the characterisation of the small critical sets for which the lower bound in Ruzsa's inequality is attained.
We write $\lambda$ for the inner Lebesgue measure on $\RR$ and $\mu$ for the inner Haar measure on $\Tor=\RR/\ZZ$. Given a bounded set $S$ of real numbers, we define its diameter $D_S=\diam(S)=\sup(S)-\inf(S)$.
\subsubsection*{Acknowledgement}
I am pleased to warmly thank Professor Ruzsa for very useful conversations and comments. I am also indebted to Professor Serra who gave a talk at the conference Additive Combinatorics in Bordeaux which helped me to get a perspective on some works in the discrete setting related to mine. He also helped me to improve the presentation of this paper. I am also grateful to Pablo Candela for bringing to my knowledge Grynkiewicz's book and for his careful reading of this paper and to Yuri Bilu for bringing my attention to the fact that the part (i) implies~(1) and~(2) of Theorem \ref{intro_3k-4} could be obtained as a consequence of his main result in \cite{Bilu}. I~am also indebted to the anonymous referee whose advice helped me a lot to (hopefully) improve the presentation of this paper and to enlighten the ideas contained in the proofs.
\section{Ruzsa's lower bound for sumsets in \texorpdfstring{$\RR$}{R}}\label{ruz}
All along this paper, we shall use some results and some arguments from Ruzsa's paper \cite{Ruz}. In order to keep this paper self contained, we collect them here.
In \cite{Ruz}, Ruzsa obtains lower bounds for the inner Lebesgue measure of the sum $A+B$ of two subsets $A$ and $B$ of real numbers in terms of $\lambda(A)$, $\lambda(B)$ and $\diam(B)$. We state here one of his intermediate results and give its proof.
\begin{lem}[Ruzsa \cite{Ruz}]\label{ruzsa1}
Let $A$ and $B$ be non empty bounded subsets of $\mathbb{R}$. Write $D_B=\diam(B)$.
Then we have either
\begin{equation}
\lambda(A+B)\geq \lambda(A)+\diam(B)
\end{equation}
or
\begin{equation}\label{min_sum1}
\lambda(A+B)\geq \frac{k+1}{k}\lambda(A)+\frac{k+1}{2}\lambda(B),
\end{equation}
with $k$ the positive integer defined by
$$k=\max\{k'\in\NN \sep \exists x\in[0,D_B),\; \#\{n\in\NN \sep x+nD_B\in A\}\geq k'\}.$$
\end{lem}
\begin{proof}
$D_B=0$ yields \eqref{min_sum1}, so we assume $D_B>0$. We can translate and rescale~$A$ and $B$ so that $0=\inf A=\inf B$ and $D_B=1$. Working with the inner Lebesgue measure, we can assume that $A$ and $B$ are closed sets. The case of general sets can be obtained by applying the result to some sequences of closed sets $A_n\subset A$ and $B_n\subset B$ such that
\[
\lim_{n\to \infty}\lambda(A_n)=\lambda(A),\quad \lim_{n\to \infty}\lambda(B_n)=\lambda(B)\quad\text{and}\quad \lim_{n\to\infty}\diam(B_n)=D_B.
\]
For any positive integer $k$ and any subset $E$ of $\RR^+$, we define
$$\tilde{E}_k=\left\{x\in[0,1) \sep \#\{n\in\NN \sep x+n\in E\}\geq k\right\}$$
and $K_E=\max\{k\in\NN \sep \tilde{E}_k\not=\emptyset\}.$ Note that $\tilde{E}_{k+1}\subset\tilde{E}_k$.
We write $S=A+B$. Since $0,1\in B$, we have $\tilde{A}_{k-1}\subset \tilde{S}_k$ for $k\geq 2$, thus
\begin{equation}\label{minSk1_2}
\mu(\tilde{S}_k)\geq \mu(\tilde{A}_{k-1}) \quad (k\geq 2)
\end{equation}
and
$$\lambda(A+B)=\sum_{k=1}^{K_S}\mu(\tilde{S}_k)\geq \sum_{k=1}^{K_A}\mu(\tilde{A}_k)+\mu(\tilde{S}_1)=\lambda(A)+\mu(\tilde{S}_1).$$
By Raikov's theorem \cite{Raikov}, either $\mu(\tilde{S}_1)=1$ and $\lambda(A+B)\geq \lambda(A)+1=\lambda(A)+D_B$, or for all $k\geq 1$, we have $\mu(\tilde{S}_{k})\leq\mu(\tilde{S}_1)<1$ and
\begin{equation}\label{minSk2}
\mu(\tilde{S}_k)\geq \mu(\tilde{A}_k)+\mu(B) \quad (k\leq K_A).
\end{equation}
If $\mu(\tilde{S}_1)<1$, combining \eqref{minSk1_2} and \eqref{minSk2} leads to
$$\mu(\tilde{S}_k)\geq\frac{k-1}{K_A}\mu(\tilde{A}_{k-1})+ \frac{K_A+1-k}{K_A}(\mu(\tilde{A}_k)+\mu(B) )\quad (1\leq k\leq K_A+1)$$
and
\begin{equation}\label{minSK}
\lambda(A+B)\geq \frac{K_A+1}{K_A}\lambda(A)+\frac{K_A+1}{2}\lambda(B),
\end{equation}
which is Ruzsa's lower bound.
\end{proof}
As a corollary, Ruzsa derives Theorem \ref{intro_cor_ruzsa} stated in the introduction. In the following theorem, we improve this result for small sets $A$ and $B$ such that $D_A/D_B$ is small. This gives a partial answer to one of the questions asked by Ruzsa in \cite{Ruz}. Namely Ruzsa asked for a lower bound depending on the measures and the diameters of the two sets $A$ and $B$.
\begin{thm}\label{cor_ruzsa}
Let $A$ and $B$ be bounded subsets of $\mathbb{R}$ such that $\lambda(B)>0$. Write $D_B=\diam(B)$, $D_A=\diam(A)$ and define $K\in\NN^*$ and $\delta\in \RR$ by \begin{equation}\label{defKdelta}
\frac{\lambda(A)}{\lambda(B)} =\frac{K(K-1)}{2}+K\delta, \quad 0\leq\delta<1.
\end{equation}
Then we have either
\begin{equation*}
\lambda(A+B)\geq \lambda(A)+\diam(B)
\end{equation*}
or
\begin{equation}\label{min_sum2}
\lambda(A+B)\geq \lambda(A)+(K+\delta)\lambda(B).
\end{equation}
Furthermore, if $D_A/D_B\leq K$, then \eqref{min_sum2} can be replaced by the better estimate
$$\lambda(A+B)\geq\frac{\lceil{D_A/D_B}\rceil+1}{\lceil{D_A/D_B}\rceil}\lambda(A)+\frac{\lceil{D_A/D_B}\rceil+1}{2}\lambda(B).$$
\end{thm}
\begin{rem}\label{rkdiam}
This theorem is mostly due to Ruzsa in \cite{Ruz}. Our only contribution consists in noticing that the lower bound can be improved in case $D_A/D_B\leq K$. If $D_A\leq D_B$ then this remark yields the lower bound
\begin{equation}\label{minD_A x, \ x\geq 0) \implique x\in A+B,\\
\label{majx_grand}
(h(y)< y+\lambda(A)+\lambda(B)-D_B, \quad 0\leq y\leq D_B) \implique y+D_A\in A+B.
\end{gather}
The statement \eqref{majx_petit} is straightforward. Let us explain \eqref{majx_grand}.
By Lemma \ref{lem_mes}, if
\[
x\leq D_A+D_B\quad\text{and}\quad\lambda([x-D_B,D_A]\cap A)+\lambda([x-D_A,D_B]\cap B)> D_A+D_B-x,
\]
then $x\in A+B$. Writing $x=y+D_A$, this leads to
$$ (\lambda([y+D_A-D_B,D_A]\cap A)+\lambda([y,D_B]\cap B)> D_B-y, \ 0\leq y\leq D_B) \implique y+D_A\in A+B. $$
Since
\begin{align*}
\lambda([y+D_A-D_B,D_A]&\cap A)+\lambda([y,D_B]\cap B)\\
&=\lambda(A)-\lambda([0,y+D_A-D_B]\cap A)+\lambda(B)-\lambda([0,y]\cap B)\\
&=\lambda(A)+\lambda(B)-h(y),
\end{align*}
the statement \eqref{majx_grand} holds.
We notice that $g$ and $h$ are non decreasing continuous positive functions. They are also $2$-Lipschitz functions and satisfy the inequalities
\begin{equation}\label{gh}
0\leq g(x)\leq h(x)\leq g(x)+D_A-D_B\quad(x\geq 0).
\end{equation}
From now on, we assume that $\lambda(A)+\lambda(B)>D_A$ and define $\Delta=\lambda(A)+\lambda(B)-D_A$.
The region $[0,D_B]\times[0,\lambda(A)+\lambda(B)]$ of the plane can be partitioned into three regions delimited by the lines $L_1$ and $L_2$ respectively defined by the equations $y=x$ and $y=x+D_A-D_B+\Delta$. It leads to a partition of $[0,D_B]$ into three regions:
\begin{itemize}
\item $Z_1=\{x\in[0,D_B]\sep g(x)\leq x\}$ is the closed set of real numbers in $[0,D_B]$ for which the function $g$ is under the line $L_1$,
\item $Z_3=\{x\in[0,D_B]\sep h(x)\geq x+D_A-D_B+\Delta\}$ is the closed set of real numbers in $[0,D_B]$ for which the function $h$ is above $L_2$,
\item $Z_2=\{x\in[0,D_B]\sep x0$, the family $\{Z_1,Z_2,Z_3\}$ form a partition of $[0,D_B]$. Furthermore, $D_A+Z_1\subset A+B$, $Z_3\subset A+B$ and $[D_B,D_A],Z_2, D_A+Z_2\subset A+B$.
\end{lem}
\begin{rem}
In particular, we have $[0,D_A]\subset (A+B)\cup(A+B-D_A)$ under the hypothesis of the lemma.
\end{rem}
\begin{proof}
By \eqref{gh},
\[
\left(g(x)\leq x\implique h(x)\leq x+D_A-D_Bx\right)
\]
and $Z_1$ and $Z_3$ are disjoint subsets, which implies that $Z_1$, $Z_2$ and $Z_3$ are disjoint subsets. Now $0\in Z_1$, $D_B\in Z_3$, so by continuity of $g$ and $h$, the family $\{Z_1,Z_2,Z_3\}$ form a partition of $[0,D_B]$.
By the previous implications and \eqref{majx_grand}, if $x\in Z_1\cup Z_2$, then $x+D_A\in A+B$ and by \eqref{majx_petit}, if $x\in Z_2\cup Z_3$, then $x\in A+B$.
For $x\in[D_B,D_A]$,
$$g(x)\geq \lambda(B)+\lambda(A)-(D_A-x)=x+\Delta>x,$$ thus by \eqref{majx_petit} again, $[D_B,D_A]\subset A+B$.
\end{proof}
Now, to switch from $Z_1$ to $Z_3$ or reciprocally, one has to cross $Z_2$. We shall call the crossings from $Z_1$ to $Z_3$ the ``up crossings'' and the crossings from $Z_3$ to $Z_1$ the ``down crossings'' (although the functions $g$ and $h$ remain nondecreasing functions). By continuity, since $0$ is in $Z_1$, $D_B$ in $Z_3$, there is at least one up crossing and if there are $m$ down crossings, then there are $m+1$ up crossings and up crossings and down crossings alternate. Therefore, if $m$ is the number of down crossings, we can partition $[0,D_A]$ as a union of $4m+3$ consecutive intervals and the interval $(D_B,D_A]$ as follows:
\begin{equation}\label{decA}
[0,D_A]=I_0^{(1)}\cup I_0^{(2)}\cup I_0^{(3)}\cup\bigcup_{k=1}^m \bigl(J_k\cup I_k^{(1)}\cup I_k^{(2)}\cup I_k^{(3)}\bigr)\cup(D_B,D_A]
\end{equation}
with $I_k^{(1)}$, $I_k^{(3)}$ closed intervals such that
\[
Z_1\subset\bigcup_{k=0}^m I_k^{(1)}\subset Z_1\cup Z_2,\quad Z_3\subset\bigcup_{k=0}^m I_k^{(3)}\subset Z_3\cup Z_2,
\]
and $I_k^{(2)}$, $J_k$ open intervals such that $\bigcup_{k=0}^m I_k^{(2)}\cup \bigcup_{k=1}^m J_k\subset Z_2$.
The intervals $I_k^{(2)}$ correspond to up crossings whereas the intervals $J_k$ correspond down crossings.
We illustrate this by Figure \ref{fig:1}. For simplicity, we chose $D_A=D_B$ so that $g=h$ and only one down crossing ($m=1$).
\begin{figure}[htb]
\begin{center}
\begin{tikzpicture}[xscale=7,yscale=7]\smaller\smaller
\draw [<->] (0,1.1) -- (0,0) -- (1.2,0);
\node [below left] at (0,0) {$0$};
\draw [] (0,0) -- (1,1);
\draw [] (0,0.05) -- (1,1.05);
\draw [dashed] (1,0) -- (1,1.05);
\node [below] at (1,0) {$D_A$};
\node at (0.5,1) {$m=1$};
\draw [<->] (1.01,1+0.05) -- (1.01,1) node[above right]{$\Delta$};
\draw[thick, red] (0,0) to [out=20,in=240] (0.2,0.2) ;
\draw[thick,red,domain=0.2:0.25] plot (\x,{2*\x-0.2});
\draw[thick, red] (0.25,0.3) to [out=60,in=190] (0.6,0.58);
\node[red] at (0.4,0.55) {$g$};
\draw[thick, red] (0.6,0.58) to [out=10,in=240] (0.8,0.8) ;
\draw[thick,red,domain=0.8:0.85] plot (\x,{2*\x-0.8});
\draw[thick, red] (0.85,0.9) to [out=60,in=180] (1,1.05) ;
\draw [dashed, red] (0.25,0) -- (0.25,0.3);
\draw [dashed, red] (0.2,0) -- (0.2,0.2);
\draw [dashed, red] (0.575,0) -- (0.575,0.575);
\draw [dashed, red] (0.5,0) -- (0.5,0.55);
\draw [dashed, red] (0.8,0) -- (0.8,0.8);
\draw [dashed, red] (0.85,0) -- (0.85,0.9);
\draw[ultra thick, blue] (0.25,0) -- (0.5,0);
\draw[ultra thick, blue] (0.85,0) -- (1,0);
\node [below, red] at (0.1,0){$I_0^{(1)}$};
\node [below, red] at (0.7125,0){$I_1^{(1)}$};
\node [below, violet] at (0.225,0){$I_0^{(2)}$};
\node [below, violet] at (0.825,0){$I_1^{(2)}$};
\node [below, violet] at (0.535,0){$J_1^{\vphantom{(2)}}$};
\node [below, blue] at (0.925,0){$I_1^{(3)}$};
\node [below, blue] at (0.36,0){$I_0^{(3)}$};
\draw[ultra thick, red] (0.2,0) -- (0,0);
\draw[ultra thick, red] (0.575,0) -- (0.8,0);
\draw[line width=4, violet] (0.575,0) -- (0.5,0);
\draw[line width=4, violet] (0.8,0) -- (0.85,0);
\draw[line width=4, violet] (0.2,0) -- (0.25,0);
\node [ right] at (1.1,-0.12) {$A+A$};
\node [below right] at (1,-0.1) {$D_A$};
\node [below right] at (1,-0.15) {$2D_A$};
\node [below left] at (0,-0.15) {$D_A$};
\node [below left] at (0,-0.1) {$0$};
\draw [] (0,-0.1) -- (1,-0.1);
\draw[line width=4] (0.2,-0.1) -- (0.575,-0.1);
\draw[line width=4] (0.8,-0.1) -- (1,-0.1);
\draw[line width=4] (0,-0.15) -- (0.25,-0.15);
\draw[line width=4] (0.5,-0.15) -- (0.85,-0.15);
\draw [] (0,-0.15) -- (1,-0.15);
\end{tikzpicture}
\end{center}
\caption{\label{fig:1}}
\end{figure}
According to Lemma \ref{propZ}, the set $A+B$ contains the following union of $2m+1$ intervals
\begin{multline}\label{decS}
\bigcup_{k=1}^m\bigl( I_{k-1}^{(2)}\cup I_{k-1}^{(3)}\cup J_k\bigr) \cup\Bigl(I_m^{(2)}\cup I_m^{(3)}\cup (D_B,D_A]\cup (D_A+ I_0^{(1)})\cup (D_A+I_0^{(2)})\Bigr)\\
\cup \bigcup_{k=1}^m\Bigl(D_A+\bigl( J_k\cup I_{k}^{(1)}\cup I_{k}^{(2)}\bigr)\Bigr).
\end{multline}
Here each set in brackets is a single interval as a union of consecutive intervals.
One of the key points in the proof of the continuous $3k-4$ theorem consists in proving that while we switch from $Z_1$ to $Z_3$ or from $Z_3$ to $Z_1$, there is a not too small interval included in $Z_2$ in the meanwhile. We make this precise in the following lemma.
\begin{lem}\label{switch}
Let $A$ and $B$ be two non empty sets of real numbers satisfying $\inf(A)=\inf(B)=0$, $D_A\geq D_B$ and $\Delta:=\lambda(A)+\lambda(B)-D_A>0$.
Let $x$ and $y$ be two real numbers in $[0,D_B]$ such that $x\in Z_1$ and $y\in Z_3$.
\begin{itemize}
\item If $xy$ then the interval $(y,x)$ contains an open subinterval $J$ which is in $Z_2$ and satisfies $\lambda(J\cap B^c)\geq \Delta+D_A-D_B$.
\end{itemize}
\end{lem}
\begin{rem}\label{rksizesum}
This implies that the intervals $\bigl( I_{k-1}^{(2)}\cup I_{k-1}^{(3)}\cup J_k\bigr)$, $\bigl( J_k\cup I_{k}^{(1)}\cup I_{k}^{(2)}\bigr)$ and $\bigl(I_m^{(2)}\cup I_m^{(3)}\cup(D_B,D_A]\cup (D_A+ I_0^{(1)})\cup (D_A+I_0^{(2)})\bigr)$ in \eqref{decS} each have length at least $2\Delta+D_A-D_B$.
\end{rem}
\skpt
\begin{proof}
\begin{itemize}
\item Assume $x b_1$, $g_B$ is a non decreasing function and $\Delta>0$, this would lead to
$$\lambda([b_2, b_1+D_A-D_B]\cap A)>\lambda([b_2, b_1+D_A-D_B]),$$
a contradiction. Thus we must have $b_2> b_1+D_A-D_B$.
\begin{figure}[htb]
\begin{center}
\begin{tikzpicture}[xscale=7,yscale=7]\smaller\smaller
\draw [->] (0.1,0.05) -- (0.9,0.05);
\draw [] (0.2,0.2) -- (1,1);
\draw [dashed] (0.2,0.2) -- (0.05,0.05);
\draw [dashed] (0.1,0.2) -- (0,0.1);
\draw [] (0.1,0.2) -- (0.9,1);
\draw [] (0.1,0.4) -- (0.7,1);
\draw [dashed] (0,0.3) -- (0.1,0.4);
\draw[thick, red] (0.1,0.58) to [out=5,in=195] (1,0.85) node[right]{$g$};
\draw[thick, blue] (0.1,0.6) to [out=7,in=190] (1,0.9) node[right]{$h$};
\draw[fill,red] (0.78,0.78) circle [radius=0.005] node [below right]{$(b_2,b_2)$};
\draw [dashed, red] (0.78,0.78) -- (0.78,0.05);
\draw[fill,red] (0.78,0.05) circle [radius=0.005] node [above right ]{$b_2$};
\draw[fill,blue] (0.365,0.665) circle [radius=0.005] node [above left]{$(b_1,b_1+\Delta+D_A-D_B)$};
\draw [dashed, blue] (0.365,0.665) -- (0.365,0.05);
\draw[fill,blue] (0.365,0.05) circle [radius=0.005] node [below ]{$b_1$};
\draw[fill] (0.535,0.05) circle [radius=0.005] node [below ]{$b_1+D_A-D_B$};
\draw [dashed,] (0.535,0.69) -- (0.535,0.05);
\draw[fill] (0.535,0.685) circle [radius=0.005];
\draw [<->] (0.22,0.22) -- (0.22,0.32);
\node[left] at (0.22,0.26){$\Delta$};
\draw [<->] (0.15,0.25) -- (0.15,0.45);
\node[left] at (0.15,0.35) {$D_A-D_B$};
\end{tikzpicture}
\end{center}
\caption{\label{fig:2}}
\end{figure}
Since $b_2> b_1+D_A-D_B$, we have
\begin{align*}
g_B(b_2)-g_B(b_1)&\leq g_A(b_2)-g_A(b_1+D_A-D_B)+g_B(b_2)-g_B(b_1)\\
&\leq b_2-b_1-(D_A-D_B)-\Delta,
\end{align*}
which yields
$
\lambda(J\cap B^c)=(b_2-b_1)-(g_B(b_2)-g_B(b_1))\geq\Delta+D_A-D_B
$.\qedhere
\end{itemize}
\end{proof}
\section{Proof of the continuous Freiman \texorpdfstring{$3k-4$}{3k} theorem}\label{sec:4}
We can now prove Theorem \ref{intro_3k-4}.
As before, we can assume that $A$ and $B$ are closed bounded subsets of $\RR$ such that $\min(A)=\min(B)=0$.
We first prove that each hypothesis yields the first two points. This is a consequence of Ruzsa's lower bound and our remark \ref{rkdiam}. The proof of the third item is more demanding and will require the use of the switches method introduced in the previous section.
\begin{itemize}
\item Let us assume that we have hypothesis (i) and that $\lambda(A)\leq \lambda(B)$, say. Then by Remark \ref{rkdiam}, $\lambda(A+B)< 2\lambda(A)+\lambda(B)$ implies
$\diam(B)\leq \lambda(A+B)-\lambda(A)$.
On the other hand, $$\frac{\lambda(B)}{\lambda(A)}=\frac{K'(K'-1)}{2}+K'\delta'$$ with $K'\geq 2$ and $0\leq\delta'< 1$ thus
\[
\lambda(A+B)< 2\lambda(A)+\lambda(B)\leq\lambda(B)+(K'+\delta')\lambda(A)
\]
and Theorem \ref{cor_ruzsa} with $(B,A)$ instead of $(A,B)$ yields $\diam(A)\leq \lambda(A+B)-\lambda(B)$.
\item If $\diam(B)\leq \diam(A)$, then by \eqref{minD_A\lambda(B)$ then we have $\lambda(A+B)< \lambda(A)+\lambda(B)+\min(\lambda(A),\lambda(B))$ and the first part of this proof gives the result.
\end{itemize}
\end{itemize}
We now turn to the end of the proof and prove that under one of the two hypotheses of Theorem \ref{intro_3k-4} there exists an interval $I$ of length at least $\lambda(A)+\lambda(B)$ included in $A+B$.
We assume without loss of generality that $D_A\geq D_B$.
Hypothesis (i) yields
\[
\lambda(A+B)< \lambda(A)+\lambda(B)+\min(\lambda(A),\lambda(B))\leq \lambda(A)+2\lambda(B)
\]
and hypothesis (ii) yields $\lambda(A+B)< \lambda(A)+2\lambda(B)$, so in any case we assume $\lambda(A+B)< \lambda(A)+2\lambda(B)$. The part of the theorem already proven imply that $D_A\leq \lambda(A+B)-\lambda(B)<\lambda(A)+\lambda(B)$. We write $\Delta=\lambda(A)+\lambda(B)-D_A$. By hypothesis $\Delta>0$.
Reasoning modulo $D_A$ as Ruzsa does in \cite{Ruz}, we write
$$\lambda(A+B)=\mu_A(A+B)+\mu_A(\left\{x\in[0,D_B] \sep x,x+D_A\in A+B\right\}),$$
where $\mu_A$ denotes the inner Haar measure modulo $D_A$.
Since $0,D_A \in A$, we have
$$B\subset\{x\in[0,D_B] \sep x,x+D_A\in A+B\}.$$
Therefore
\begin{equation}\label{mes_som}
\lambda(A+B)\geq\mu_A(A+B)+\mu_A\left(\left\{x\in[0,D_B]\cap B^c \sep x,x+D_A\in A+B\right\}\right)+\mu_A(B).
\end{equation}
As in the previous section, we define the functions $g_A$, $g_B$, $g$ and $h$ and partition $[0,D_A]$ into three regions $Z_1$, $Z_2$ and $Z_3$.
In the following picture, we draw two functions $g_A$ and $g_B$, the corresponding functions $g$ and $h$ and the corresponding regions $Z_1$, $Z_2$ and $Z_3$. The main part of the proof will consist in showing that with our hypothesis this drawing covers the possible configurations of the curves. More precisely, we shall prove that there is no down crossing, thus only one up crossing (see Figure \ref{fig:3}).
\begin{figure}[htb]
\begin{center}
\begin{tikzpicture}[xscale=7,yscale=7]\smaller\smaller
\draw [<->] (0,1.2) -- (0,0) -- (1.2,0);
\node [below left] at (0,0) {$0$};
\draw [] (0,0) -- (1,1);
\draw [] (0,0.425+0.025+0.5+0.1-1) -- (1,0.425+0.025+0.5+0.1);
\draw [] (0,0.425+0.025+0.5+0.1-1+0.15) -- (1,0.425+0.025+0.5+0.1+0.15);
\draw [dashed] (1,0) -- (1,1.2);
\node [below] at (1,0) {$D_A$};
\draw [dashed] (0.85,0) -- (0.85,1.2);
\node [below] at (0.85,0) {$D_B$};
\draw [<->] (1.01,1+0.425+0.025+0.5+0.1-1) -- (1.01,1) node[above right]{$\Delta$};
\draw [<->] (1.015,1+0.425+0.025+0.5+0.1-1) -- (1.015,1+0.425+0.025+0.5+0.1-1+0.15);
\node[right] at (1.015,1+0.425+0.025+0.5+0.1-1+0.075) {$D_A-D_B$};
\draw[orange, domain=0:0.4] plot (\x,{\x*\x/0.8});
\draw[orange,domain=0.4:0.6] plot (\x,{\x-0.2});
\draw[orange,domain=0.6:1] plot (\x,{0.5+0.1-(1-\x)*(1-\x)/(2*(1-0.4-0.2))}) node[right] {$g_A(x)$};
\draw[cyan, domain=0:0.3] plot (\x,{\x*\x/0.6});
\draw[cyan,domain=0.3:0.35] plot (\x,{\x-0.15});
\draw[cyan,domain=0.35:0.85] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))});
\draw[cyan,domain=0.85:1] plot (\x,{0.425+0.025}) node[right] {$g_B(x)$};
\draw[thick,red, domain=0:0.3] plot (\x,{\x*\x/0.6+\x*\x/0.8});
\draw[fill,red] (0.3455,0.3455) circle [radius=0.005] ;
\draw [dashed, red] (0.3455,0) -- (0.3455,0.3455);
\node [below left, red] at (0.36,0){$b_1$};
\draw[thick,red,domain=0.3:0.35] plot (\x,{\x-0.15+\x*\x/0.8});
\draw[thick,red,domain=0.35:0.4] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+\x*\x/0.8});
\draw[thick,red,domain=0.4:0.6] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+\x-0.2})node[below right] {$g(x)$};
\draw[thick,red,domain=0.6:0.85] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+0.5+0.1-(1-\x)*(1-\x)/(2*(1-0.4-0.2))});
\draw[thick,red,domain=0.85:1] plot (\x,{0.425+0.025+0.5+0.1-(1-\x)*(1-\x)/(2*(1-0.4-0.2))}) ;
\draw[thick,blue, domain=0:0.25] plot (\x,{\x*\x/0.6+(\x+0.15)*(\x+0.15)/0.8});
\draw[thick,blue, domain=0.25:0.3] plot (\x,{\x*\x/0.6+\x-0.2+0.15});
\draw[thick, blue,domain=0.3:0.35] plot (\x,{\x-0.15+\x-0.2+0.15});
\draw[fill,blue] (0.405,0.605) circle [radius=0.005] ;
\draw [dashed, blue] (0.405,0) -- (0.405,0.605);
\node [below right, blue] at (0.4,0){$b_2$};
\draw[thick, blue, domain=0.35:0.45] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+\x-0.2+0.15})node[above left] {$h(x)$};
\draw[thick, blue,domain=0.45:0.85] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+ 0.5+0.1-(1-(\x+0.15))*(1-(\x+0.15))/(2*(1-0.4-0.2))});
\draw[thick,blue,domain=0.7:0.85] plot (\x,{0.425+0.025-(0.85-\x)*(0.85-\x)/(2*(0.85-0.3-0.05))+0.5+0.1-(1-(\x+0.15))*(1-(\x+0.15))/(2*(1-0.4-0.2)) });
\draw[thick,blue,domain=0.85:1] plot (\x,{0.425+0.025+0.5+0.1});
\draw[ultra thick, blue] (0.405,0) -- (1,0);
\node [below, red] at (0.185,0){$Z_1$};
\node [below, blue] at (0.7025,0){$Z_3$};
\node [below, violet] at (0.38,0){$Z_2$};
\draw[ultra thick, red] (0.3455,0) -- (0,0);
\draw[line width=4, violet] (0.3455,0) -- (0.405,0);
\draw [] (0,-0.1) -- (1,-0.1);
\draw [] (0,-0.11) -- (0,-0.09);
\node [below left] at (0,-0.10){$0$};
\draw [] (1,-0.11) -- (1,-0.09);
\node [below ] at (1,-0.10){$D_A$};
\draw[line width=4] (0.3455,-0.1) -- (1,-0.1);
\draw[line width=4] (0,-0.15) -- (0.25,-0.15);
\draw[line width=4] (0.405,-0.15) -- (0,-0.15);
\draw [] (0.405,-0.15) -- (0.85,-0.15);
\draw [] (0.85,-0.16) -- (0.85,-0.14);
\node [below ] at (0.85,-0.15){$D_A+D_B$};
\draw [] (0,-0.16) -- (0,-0.14);
\node [below ] at (0,-0.15){$D_A$};
\end{tikzpicture}
\end{center}
\caption{\label{fig:3}}
\end{figure}
Since $[0,D_B]=Z_1\cup Z_2\cup Z_3$, $(D_B,D_A]\subset A+B$ and $Z_i\subset A+B \bmod D_A$ for $i=1,2,3$ (which we proved in Lemma \ref{propZ}), we have $\mu_A(A+B)=D_A$ and $Z_2\subset \left\{x\in[0,D_B] \sep x,x+D_A\in A+B\right\}$.
With \eqref{mes_som} this yields
\begin{align}
\lambda(A+B)&\geq D_A+\lambda(B)+\lambda(Z_2\cap B^c)=\lambda(A)+2\lambda(B)+\lambda(Z_2\cap B^c)-\Delta.\label{minsum}
\end{align}
If there exist $x,y\in[0, D_B]$ such that $y< x$, $ x\in Z_1$, $y\in Z_3$, by Lemma \ref{switch} and~\eqref{minsum}, we get $\lambda(A+B)\geq \lambda(A)+2\lambda(B)+D_A-D_B$
which contradicts the hypothesis. Therefore there is no down crossing (i.e. for $x,y\in [0, D_B]$, $x\in Z_1$ and $y\in Z_3$
imply $x0$. We define the functions $g$ and $h$ as in Section \ref{secswitch}.
\begin{proof}[Proof of Theorem \ref{intro_relaxed_3k-4}]
As explained in Section 3, we can partition
\[
[0,D_B]\times [0,\lambda(A)+\lambda(B)]
\]
into three regions $Z_1$, $Z_2$ and $Z_3$. Let $m$ be the number of down crossings from $Z_3$ to~$Z_1$.
In Lemma \ref{switch}, we proved that for each down crossing, we gain a subset of $B^c\cap Z_2$ of measure at least $\Delta+D_A-D_B$. By use of \eqref{minsum}, it yields
$$\lambda(A+B)\geq \lambda(B)+D_A+\lambda(B^c\cap Z_2)\geq \lambda(B)+D_A+m(\Delta+D_A-D_B).$$
Furthermore, $[0,D_A]$ can be written as a union of $4m+4$ consecutive intervals as in~\eqref{decA} and by \eqref{decS} the set $A+B$ contains a union of $2m+1$ intervals, each of length at least $2\Delta+D_A-D_B$ by Remark \ref{rksizesum}. Furthermore the sum of the length of these intervals is at least
\begin{multline*}
D_A+\sum_{k=0}^n\lambda(I_k^{(2)})+\sum_{k=1}^n\lambda(J_k)\\\geq D_A+(n+1)\Delta+n(\Delta+D_A-D_B)\geq D_A+(2n+1)\Delta+n(D_A-D_B).
\end{multline*}
Here we used that $[0,D_A]\bmod D_A$ is covered by these intervals and that each $I_k^{(2)}$ and $J_k$ appear twice in the sum $A+B$ modulo $D_A$.
This yields the result.\end{proof}
Note that even in the case $m=0$, this theorem gives a new information. In case $D_BD_A$ to get the same conclusion.
Some more elements on the structure of the sets $A$ and $B$ could be derived from the graphic interpretation we gave. For simplicity $A=B$ and $\lambda(A)\geq \frac12 D_A$. In this case, we write $\lambda(A)=\frac12D_A+\delta$. The hypothesis of Theorem \ref{intro_relaxed_3k-4} becomes
\[
\lambda(A+A) \frac12\spfrac{D_A}{2m+3}$.
The set $[0,D_A]$ may be partitioned into the union of some disjoint intervals as follows
$$[0,D_A]=I_0^{(1)}\cup I_0^{(2)}\cup I_0^{(3)}\cup\bigcup_{k=1}^n \bigl(J_k\cup I_k^{(1)}\cup I_k^{(2)}\cup I_k^{(3)}\bigr),$$
On endpoints of $I_k^{(1)}$, thus on right endpoints of $J_k$ and left endpoints of $I_k^{(2)}$, we have $g(x)=x$ whereas on endpoints of $I_k^{(3)}$, thus on left endpoints of $J_k$ and right endpoints of $I_k^{(2)}$, we have $h(x)=g(x)=x+\Delta$. Therefore
$A$ has density $1/2$ of each interval $I_k^{(1)}$ and $I_k^{(3)}$, $\lambda(A\cap I_k^{(2)})=\frac12\lambda( I_k^{(2)})+\delta$ and $\lambda(A\cap J_k)=\frac12\lambda(J_k)-\delta$. Furthermore, there is a connection in the structures of $A$ and $A+A$. This connection is easier to explicate in the special case of extremal sets. This shall be the purpose of the next section.
\section{Small sumset and large densities: structure of the extremal sets}\label{sec:6}
In \cite{Freiman2009IAP11}, Freiman exhibits a strong connection in the description of $A$ and $A+A$ and reveals the structures of these sets of integers in case the size of $A+A$ is as small as it can be. In Theorem \ref{intro_equalarge} we give a similar result in the continuous setting. Our result also applies to sets $A$ and $B$ with $A\not=B$. As far as we know, no discrete analogue of this result can be found in the literature.
\begin{proof}[Proof of Theorem \ref{intro_equalarge}]
We use the same notation as in the proof of Theorem \ref{intro_3k-4} and we assume that $A$ and $B$ are closed bounded subsets of $\RR$ such that
\[
0=\min {A}=\min {B},\quad D_B\leq D_A\quad\text{and}\quad\lambda(A+B)=D_B+\lambda(A)< \lambda(A)+2\lambda(B).
\]
We proved already that there exists $I_2=(b,D_B-c)$ with
\[
g(b)=b,\quad h(D_B-c)=D_A-c+\Delta,
\]
where
\[
\Delta:=\lambda(A)+\lambda(B)-D_A>0\quad\text{and}\quad(b,D_A+D_B-c)\subset (A+B).
\]
Write
\[
A_1=A\cap[0,b],\quad B_1=B\cap[0,b],\quad S_1=(A+B)\cap[0,b]
\]
and
\begin{gather*}
A_2=(D_A-A)\cap[0,c],\quad (\text{\ie} D_A-A_2=A\cap[D_A-c,D_A]),\\ B_2=(D_B-B)\cap[0,c],\quad
S_2=\left((D_A+D_B)-(A+B)\right)\cap[0,c].
\end{gather*}
Then $A_1\subset S_1$ (since $0\in B$) and $A_2\subset S_2$ (since $D_B\in B$).
Furthermore
we have, on the one side,
$$A+B=S_1\cup (b,D_A+D_B-c)\cup \left(D_A+D_B-S_2\right)$$
and, on the other side,
$$\lambda(A+B)=D_B+\lambda(A)=D_B+\lambda(A_1)+\lambda\left(A\cap (b,D_A-c) \right)+\lambda(A_2).$$
Therefore we get $A_1\subsetsim S_1$, $A_2\subsetsim S_2$ and $A_I= A\cap(b,D_A-c) \subsetsim (b,D_A-c)$.
Since $0, D_A\in A$, this in particular implies, up to a set of measure $0$, that $B_1\subset A_1$ and $B_2\subset A_2$.
\end{proof}
\section{Small sets with small sumset: the extremal case}
We now characterise the sets $A$ and $B$ such that equality holds in \eqref{min_sum2}, thus
\[
\lambda(A+B)=\lambda(A)+(K+\delta)\lambda(B)
\]
with $K$ and $\delta$ defined in \eqref{defKdelta}. In \cite{Ruz}, Ruzsa gives an example of such sets $A$ and $B$. Theorem \ref{small_equa} states that his example is essentially the only kind of sets for which this equality holds.
Extremal sets will have the following shape (In this example, $K=3$ and $D_B=1$).
\begin{figure}[htb]
\begin{tikzpicture}[xscale=4]\smaller\smaller
\draw [draw=red, thick] (0.2,-.1) -- (0.2,0.1);
\draw[-][draw=red, line width=3] (0,0) -- (.2,0);
\draw[-][thick] (.2,0) -- (.9,0);
\draw [draw=red, thick] (0.9,-.1) -- (0.9,0.1);
\draw[-][draw=red, line width=3] (.9,0) -- (1,0);
\draw[-][thick] (1,0) -- (2.5,0);
\draw [draw=red, thick] (0,-.1) node[below]{0} -- (0,0.1);
\draw [draw=red, thick] (1,-.1) node[below]{1} -- (1,0.1);
\draw [thick] (2,-.1) node[below]{2} -- (2,0.1);
\node[align=center, above] at (1.25,.3){Set $B$};
\end{tikzpicture}
\begin{tikzpicture}[xscale=4]\smaller\smaller
\draw [draw=red, thick] (0.55,-.1) -- (0.55,0.1);
\draw[-][draw=red, line width=3] (0,0) -- (.55,0);
\draw[-][thick] (.55,0) -- (.9,0);
\draw [draw=red, thick] (0.9,-.1) -- (0.9,0.1);
\draw [draw=red, thick] (1.9,-.1) -- (1.9,0.1);
\draw[-][draw=red, line width=3] (.9,0) -- (1.35,0);
\draw [draw=red, thick] (1.35,-.1) -- (1.35,0.1);
\draw[-][thick] (1.35,0) -- (1.8,0);
\draw [draw=red, thick] (1.8,-.1) -- (1.8,0.1);
\draw[-][draw=red, line width=3] (1.8,0) -- (2.15,0);
\draw [draw=red, thick] (2.15,-.1) -- (2.15,0.1);
\draw[-][thick] (2.15,0) -- (2.5,0);
\draw [draw=red, thick] (0,-.1) node[below]{0} -- (0,0.1);
\draw [thick] (1,-.1) node[below]{1} -- (1,0.1);
\draw [draw=red, thick] (0.2,-.1)--(0.2,0.1);
\draw [draw=red, thick] (0.4,-.1)--(0.4,0.1);
\draw [draw=red, thick] (1.2,-.1)--(1.2,0.1);
\draw [thick] (2,-.1) node[below]{2} -- (2,0.1);
\node[align=center, above] at (1.25,.3){Set $A$};
\end{tikzpicture}
\caption{\label{fig:4}}
\end{figure}
\begin{proof}[Proof of Theorem \ref{small_equa}]
We assume without loss of generality that $A$ and $B$ are closed sets of $\RR^+$ such that
\[
0\!=\!\min A\!=\!\min B,\ D_B\!=\!1,\ \lambda(B)\!\neq\!0\text{ and }\lambda(A+B)\!=\!\lambda(A)+(K+\delta)\lambda(B)\!<\!1+\lambda(A),
\]
where $K$ and $\delta$ are defined by \eqref{defKdelta}.
Given two subsets $C$ and $D$ of $\Tor$ or $\RR$, we introduce the notation $C\subsetsim D$ when $C\subset D$ and $\mu(C)=\mu(D)$ in case $C, D\subset\Tor$, $\lambda(C)=\lambda(D)$ in case $C, D\subset\RR$.
We need to prove that
$$B\subsetsim[0,b_+]\cup [1-b_-,1] \quad\text{and}\quad A\subsetsim \bigcup_{\ell=0}^{K-1}[(\ell-\ell b_-,\ell+\delta b+(K-1-\ell)b_+],$$ with $b=b_++b_-$.
We use the notation introduced in the proof of Lemma \ref{ruzsa1}.
The proof will be divided into three steps. We first prove that $B$, $\tilde{A}_k$ and $\tilde{S}_k$ are unions of at most $m$ intervals in $\Tor$, then we prove that $m=1$. Finally, we determine the precise shape of $A$ and $B$.
The first step consists in determining the shape of $B$, $\tilde{A}_k$ and $\tilde{S}_k$ for positive integers~$k$. To this aim, we shall follow Ruzsa's arguments in \cite{Ruz} and use Kneser's theorem on critical sets in $\Tor$ \cite{kneser}.
Following the argumentation of the proof of Lemma \ref{ruzsa1}, the equality $$\lambda(A+B)=\lambda(A)+(K+\delta)\lambda(B)=\frac{K+1}{K}\lambda(A)+\frac{K+1}2\lambda(B)<\lambda(A)+1$$ implies $\mu(\tilde{S}_1)<1$, $K_A=K$, and
\begin{equation}\label{muSk}
\begin{cases}
\mu(\tilde{S}_k)= \mu(\tilde{A}_{k-1}) & (2\leq k\leq K+1),\\
\mu(\tilde{S}_k)= \mu(\tilde{A}_k)+\mu(B) & (1\leq k\leq K),\\
\mu(\tilde{S}_k)=0 &( k\geq K+2).
\end{cases}
\end{equation}
For $1\leq k\leq K$, we have $\tilde{A}_k+B\subset \tilde{S}_k$ thus the second line in \eqref{muSk} implies that we have equality in Raikov's inequality, meaning $\mu(\tilde{A}_k+B)=\mu(\tilde{A}_k)+\mu(B)$ and by Kneser's theorem on critical sets in $\Tor$ \cite{kneser} there exists $m_k\in\NN$, there exist two closed intervals $I_k$ and $J_k$ of $\Tor$ such that $m_k\tilde{A}_k\subset I_k$, $m_k B\subset J_k$ and $\mu(I_k)=\mu(\tilde{A}_k)$, $\mu(J_k)=\mu(B)$.
Now $m_k B\subset J_k$ with $\mu(J_k)=\mu(B)$ and $m_\ell B\subset J_\ell$ with $\mu(J_\ell)=\mu(B)$ implies \hbox{$m_k\!=\!m_\ell$} and $J_k=J_\ell$. Let us write $J=J_k$ and $m=m_k$. We thus have for some~\hbox{$m\in\NN$},\vspace*{-3pt}
\begin{equation}\label{Sk}
\begin{cases}
m\tilde{A}_k\subsetsim I_k, & mB\subsetsim J,\\
\tilde{A}_{k-1}\subsetsim \tilde{S}_k & (2\leq k\leq K+1),\\
\tilde{A}_k+B\subsetsim\tilde{S}_k & (1\leq k\leq K),\\
\emptyset\subsetsim\tilde{S}_k &( k\geq K+2).
\end{cases}
\end{equation}
This implies $I_{k-1}=I_k+J$ for $2\leq k\leq K$ thus $I_k=I_K+(K-k)J$ for $1\leq k\leq K$. Since\vspace*{-3pt}
$$\lambda(A)=\sum_{k=1}^K\mu(\tilde{A}_k)=\sum_{k=1}^K\mu(I_k),$$
we get, using $\mu(J)=\mu(B)$ and the definition of $K$ and $\delta$, that\vspace*{-3pt}
$$\mu(I_K)=\frac1K\lambda(A)-\frac{K-1}{2}\lambda(B)=\delta\lambda(B).$$
Now, we write $b=\lambda(B)$. We proved that we have
$$m\tilde{A}_k\subsetsim I_k= I_K+(K-k)J,\, \mbox{ with }\,\mu(I_K)=\delta b\,\mbox{ and }\,\mu(J)=b.$$
As a second step, we prove that $m=1$.
Write $J=J_+\cup J_-$ with $J_-$ a closed interval in $(-1,0]$ and $J_+$ a closed interval in $[0,1)$ and $b_+=\lambda(J_+)$, $b_-=\lambda(J_-)$.
Assume for contradiction that $m\geq 2$. Then, since $0\in B$,
$$B=\bigcup_{\ell=0}^mB_\ell\quad\mbox{ with }\quad B_0=\frac{J_+}m, \, B_m=1+\frac{J_-}{m}, \quad\text{and}\quad B_\ell= \frac{\ell+J}{m} \, \mbox{ if }\, 1\leq\ell\leq m-1.$$
In particular $\lambda(B_\ell)=\sfrac{b}{m}$ for $1\leq \ell\leq m-1$ and $\sum_{\ell=0}^m\lambda(B_\ell)=b$.
Similarly,\vspace*{-3pt}
$$A=\bigcup_{\ell=0}^L A_\ell\quad\mbox{ with }\quad A_\ell=A\cap \frac{\ell+I_1}{m} \, \mbox{ and }L=\max\{\ell\sep A_\ell\not=\emptyset\}$$
and\vspace*{-3pt}
$$A+B=\bigcup_{\ell=0}^{L+m} S_\ell\quad\mbox{ with }\quad S_\ell=(A+B)\cap \frac{\ell+I_1+J}{m}.$$
We write $\mathcal{L}=\{\ell\geq 0\sep A_\ell\not=\emptyset\}$.
On the one hand, we have $A_i+B_j\subset S_{i+j}$ for $i\in\mathcal{L}$ and $0\leq j\leq m$, thus\vspace*{-3pt}
\begin{equation}\tag{$*$}
\begin{split}
\lambda(A)+(K+\delta)b&=\lambda(A+B)=\sum_{\ell=0}^{L+m} \lambda(S_\ell)\\[-3pt]
&=\lambda(S_0)+\sum_{\ell=0}^{L} \lambda(S_{\ell+1})+\sum_{\ell=2}^{m} \lambda(S_{L+\ell})\\[-3pt]
&\geq\lambda(A_0)+\lambda(B_0)+\sum_{\ell\in\mathcal{L}} (\lambda(A_{\ell})+\lambda(B_1))+\sum_{\ell=2}^{m} (\lambda(A_L)+\lambda(B_\ell))\\
&\geq\lambda(A)+\lambda(A_0)+(m-1)\lambda(A_L)+b-\frac{b}{m}+\frac{b}{m}\#\{\ell\sep A_\ell\not=\emptyset\}\\
&\geq\lambda(A)+b-\frac{b}{m}+\frac{b}{m}\#\mathcal{L},
\end{split}
\end{equation}
therefore $\#\mathcal{L}\leq (K+\delta-1)m+1