User:Aleksa Gradimirov Joksimović/sandbox

= Phallic theory = Phallic theory or phallic analysis is a mock branch of mathematics concerned with the study of the properties and behavior of the phallic function and phallic distribution. Phallic theory specifically deals with possible interpretations and applications of the phallic function. Some areas of interest include the phallic distribution, phallic-Cauchy approximation, Joksimovic's inequality, phallic series & the phallic integral.

Phallic function
In mathematics, the phallic function is a type of continuous real valued function whose graph traces the shape of a phallus. It is the function from which a type of continuous probability distribution known as the phallic distribution is created. The equation for the basic form of the phallic function is:

$$\ \ f(x)=\frac{1+\cos3x}{1+x^2}$$

This function graphs a phallic-like shape centered around zero and exhibits heavy tails extending into positive and negative infinity. This representation is sometimes referred to as the "raw phallic function". Its further development introduces an indicator function in order to isolate the phallic shape, and a parameter for the peak of the function. The equation for the phallic function then becomes:

$$\ \ \varphi(x;d)=\boldsymbol{1}_{[-\pi,\pi]}(x)\frac{d^2\bigl(1+\cos3x\bigr)}{1+d^2x^2}$$

where $$\boldsymbol{1}_{[-\pi,\pi]}(x)$$ is an indicator function which outputs zero everywhere except within the interval from $$-\pi$$ to $$\pi$$ (in order to get rid of the tails of the function so that a phallus is more closely resembled) and $$d$$ is the real valued parameter which adjusts for the length of the phallus (i.e. the peak of the graph).

Length parameter
By evaluating the function at $$x=0$$ we find the expression for the relationship of the function's peak and the length parameter, given by:

$$\ \ \varphi_{0}=2d ^2$$ or $$d = \sqrt{\frac{\varphi_{0}}{2}}$$

The peak of the graph increases quadratically as $$d$$ increases. We can inspect the rate of change of the phallic function with respect to the length parameter by evaluating its partial derivative with respect to $$d$$:

$$\ \ \frac{\partial \varphi}{\partial d} = {\partial \over \partial d}\biggl(\frac{d^2\bigl(1+\cos3x)}{1+d^2x^2}\biggr)=\frac{2d(1+ \cos3x)}{(1+d^2x^2)^2}$$

