Abel Gómez

Pau Martí

M Carmen Penadés

José H Canós

DPLFW: a Framework for the Product-Line-Based Generation of Variable Content Documents

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Cno. de Vera, s/n. 46022 Valencia. Spain. {pmarti,mpenades,jhcanos}@dsic.upv.es

Abstract. Document Product Lines (DPL) is a document engineering methodology that applies product-line engineering principles to the generation of documents in high variability contexts and with high reuse of components. Instead of standalone documents, DPL promotes the definition of families of documents where the members share some common content while differ in other parts. The key for the definition is the availability of a collection of content assets which can be parameterized and instantiated at document generation time.

In this demonstration, we show the features of the DPL framework (DPLfw), the tool that supports DPL. DPLfw implements the domain engineering and application engineering stages of typical product line engineering approaches, supports different asset repositories, and generates customized documents in different output formats. We use the case study of the generation of customized emergency plans in a University campus [http://youtu.be/ueKGfmfkyI0].

Motivation

The concept of document has changed in last decades from the classical printed artifact to a purposeful and self-contained collection of information in a technology-neutral way [START_REF] Glushko | Document Engineering: Analyzing and Designing Documents for Business Informatics & Web Services[END_REF]. In more and more domains, documents are the central pieces of the business processes; moreover, in most cases the generation of customized documents has become the final milestone. Examples are customized emergency plans for organizations, customized learning objects based on students' profiles, or customized book catalogs made according to customers' preferences.

Customization can be made in three dimensions, namely content, structure and presentation. Specifically, content customization has been tackled from two different perspectives. On the one hand, proposals on Variable Data Printing (VDP) use variables within documents that are used as placeholders for content that are replaced with values to generate customized documents. These approaches are mostly XML-based [START_REF] Lumley | A framework for structure, layout & function in documents[END_REF][START_REF] Piccoli | A novel physics-based interaction model for free document layout[END_REF][START_REF] Sellman | VDP templates with theme-driven layer variants[END_REF]: document components are defined in XML, and the customized document is generated using XSLT, XPath, and other related technologies. In these proposals, the variability model is implicit (that is, it is embedded in XML, XPath and XSLT expressions), forcing document engineers to have a high knowledge about the XML world. On the other hand, more recent proposals such as [START_REF] Karol | Using feature models for creating families of documents[END_REF][START_REF] Rabiser | A flexible approach for generating product-specific documents in product lines[END_REF] use a product line approach to model the variability explicitly. These proposals use feature models to identify the variability points from a domain-oriented perspective, hiding the XML complexity.

The Document Product Lines approach (DPL) [START_REF] Gómez | A framework for variable content document generation with multiple actors[END_REF][START_REF] Penadés | Document product lines: variability-driven document generation[END_REF] is an example of the latter. DPL was created with a twofold goal: first, to make variable content documents creation affordable to non-expert users by including a domain engineering process previous to document generation; and second, to enforce content reuse at domain level following principles of Software Product Line Engineering (SPLE). We implemented a tool, DPLfw [3], to provide the methodological and technological background to creating variable content documents by the DPL approach. DPLfw implements a true product line engineering process where the content variability is represented using document feature models and different variants of the document may be generated by defining different document configurations. DPLfw was developed following the MDE and Model Driven Architecture (MDA) paradigms, which allowed us to take advantage of code generation techniques for the implementation of the tool prototype.

2 The Document Product Lines methodology DPL is a method for the generation of variable content documents. As in SPLE, the DPL process is the concatenation of two main subprocesses, namely Domain Engineering and Application Engineering. Fig. 1 shows the most relevant tasks and artifacts in each subprocess using the BPMN notation.

The goal of the Domain Engineering is to define a family of documents and related artifacts. A family is a set of documents that share some mandatory content while differ in other optional content. To enforce reuse, the content of a family of documents is structured via a document feature model. In the Analyse Document Family task, a domain engineer specifies the documents in terms of features and feature attributes. The result is a document feature model including mandatory, optional, alternative features and their corresponding attributes (if applicable). In the Design Document Family task, the generic document architecture is defined by identifying the document components (called core assets in the SPLE terminology and InfoElements in DPL) required according to the feature model built in the previous stage. These InfoElements may define a set of variables corresponding to a set of placeholders, i.e., parts of their content that may be instantiated at later stages of the document generation process. Specific instances of the architecture are created later in the process, after the variability points and document variable have been fixed for a specific document. DPL assumes the existence of a Repository where InfoElements are stored and organized for reuse. Metadata are attached to each InfoElement in order to support retrieval processes in the Develop Core Asset task to find existing components. Finally, in the Generate Document Line task, a production plan is obtained; it is a process that specifies how the components are integrated according to the different relationships defined between the document features.

In the Application Engineering subprocess, a member of the document family is generated. The process starts with the Characterize Document task by selecting in the configuration the specific document features and variable values to be included in the final document. Next, the core-assets associated to the selected document features are retrieved and put together to Generate a Document Creation's Workflow model that it is used to generate a set of Custom Document Editors. The editors provide guidance for Enacting the Document's Creation Workflow by giving both a task-oriented and user-centered view of the document based on editing task and permissions producing the final document.

The DPLfw Framework

Figure 2 describes how a (simplified) DPL process is carried out in DPLfw. The Domain Engineering stage is an iterative process. For the sake of simplicity no specific order is enforced to execute its tasks as far as there is a fully populated document feature model describing the domain at the end of the stage. The Feature Editor is used by the Domain Engineer to characterize the variability of the domain as a document feature model. The Feature Editor interfaces with the Repository, which contains the InfoElements that will later be reused. All these elements support the Analyse Document Family task (cf. Figure 1).

It is noteworthy that, for the sake of simplicity, the Reference Architecture matches the structure of the feature model, and thus, the Design Document Family task does not require user-interaction. The Component Editor supports the Develop Core Assets task and is used to create new InfoElements and add them to the Repository. The Generate Document Line, which will describe how to retrieve and integrate the different components to obtain the final product, is also hidden from the user-point of view.

Regarding the Application Engineering subprocess, the Configuration Editor supports the Characterize Document task through the selection of variability points. Once a document feature model configuration is defined, the Enact Document Creation's Workflow task starts and the Custom Document Editors are generated by composing the InfoElements. These editors are used to fill in any remaining variable data. Finally, the Document Generator (a DITA-based [START_REF]OASIS: Darwin Information Typing Architecture (DITA) Version 1[END_REF] document generator engine) integrates the different components to obtain a fully instantiated document generated in a specific format (printed, hypermedia, etc.).

Demonstration: The UPV Campus Emergency Plans

Emergency plans development is the field we selected for our case study. An emergency plan is a document that contains all the knowledge required to respond to any incident in an organization. Emergency plans development is a domain that brings together a set of requirements that makes it an interesting real case study. In our demonstration we will show how a family of emergency plans is modeled, and how a customized emergency plan is generated. The UPV Campus is a real case study, and its document feature model represents the family of emergency plans of the university campus; where each building of the campus has its own emergency plan obtained as a configuration of the family.

Prior to the adoption of the DPL methodology in the UPV, new emergency plans were manually created using a text editor (MS Word). Applying DPL to the development of emergency plans requires that a set of document fragments (i.e. InfoElements) need to be created to be combined in the final document and a Document Feature Model describing the family of plans. However, sometimes an InfoElement needs some small parts to be changed from one emergency plan to another (e.g. the building name or the specific maps or warning systems, etc.). This scenario allows us to show how both approaches for document customization (variability-based customization and Variable Data Printing) have been combined in DPL and DPLfw.

DPLfw supports the generation of variable content documents in a product-line style. Such an approach has several advantages. On one hand, a domain-oriented variability specification helps to hide the complexity intrinsic to document description languages such as XML. On the other hand, the definition of generic content components increases the reusability of content significantly. DPLfw supports the generation of customized documents with high levels of reuse. Its foundation, DPL, aims at raising the level of abstraction in comparison with previous approaches, helping domain engineers and document engineers to develop families of documents without knowledge of the underlying document representation techniques such as XML, XPath, DITA or DocBook.

We have illustrated the use of DPLfw with an example taken from our collaboration with the emergency planning team at the Universidad Politècnica de València. The DPLfw documentation and prototype are publicly available for download in [3].

Fig. 1 .

 1 Fig. 1. DPL-based Document Generation Process

Fig. 2 .

 2 Fig. 2. DPLfw overview

  DPLFW: a Framework for the Product-Line-Based Generation of Variable Content Documents Abel Gómez 1 , Pau Martí 2 , M. Carmen Penadés 2 , and José H. Canós 2 1 AtlanMod team (Inria, Mines Nantes, LINA) 4 rue Alfred Kastler. 44307 Nantes, France abel.gomez-llana@inria.fr 2 ISSI -DSIC, Universitat Politècnica de València.


Alain Plagne
email: plagne@math.polytechnique.fr

Anne De Roton
email: anne.de-roton@univ-lorraine.fr

MAXIMAL SETS WITH NO SOLUTION TO x + y = 3z

come

Maximal sets with no solution to x + y = 3z

Introduction

Almost one century ago, on his way towards Fermat's Last Theorem, Schur [START_REF] Schur | Über die Kongruenz x m + y m = z m (mod p)[END_REF] was led to study sets of integers not containing a triple of elements with one being the sum of the two others. This was a pioneering work in Ramsey theory but at the same time the study of such sets, now called sum-free, was seminal in combinatorial number theory. Since then, sum-free sets have been widely investigated (see for instance [START_REF] Wallis | Combinatorics: Room Squares, Sum-Free Sets, Hadamard Matrices[END_REF]) and generalized to further contexts.

One possible generalization is the study of sets of integers without solutions (x, y, z) to an equation of the form ax + by = kz (with integral a, b and k) that Lucht [START_REF] Lucht | Dichteschranken für die Lösbarkeit gewisser linearer Gleichungen[END_REF] began in 1976. Ruzsa [START_REF] Ruzsa | Solving a linear equation in a set of integers I[END_REF][START_REF] Ruzsa | Solving a linear equation in a set of integers II[END_REF] studied more general linear equations and introduced a new terminology by distinguishing between what he called invariant and noninvariant equations.

In the present paper, we shall only deal with k-sum-free sets (k is a positive integer). A subset of a given (additively written) semi-group, say, is said to be k-sum-free if it contains no triple (x, y, z) satisfying the equation x + y = kz. Invariant equations, which correspond here to the fact that the sum of the coefficients of the unknowns in the forbidden relation is equal to zero, lead to the existence of trivial solutions -as appears for instance in the case of 2-sum-free sets (since x + x is equal to 2x, whatever x is) -which have not to be considered and lead to special developments: 2-sum-free sets, which are also and in fact mainly known as sets without arithmetic progressions of length 3, are of great importance and their study is central in additive combinatorics. We simply mention [START_REF] Sanders | On Roth's theorem on progressions[END_REF] for the latest development on the subject which goes back at least to Roth [START_REF] Roth | On certain sets of integers[END_REF]. Here, we restrict ourselves to the noninvariant cases, that is, k is supposed different from 2. In this case, the problems which appear are of a different kind.

The very basic question to maximize the cardinality of a set of integers included in {1, 2, . . . , n} having no solution to the equation x + y = z (sum-free sets) belongs to the folklore and is easily solved (see for instance [START_REF] Chung | Integer Sets Containing no Solution to x + y = 3z, The mathematics of Paul Erdős[END_REF] or [START_REF] Deshouillers | On the structure of sum-free sets[END_REF]). One cannot select more than n/2 integers with the required property, and this is optimal. Interestingly, for a general n, there are two kinds of extremal sum-free sets (see Theorem 1.1 of [START_REF] Chung | Integer Sets Containing no Solution to x + y = 3z, The mathematics of Paul Erdős[END_REF] for a precise statement): the combinatorial one, namely the upper-half, { (n + 1)/2 , . . . , n} for which the impossibility to solve the equation follows from a size condition (the sum of two elements in this set is larger than n, thus outside the set); and the arithmetic one, in the present case the set of odd integers, for which a modular condition prevents from the existence of a solution. Not only in the case of sum-free sets of integers is this dichotomy emerging. In all these types of questions, when asked in a discrete setting, this typology is subject to appear.

For k = 3 (and n = 4), Chung and Goldwasser [START_REF] Chung | Integer Sets Containing no Solution to x + y = 3z, The mathematics of Paul Erdős[END_REF] proved Erdős' conjecture that n/2 is the maximal size of a 3-sum-free set of positive integers less than n. They also prove, at least when n ≥ 23 (see Theorem 1.3 in [START_REF] Chung | Integer Sets Containing no Solution to x + y = 3z, The mathematics of Paul Erdős[END_REF]), that the set of odd integers is the only example attaining this cardinality.

For k ≥ 4, Chung and Goldwasser [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF] discovered k-sum-free subsets of {1, 2, . . . , n} with a size asymptotic to

∼ k -2 k 2 -2 k + 8 k(k 4 -2k 2 -4) n
as n tends to infinity. This was obtained thanks to an explicit construction of three intervals of integers. They additionally conjectured that this was the actual exact asymptotic maximal value. This conjecture was finally settled by Baltz, Hegarty, Knape, Larsson and Schoen in [START_REF] Baltz | The structure of maximum subsets of {1, n} with no solutions to a + b = kc[END_REF] (see also [START_REF] Dilcher | On finite pattern-free sets of integers[END_REF] for an alternative proof). These authors additionally proved an inverse theorem giving the structure of a k-sum-free sets of this size : such sets have to be close from the set composed of the three above-mentioned intervals.

In fact, Chung and Golwasser managed to predict the maximal size of a k-sum-free set of integers less than n by studying the continuous analog of the problem in [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF]; in other words by introducing the study of k-sum-free subsets of real numbers selected from [0, 1]. Indeed, a k-sum-free subset of [0, 1] leads, after a suitable dilation, to a k-sum-free set of integers (but it is important to notice, this set will be mandatorilyin the typology mentioned above -of a combinatorial nature).

We thus arrive to the question of determining the maximal Lebesgue measure -denoted thereafter µ -of a subset of [0, 1] having no solution to the equation x + y = kz. The case k = 1 is easy and, as mentioned above, the cases k ≥ 4 were solved in [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF]. However, the case k = 3 was left open and remained the only one for which the optimal asymptotic density was unknown. Nonetheless, it was precisely investigated and the set (composed again of three intervals) (1)

A 0 = 8 177 , 4 59 ∪ 28 177 , 14 59 ∪ 2 3 , 1
which does not contain a solution to the equation x + y = 3z, was identified in [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF] as playing an important role in the question. Notice that its measure is equal to 77/177 = 0.4350 . . . In the sequel, we shall call A 1 , . . . , A 7 the seven sets defined as the union of A 0 and three points, one end-point of each interval appearing in the definition of A 0 , except (8/177, 14/59, 2/3). These seven sets are 3-sum-free. The quite precise following conjecture was then formulated in [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF]:

Chung-Goldwasser Conjecture . Let A be a measurable 3-sum-free subset of [0, 1]. Then

µ(A) ≤ 77 177 .
Moreover, if µ(A) = 77/177 and if A is maximal with respect to inclusion among the 3-sum-free subsets of [0, 1], then A ∈ {A 1 , . . . , A 7 }.

Recently, Matolcsi and Ruzsa [START_REF] Matolcsi | Sets with no solutions to x + y = 3z[END_REF] led several computer-aided checks supporting this conjecture. Mainly, they made the first breakthrough towards the first part of this conjecture by showing the following theorem.

Matolcsi-Ruzsa Theorem . Let A be a mesurable 3-sum-free subset of [0, 1]. Then its measure satisfies µ(A) ≤ 28 57 = 0.49122 . . . This result, the first one to prove a strictly less than 0.5 upper bound for 3-sum-free subsets of [0, 1], is very noticeable because it shows in particular that in the case of 3-sum-free sets, contrary to what happens in the other cases, the maximal size of such a subset in [0, 1] is not the analog of that of a k-sum-free subset of integers (let us recall that such a set has a density 1/2). This illustrates indeed the fact that the only known 3-sum-free set of integers of maximal size is the set of odd numbers, a set of an arithmetic nature which does not possess a 'direct' continuous analog (contrarily to sets of combinatorial nature). Well, one could try to fatten up the set of odd numbers in {1, 2, • • • , n} and normalize it to obtain a 3-sum free subset of [0, 1] as explained in [START_REF] Chung | Maximum subsets of [0, 1] with no solutions to x + y = kz[END_REF] but the measure of this set would be roughly 1/3. This is an important observation: while such a phenomenon may occur when comparing sets with no solution (to a given linear equation) in {1, 2, • • • , n} and in [0, 1], a recent theorem of Candela and Sisask (see Theorem 1.3 in [START_REF] Candela | On the asymptotic maximal density of a set avoiding solutions to linear equations modulo a prime[END_REF]) shows that, in the analogous case of cyclic groups of prime order versus the torus, the discrete model always converges towards the continuous one. Notice that a good reason for this to happen, in this discrete case, is that even sets of an arithmetic nature can be transformed without loss of generality into sets of a combinatorial nature with the same density: multiplying an arithmetic progression by the inverse of its difference transforms it into an interval. This does not happen in the case of present study and makes the behaviour of maximal sets more difficult to handle.

In this paper, we first establish the optimal (in view of example ( 1)) upper bound for the measure of 3-sum-free sets of [0, 1].

Theorem 1. Let A be a measurable 3-sum-free subset of [0, 1]. Then µ(A) ≤ 77 177 .
We then describe the 3-sum-free subsets of [0, 1] of maximal measure, which in particular solves the inverse associated problem.

Theorem 2. Let A be a measurable 3-sum-free subset of [0, 1] satisfying µ(A) = 77/177, then there is an i ∈ {1, . . . , 7} such that A ⊂ A i .

The full Chung-Goldwasser conjecture is thus proved.

Notations and prerequisites

In what follows, we denote respectively by µ(X) and diam(X) = sup X -inf X, the Lebesgue measure and the diameter of a set X of real numbers. We shall denote by A + B the Minkowski sumset of two subsets A and B of R, and by α • A the α-dilate of A, that is {αx for x ∈ A}. Notice in particular that 2 • A is included in, but in general different from, A + A.

While the behaviour of µ with respect to dilation is clear since one has

(2) µ(α • A) = αµ(A),
it is more complicated for the case of Minkowski addition. The basic estimate for the measure of the sum of two measurable bounded subsets A and B of R is a standard Brunn-Minkowski type [START_REF] Henstock | On the measure of sum sets, I. The theorems of Brunn[END_REF] lower bound, namely

(3) µ * (A + B) ≥ µ(A) + µ(B),
where µ * denotes the inner measure (the use of this tool is made necessary by the fact that A + B is not necessarily measurable as shown by Sierpiński [START_REF] Sierpiński | Sur la question de la mesurabilité de la base de M. Hamel[END_REF]). Beyond this, the best known result is due to Ruzsa.

Lemma 1. (Ruzsa [START_REF] Ruzsa | Diameter of sets and measure of sumsets[END_REF]) Let A and B be two bounded measurable subsets of R such that µ(A) ≤ µ(B), then

(4) µ * (A + B) ≥ min(2µ(A) + µ(B), µ(A) + diam(B)).
In particular, one has

(5) µ * (A + A) ≥ min(3µ(A), µ(A) + diam(A)).
We underline the fact that up to this lemma, the result presented in this paper is self-contained.

We now state two more specific lemmas, due to Matolcsi and Ruzsa [START_REF] Matolcsi | Sets with no solutions to x + y = 3z[END_REF], that we shall need in the present study. These intermediary results are not presented as lemmas in [START_REF] Matolcsi | Sets with no solutions to x + y = 3z[END_REF], therefore, to ease the reading of the present paper, we include their respective (condensed) proofs here. Before entering this, we note that the assumption that there is no solution to x + y = 3z with x, y, z ∈ A can be rewritten set-theoretically in the form

(6) (A + A) ∩ (3 • A) = ∅ or, equivalently, 1 3 • (A + A) ∩ A = ∅. Lemma 2. (Matolcsi-Ruzsa [9]) Let A be a measurable bounded 3-sum-free subset of R + . One has µ(A) ≤ 2 sup A -inf A 4 .
Proof. Since, by definition, 1/3 • (A + A) and A are intersection-free and both included in the interval [2 inf A/3, sup A], we obtain

sup A - 2 3 inf A ≥ µ * 1 3 • (A + A) + µ(A) ≥ min µ(A), 1 3 (µ(A) + sup A -inf A) + µ(A),
in view of (2) and ( 5). If 2µ(A) ≥ diam(A), then we obtain

sup A - 2 3 inf A ≥ 4 3 µ(A) + 1 3 (sup A -inf A)
which gives the result. In the other case, we have

µ(A) ≤ 1 2 diam(A) = 1 2 (sup A -inf A) ≤ 2 sup A -inf A 4 , since A ⊂ R + .
Here is the second lemma useful to our purpose.

Lemma 3. (Matolcsi-Ruzsa [9]) Let A be a measurable 3-sum-free subset of [0, 1] such that sup A = 1, then µ(A) ≤ 1 3 + 1 2 µ A ∩ 2 3 , 1 .
Proof. We define

a = inf A, A 1 = A ∩ 2 3 , 1 and ε = 1 3 -µ(A 1 )
and refine the argument used in the proof of Lemma 2 using that the three sets 1/3

• (A + A), A and (2/3, 1] \ A 1 are disjoint subsets of [2a/3, 1]. This gives 1 - 2a 3 ≥ 1 3 µ * (A + A) + µ(A) + ε. Now, (5) gives µ * (A + A) ≥ µ(A) + min(2µ(A), 1 -a).
In the case where 2µ(A) > 1 -a, we get

1 - 2a 3 ≥ 1 -a 3 + 4 3 µ(A) + ε, thus µ(A) ≤ 1 2 - 3 4 ε - a 4 , whereas if 2µ(A) ≤ 1 -a, we get 1 - 2a 3 ≥ 2µ(A) + ε, from which it follows that µ(A) ≤ 1 -ε 2 - a 3 .
In both cases, we have

µ(A) ≤ 1 -ε 2 = 1 3 + 1 2 µ(A 1 ),
that is, the result.

Two central lemmas

The proof of the main theorem (Theorem 1) relies essentially on the following technical lemma.

Lemma 4. Let A be a measurable 3-sum-free subset of [0, 1] such that sup A = 1. Let a = inf A and A 1 = A ∩ 2 3 , 1
and define

ε 1 = inf A 1 - 2 3 and ε 2 = 1 3 -ε 1 -µ(A 1 ). If ε 1 + 2ε 2 ≤ 1/3, then one has µ A ∩ 2 9 + a 3 , 1 ≤ 1 3 -1 6 ε 1 if ε 1 ≤ 2 3 a, 1 3 -1 24 ε 1 -2 3 a if ε 1 > 2 3 a.
Proof. We define the following three sets A 2/3 , A 4/9 and A 1/3 :

A 2/3 = A ∩ 4 9 + 2 3 ε 1 , 2 3 , A 4/9 = A ∩ 1 3 + 1 2 ε 1 , 4 9 + 1 6 ε 1 ,
and

A 1/3 = A ∩ 2 9 + 1 3 (a + ε 1 ), 1 3 + 1 3 a .
By [START_REF] Deshouillers | On the structure of sum-free sets[END_REF], one gets

µ * 1 3 • (A 1 + A 1 ) ≥ min µ(A 1 ), 1 3 (µ(A 1 ) + diam(A 1 )) = min 1 3 -ε 1 -ε 2 , 1 3
2 3 -2ε 1 -ε 2 = 2 9 - 2 3 ε 1 - 1 3 ε 2 (7) using the assumption that ε 1 + 2ε 2 ≤ 1/3.
Since, by ( 6), the two sets 1/3 • (A 1 + A 1 ) and A 2/3 are disjoint subsets of the interval [4/9 + 2ε 1 /3, 2/3], one obtains, using ( 7), [START_REF] Lucht | Dichteschranken für die Lösbarkeit gewisser linearer Gleichungen[END_REF] µ(

A 2/3 ) ≤ µ 4 9 + 2 3 ε 1 , 2 3 -µ * 1 3 • (A 1 + A 1 ) ≤ ε 2 3 .
We now prove that

(9) µ(A 4/9 ) ≤ 1 3 ε 2 .
If A 4/9 has measure zero, there is nothing to prove. Thus we denote by c 1 the infimum of A 4/9 and by c 2 its supremum, and assume they are distinct. We choose a decreasing sequence (c 1 (n)) n≥0 in A 4/9 tending to c 1 when n tends to infinity and

< c 2 (if c 1 is in A 4/9 , c 1 (n) = c 1 will do). One has in view of 1/3 + ε 1 /2 ≤ c 1 ≤ c 1 (n) < c 2 ≤ 4/9 + ε 1 /6, 1 3 c 1 (n) + 2 3 + ε 1 ≤ c 1 (n) ≤ c 2 ≤ 4 9 + ε 1 6 ≤ 1 + c 1 3 ≤ 1 + c 1 (n) 3 , therefore A 4/9 = A ∩ [c 1 , c 2 ] = (A ∩ [c 1 , c 1 (n)]) ∪ (A ∩ [c 1 (n), c 2 ]) ⊂ (A ∩ [c 1 , c 1 (n)]) ∪ A ∩ 1 3 c 1 (n) + 2 3 + ε 1 , 1 3 (c 1 (n) + 1) ⊂ (A ∩ [c 1 , c 1 (n)]) ∪ A ∩ 1 3 • c 1 (n) + 2 3 + ε 1 , 1 .
Since c 1 (n) ∈ A, assumption (6) implies that 1 3 (c 1 (n) + A 1 ) ∩ A 4/9 = ∅ and therefore (10)

A 4/9 ⊂ (A ∩ [c 1 , c 1 (n)]) ∪ 1 3 • c 1 (n) + 2 3 + ε 1 , 1 \ A 1 ,
which in turn gives

µ(A 4/9 ) ≤ µ([c 1 , c 1 (n)]) + 1 3 µ 2 3 + ε 1 , 1 \ A 1 = (c 1 (n) -c 1 ) + 1 3 1 3 -ε 1 -µ(A 1 ) = (c 1 (n) -c 1 ) + 1 3 ε 2 .
Letting n tend to infinity in this inequality finishes the proof of ( 9). In the same fashion, if a ∈ A, one obtains

A 1/3 = A ∩ 1 3 • a + 2 3 + ε 1 , 1 = A ∩ 1 3 • a + 2 3 + ε 1 , 1 \ A 1 from which it follows (11) µ(A 1/3 ) ≤ 1 3 ε 2
and this remains true even if a ∈ A by considering a sequence (a(n)) n≥0 of elements of A tending to a when n goes to infinity arguing similarly as in the proof of [START_REF] Matolcsi | Sets with no solutions to x + y = 3z[END_REF]. We now study separately the two inequalities in the statement of the Lemma.

First inequality.

Suppose first that ε 1 ≤ 2a/3, which implies

sup 2 9 + 1 3 (a + ε 1 ), 1 3 + 1 3 a ≥ inf 1 3 + 1 2 ε 1 , 4 9 + 1 6 ε 1 ,
or, in other words, that A 4/9 and A 1/3 overlap. One then deduces from ( 8), ( 9) and ( 11) that

µ A ∩ 2 9 + a 3 , 1 ≤ µ(A 1 ) + µ(A 2/3 ) + 1 2 ε 1 + µ(A 4/9 ) + µ(A 1/3 ) + 1 3 ε 1 ≤ 1 3 -ε 1 -ε 2 + ε 2 + 5 6 ε 1 = 1 3 - 1 6 ε 1 .
And the inequality of Lemma 4 follows in this first case.

Second inequality.

Until the end of this proof, we assume that ε 1 > 2a/3.

We shall need the sets B 1/3 and C 1/3 defined in the following way :

B 1/3 = A ∩ 1 3 + 1 3 a, 1 3 + 1 2 ε 1 , C 1/3 = A ∩ 2 9 + 2 9 a, 2 9 + 1 3 ε 1 .
The assumption on the relative sizes of ε 1 and a shows that [START_REF] Dilcher | On finite pattern-free sets of integers[END_REF] shows that the set on the left is intersection-free with B 1/3 and one thus gets

1 3 • 2 3 + ε 1 + B 1/3 ⊂ 1 3 + a 9 + ε 1 3 , 1 3 + ε 1 2 ⊂ 1 3 + a 3 , 1 3 + ε 1 2 . If 2/3 + ε 1 ∈ A,
(12) µ(B 1/3 ) ≤ µ 1 3 + a 3 , 1 3 + ε 1 2 - 1 3 µ(B 1/3 ) = ε 1 2 - a 3 - µ(B 1/3 ) 3 , consequently (13) µ(B 1/3 ) ≤ 3 4 ε 1 2 - a 3 .
Once again, the same type of arguments as the ones used to prove [START_REF] Matolcsi | Sets with no solutions to x + y = 3z[END_REF] shows that this remains true even if 2/3 + ε 1 ∈ A. Now the inclusion 1 3

• (B 1/3 + B 1/3 ) ⊂ 2 9 + 2a 9 , 2 9 + ε 1 3
and [START_REF] Dilcher | On finite pattern-free sets of integers[END_REF] show that the set on the left-hand side of this inclusion and C 1/3 are disjoint and both included in the set on the right-hand side, that is, we obtain ( 14)

µ * 1 3 • (B 1/3 + B 1/3 ) + µ(C 1/3 ) ≤ ε 1 3 - 2a 9
.

By (3), this yields 2 3 µ B 1/3 + µ(C 1/3 ) ≤ ε 1 3 - 2a 9 .
Then, using this and ( 13), we derive

µ(B 1/3 ) + µ(C 1/3 ) = 2 3 µ B 1/3 + µ(C 1/3 ) + 1 3 µ B 1/3 ≤ ε 1 3 - 2a 9 + 1 4 ε 1 2 - a 3 = 11 24 ε 1 - 11 36 a.
We finally deduce from ( 8), ( 9), [START_REF] Ruzsa | Diameter of sets and measure of sumsets[END_REF] and the preceding inequality, that

µ A ∩ 2 9 + a 3 , 1 ≤ µ(A 1 ) + µ(A 2/3 ) + ε 1 2 + µ(A 4/9 ) + µ(B 1/3 ) + µ(A 1/3 ) + a 3 + µ(C 1/3 ) ≤ 1 3 -ε 1 -ε 2 + ε 2 + 1 2 ε 1 + 1 3 a + 11 24 ε 1 - 11 36 a = 1 3 - 1 24 ε 1 + 1 36 a = 1 3 - 1 24 ε 1 - 2 3 a .
Hence the announced inequality.

The second central lemma, needed for the proof of Theorem 2, deals with attaining the bound 1/3 in Lemma 4. Here it is. Lemma 5. Let A be a measurable 3-sum-free subset of [0, 1] such that sup A = 1. We define

a = inf A, A 1 = A ∩ 2 3 , 1 , ε 1 = inf A 1 - 2 3 and ε 2 = 1 3 -ε 1 -µ(A 1 ).
We assume ε 1 + 2ε 2 ≤ 1/3 and a > 0. Then, µ (A ∩ [2/9 + a/3, 1]) = 1/3 implies

ε 1 = ε 2 = 0.
Proof. In this proof we will use freely the notation introduced in the preceding lemma.

We first apply Lemma 4 to A. The precise inequality obtained there implies that we cannot have ε 1 > 2a/3, since we would get µ(A ∩ [2/9 + a/3, 1]) < 1/3. Thus µ(A ∩ [2/9 + a/3, 1]) = 1/3 implies ε 1 ≤ 2a/3 and then ε 1 = 0 in view of the precise formula in this case.

We now turn to the core of this proof and show that ( 15)

ε 2 = 0
and assume for a contradiction that ε 2 > 0.

The definition of the sets introduced in Lemma 4 gives

µ A ∩ 2 9 + a 3 , 1 = µ(A 1 ) + µ(A 2/3 ) + µ(A 4/9 ) + µ(A 1/3 ) -µ(A 1/3 ∩ 4 4/9 ).
Recall that by definition µ(A 1 ) = 1/3 -ε 2 and, in view of ( 8), ( 9) and [START_REF] Ruzsa | Diameter of sets and measure of sumsets[END_REF],

µ(A 1/3 ), µ(A 4/9 ), µ(A 2/3 ) ≤ ε 2 3 .
This, with µ(A 1/3 ∩ 4 4/9 ) ≥ 0, shows that µ (A ∩ [2/9 + a/3, 1]) = 1/3 can hold only in the case ( 16)

µ(A 1/3 ) = µ(A 4/9 ) = µ(A 2/3 ) = ε 2 3 , and µ 1 3 , 1 3 + a 3 ∩ A = 0,
this last equality being tantamount to saying that the intersection of A 1/3 and A 4/9 has measure zero. The function f :

x → µ([1/3, x] ∩ A 4/9
) is a non-decreasing non-negative continuous function on [1/3, 4/9] such that f is identically 0 on [1/3, (1+a)/3] and f (4/9) = ε 2 /3 > 0. We define c1 as the following infimum

c1 = inf{x ∈ [1/3, 4/9], f (x) > 0}.
We have [START_REF] Wallis | Combinatorics: Room Squares, Sum-Free Sets, Hadamard Matrices[END_REF] c1

≥ 1 + a 3 . Furthermore, µ([1/3, x]∩A 4/9 ) = 0 for any x ∈ [1/3, c1 ], whereas µ A 4/9 ∩ [ c1 , c1 + η] > 0 for any η > 0.
We choose a real number η such that 0 < η < min(a, ε 2 )/3. Let v be any element of [ c1 , c1 + η] ∩ A 4/9 . We have, using [START_REF] Wallis | Combinatorics: Room Squares, Sum-Free Sets, Hadamard Matrices[END_REF],

1 3 < v < c1 + η < c1 + a 3 ≤ c1 + c1 - 1 3 < c1 + 2 c1 - 1 3 = 3 c1 - 2 3
from which it follows that

1 3 v + 2 3 ≤ c1 ≤ c 2 ≤ 4 9 ≤ 1 3 (v + 1),
on recalling that c 2 = sup A 4/9 . Going back to the proof that µ(A 4/9 ) = ε 2 /3 in Lemma 4, the preceding inequalities allow us to obtain

A 4/9 ⊂ (A ∩ [c 1 , c1 ]) ∪ (A ∩ [ c1 , c 2 ]) ⊂ (A ∩ [c 1 , c1 ]) ∪ 1 3 • A ∩ v + 2 3 , 1 .
As previously, assumption (6) yields

A 4/9 ⊂ (A ∩ [c 1 , c1 ]) ∪ 1 3 • v + 2 3 , 1 \ A 1 .
But the sets A 4/9 and 1/3

• (v + ([2/3, 1] \ A 1 )
) have the same measure ε 2 /3 while A ∩ [c 1 , c1 ] has measure zero. We therefore deduce that, for any v in [ c1 , c1 + η] ∩ A 4/9 , (18)

A 4/9 = 1 3 • v + 2 3 , 1 \ A 1
up to a set of measure zero. Choosing u = u in [ c1 , c1 + η] ∩ A 4/9 (such u and u do exist since µ ([ c1 , c1 + η] ∩ A) = 0), and applying (18) consecutively to v = u and v = u , we get, up to sets of measure zero,

u + 2 3 , 1 \ A 1 = u + 2 3 , 1 \ A 1 .
This implies that 15) is therefore proved.

