The Lavrentiev phenomenon in calculus of variations with differential forms

In this article we study convex non-autonomous variational problems with differential forms and corresponding function spaces. We introduce a general framework for constructing counterexamples to the Lavrentiev gap, which we apply to several models, including the double phase, borderline case of double phase potential, and variable exponent. The results for the borderline case of double phase potential provide new insights even for the scalar case, i.e., variational problems with $0$-forms.


Introduction
In this article we study variational problems and corresponding function spaces associated with the integral functionals of the form where Ω is a bounded domain in R N (later we will only consider the case of a cube or ball) with Φ : Ω × R + → R + is a generalized Orlicz function, ω a differential k-form and b a differential (N − k − 1)-form, and dV = dx 1 . . .dx n .For 0-forms the problem reduces to the classical problem of calculus of variations with dω replaced by ∇ω.Further we refer to the case of 0-forms (functions) as the scalar case.
We study calculus of variations for the non-autonomous models with general growth and differential forms.For our knowledge no regularity results are know for such classes.The focus of the present paper is on the conditions, separating the case with the energy gap from the regular case (density of smooth functions) for the integrands with nonstandard growth, in particular, for the variable exponent and double phase models.The study of the ρ-harmonic forms goes back to [Uhl77] K. Uhlenbeck, who obtained classical results on the Hölder continuity.These results were extended by Hamburger in [Ham92].Beck and Stroffolini [BS13] considered partial regularity for general quasilinear systems for differential forms.Sil [Sil17;Sil19a;Sil19b] studied convexity properties of integral functionals with forms and regularity estimates for inhomogeneous quasilinear systems with forms.Let is mention that the results obtained by Sil are related to the autonomous case Φ(x, |dω|) = Φ(|dω|).
In the present paper we study variational problems for the integral functional (1.1) with convex integrands Φ(x, t) that satisfy general "nonstandard" growth conditions of the type where 1 < p − ≤ p + < ∞, c 0 ≥ 0, c 1 , c 2 > 0. The class of "non-standard" integrands satisfying (1.2) includes for example the p(x)-integrand studied for the scalar case in many papers and several books, see [Zhi86; Zhi95; Zhi11; DHHR11; CF13; KMRS16].For the variable exponent model the Hölder regularity of solutions, a Harnack type inequality for non-negative solutions, and boundary regularity results were obtained by Alkhutov [Alk97;Alk05] and by Alkhutov and Krasheninnikova [AK04] under some suitable assumptions on the variable exponent of the log-Hölder type.Gradient regularity for Hölder exponent was obtained by Coscia and Mingione [CM99] and for the log-Hölder exponents by Acerbi and Mingione [AM01].
Colombo and Mingione in [CM15] obtained Hölder regularity results for double-phase potential model Φ(x, t) = 1 p t p + 1 q a(x)t q if q ≤ p(d+α)/d and a ∈ C 0,α (Ω).Moreover, bounded minimizers are automatically W 1,q (Ω) if a ∈ C 0,α (Ω) and q ≤ p + α, see the paper [BCM18] by Baroni, Colombo and Mingione.As it was shown in [BDS20] those results in the scalar case are sharp in terms of the counterexamples on the Lavrentiev gap.
The special case of the model (1.4) with ϕ(t) = t p and ψ(t) = t p log(e + t) was studied by Baroni, Colombo, Mingione in [BCM15].In particular they obtained the C 0,γ loc regularity result for the minimizers provided that the weight a(x) is log-Hölder continuous (with some γ) and more strong result (any γ ∈ (0, 1)) for the case of vanishing log-Hölder continuous weight.Skrypnik and Voitovych recently proved continuity and Harnack inequality for solutions of a general class of elliptic and parabolic equations with nonstandard growth conditions, see [SV21].The results on generalized Sobolev-Orlicz spaces are collected in the book by Harjulehto and Hästö [HH19] and for anisotropic Musielak-Orlicz setting in the book by Chlebicka, Gwiazda, Świerczewska-Gwiazda and Wróblewska-Kamińska [CG ŚW21].In the general framework of problems with nonstandard growth and nonuniform ellipticity recent results are due to Mingione and Rǎdulescu [MR21] and to De Filippis and Mingione, see [DM20;DM21a;DM21b].Recent contributions for such energies include new results on density of smooth functions and absence of Lavrentiev gap by Bulíček, Giazda, and Skrzeczkowski [BGS22], Koch [Koc22], and Borowski et al. [BCDM23].
An essential feature of the nonautonomous models with nonstandard growth is the presence of the Lavrentiev gap phenomenon.The energy F Φ,b defines the corresponding generalized partial Sobolev-Orlicz spaces of differential forms W d,Φ(•) (Ω, Λ k ) (the natural energy space for F Φ,0 , which consists of forms with W 1,1 (Ω) coefficients which fall in the domain of F Φ,0 ) described in Section 2.5.The Lavrentiev gap in this case is the inequality where A closely related problem is density of smooth functions in the natural energy space of the functional.Denote the closure of smooth forms from If any function from the domain of F Φ,b can be approximated by smooth functions with energy convergence (equivalently, if then the Lavrentiev gap is obviously absent.In the autonomous case, when the integrand Φ = Φ(t) is an Orlicz function independent of x, the Lavrentiev phenomenon is absent (H = W ).
In the scalar case (for functions = 0-forms) the study of such models goes back to Zhikov [Zhi86], [Zhi95], who constructed the first examples on Lavrentiev phenomenon for variable exponent model and double phase model in dimension N = 2. Esposito, Leonetti, Mingione [ELM04] generalized this example to any dimension (for the standard double phase model); Fonseca, Malý, Mingione [FMM04] constructed examples of minimizers for the standard double phase model with large (fractal) sets of discontinuity.All these examples required the dimensional restriction p − < N < p + .This restriction was overcome by the authors of the present paper with Diening in [BDS20] using fractal contact sets for scalar variable exponent, double phase and weighted model.In [BS21] the authors of the present paper studied the Lavrentiev gap property for the borderline double phase model (1.4) with one saddle point (that is, an example constructed as in [Zhi86], [Zhi95], and [ELM04]) with p = N , α, β > 0.
In this paper we extend the approach of [BDS20] to variational problems with differential forms and refine the construction by using the generalized Cantor sets which have an additional tweaking parameter.This allows for fine tuning of the singular set, while keeping the formal Hausdorff dimension.We construct examples of the Lavrentiev gap for the p(x)-integrand (1.3) and both "standard" double phase (1.4), (1.5) and "borderline" double phase (1.4), (1.6) integrands (the last results are new even for the case of scalar functions 0-forms).For the latter model the fine tuning of the Cantor set is crucial.Now we state the main results of this paper.We work with three models: classical double phase potential, borderline double phase potential, and variable exponent.For each of these cases we construct examples for the Lavrentiev gap.However, the construction presented in this paper is not limited to these models.For instance, it can be also used to treat the weighted energy.Let Ω be a ball in R N and k ∈ {0, . . ., N − 2}.
Theorem A. Let p > 1, α ∈ [0, 1], and q > p + α max((k + 1) −1 , (p − 1)(N − k − 1) −1 ) Then there exists an integrand Φ(x, t) = t p + a(x)t q where nonnegative weight a Let ϕ and ψ be two Orlicz functions such that ϕ(t) ∼ t p0 ln −β t and ψ(t) ∼ t p0 ln α t for large t.Then there exists an integrand Φ(x, t) = ϕ(t) + a(x)ψ(t) where a = a(x) is a nonnegative function with the modulus of continuity Theorems A, B, C follow from the theorems 31, 33, 35 are proved in Section 5.The weight a = a(x) in Theorems A and B and the exponent p = p(x) in Theorem C (as well as the forms providing the examples of non-density and competitors used to show the Lavrentiev phenomenon) are regular outside of a singular set of Cantor type which lies on a proper subspace of R N .The dimension of this subspace is either k + 1 or N − k − 1 depending on the parameters.Compare this to [BDS20] where for the scalar case k = 0 the singular set was either a Cantor set C on a line ("superdimensional" setup, which was used to construct the examples with variable exponent taking values greater than the space dimension N ) or a Cantor set C N −1 on a hyperplane ("subdimensional" setup, which was used to construct the examples with variable exponent taking values less than the space dimension N ).For k-forms in the variable exponent setting the value of exponent separating these two cases is N/(k + 1) -for exponent taking values greater than N/(k + 1) the singular set will be of the form C k+1 × {0} N −k−1 and for exponent taking values less than N/(k + 1) the singular set is of the form C N −k−1 × {0} k+1 .
Our setting can be called "semivectorial", or generalized Uhlenbeck structure, since the integrand is isotropic.In this respect it has substantially more rigid structure than the fully vectorial problems (say, of elasticity theory) with quasi-convex integrands.Note that in the "fully" vectorial setting the situation is more delicate, and the Lavrentiev phenomenon is possible even for "standard" growth conditions in the autonomous (but anisotropic!) case, see Ball, Mizel [BM85] and Foss, Hruza, Mizel [FHM03] in the context of non-linear elasticity.
The models with Lavrentiev phenomenon are also challenging to study numerically since the standard numerical schemes fail to converge to the W -minimiser of the problem.For the scalar case the problem could be solved using non-conforming methods, see Balci, Ortner, and Storn [BOS22].The vectorial setting remains open.
Structure of the paper.In Section 2 we recall some basic definitions related to the theory of differential forms and Sobolev-Orlicz spaces.In Section 3 we study the existence of minimizers of the functional (1.1).In Section 4 we describe the general framework for construction of examples using the fractal Cantor barriers.In Section 5 we apply this general construction to different problems.We obtain the examples of Lavrentiev gap and non-density of smooth functions for the classical double phase in Subsection 5.1, for the borderline double phase model in Subsection 5.2, and for the variable exponent model in Subsection 5.3.The results for the borderline double phase model are new even in the scalar case.

Differential forms and Sobolev-Orlicz spaces
Here we recall some basic facts and definitions from the theory of differential forms.In general we follow definitions and notations from [CDK12][Chapters 1.2;2.1;3.1-3.3],but the Hodge codifferential is the formal adjoint of the exterior derivative d (as in [IL93; GT06]).
2.1.Exterior algebra.The Grassman algebra of exterior k-forms (i.e.skew-symmetric k-linear functions) over R N is denoted by Λ k (R N ), or for brevity just by Λ k .The exterior product of f ∈ Λ k and g ∈ Λ l is defined by where the summation is over permutations (i 1 , . . ., i k , j 1 , . . ., j l ) of (1, 2, . . ., k + l) such that i 1 < . . .< i k , j 1 < . . .< j l .This operation is linear in both arguments, associative, and for f ∈ Λ k and g ∈ Λ l there holds f ∧ g = (−1) kl g ∧ f .Let e j be an orthonormal basis {e j } N j=1 in R N and {e j } N j=1 be its dual system in Λ 1 , e j (e l ) = δ jl .The monomials e i1 ∧ . . .∧ e i k , i 1 < i 2 < . . .< i k form a basis in Λ k .Denote f i1...i k = f (e i1 , . . ., e i k ).Then the set of f i1...i k with i 1 < i 2 < . . .< i k gives the coordinates of f : The scalar product of f, g ∈ Λ k with coordinates f i1...i k and g i1...i k is given by The scalar product does not depend on the particular choice of the orthonormal basis {e j } N j=1 .We The Hodge star operator * : Λ k → Λ N −k is defined by f ∧ g = * f, g e 1 ∧ . . .∧ e N for any g ∈ Λ N −k , or equivalently by f ∧ * g = f, g e 1 ∧ . . .∧ e N for all f, g ∈ Λ k .The Hodge star operator * is an isometry between Λ k and Λ N −k and for f ∈ Λ k there holds * ( * f For any f ∈ Λ k and shuffle j 1 , . . ., j N there holds ( * f ) j k+1 ...jN = sign (j 1 , . . ., j N )f j1...j k .
The interior product (contraction) of f ∈ Λ k and g ∈ Λ l defined by is the adjoint of the wedge product: There holds * (g f ) = (−1) For w, v ∈ Λ 1 there holds For a vector X the operator ı For a vector v ∈ R N and the 1-form v ♭ ∈ Λ 1 with the same coordinates there holds v ♭ f = ı v f .2.2.Differential forms.A differential form is a mapping from Ω ⊂ R N to Λ k .Further Ω will be a bounded contractible domain with sufficiently regular boundary.Using the canonical basis dx i1 ∧ . . .∧ dx i k a k-form can be represented as For two differential forms f and g of order k their scalar product in the sense of The operation of exterior differentiation d is a unique mapping from k-forms to (k + 1)-forms such that df coincides with the differential of f for 0-forms (functions), d The interior derivative (Hodge codifferential) of a k-form f is There holds d 2 = 0, δ 2 = 0. On k-forms For a k-form f and l-form g there holds Formally one can write df = ∇ ∧ f , δf = −∇ f , and in coordinates, for the form (2.2), using the Einstein convention of summation over repeated indices we have Let ν = (ν 1 , . . ., ν N ) be the unit outer normal to Ω and ν ♭ = ν 1 dx 1 + . . .+ ν N dx N .For a differential k-form f the standard Gauss theorem reads as (see (2.4)) , where dV = dx 1 . . .dx N is the standard volume form and dσ is the surface area element.The same reasoning also gives the integration-by-parts formula In the sense of forms, the surface element dσ is connected to the volume form dV by dσ = ı ν dV .The orientation of ∂Ω is chosen such that the integral of dσ over any "substantial" boundary part is positive.
A form f satisfying df = 0 is closed.A form f satisfying δf = 0 is coclosed.If f = dg then f is exact, and if f = δg then f is coexact.If both df = 0 and δf = 0 the form is called harmonic (or harmonic field).
The pullback of the form f under the mapping ϕ is defined by ϕ * f , 2.3.Tangential and normal part of a form.Let ν = (ν 1 , . . ., ν N ) be the unit outer normal to ∂Ω and for a differential form ω define its tangential part and its normal part nω = ω − tω.Define the 1-form That is, setting tf is equivalent to setting ν ♭ ∧ f and setting nf is equivalent to setting ν ♭ f .While integrating over ∂Ω, the tangential part of a form coincides with its pullback under the inclusion  : ∂Ω → Ω, that is tω =  * ω, and the normal part of the form vanishes.
In terms of the Stokes theorem, integration-by-parts formula (2.5) reads as follows: by (2.3) for a k-form f and a (k + 1)-form g there holds 2.4.Orlicz functions setup.We say that φ In particular, st ≤ φ(t) + φ * (s).
In the following we assume that x, •) is an Orlicz function for every x ∈ Ω and Φ(•, t) is measurable for every t ≥ 0. We define the conjugate function We assume that Φ satisfies the "nonstandard" growth condition

and the following properties:
(a) Φ satisfies the ∆ 2 -condition, i.e. there exists c ≥ 2 such that for all x ∈ Ω and all t ≥ 0 (2.8) (b) Φ satisfies the ∇ 2 -condition, i.e.Φ * satisfies the ∆ 2 -condition.As a consequence, there exist s > 1 and c > 0 such that for all x ∈ Ω, t ≥ 0 and γ ∈ [0, 1] there holds (2.9) (c) Φ and Φ * are proper, i.e. for every t ≥ 0 there holds 2.5.Sobolev-Orlicz spaces of differential forms.Let Ω ⊂ R N be a bounded domain in R N .In our applications this will always be a ball or a cube.
The Lebesgue-Orlicz space L Φ(•) (Ω) is the set of all measurable functions in Ω with finite Luxemburg norm For a generalized Orlicz function Φ(x, t) we define the Lebesgue-Orlicz space ) is the space of all differential k-forms for which all partial derivatives D α f I up to the order r are continuous in E. By C ∞ 0 (Ω, Λ k ) we denote the space of smooth k-forms with compact support in Ω.
The space H d,Φ(•) (Ω, Λ k ) is the closure of smooth forms from W d,Φ(•) (Ω, Λ k ) in this space. For If Ω is a bounded C 2 domain (or a polyhedral domain), then the following Green's formulas hold The boundary traces ν ∧ f and ν g in these formulas are given by bounded linear mappings from W d,p (Ω, Λ k ) to W −1/p,p (∂Ω, Λ k+1 ) and from W δ,p ′ (Ω, Λ k+1 ) to W −1/p ′ ,p ′ (∂Ω, Λ k ), respectively.These mappings are generated by these very integration-by-parts formulas.If f belongs to the full Sobolev space W 1,p (Ω, Λ k ), then both tangential and normal components of its boundary trace tf and nf are from (Ω, Λ k ) be the set of forms from W d,Φ(•) (Ω, Λ k ) with compact support in Ω.
The space Clearly, Clearly, The following proposition is straightforward.

