## What’s the purpose of explicit encapsulation?

Assume you have a library in which every function is public. Sooner or later developers who use your library will come up with a stable pattern of usage. In that terms external information of how developers are using you library already defines the public interface.

If your function is dealing with only inner context of library user will not use it. User will feel that in the library there are some other functions that allow him to do his task in a more convinient manner. Why should a user use an internal function if this fuction doesn’t touch his context?

If the user of the library want to call the internal function that touches his context but this function is encapsulated who said that it was a right decision to make it encapsulated. User context “knows” better what should be encapsulated.

Even if the user of the library is messing with internals who said that it will lead to unmaintainability. On the next iteration developer will refactor the code and will come up with the proper maintainable call. For example if you have age field and getAge() method I will use getAge() because I understand that using age field is not maintainable. By the way that doesn’t mean that getAge() is maintainable. May be operating with the field is more simple and clean than with the getAge() method.

All of this stuff you can’t predict because you look at your library inside(internally) and not externally (just because you have no information of usage). If you write your own library that doesn’t mean that you know better how to use it. If you make something private that means that you define a pattern of usage (you say to developers: “Use this, not this”). But how you can define a pattern of usage if you don’t have enough information about user needs and context? Who said that some private function should be private?

Interface of the library should be defined by a user not by the creator. And user defines it by pattern of usage. Why can’t you make everything public and let the user define what should be used and how and what should not? User context “knows” better what should be encapsulated and user code already “encapsulates” your library by the practice of using.

So what’s the purpose of explicit encapsulation?

## Can Riemann’s explicit formula be generalized to semi-primes?

Following Isometry group of an integer I wonder if one can define a “mock zeta function” $$\zeta_{V}$$ (where $$V:=(\mathbb{Z}/2\mathbb{Z})^{2}$$ stands for “Vierergruppe”, the German word for the Klein group) whose non-trivial zeros would give rise to the analogue of Riemann’s explicit formula (relating the non-trivial zeros of $$\zeta_{\mathbb{Z}/2\mathbb{Z}}:=\zeta$$ to $$\pi(x)=\pi_{\mathbb{Z}/2\mathbb{Z}}(x)$$) for the counting function of the semi primes $$\pi_{V}(x)$$. If so could the analogue of the Riemann hypothesis for $$\zeta_{V}$$ be proven false?

I suspect there might be a relationship between the isometry group of the multi set of non trivial zeros of $$\zeta_{G}$$ for $$G\in\{V,\mathbb{Z}/2\mathbb{Z}\}$$ (this isometry group being equal to $$V$$ if and only the relevant RH is false) and the isometry group of the integers as defined in the link above counted by $$\pi_{G}(x)$$.

To state it differently, would the so-called parity problem be overcome by a proof of RH?

## Explicit computation of connection & curvature matrix

I have recently learned the generalized Gauss-Bonnet theorem, which states that:

$$$$\int_M \text{Pf}(\Omega) = (2\pi)^n\chi(M),$$$$ where $$n$$ is half the dimension of an even dimensional, compact, Riemannian manifold.

Here, $$\Omega$$ is the curvature matrix of 2-forms determined by the Riemannian metric $$g$$ and some metric compatible connection $$\nabla$$, and $$\text{Pf}(\Omega)$$ is the Pfaffian.

By Chern-Weil, we know that our choice of $$\nabla$$ does not make any difference.

Question: The above integral, if the dimension of the manifold in question is 2, better reduce to the Gauss-Bonnet theorem that we know and love: $$$$\int_M KdA = 2\pi\chi(M),$$$$ where $$K$$ is the Gaussian curvature. But I am not sure how I can carry out the computation necessary to get there…

More specifically, I know that if the dimension is 2, then $$\text{Pf}(\Omega)$$ is gonna be a 2 form, more precisely, some number times $$\Omega_1^2$$, the upper-right entry of $$2\times 2$$ curvature matrix. If all were to work, this 2-form better be the form $$KdA$$.

By Chern-Weil, we may as well assume that the connection in question is Levi-Civita. Then the Theorema Egregium allows us to write $$K$$ in terms of $$g$$ and the associated Christoffel symbols.

My problem is that I don’t know how to carry out this explicit computation… Could you help me with this?

## Why is it so hard to find an explicit infinite set of primes?

More precisely, what properties of the primes (in $$\mathbb{Z}$$) make it so hard to find to construct an explicit infinite set of primes? Are there other structures with those properties?

## Explicit formula for the Neumann problem on the ball

I would like to have a reference for the very classical solution of the Neumann problem on the ball, providing $$u$$ in terms of $$F$$ and $$g$$, where $$\begin{cases} \Delta u=F\quad \text{on \vert x\vert\le R ,}\ \frac{\partial u}{\partial \nu}=g\quad \text{at \vert x\vert= R ,} \end{cases}$$ as well as the same formula for the half-space.

## Explicit Version of the Burgess Theorem

Does it exist a totally explicit version of the Burgess theorem? Precisely, let $$m$$ be a positive integer, and let $$\chi$$ be a primitive character mod $$m$$. A special case (sufficient for my purposes) of the Burgess theorem asserts that