ε 2 = 3µ 2 3 , 1 \ A 1 = 0, a contradiction. Assertion (

Proof of Theorem 1

Let us begin with a simple consequence of Lemma 4.

Lemma 6.

Let A be a measurable 3-sum-free subset of [0, 1] such that sup A = 1 and µ(A) ≥ 5/12. Then,

µ A ∩ inf A 3 + 2 9 , 1 ≤ 1 3 .
Proof. Define ε 1 and ε 2 as in the statement of Lemma 4. The assumptions and Lemma 3 show that

5 12 ≤ µ(A) ≤ 1 3 + 1 2 µ A ∩ 2 3 , 1 = 1 2 (1 -ε 1 -ε 2 ),
or, equivalently, ε 1 + ε 2 ≤ 1/6, which implies ε 1 + 2ε 2 ≤ 2(ε 1 + ε 2 ) ≤ 1/3 and makes it possible to apply Lemma 4, which in turn concludes the proof.

We can now prove Theorem 1, the main result of this paper.

Proof of Theorem 1. We may, without loss of generality, assume that sup(A) = 1, since otherwise, we consider (1/ sup(A)) • A. Since 77/177 > 5/12, we may also assume that µ(A) ≥ 5/12, otherwise there is nothing to prove. Therefore, applying Lemma 6, we get

(19) µ(A) ≤ 1 3 + µ(R) where R = A ∩ a, 2 9 + 1 3 a and a = inf A. Notice that (20) µ(R) ≤ µ a, 2 9 + 1 3 a = 2 9 - 2a 3 .
Since R is non-empty (its measure is at least 1/12, by assumption), we define

r = sup R, R = 1 r • R and R 1 = R ∩ 2 3 , 1 = 1 r • R ∩ 2 3 r, r
and put

η 1 = inf R 1 - 2 3 , η 2 = 1 3 -η 1 -µ(R 1 ).
We distinguish two cases.

Case 1:

η 1 + 2η 2 ≤ 1/3.
We apply Lemma 4 to the set R and get

µ (R ) ≤ 1 3 + µ R ∩ a r , 2 9 + a 3r .
This implies

(21) µ (R) ≤ r 3 + µ R ∩ a, 2r 9 + a 3 = r 3 + µ (R 0 ) , if we denote R 0 = R ∩ a, 2r 9 + a 3 .
If µ(R 0 ) = 0, then by ( 20), ( 21) and the inequality r ≤ 2/9 + a/3, we obtain

µ(R) ≤ min r 3 , 2 9 - 2a 3 ≤ min 2 27 + a 9 , 2 9 - 2a 3 ≤ 2 21 .
This can be easily checked by noticing that the maximum value is attained for a = 4/21. Thus, in this case we must have

µ(A) ≤ 1 3 + 2 21 = 3 7 < 77 177
and we are done.

From now on, we therefore assume that µ(R 0 ) > 0, in particular that R 0 is a non empty set and we define b = sup R 0 . Applying Lemma 2 to R 0 together with the obvious inequality µ We now prove that

(R 0 ) ≤ b -a yields µ(R 0 ) ≤ min 2b -a 4 , b -a ≤ min r 9 - 1
(23) µ(R) ≤ max 1 2 (r -a), 2r -a 6 .
Indeed, if µ(R) > (r -a)/2 = diam(R)/2, then (5) implies

µ * (R + R) ≥ µ(R) + diam(R) = µ(R) + (r -a). Since 1/3 • (R + R) ⊂ [2a/3, 2r/3] and (1/3 • (R + R)) ∩ R = ∅, we get µ R ∩ a, 2 3 r = µ R ∩ 2 3 a, 2 3 r ≤ 2 3 (r-a)-µ * 1 3 • (R + R) ≤ 1 3 (r-a)- 1 3 µ(R).
It follows that

µ(R) = µ R ∩ a, 2 3 r + µ R ∩ 2 3 r, r ≤ 1 3 (r -a) - 1 3 µ(R) + r 3 -(η 1 + η 2 )r ≤ 1 3 (r -a) - 1

The inverse result: proof of Theorem 2

This section is devoted to the proof of the structural characterization of 3-sum-free sets with maximal measure. We start with a lemma which contains the core of the structural result. Lemma 7. Let A be a measurable 3-sum-free subset of [0, 1] satisfying µ(A) = 77/177. Then µ(A∆A 0 ) = 0 where A∆A 0 stands for the symmetric difference between A and A 0 as defined in formula (1).

Proof. Let us assume that we have a set A ⊂ [0, 1] with no solution to the equation x + y = 3z such that µ(A) = 77/177. We can assume that sup(A) = 1, otherwise (1/ sup A) • A would contradict Theorem 1.

For the sake of clarity, we recall the notation we shall use in this proof, namely

a = inf A, A 1 = A ∩ 2 3 , 1 , ε 1 = inf A 1 - 2 3 , ε 2 = 1 3 -ε 1 -µ(A 1 ), R = A ∩ a, 2 9 + 1 3 a , r = sup R, R 1 = 1 r • R ∩ 2 3 , 1 , and
R 0 = R ∩ a, 2 9 r + a 3 , b = sup R 0 .
If we examine the proof of Theorem 1, we notice first that we must have µ(A) = 1/3 + µ(R) that is,

(24) µ A ∩ 2 9 + a 3 , 1 = µ(A \ R) = 1 3 .
Furthermore, we cannot be in Case 2 of the proof of Theorem 1 since the conclusion is then that µ(A) ≤ 22/51 < 77/177. Therefore we must be in Case 1 (and more precisely subcase R 0 = ∅) and several inequalities occurring in the course of the proof must actually be equalities. In particular, we must have This implies the statement of the lemma since A and A 0 have the same measure.

Before coming to the proof of our inverse theorem, we recall a kind of prehistorical lemma in our context. Consequently the two full-measure in (χ -θ, χ + θ) sets ((v -X) ∩ (χ -θ, χ + θ)) and Y ∩ (χ -θ, χ + θ)) must intersect which shows that there are a x in X and a y in Y such that v -x = y or v = x + y ∈ X + Y . Hence the result, this being valid for any v.