Minimization problem for non-autonomous functionals with differential forms
3.1.Gauge fixing.Recall (for instance, [CDK12, Theorem 6.5]) the following facts regarding the harmonic forms with vanishing tangential or normal components at the boundary.Let H T (Ω, Λ k ) be the set of harmonic forms from W 1,2 T (Ω, Λ k ) and H N (Ω, Λ k ) be the set of harmonic forms from The space H T (Ω, Λ N ) is the span of dx 1 ∧ . . .∧ dx N and the space H N (Ω, Λ 0 ) is the span of 1.
We need the following result on the solvability of the Cauchy-Riemann type systems for differential forms.This result is a particular case of theorems [CDK12, Theorem 7.2] for p ≥ 2 and [Sil16, Theorems 2.43] for any p > 1, and triviality of the set of harmonic forms with zero tangential component at the boundary.
Proof.Let ω s be a minimizing sequence, clearly Due to the coercitivity condition (1.2) we have By Corollary 6 there exists α s ∈ ω 0 + W 1,p− T (Ω, Λ k ) satisfying dα s = dω s and δα s = 0 in Ω such that ) such that δα = 0 and up to the subsequence, Due to the lower-semicontinuity of F , which follows from the convexity of Φ(x, •) and Mazur's lemma, we have Since in the linear part we have convergence, the proof is complete.
Proof.We keep the notation from the proof of Theorem 7. Let ), be a minimizing sequence, clearly Due to the coercitivity condition (1.2) we have By Corollary 6 there exists Writing Let ϕ t : Ω × [0, 1] → R N , t ∈ (0, 1), be C 2 mapping such that ϕ 1 = id, and ϕ −1 t Ω ⋐ Ω.If Ω is a ball centered at the origin, one takes ϕ t (x) = x/t.Consider the pullbacks ϕ * t β s .These forms have compact support in Ω, with dϕ * t β s uniformly converging to Therefore, keeping the same notation for β s while replacing it by (ϕ * t β s ) ε for appropriate t and ε, we can assume that the new minimizing sequence has the form α s = ω 0 +β s , where Therefore there exists such that δ(ω 0 + β) = 0 and up to the subsequence, Due to the convexity of Φ(x, •) and Mazur's lemma, we have β ∈ H 1,Φ(•) T (Ω, Λ k ) and for α = ω 0 + β there holds lim inf Since in the linear part we have convergence, the proof is complete.