The graph of the function produces one large and two smaller peaks. As the length parameter increases, the larger peak increases quadratically, while the rate of change of the two smaller peaks approaches $$0$$, simulating the effect of an engorging penis (see Joksimovic's law). The peak of the graph of the phallic function, and the graph of its derivative with respect to $$d$$ meet at $$d=2$$.

Piecewise formulation
The phallic function can be written without using an indicator function in piecewise form:

$$\ \ \varphi(x, \delta) = \begin{cases} \frac{d^2\bigl(1+\cos\bigl(3x\bigr)\bigr)}{1+d^2x^2}, & \text{if }x\in[-\pi,\pi] \\ 0, & \text{otherwise } \end{cases}$$

Sum expression
The phallic function can also be expressed as an infinite sum. Firstly, by splitting the phallic function into two terms we get

$$\varphi(x)=\frac{1}{1+x^2} + \frac{\cos3x}{1+x^2}=A(x)+B(x)$$

By combining the geometric series of $$A(x)$$ and the Taylor series of $$B(x)$$ we get the sum expression of the phallic function, also sometimes referred to as it's series formulation

$$\ \ \varphi(x)=\sum_{n=0}^\infty (-1)^n x^{2n}+\sum_{n=0}^\infty\sum_{m=0}^\infty (-1)^{m+n} x^{2(m+n)}\frac{3}{(2n)!}$$

This expression can be further simplified by introducing a new index $$k=m+n$$. The phallic series then takes on the form

$$\ \ \varphi(x)=\sum_{k=0}^\infty \biggl[(-1)^k + \sum_{n=1}^\infty(-1)^n \frac{3^{2n}}{(2n)!}\biggr]x^{2k}$$

Phallic series and phallic set
The phallic series is the infinite series formed by summing all outputs of the phallic function evaluated at positive integers

$$\ \ \sum_{k=0}^\infty \frac{1+\cos3k}{1+k^2}$$

It is a convergent series that converges to

$$\ \ \sum_{k=0}^\infty \frac{1+\cos3k}{1+k^2}=1 + \frac{\pi}{2}(\coth(\pi)+\cosh(3- \pi)+ \text{csch}(\pi))\approx2.714$$

The set that contains each term of the phallic series evaluated at some interval $$a \leqslant k \leqslant b$$ where $$k$$ is a positive integer is defined as the phallic set, usually denoted with $$F$$. The phallic set is useful when dealing with the discrete case of the phallic function and the phallic distribution, because it contains all the outputs of the phallic function evaluated at a specified interval of positive integers. More formally, the phallic set is defined as

$$\ \ F = \{ \varphi(k) \mid k \in \mathbb{Z} \ \land \ a \leqslant k \leqslant b \}$$

where $$\varphi(k)$$ denotes the phallic function with length parameter one, which is usually left out. Theoretically, the phallic set can contain an infinite number of elements, similarly to how the phallic series is an infinite series, however by specifying the upper and lower bounds of the summation, and then mapping each term to the phallic set, we can plot and analyze the discrete phallic function for any specified interval. E.g. the phallic set for the first 4 terms of the phallic series starting at zero is

$$\ \ F = \{2,\frac{1+\cos3}{2},\frac{1+\cos6}{5},\frac{1+\cos9}{10}\} $$

The python code for plotting the discrete phallic function within the interval $$k \in [a,b]$$ is

= Joksimovic's inequality = In mathematics, Joksimovic's inequality, or Joksimovic's law is a statement that describes the rate of change of the phallic function. It states that the value of the partial derivative of the phallic function with respect to it's length parameter is greatest when $$x$$ is equal to zero. In other words, the peak of the graph of the parameterized phallic function increases faster at the origin than at any other point on the x-axis. Mathematically, this can be represented as

$$\ \ \frac{\partial \varphi}{\partial \delta} (0, \delta) > \frac{\partial \varphi}{\partial \delta} (x, \delta)$$

where $$\varphi$$ represents the phallic function with length parameter $$\delta$$. The peak of the phallic function increases quadratically towards infinity, whereas the two smaller peaks increase at a slower rate, approaching a constant value approximately equal to 0.51. The expression for the partial derivative of the phallic function with respect to $$\delta$$ is

$$\ \ \frac{\partial \varphi}{\partial \delta} = {\partial \over \partial \delta}\Biggl[\frac{\delta^2\bigl(1+\cos3x)}{1+\delta^2x^2}\Biggr]=\frac{2 \delta(1+ \cos3x)}{(1+\delta^2x^2)^2}$$

Joksimovic's inequality also works with the second partial derivative of the phallic function, however taking into account that for $$\delta = 0$$, the second derivative oscillates with period $$\frac{2 \pi n}{3}$$, where $$n \in \mathbb{Z}$$. The inequality for the second partial derivative then becomes

$$\ \ \frac{\partial^2 \varphi}{\partial \delta^2} \Bigl (\frac{2 \pi n}{3}, 0 \Bigr) > \frac{\partial^2 \varphi}{\partial \delta^2} (x, \delta)$$

Understanding this behavior provides key insights into the phallic function's dynamics and how it evolves across its domain.

= Phallic distribution = In probability theory and statistics, the phallic distribution is a type of continuous probability distribution for a real-valued random variable whose function graphs a shape that closely resembles that of a phallus. It is a type of "pathological" probability distribution, since its variance isn't defined. The general form of its probability density function is:

$$\ \ \Pi(\mu, \delta)=\frac{1}{\pi \delta \bigl(1+ e^{-3/\delta}\bigr)} \left [ \frac{\delta^2\bigl(1+\cos\bigl(3x-3\mu \bigr)\bigr)}{1+ \delta^2{\bigl(x-\mu \bigr)^2}} \right ]$$

where $$\mu$$ is the mean or expected value and $$\delta$$ is the height parameter of the distribution which acts as a scaling factor, impacting the vertical dimension or amplitude of the phallic shape within the distribution. As the height parameter increases, the phallic distribution approaches the Cauchy-Lorentz distribution (according to the phallic-Cauchy approximation).

Phallic function
The phallic distribution is an extended form of the phallic function, with its indicator function removed:

$$\ \ \varphi(x,d)=\frac{d^2\bigl(1+\cos\bigl(3x\bigr)\bigr)}{1+d^2x^2}$$

Standard phallic distribution
The simplest case of a phallic distribution is known as the standard phallic distribution. It is a special case of the general phallic distribution when $$\mu = 0$$ and $$\delta = 1$$, and it is described by the following probability density function:

$$\ \ \Pi(x)= \frac{e^3}{ \pi(1+e^3\bigr)}\biggl( \frac{1+\cos3x}{1+x^2} \biggr)$$

The density is centered at and symmetrical around $$x=0$$. The normalizing constant of the standard phallic distribution is an expression of the general normalizing constant with the height parameter $$\delta = 1$$:

$$\ \ \frac{1}{\pi\bigl(1+ e^{-3}\bigr)}=\frac{e^3}{ \pi(1+e^3\bigr)}$$

Characteristic function
The characteristic function is the Fourier transform of the probability density function. For the time being, the characteristic function of the standard phallic distribution is considered to be:

$$\ \ \phi_X(t)=\langle e^{itX} \rangle = \frac{e^{-t}(1+2e^3+e^3)}{2(1+e^3)}$$

It is important to note that the expression above is yet to be verified.

Notation
The probability density of the phallic distribution is often denoted with the Greek capital letter $$\Pi$$ (pi). Thus when a random variable is phallically distributed with mean $$\mu$$ and standard height $$\delta$$, one may write $$X \sim \Pi(\mu, \delta)$$.

Variance and higher moments
Unlike the normal (Gaussian) distribution, which along with the mean contains a parameter for the standard deviation or variance, the variance of the phallic distribution is undefined, which is why an alternative height parameter is used instead. This is a result of the expression for the variance of the probability density of the phallic distribution, which is in the form of an integral that diverges.

For higher moments of the distribution, the moment generating function cannot be used since it is also undefined for the phallic probability density function.

= Phallic-Cauchy approximation = In statistics, the phallic-Cauchy approximation or the phallic convergence hypothesis states that the probability density function of the phallic distribution closely approximates the Cauchy distribution as its height parameter $$\delta$$ increases (especially for values further from the mean). It's important to note that for the convergence to work, the distributions must be centered around the same value, and the scale parameter of the Cauchy distribution must decrease proportionally to the increase of the height parameter of the phallic distribution. Formally, if we denote the corresponding Cauchy distribution as $$\mathrm{Cauchy}(\delta^{-1},0)$$, the approximation can be written as:

$$\ \ \Pi(\mu,\delta)\sim \mathrm{Cauchy} (\delta^{-1},\mu)$$ as $$ \delta\rightarrow \infty$$

where $$\delta$$ denotes the height parameter of the phallic distribution. Due to the periodic nature of the cosine function present in the probability density of the phallic distribution, there is some additional variability to the approximation. Evaluating the limits and setting the mean to zero, we get:

$$\ \ \delta\rightarrow \infty, \Pi(0, \delta)\approx \frac{1+\cos3x}{2 \pi \delta x^2}$$ and $$\delta\rightarrow \infty, \mathrm{Cauchy} (\delta^{-1},0)\approx \frac{1}{ \pi \delta x^2}$$

where the variability is induced by $$\frac{1+\cos3x}{2}$$. Taking to account the periodic variability, we can also state the hypothesis as:

$$\ \ \lim_{\delta \to \infty}\Pi(\mu,\delta)=\frac{1+\cos3x}{2}\lim_{\delta \to \infty}\mathrm{Cauchy} (\delta^{-1},\mu)$$ or

$$\ \ \lim_{\delta \to \infty}\frac{\Pi(\mu,\delta)}{\mathrm{Cauchy}(\delta^{-1},\mu)}=\frac{1+\cos3x}{2}$$

Peak deviation
The Cauchy distribution being approximated has the following PDF:

$$\ \ \mathrm{Cauchy}(\delta^{-1},0)=\frac{\delta}{\pi\bigl( 1+ x^2 \delta^2\bigr)}$$

For large values of $$\delta$$, the peak of $$\Pi(\delta, 0)$$ is consistently offset by a deviation $$r$$ from the peak of the Cauchy distribution. This deviation between the two distributions is defined as the difference between their y-intercepts:

$$r(\delta)=\frac{2\delta}{\pi\bigl(1+e^{-3/\delta}\bigr)}-\frac{\delta}{\pi}$$

This deviation diminishes and stabilizes as $$\delta$$ grows, converging to:

$$\ \ \lim_{\delta \to \infty}r(\delta)=\frac{3}{2 \pi}$$

To align $$\Pi(\delta, 0)$$ more closely with the Cauchy distribution, the PDF can be adjusted by subtracting $$r(\delta)$$ from $$\Pi(\delta, 0)$$ for values at and around the peak of the distribution:

$$\ \ \mathrm{Cauchy}(\delta^{-1},0)\approx\Pi(\delta,0) - r(\delta)$$

Discovery
The phallic-Cauchy conjecture, along with the phallic distribution were formulated by medical student Aleksa Joksimović. The creation of the distribution was conceived as an intriguing exercise in fundamental concepts of probability theory and other topics relevant to mathematical statistics.

= Phallic integral = The phallic integral is the integral of the phallic function over the entire real line. It results in

$$\ \ \int_{- \infty}^{\infty} \frac{1+\cos3x}{1+x^2}\ dx=\frac{\pi(1+e^3)}{e^3}=\pi \alpha^{-1}$$

This expression can also be rearranged to solve for $$\pi$$, which is sometimes referred to as the phallic formulation of pi

$$\ \ \frac{e^3}{1+e^3}\int_{- \infty}^{\infty} \frac{1+\cos3x}{1+x^2}\ dx = \pi$$

If we label the constant in front of the integral as $$\alpha$$ and the integrand as the phallic function $$\varphi(x,1)$$ we get the expression for the phallic equation for $$\pi$$ and for Euler's constant e:

$$\ \ \pi = \alpha\int_{- \infty}^{\infty} \varphi(x,1)\ dx$$ and $$e = \biggl(\pi^{-1} \int_{- \infty}^{\infty} \varphi (x,1) \ dx -1\biggr)^{- \frac{1}{3}}$$

Where $$\alpha \approx 0.953$$.The phallic integral is used to compute the normalizing constant of the standard phallic distribution. Analogous to the Gaussian integral, the phallic integral doesn't have an elementary antiderivative.

= Core theory = In minecraft, core theory or core model is a theoretical framework that attempts to quantitatively describe the difference in distance traveled between the Overworld and Nether dimensions. In core theory, the Nether dimension is modelled as a sphere contained within the larger spherical Overworld dimension (resembling the Earth's core). Assuming the dimensions share the same center, this setup geometrically explains why distance travelled in the Nether equates to eightfold the distance travelled in the Overworld.

Coordinate conversion
In the Overworld, a player normally enters the Nether by constructing a portal. The Overworld portal's coordinates, contained within the position vector $$\vec{p}$$, determine the coordinates of the portal summoned in the Nether when a player passes through it. Assuming no terrain obstruction, the coordinates of the Nether portal are predicted using the coordinate conversion equation:

$$\ \ \vec{p}_n = \langle \psi(x_0),\psi(y_0),\psi(z_0) \rangle$$

where $$x_o$$, $$y_o$$ and $$z_o$$ are the coordinates of the lower left portal block, and $$\psi(x)$$ denotes the psi conversion function. It's important to note that while the conversion of the y coordinate is included in the equation, in practice it is ignored since the height at which the portal spawns follows no clear predictable pattern. In practice, there is variability in the predicted position which is a result of the unlevel and irregular shape of the biomes in the Nether dimension.

Psi conversion function
In core theory, the psi conversion function is used to determine the coordinates of the summoned Nether portal based on the coordinates of the portal summoned in the Overworld. It is a piecewise function of the form:

$$\ \ \psi (n) = \begin{cases} -\lfloor|\frac{n}{8}|\rfloor, & n< 0 \\ \lceil \frac{n}{8} \rceil, & n \geqslant 0 \end{cases}$$

where n is replaced with the Overworld x, y and z coordinates in the coordinate conversion equation.