$$\left| \sum_{a\le n\le a+x}\chi(n) \right|\ll_\varepsilon x^{1/2}m^{3/16+\varepsilon}$$

I wonder if this was ever made totally explicit. In the case $$m=p$$ prime Iwaniec and Kowalski prove in their book the inequality with right-hand side $$cx^{1/2}p^{3/16}(\log p)^{1/2}$$ and claim (without going into details) that $$c=30$$ is nice.

I need, however, the case of composite modulus as well. Was anything like this ever done?

## ContourPlot3D in an explicit region

I would like to do a 3D contour plot over an implicit region, however, it seems that mma does not support the arguments within an implicit region for ContourPlot3D, is there any way to get over this? As for my problem, the region is defined as:

reg3d = ImplicitRegion[( 1+k1+k2>=0&&1-k1+k2>=0&&k2<=0&&0<=k3<=6 )||(k2>=0&&-4k2<=k1<=4 k2 &&k1^2-8k2 (1-k2)<=0&&0<=k3<=6)||(k2>=0&& 4k2<k1&&-k1+k2+1>=0&&0<=k3<=6)||(k2>=0&& -4k2>k1&&k1+k2+1>=0&&0<=k3<=6 ), { { k1, -1.5, 1.5 }, { k2, -1, 1 }, { k3, 0, 6 } } ]; 

which looks like:

and the function I would like to plot is:

gsc1[ K0_, K1_, K2_ ] := 1 - ( K0 - (K0 K1 K2)/2 ); 

hope some expert can give me some suggestion, thanks a lot!

## Questions on Riemann’s explicit formula

If we consider this version of the prime-counting function $$\pi_0(x) = \frac{1}{2} \lim_{h\to 0} (\pi(x+h) + \pi(x-h))$$ (with $$\pi$$ being the normal prime-counting function), then we can write $$\pi_0$$ as $$\pi_0(x) = \sum_n\frac{1}{n}\mu(n)f(x^{1/n}),$$ where $$\mu$$ is the Mertens function and $$f(x) = \operatorname{li}(x) – \sum_\rho \operatorname{Ei}(\rho \cdot \log(x)) -\log(2) +\int_x^\infty\frac{dt}{t(t^2-1)\log(t)},$$ the $$\rho$$ being the non-trivial zeros of the Riemann zeta function.

I am wondering, if

• it is known how inacurrate the formula for $$\pi_0$$ gets (with absolute constants, not O notation), if we just consider all zeros with absolute imaginary part $$|\Im(\rho)| for some $$T>0$$.
• if there is a similar formula, not for $$\pi_0$$, but for the $$n$$-th prime number, and, if so, how much that would be affected by considering just the aforementioned selection non-trivial zeros.

## Explicit Formula for the Pseudo Inverses of a Family of Matrices Related to Calculating Certain Vertex Weights

Trying to identify canonical vertex weights for complete weighted graphs, I investigated the Ansatz, that the sum over the weights of all edges that are adjacent to same vertex, should equal the sum of the corresponding edgeweights. In the symmetric case that Ansatz yields a non-singular square-matrix, whereas in the asymmetric case the resulting matrix is rank-deficient and one has to resort to pseudo inverses to obtain canonical vertex weights in that case.

Let $$\mathcal{I}_n$$ denote the $$n\times n$$ unit matrix and $$\mathcal{J}_n$$ the $$n\times n$$ matrix with all entries equal to $$1$$, then the matrices are
$$\mathcal{J}_n-\mathcal{I}_n+(n-1)\mathcal{I}_n$$ in the symmetric case and $$\begin{bmatrix} (n-1)\mathcal{I}_ n& \mathcal{J}_n-\mathcal{I}_n \\mathcal{J}_n-\mathcal{I}_n& (n-1)\mathcal{I}_ n\end{bmatrix}$$ in the asymmetric case, where the rank is $$2n-1$$

Question:

what are the values $$a_{ij}$$ of the Moore-Penrose inverse $$A^+$$ of $$\begin{bmatrix} (n-1)\mathcal{I}_ n& \mathcal{J}_n-\mathcal{I}_n \ \mathcal{J}_n-\mathcal{I}_n& (n-1)\mathcal{I}_ n\end{bmatrix}$$

in the asymmetric case one can formally distinguish between the weights of source-vertices and target-vertices of directed edges, which explains the doubling of the matrix-dimension, but it doesn’t explain the incurred rank deficiency.

## More explicit explanation for password authenticated key retriveal

How can i realize password authenticated key retrieval? I found some description of PAKR:

A PAKR (Password-Authenticated Key Retrieval) protocol and its multi-server system allow one party (say, client), who has a memorable password, to retrieve a long-term static key in an exchange of messages with at least one other party (say, server) that has a private key associated with the password.

But i can’t figure out why use “retrieve” a long-term static key. Is it meaning that i can find my private key through negotiating servers with some message associated password? If is the case, why we need to store private key in server?