DCP representation of convex function $\log(\frac{log(p)}{p} + \frac{log(1-p)}{1-p})$

As the title suggests, I’m looking for a DCP representation of

\log(\frac{-log(p)}{p} + \frac{-log(1-p)}{1-p}), for p \in (0,1), which is convex, per the graph below:

the expression inside the outer log is -\text{entr}(1/p) - \text{entr}(1/(1-p)), but I don’t really know how to follow from there…

Any ideas will be greatly appreciated!

I think, but haven’t proven, that it is convex over (0,1). Plots are not accepted on this forum as proofs. (Plot f(x) = 1 for rational x, 0 for irrational x Then make conclusions based on the plot. That was considered a garden variety function in my Math Analysis class.).

The argument of the outer log is convex, as you have shown using entr. But log(convex) is not allowed per DCP rules, So that appears to be a dead end.

Both of log(-log(p)/p) and log(-log(1-p)/(1-p)) are neither convex nor concave over (0,1).

I’m not optimistic it can be reformulated per DCP rules, But if anyone can do it, perhaps @Michal_Adamaszek,@hfriberg, or @Erling can figure it out, or perhaps relate it to another expression which nobody knows how to do.

Can you eliminate the outer log? That depends on how it appears within your optimization problem.

If that appears alone in the objective, you can get rid of the log and get an equivalent problem having the same argmin.

If it appears as
log(-log(p)/p -log(1-p)/(1-p)) <= constant
it can be rewritten as
-log(p)/p -log(1-p)/(1-p) <= exp(constant)

That won’t work for
log(-log(p)/p -log(1-p)/(1-p)) <= affine

Tried log-sum-inv and log-sum-exp from MOSEK cookbook without luck. Also tried convexifying the outer log as -\log( \frac{1}{ r } ) , hoping that the argument, \frac{1}{ r }, behaved like a harmonic mean. Unfortunately, this didn’t work either.