, 1 .

 1 a > 0, Lemma 5 shows that (24) implies ε 1 = ε 2 = 0, thus µ(A 1 ) = 1/3 = µ(A \ R), therefore, up to a set of measure zero, we have(25) A = R ∪ 2 3Moreover, in the course of the proof of Theorem 1 we also applied Lemma 4 to (1/r)•R, so, in the equality case, similar arguments as above yield, up to a set of measure zero, R ∩ [2r/9 + a/3, r] = (2r/3, r) = (28/177, 14/59).What remains of A is, by definition, contained in [a, b]. It follows that up to a set of measure zero

Lemma 8 .

 8 Let X and Y be two subsets of R. Let α, β, γ, δ ∈ R such thatX ⊂ (α, β), µ * (X) = β -α, Y ⊂ (γ, δ), µ * (Y ) = δ -γ, then X + Y = (α + γ, β + δ). Proof. Let v ∈ (α + γ, β + δ). It can be written as v = φ + χ with φ ∈ (α, β) and χ ∈ (γ, δ). Let θ = 1 2 min(|φ -α|, |φ -β|, |χ -γ|, |χ -δ|).It follows that (φ -θ, φ + θ) ⊂ (α, β) and (χ -θ, χ + θ) ⊂ (γ, δ). Since X and Y are of full measure, we must haveµ * (X ∩ (φ -θ, φ + θ)) = µ * (Y ∩ (χ -θ, χ + θ)) = 2θ.Moreover, the set v -(φ -θ, φ + θ) = (χ -θ, χ + θ) and it follows that we must also have µ * ((v -X) ∩ (χ -θ, χ + θ)) = µ * (Y ∩ (χ -θ, χ + θ)) = 2θ.

  Moreover, the upper bound is tight and taken uniquely by the value a = 8/177. This piece of information will be used later on in the proof of Theorem 2.Case 2 : Assume now that η 1 + 2η 2 > 1/3.In particular, η 1 + η 2 > 1/6. This together with Lemma 3 give µ(R ) ≤ 5/12, thus

	Using (19) and r ≤ 2/9 + a/3, we get
	µ(A) ≤	1 3	+ min	4 9	2 9	+	a 3	-	1 12	a,	5 9	2 9	+	1 3	a -	2 3	a
	≤	1 3	+ min	8 81	+	7 108	a,	10 81		-		13 27	a
	≤	77 177	.
	(22)					µ(R) ≤	5r 12	.
											12	a,	2r 9	-	2 3	a
	since b ≤ 2r/9 + a/3. Therefore, by (21), we have
			µ(R) ≤ min	4r 9	-		1 12	a,		5r 9	-	2 3	a .

Both authors are supported by the ANR grant Caesar, number ANR 12 -BS01 -0011.

We start by a key-remark which will be essential in the proof of Theorem 2. Generalizing [START_REF] Dilcher | On finite pattern-free sets of integers[END_REF], we notice that if A is a 3-sum-free set, then we have

Giving a proof is immediate.

We are now ready to conclude the proof of the Chung-Goldwasser conjecture and prove Theorem 2.

Proof of Theorem 2. Applying Lemma 7 gives that, under the hypothesis of the theorem, µ(A∆A 0 ) = 0. Equivalently, A is of the form

, and

these three sets being of maximal measure in their respective intervals; and µ(Z) = 0.

Having noticed that if a set is of full measure in a given interval then dilating it by a constant factor transforms it as a full measure set in the dilated interval, an easy computation, based on Lemma 8, shows that

In the same way, we compute that

, 28 177 and

By (26), the union of all these sets is intersection-free with A, therefore A is contained in its complementary set in [0, 1], namely It follows that Z = ∅.

Studying the different cases with the endpoints leads to the result.