Lavrentiev gap and non-density
In this section we design the general framework for the construction of the examples on Lavrentiev gap.We introduce the set of assumptions for the examples in the Section 4.1 and show how to obtain non-density of smooth functions and the special type of the non-uniqueness of the minimisers under these assumptions.In Section 4.2 we introduce basic forms which will be building blocks of our examples.These building blocks correspond to the one saddle-point geometry of the classical checkerboard Zhikov example and are then used in Sections 4.3 and 4.4 to construct more advanced examples using fractal Cantor barriers.The results are summarised in the subsection 4.5.

Separating pairs of forms and separating functionals.
Here we present some "conditional" statements.We shall use two assumptions.Let Ω be a domain in R N with sufficiently regular boundary, k ∈ {1, . . ., N − 1}, and S ⊂ Ω be a closed set of zero Lebesgue N -measure.Our argument will be based upon defining a suitable set S and (k − 1)-form u and (N − k − 1)-form A, which are smooth in Ω \ S and give a "counterexample" to the Stokes theorem.The regularity of ∂Ω is assumed to be such that the classical Stokes theorem holds.Further Ω will be either cube of ball in R N .
Definition 9. We say that a pair of (k − 1)-form and (N − k − 1)-form (u, A) defined in Ω is (Φ, k)-separating if there exists a closed set S ⊂ Ω of zero Lebesgue N -measure such that (i) u and A are regular outside S; When invoking a pair of (Φ, k)-separating forms we assume that the set S comes from this definition and when necessary denote it by S(u, A).
The essential property of (Φ, k)-separating forms is that A∧du "contradicts" the Stokes theorem.Indeed, disregarding the singular set Σ we would arrive at Definition 10.Let u and A be a pair of (Φ, k)-separating forms and η ∈ C ∞ 0 (Ω) with η = 1 in a neighbourhood of S. Set Proof.The first claim follows from dA ∈ L Φ * (Ω, Λ N −k ).Due to the Stokes theorem and by approximation for all ω ∈ H d,Φ(•) (Ω, Λ k−1 ) it holds , we can use the Stokes theorem and the third property of (Φ, k)-separating pair to obtain ), and d(A • ∧du ∂ ) = dA • ∧du ∂ , again by the Stokes theorem we get This proves the claim.
Theorem 16 (H-harmonic = W-harmonic).Under Assumption 15, for By the properties of the Hodge dual and the Young inequality, See [IKKS04] for estimates of exterior product submultiplication constant.
(Ω), we have S(h t − tu ∂ ) = 0 by Proposition 11.This and S(u ∂ ) = 1 by the same Proposition imply Combining (4.1) and (4.2) we get for all t, s > 0. By Assumption 15 the right hand-side of last inequality is positive, and thus F (h t ) > F (w t ).This proves the claim.4.2.Basic forms.In this section we introduce differential forms which will be building blocks of our examples.We do necessary calculations in the cubic setting, where the boundary orientation is straightforward.
Let k ∈ {1, . . ., N − 1}.Define two groups of variables x = (x 1 , . . ., x k ) and x = (x k+1 , . . ., x N ).Let Γ l (x), x ∈ R l , denote the fundamental solution of the Laplace equation in R l with pole at the origin: Here and below σ l denotes the surface area ((l − 1)-volume) of the unit sphere in R l , and |x| denotes the standard Euclidian norm of x.
Let θ : R → R be a smooth increasing function such that Let η : R → R be a smooth increasing function such that Our basic forms are Here * x and * x are applied only within respective variables, that is Further for (N − k − 1)-form u from (4.3) and (k − 1)-form A from (4.4)we use the notation u = P 1 (k, N − k, 0, 0) and A = P 2 (k, N − k, 0, 0).Also, in this case we denote where the natural induced orientations of the boundary are assumed.
Proposition 18.For the forms u and A given by (4.3) and (4.4)(a) There holds (b) The forms u and A are smooth outside the origin, (4.5) For any bounded domain (4.6) For a nonnegative function G = G(•, •) with nonnegative arguments, satisfying △ 2 -condition in the second variable and G(•, 0) = 0 (4.8) Denote the boundary faces of Q N as we denote the (N − k)-dimensional cubes with centers at (x, 0), The faces I (±) j [x] of these cubes are and the boundary of ).By (4.9) we have Thus we get the first relation in (4.10).Since we have This yields the second relation in (4.10).The proof of Lemma 20 is complete.
To summarize the results of this section, we have shown that the pair of forms u and A given by (4.3) and (4.4) is (Φ, N − k)-separating in Ω = [−1, 1] N provided that the integral (4.7) converges for F ≥ Φ and the integral (4.8) converges for G ≥ Φ * .4.3.Generalized Cantor sets and their properties.In this section we construct (generalized) Cantor sets.
Let l j , j = 0, 1, 2, . . .be a decreasing sequence of positive numbers starting from l 0 = 1: such that l j−1 > 2l j for all j ∈ N. We start from I 0,1 = [−1/2, 1/2].On each m-th step we we remove the open middle third of length l j − 2l j+1 from the interval I m,j , j = 1, . . ., 2 m to obtain the next generation set of closed intervals I m+1,j , j = 1, . . ., 2 m+1 .The union of the closed intervals I m,j = [a m,j , b m,j ], j = 1, . . ., 2 m of length l m from the same generation forms the pre-Cantor set On each m-th step we define the pre-Cantor measure as is the standard Lebesgue measure of C m , and the weak limit of the measures µ m is the Cantor measure corresponding to C. We require further that at least for all sufficiently large m.
If the sequence l j satisfies the conditions above only for sufficiently large j ≥ j 0 , then we modify it by taking the sequence l j = l j+j0 (l j0 ) −1 , j = 0, 1, 2, . . .For k ∈ N by C k and µ k we denote the Cartesian powers of k copies of C and its corresponding Cantor measure, respectively.
t is the open ball in R k with center at x and radius t.Lemma 21.We have Proof.Let l j be the sequence of interval lengthes defining the corresponding Cantor set.Let t ∈ (l j /2 − l j+1 , l j−1 /2 − l j ).The set C * ,t consists of 2 kj identical cubes of the form First consider the case C = C k λ,γ with λ > 0. Then l j + 2t ≤ l j−1 − l j ≤ ct with some constant c independent of j, so Recalling that D = −k ln 2/ ln λ and λ D = 2 −k , we get Thus we arrive at the first inequality in (4.11).Now consider the case C = C k 0,γ (ultrathin Cantor sets).Then we get ≈ ln 1 t γk and this yields the second inequality from (4.11).Now let us estimate µ(B x r ).Any interval of length 2t with t ∈ (l j /2 − l j+1 , l j−1 /2 − l j ) can intersect at most one interval forming the j-th iteration of the pre-Cantor set.Since B x t lies within a cube with edge 2t, then µ k λ,γ (B x t ) ≤ 2 −jk .Using the above estimates for 2 jk we arrive at (4.12).The proof of Lemma 21 is complete.4.4.From one singular point to fractal sets.Let k ∈ {1, . . ., N }, λ ∈ (0, 1/2) and γ ∈ R, or λ = 0 and γ > 0 be given.Let Ω be the ball of radius √ N in R N centered at the origin.Now let C = C k λ,γ be the generalized Cantor set with the given parameters and µ = µ k λ,γ be the Cantor measure corresponding to C k λ,γ .Our construction will be based on the singular (or fractal contact/ barrier) set S = C k λ,γ × {0} N −k .Recall that for generalized Canter sets C k λ,γ we set D = −k ln 2/ ln λ (equivalently, λ = 2 −k/D ) and for meager Cantor sets C k 0,γ we set D = 0. Let d(x, C) be the generalized distance, see [Ste16, Chapter VI, §2] from x to C. In particular, where C > 1 and dist(x, C) is the standard Euclidian distance from x to C. Without loss, we assume that C ≥ 4. Let θ : R → R be a smooth nondecreasing function such that θ(t) = 1 for t ≥ 1/2, θ(t) = 0 for t ≤ 1/4, |θ ′ | ≤ 4. Let η : R → R be a smooth nondecreasing concave function such that η(t) = t for t ≤ 1/4 and η(t) = 1/2 for t ≥ 3/4. For , we define the (N − k − 1)-form u S , the (k − 1)-form A S , and the function ρ S by Here the constant C is from (4.13).The integral is understood as integrating the coefficients of the form.
Further the (N − k − 1)-form u S defined by (4.14) and (k − 1)-form A S defined by (4.15) corresponding to the space dimension N and the Cantor set C λ,γ will be denoted by P 1 (k, N −k, D, γ) and P 2 (k, N − k, D, γ).That is, u S = P 1 (k, N − k, D, γ) and A S = P 2 (k, N − k, D, γ).The function ρ S defined in (4.16) will be also denoted by P 0 (k, N − k, D, γ).
Lemma 23.There holds To calculate the second integral we use the same argument as in Lemma 20: the form A ∧ du − (−1) k(N −k) u ∧ dA is exact, therefore its integral over ∂[−1, 1] N is zero.
Let Φ be such that Φ(x, t) ≤ F 1 (|x|, t) on the support of du and Φ(x, t) ≥ F 2 (|x|, t) on the support of dA.If (4.23) then the pair (u, A) is (Φ, k)-separating.Moreover, in both cases there holds Proof.The forms u and A are regular outside S by construction.By Lemmas 22,23 we have It only remains to prove that But this follows from estimates (4.18) and (4.20) by the assumptions of the lemma.
In view of Section 4, to construct an example for the Lavrentiev gap, it is sufficient to check the conditions of Lemma 28.In the following section we do this for the "standard" and "borderline" double phase models and for the variable exponent.4.6.Example setups.Two cases of Lemma 28 and different choices of the fractal contact set give us several variants of example setup.Further p 0 > 1 will be the threshold parameter.Depending on the value of the threshold parameter p 0 , we design 5 different setups: (a) critical or one saddle point setup corresponds to the classical Zhikov checkerboard example [Zhi86] (N = 2, k = 1) and its development by [ELM04] ( N > 1, k = 1); (b) supercritical setup corresponds to the case p 0 > N/k, in the scalar settting (k = 1) of [BDS20] this corresponds to the superdimensional case p 0 > N with singular set on a line; (c) subcritical case corresponds to the case 1 < p 0 < N/k, in the scalar settting (k = 1) of [BDS20] this corresponds to the subdimensional case 1 < p 0 < N with singular set on a hyperplane; (d) right limiting critical case corresponds to the situation when p 0 = N/k + 0 (that is, for the critical value p 0 = N/k we use the supercritical construction); (e) left limiting critical case corresponds to the situation when p 0 = N/k − 0 (that is, for the critical value p 0 = N/k we use the subcritical construction).
Each of these setups includes the fractal set C (see Section 4.3, in the "critical" case it is just one point), the barrier fractal set S, the pair of the forms u and A, and the function ρ which separates the supports of du and dA: it is equal to 0 on the support of du and 1 on the support of dA.The construction of the forms u, A and the function ρ is described in 4.2 (for one singular point case) and in 4.4 (for the rest of cases).
One can easily verify (this is done in Section 5.1) that du ∈ L p (Ω, Λ k ) for any p < p 0 and dA ∈ L q ′ (Ω, Λ N −k ) for any q > p 0 which explains why we call this parameter "threshold".The function ρ is then used to construct the function Φ for which the pair (u, A) is (Φ, k)-separating.
The second free parameter of the construction -the shrinking fractal parameter γ -plays an important role later in refining our examples to the limiting case and in treating the borderline double phase and the log-log-Hölder exponents.

Applications
In this section we show the presence of the Lavrentiev gap for the following models To this end we use the framework defined in Section 4 and the Cantor set-based construction from Section 4.4.That is, we have to show that the of forms u and A build as in Section 4.4 is (Φ, k)-separating and satisfies the conditions of Assumption 15 (the latter one for the Dirichlet problem) for the generalized Orlicz functions Before passing on to the examples we make the following observation.
, and any γ > 0 otherwise.Use left limiting critical Setup 5. Then for Φ given by (5.2), the pair of forms u and A is a (Φ, k)-separating pair.
Here one notes that By Lemma 28 i), the pair (u, A) is (Φ, k)-separating.
Here one notes that By Lemma 28 (ii), the pair (u, A) is (Φ, k)-separating.
(e) Case p 0 = N/k − 0. We use case (i) of Lemma 28 For the first integral in (4.22), we have For the second integral in (4.23), we get By Lemma 28 (i), the pair of forms (u, A) is (Φ, k)-separating.
Note that here Φ(x, t) = t p + a(x)t q where a ∈ C α (Ω) (by Lemma 29).This proves Theorem A.

Further
in this section k ∈ {1, . . ., N − 1}, C = C l λ,γ is a generalized Cantor set as in Section 4.3, and S = C × {0} N −l is the singular contact set, where l = k or l = N − k.As above, by C t we denote the t-neighbourhood of the set C. Recall that the parameter λ of the fractal set C m λ,γ is connected to its "fractal dimension" D by D = −m ln 2/ ln λ if D > 0 and λ = 0 if D = 0, and the forms u and A defined in (4.14) and (4.15), based on the contact set C m λ,γ (or (4.3) and (4.4) for D = γ = 0) are denoted by P 1 (m, N − m, D, γ) and P 2 (m, N − m, D, γ).That is, the forms P j (m, N − m, D, γ), j = 1, 2, together with the function P 0 (m, N − m, D, γ) are constructed using the singular set C m λ,γ × {0} N −m with λ = 2 −m/D if D > 0 and λ = 0 if D = 0.