∎

<EMAIL_ADDRESS><EMAIL_ADDRESS>11institutetext:
Department of Physics, Addis Ababa University, P.O. Box 1176, Addis Ababa,
Ethiopia 22institutetext: Department of Physics, Mizan-Tepi University,P.O.
Box 260, Mizan Teferi, Ethiopia 33institutetext: Department of Physics, Addis
Ababa University, P.O. Box 1176, Addis Ababa, Ethiopia

# Computation of Thermodynamic and Hydrodynamic Properties of the Viscous
Atmospheric Motion on the Rotating Earth in 2D Using Naiver-Stokes Dynamics

Admasu Abawari addr1, addr2, e1  Yitagesu Elfaged addr3, addr1,e2

(September 3, 2024)

###### Abstract

In this article, we model Earth’s lower small-scale eddies motion in the
atmosphere as a compressible neutral fluid flow on a rotating sphere. To
justify the model, we carried out a numerical computation of the thermodynamic
and hydrodynamic properties of the viscous atmospheric motion in two
dimensions using Naiver-Stokes dynamics, conservation of atmospheric energy,
and continuity equation. The dynamics of the atmosphere, governed by partial
differential equation without any approximation ,and without considering
latitude-dependent acceleration due to gravity. The numerical solution for
those governed equations was solved by applying the finite difference method
with applying some sort of horizontal air mass density as a perturbation to
the atmosphere at a longitude of $5\Delta\lambda$ . Based on this initial
boundary condition with taking temperature-dependent transport coefficient in
to account, we obtain the propagation for each atmospheric parameter and
presented in graphically as a function of geometrically position and time. All
of the parameters oscillating with respect to time and satisfy the
characteristics of atmospheric wave. Finally, the effect of the Coriolis force
on resultant velocity were also discussed by plotting contour lines for the
resultant velocity for different magnitude of Coriolis force, then we also
obtain an interesting wave phenomena for the respective rotation of the
Coriolis force.

Keywords: Naiver-Stokes Equations; Finite difference method; Viscous
atmospheric motion; Viscous dissipation; convective motion.

##  1 Introduction

As stated in andrews2010introduction , it is very difficult to define the
exact size, mass, and weight of the Earths atmosphere, but in many respects,
our atmosphere is a very thin layer, compared to Earth’s radius. It is a
critical system for life on our planet and together with the oceans, the
atmosphere shapes Earth’s climate and weather patterns and makes some regions
more habitable than others. The atmosphere consists of a mixture of ideal
gases: although molecular nitrogen and molecular oxygen predominate by volume.
Like other planetary atmospheres, the earth’s atmosphere figures centrally in
transfers of energy between the sun and the planet’s surface and from one
region of the globe to another; these transfers maintain thermal equilibrium
and determine the planet’s climate curry1998thermodynamics .

As cited in reference denur2016condensation  , Atmospheric thermodynamics is
the study of heat-to-work transformations(and their reverse) that take place
in the earth’s atmosphere and manifest as the weather of climate. Hence it is
involved in every atmospheric process, from the large-scale general
circulation to the local transfer of radiative, sensible and latent heat
between the surface and the atmosphere and the microphysical processes
producing clouds cairo2011atmospheric . As we stated above, the earth’s
atmosphere is the fluid system envelope surrounding the planet, and the
atmosphere is capable of supporting a wide spectrum of motions, ranging from
turbulent eddies of a few meters to circulations having dimensions of the
earth itself. Its motion is strongly influenced by different factors such as
the effect of the rotation of the Earth, gravity of the earth, air pressure
force and the viscosity of the fluid salby1996fundamentals .

As suggested in reference vallis2016geophysical , the atmosphere is governed
by the laws of continuum mechanics and these can be derived from the laws of
mechanics and thermodynamics governing a discrete fluid body by generalizing
those laws to a continuum of such systems. In order to simulate these fluid
flow and other related physical phenomena, it is necessary to describe the
associated physics in mathematical form.

Nearly all the physical phenomena of interest to us in this finding are
governed by principles of conservation and are expressed in terms of partial
differential equations. Hence, Cloaude-Louis Navier (1823) derived the
equations of motion for a viscous fluid from molecular considerations, and
George Stokes (1845) also derived the equations of motion for a viscous fluid
in a slightly different form and the basic equations that govern fluid flow
are now generally known as the Naiver-Stokes equations which arise from
applying Isaac Newton’s second law to fluid motion childs2010rotating .
According to wallace2006atmospheric , the dynamics that described by the
Naiver-Stokes equations (NSE) of fluid dynamics, for a variable the density of
incompressible ocean and compressible atmosphere expressing conservation of
mass, momentum, and energy. All the atmospheric gases are constituents of air
characteristics with their pressure, density, and temperature and these
parameters vary with altitude, latitude, longitude, and related to each other
by the equation of state jacobson2005fundamentals  and these field variables
are related to one another by the equation of state for an ideal gas.

Life is too short to solve every complex problem in detail, and the
atmospheric and oceanic sciences abound with such a complex problem. To solve
real-world problems we need to add water vapor as well as the equations of
radiative transfer on Thermodynamical equation. All these make a complex
system, and to make progress, we need to simplify where possible and eliminate
unimportant effects from the model. Thus, during the last decades, direct
numerical simulations (DNS) have been recognized as a powerful and reliable
tool for studying the basic physics of turbulence, and numerous findings
showed that the results obtained by DNS are in excellent agreement with
experimental findings nikitin2006finite . In reference, burger2010numerical ,
one of the challenging equations in atmosphere phenomena is the Naiver-Stokes
equations which can not be solved exactly. So, approximations and simplifying
assumptions are commonly made to allow the equations to be solved
approximately.

Recently, high speed computers have been used to solve such equations by
replacing them with a set of algebraic equations using a variety of numerical
techniques like finite difference method (FDM) reis2015compact ;
tsega2018finite , the finite element method (FEM) kolmogorov2014finite  the
finite volume method (FVM)nath2016numerical , meshfree methods and boundary
elements method sedaghatjoo2018numerical . Many authors in their finding
considered the coefficient of viscosity as well as the thermal conductivity of
the fluid as a constant parameter, and on many other studies fluid as
incompressible for numerical computation of Navier-Stokes dynamics,and there
is still no findings that have been done considering on this area (apply the
temperature dependent viscosity and thermal conductivity and their influence
on the accuracy of the final solution ) for solving an atmosphere model, and
we numerical compare on the two solutions through finding the relative error
between on two mechanism.

The strategy intended to achieve our goal that is to compute the thermodynamic
and hydrodynamic properties of the viscous atmospheric motion on the rotating
Earth frame. The assumptions used in this analysis are the flow is simple a
compressible neutral fluid, with considering temperature dependent transport
coefficients of the fluid flow over small-scale motion. In order to get the
distributions of the resultant velocity, pressure, density, and temperature of
the fluid on our atmosphere, the governing equations have been derived based
on the above-mentioned assumptions and given as follows in Section2 and 3, and
the numerical results obtained are presented graphically and discussed. in
section 6.

##  2 The Laws of Thermodynamics of the Atmosphere

In this context, the first law of the thermodynamics which when applied to the
moving fluid elements is consists of the net transfer of heat by fluid flow,
net heat transfer by conduction, rate of internal heat generation, the rate of
work transfer from the control volume to its environment. Hence, the first law
of thermodynamics equation containing the viscous dissipation term $\varPhi$
is given in equation (1)

$\rho\frac{De}{Dt}=\rho\dot{q}+k\nabla^{2}T+\nabla k\nabla
T-p\nabla\bullet\vec{u}+\varPhi$ (1)

The way we have written (1) is intended to give a clear picture of the
balances of work and energy in the flow field. Thus, the heat added by
conduction, radiation and chemical reaction (the right-hand-side terms in the
first line of (1) is employed directly to increase the total internal energy.
Viscous dissipation as well as compression work, written for clarity in
separate lines in (1), are the mechanisms transforming mechanical energy into
internal energy, with only the latter being reversiblemonteiro2007dynamic .

The natural coordinates in which to express our equations, when they are
applied to the Earth, are spherical coordinates $(r,\phi,\lambda)$, where $r$
is the distance from the center of the Earth, $\phi$ is latitude and $\lambda$
is longitude. The detailed derivation of the atmospheric equations of motion
(1) in Cartesian coordinates was given in andrews2010introduction , and in
spherical coordinate for an compressible fluid it becomes expressed as

$\begin{split}&\rho c_{v}\left[\frac{\partial T}{\partial
t}+\frac{u}{r\cos\phi}\frac{\partial
T}{\partial\lambda}+\frac{v}{r}\frac{\partial T}{\partial\phi}+w\frac{\partial
T}{\partial z}\right]=\\\
&k\left[\frac{1}{r^{2}\cos^{2}\phi}\frac{\partial^{2}T}{\partial\lambda^{2}}-\frac{\tan\phi}{r^{2}}\frac{\partial
T}{\partial\phi}+\frac{2}{r}\frac{\partial T}{\partial
z}+\frac{1}{r^{2}}\frac{\partial^{2}T}{\partial\phi^{2}}+\frac{\partial^{2}T}{\partial
z^{2}}\right]\\\ &+\left(\frac{1}{r\cos\phi}\right)^{2}\frac{\partial
k}{\partial\lambda}\frac{\partial
T}{\partial\lambda}+\frac{1}{r^{2}}\frac{\partial
k}{\partial\phi}\frac{\partial T}{\partial\phi}+\frac{\partial k}{\partial
r}\frac{\partial T}{\partial r}\\\ &-p\left(\frac{1}{r\cos\phi}\frac{\partial
u}{\partial\lambda}+\frac{1}{r}\frac{\partial
v}{\partial\phi}+\frac{2w}{r}-\frac{v\tan\phi}{r}-\frac{u}{r}+\frac{\partial
w}{\partial r}\right)\\\ &\rho\dot{q}+\varPhi_{I}\end{split}$ (2)

Here, the coefficient of the thermal conductivity of the air ,and it’s
viscosity $\mu$ depends on the temperature based on experimental result and
they are approximately by using Sutherland’s lawsmits2006turbulent

$k_{T}=k_{o}\left(\frac{T}{T_{o}}\right)^{\frac{3}{2}}\frac{T_{o}+S_{k}}{T+S_{k}}$
(3)
$\mu_{T}=\mu_{o}\left(\frac{T}{T_{o}}\right)^{\frac{3}{2}}\frac{T_{o}+S_{\mu}}{T+S_{\mu}}$
(4)

Where, $S_{k},\&S_{\mu}$ are an effective temperature for cofficient of
thermal conductivity and viscosity of the air ,respectively and their value as
mentioned in Sutherland law. And $\mu\leavevmode\nobreak\
,\leavevmode\nobreak\ \mu_{o}$ are dynamic viscosity at input temperature T
and at reference temperature $T_{o}$ ,respectively. In the atmospheric range
of temperatures, the two specific heat capacity are given by
$c_{p}=c_{pd}\left(1+0.87q_{v}\right)$ and
$c_{v}=c_{pv}\left(1+0.97q_{v}\right)$ where,$q_{v}$ is the mass ratio of the
vapor to the moist air ($q_{v}=\frac{m_{v}}{m_{v}+m_{d}}$). The dissipation
term $\varPhi_{I}$ in spherical coordinate system for compressible fluid flow
is given as

$\begin{split}&\varPhi_{I}=\left(2\mu-\upsilon\right)\left(\frac{1}{r\cos\phi}\frac{\partial
u}{\partial\lambda}+\frac{1}{r}\frac{\partial
v}{\partial\phi}+\frac{2w}{r}-\frac{v\tan\phi}{r}\right)\\\
&+\left(2\mu-\upsilon\right)\left(-\frac{u}{r}+\frac{\partial w}{\partial
r}\right)+\frac{\mu}{r^{2}}\left(\frac{\partial
u}{\partial\phi}+\frac{1}{\cos\phi}\frac{\partial
v}{\partial\lambda}\right)^{2}\\\ &-\frac{4\mu}{r\cos\phi}\frac{\partial
u}{\partial\lambda}\frac{\partial v}{\partial\phi}\end{split}$ (5)

##  3 The Naiver-Stokes Equations for the moist air in Rotational Coordinate
System

In this section, we introduce the basic fluid dynamical laws that govern our
atmospheric flows. When we assume that the blob is instantaneous of cuboidal
shape, with sides $\delta x,\delta y$ and $\delta z$ which is fixed in space
and different type of forces exerted on this blob, then Newton’s second could
be expressed as

$m\frac{d\vec{U}}{dt}=\sum\vec{F}$ (6)

Here, the vector $\vec{F}$ is the sum of all the relevant forces exerted on
the neutral fluid elements that include the pressure, viscous, Coriolis, and
effective gravitational forces. Hence, the equations governing small-scale
atmospheric motion would be also derived from a Lagrangian perspective by
considering the rotation of the Earth which adopted from
ref.andrews2010introduction , and in vector form:

$\rho\frac{D\vec{U}}{Dt}=-\frac{{\nabla}p}{\rho}-2{\Omega}\times
U+\rho\vec{g}+\nabla\bullet\Bbbk$ (7)

In order to formulate the last term of (7), we use the following analytic
expression for the stress tensor$\leavevmode\nobreak\
\Bbbk\leavevmode\nobreak\ $zdunkowski2003dynamics  :

$\Bbbk=\mu\left(\nabla\vec{v}+\vec{v}^{\curvearrowleft}\nabla\right)-\lambda\nabla\bullet\vec{v}{E}$
(8)

We have used Lamè’s coefficients of viscosity $\lambda$ and $\mu$, which will
be treated as temperature-dependent.

$\nabla\bullet\Bbbk=\mu\nabla^{2}\vec{v}+\left(\nabla-\lambda\right)\nabla\left(\nabla\bullet\vec{v}\right)+\nabla\mu\bullet\left(\nabla\vec{v}+\vec{v}^{\curvearrowleft}\nabla\right)-\left(\nabla\bullet\vec{v}\right)\nabla\lambda$
(9)

In Cartesian coordinator, the viscous forces along x and y components from
equation(9) can be expressed as following in equations (10),and (11),
respectively.

$\nabla\bullet\Bbbk_{x}=\mu\nabla^{2}u+\left(\mu-\lambda\right)\frac{\partial}{\partial
x}\left(\nabla\bullet\vec{v}\right)+2\left(\frac{\partial\mu}{\partial
x}\frac{\partial\vec{u}}{\partial x}\right)+2\frac{\partial\mu}{\partial
y}\left(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial
x}\right)-\frac{\partial\lambda}{\partial x}\left(\nabla\bullet\vec{v}\right)$
(10)
$\nabla\bullet\Bbbk_{y}=\mu\nabla^{2}v+\left(\mu-\lambda\right)\frac{\partial}{\partial
y}\left(\nabla\bullet\vec{v}\right)+2\left(\frac{\partial\mu}{\partial
y}\frac{\partial\vec{v}}{\partial y}\right)+2\frac{\partial\mu}{\partial
x}\left(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial
x}\right)-\frac{\partial\lambda}{\partial y}\left(\nabla\bullet\vec{v}\right)$
(11)

In spherical coordinates with the components of the velocity vector given by
$\left(\vec{u}=u,v\right)$ , the Naiver-Stokes equations are given by

  * •

$\lambda$\- component of the momentum equation

$\begin{split}&\frac{\partial u}{\partial
t}+\left(\frac{u}{r\cos\phi}\frac{\partial
u}{\partial\lambda}+\frac{v}{r}\frac{\partial
u}{\partial\phi}\right)+\frac{uw}{r}-\frac{uv}{r}\tan\phi+lw-fv\\\
&+\frac{1}{r\rho\cos\phi}\frac{\partial p}{\partial\lambda}=\\\
&\mu\left(\frac{4}{3r^{2}\cos^{2}\phi}\frac{\partial^{2}u}{\partial\lambda^{2}}-\frac{\tan\phi}{r^{2}}\frac{\partial
u}{\partial\phi}+\frac{1}{r^{2}}\frac{\partial^{2}u}{\partial\phi^{2}}\right)\\\
&+\frac{\left(\mu-\lambda\right)}{r\cos\phi}\frac{\partial}{\partial\lambda}\left(\nabla\bullet\vec{v}\right)-\frac{1}{r\cos\phi}\frac{\partial\lambda}{\partial\lambda}\left(\nabla\bullet\vec{v}\right)+\frac{2}{r^{2}\cos^{2}\phi}\frac{\partial\mu}{\partial\lambda}\left(\frac{\partial
u}{\partial\lambda}\right)+\\\
&\frac{2}{r^{2}}\frac{\partial\mu}{\partial\phi}\left(\frac{\partial
u}{\partial\phi}+\frac{1}{\cos\phi}\frac{\partial
v}{\partial\lambda}\right)\end{split}$ (12)

  * •

$\phi$\- component of the momentum equation

$\begin{split}&\frac{\partial v}{\partial
t}+\left(\frac{u}{r\cos\phi}\frac{\partial
v}{\partial\lambda}+\frac{v}{r}\frac{\partial
v}{\partial\phi}\right)+\frac{vw}{r}-\frac{u^{2}}{r}\tan\phi+\\\
&fu+\frac{1}{r\rho}\frac{\partial
p}{\partial\phi}=\mu\left(\frac{4}{3r^{2}}\frac{\partial^{2}v}{\partial\phi^{2}}+\frac{1}{r^{2}\cos^{2}\phi}\frac{\partial^{2}v}{\partial\lambda^{2}}\right)\\\
&+\frac{\left(\mu-\lambda\right)}{r}\frac{\partial}{\partial\phi}\left(\nabla\bullet\vec{v}\right)-\frac{1}{r}\frac{\partial\lambda}{\partial\phi}\left(\nabla\bullet\vec{v}\right)+\frac{2}{r^{2}}\frac{\partial\mu}{\partial\phi}\left(\frac{\partial
u}{\partial\phi}\right)+\\\
&\frac{2}{r^{2}\cos\phi}\frac{\partial\mu}{\partial\phi}\left(\frac{\partial
u}{\partial\phi}+\frac{1}{\cos\phi}\frac{\partial
v}{\partial\lambda}\right)\end{split}$ (13)

Here,the latitudinal dependence of the Coriolis parameter is accounted for
this work are $f=2\Omega\sin\phi$ , $l=2\Omega\cos\phi$ , respectively and
$\rho$ is the density of the fluid, $p$ pressure, $\vec{g}$ the effective
gravitational acceleration, and the right side terms of equation(12)-(13)
comes from the normal and shear stresses due to friction.

##  4 Application of the Dynamics

As cited in ref saks2011cauchy , the above both atmospheric energy ,and
Naiver-Stokes equations are useful because they describe the physics of many
phenomena of scientific and engineering interest. They may be used to model
the weather, ocean currents, water flow in a pipe, and airflow around a wing.
The Naiver-Stokes equations, in their full forms, help with the design of
aircraft and cars, the study of blood flow, the design of power stations, the
analysis of pollution, and many other things. Coupled with Maxwell’s
equations, they can be used to model and study magneto-hydrodynamics.

The above description of the fluid system is not complete until we also
provide a relation between density and pressure for the heterogeneous nature
of the Earth’s lower atmospheric layer. For moist neutral air in the
atmosphere behaves approximately as an ideal gas, and its density depends on
the specific humidity and virtual temperature of the air, and so we write:

$p=\rho R_{d}T_{o}\left(1+0.608q_{v}\right)$ (14)

We recall that global existence of solutions of the atmospheric energy and the
Naiver-Stokes equations is known to hold in every space and time dimension
georgiev2018existence . However, theoretical understanding of the solutions to
these equations in many finding is done by taking some standard techniques to
estimate wind resources and they did not considered tiny errors at the
smallest scales will ultimately have huge effects on the overall solution.

##  5 Numerical Simulation of the Primitive Equations

In this section, we propose finite-difference-central difference schemes,
Runga Kutta fourth-order schemes, and 2D unstaggered grid methods were
implemented for proving of existence of global solutions for the above
governed equations. In all numerical solutions, the continuous partial
differential equation is replaced with a discrete approximation, and the
discretization of those equations are carried out with respect to dimensional
coordinates $\lambda$,and $\phi$ to convey the equations in finite difference
form by approximating the functions and their derivatives in terms of central
differences with applying the Courant-Friedrichs-Lewy stability criterion be
obeyedzdunkowski2003dynamics , and the spherical form of this criterion we
have used for numerical solve our model is given by $\frac{\partial
t}{r^{2}\cos^{2}\phi\partial\lambda^{2}},\frac{\partial
t}{r^{2}\partial\phi^{2}}\leq\frac{1}{4}$.

As indicated in last section of the introduction, we considered the small
scale neutral fluid motion of lower atmosphere as a compressible. Our flow is
a shallow box of dimensions $lx=45^{o}$ in the longitude direction,and
$ly=45^{o}$ in the latitude direction of the earth. The grid space is
$\Delta\lambda=1^{-1}$ in the longitude direction,and $\Delta\phi=1^{-1}$ in
the latitude direction of the Earth, with these parameters, the angular speed
of the rotation of Earth to be $\Omega=7.30*10^{-5}s^{-1}$. We apply some sort
of horizontal air mass density($\rho=10kg/m^{3}$) as a perturbation to the
atmosphere at a longitude of $5\Delta\lambda$,and some useful physical
constants were taken from Appendix A of referenceandrews2010introduction . The
computations have been performed using $\Delta t=1$ to ensure the stability
with the time step $n_{t}=50000$, then the over all characteristics of the
atmospheric variables would be brief discussed in the next section 6.

##  6 Results and Discussion

The result presented in this section is computed thermodynamic and
hydrodynamic properties of the viscous atmospheric motion with restricting our
attention to the lower part of the atmosphere as compressible neutral fluid.
To see the effect of transport coefficients (viscosity and thermal
conductivity) on the propagation of atmospheric resultant velocity,
temperature, density, and pressure with respect to time, we perform a
numerical simulation using a constant and temperature-dependent transport
coefficient (viscosity and thermal conductivity). Taking these parameters into
account, and based on our initial boundary condition, we obtain the
propagation of resultant velocity , and temperature against time for
temperature-dependent as well as for temperature-independent transport
coefficient as shown in Figure1(a)(left $1\&2$ column), and in
Figure1(b)(right $1\&2$ column), respectively. By comparing their magnitude,
we obtain the change in resultant, and temperature from the corresponding two
graphs , and presented in graphically as shown in the last end column of
Figures1(a)$\leavevmode\nobreak\ \&$ 1(b). Thus, from those corresponding
figures, we have observed that there is a slight change in both resultant
velocity and temperature with respect to time when we used temperature-
dependent transport coefficient instead of temperature-independent transport
coefficient.

(a) This figure shows how $\vec{V}$ changes during iteration steps.

(b) This figure shows how temperature changes during iteration steps.

Figure 1:  Propagation of resultant velocity and the temperature of moist air
with respect to time. From top to bottom: resultant velocity(Fig.1(a)) and
temperature (Fig.1(b))

Moreover, the propagation of density and pressure with respect to time is
becomes as shown in Figure2(a)(left column) and 2(b)(right column) for both
temperature-dependent ($\mu(T),K(T)$) and temperature-independent transport
coefficient ($\leavevmode\nobreak\ \mu,k$). Again here, their corresponding
variation with respect to time is presented in graphically as shown in Figure
2(a) (left last column) and Figure2(b) (right last column), respectively.
Based on these results, a correction, should be always considered for the
computation of thermodynamic and hydrodynamic properties of the viscous
atmospheric motion, and for better accuracy, temperature-dependent thermal
conductivity and coefficient of viscosity should be considered. Hence, we
consider the temperature-dependent transport coefficient for numerical solving
all of the governed equations that interpret our model.

(a) This figure shows how density changes during iteration steps.

(b) This figure shows how pressure changes during iteration steps.

Figure 2:  Propagation of density and pressure of moist air with respect to
time. From top to bottom: density(Fig.2(a)) and pressure (Fig.2(b))

Depending on the above result, that is by taking temperature-dependent
transport coefficient, we obtain the numerical solution for the governed
equations and it is presented in graphically as shown in below Figures 3$\&$4.
From those figures, we have seen that all the atmospheric parameters profile
behaves like a wave with respect to time, and the flow patterns of Figures are
very close to those shown inbruneau20062d . The propagation of resultant
velocity and the temperature have opposite in directions as we observe, in
Figure3(3(a) ,$\&$ 3(b)),and the reasons for this is currently is due to the
dissipation of the fluid their is a transformation mechanical energy to the
thermal and a vice verse relation .

(a) The plots of $\vec{v}(t,\lambda)$

(b) The plots of $T(t,\lambda)$

Figure 3:  The distribution of resultant velocity(Fig.3(a)) ,and
temperature(Fig.3(b)) with respect to time,and longitude.

When we apply the finite difference method on continuity equation, we obtain
the propagation of density($\rho$) as function of geometrically positions and
the time taken. Here, the propagation of density was presented graphically as
shown in Figure4(a) with respect to time and longitude, and the propagation of
atmospheric pressure as shown in Figure4(b). Thus, both of the density and the
pressure graph oscillate with same direction respect to time . Due to ideal
gas relation, from Figures3(b),4(a),$\&$ 4(b) we have seen that the
propagation of temperature is also in opposite direction to the propagation of
density and pressure of the fluid .

(a) The plots of $\rho(t,\lambda)$

(b) The plots of $P(t,\lambda)$

Figure 4:  The distribution of density( Fig.4(a)) ,and pressure( Fig.4(b))
with respect to time,and longitude.

When a sort of horizontal air mass density, $\rho\approx 10kg/m^{3}$ occurred
as a perturbation on the atmosphere at a specific longitude then this
perturbation of the density change its propagation with time as shown in
Figure5 in the form of full three dimensional surface. Thus, from the first
figure5(a), we observed that propagation of density has a maximum amplitude at
perturbation point , then its oscillation becomes decay to atmospheric density
at sea level $\rho=1.225kg/m^{3}$ in both direction of longitude. When the
time taken reaches to 100sec and 200sec,the propagation of density behave like
a random motion with increasing in amplitude as shown in figures(5(b), $\&$
5(c)). In similar fashion,using this perturbed density value, we also
determine the propagation for the remaining of the atmospheric parameter along
to the geometrically position (longitude,and latitude) at specific time taken
(see appendices with detailed). Finally, we can put observed that the
propagation of resultant velocity,temperature,and pressure behave like random
motion with respect to longitude and latitude at different time moments.

(a) The initial perturbed air mass density at time = 0 sec at
$5\Delta\lambda$.

(b) The computed numerical air mass density at time = 100 sec

(c) The computed numerical air mass density at time = 200 sec

Figure 5:  The graph of density against longitude $\&$ latitude. From top to
bottom: propagation of density at t=0sec (left column) and at t=100sec(right
column), and t=200sec(left last column)

.

Finally, it is interesting to note that the Coriolis effect does not appear in
the radial component of Naiver-Stokes equation which is related to two-
dimensional velocity. Its effect appears on the equations for resultant
velocity. Hence, by contrast the magnitude of the rate of momentum change due
to Coriolis forces that exerted on the atmospheric compressible fluid, we
obtain the resultant velocity field shown as a color plot with some contour
lines for corresponding equation(12) - (13) at a different time of the
simulation as shown in below figures 6 (left , and right columns) for small
and large magnitude of Coriolis force.

Figure6(a), and 6(b) , has been pointed out that there is an initial circular
shape wave propagation was observed at the center at around $t\approx 10$ sec
and due to double periodic condition, the circular wave spread out in two
dimension and we mark an interesting wave phenomena with symmetric in shape
observed at figure 6(c), $\&$ 6(d) for respective magnitude of Coriolis force
. Hence,as the time taken increases its magnitude to $115.1$ sec and to
$136.1$ sec for corresponding magnitude of Coriolis force, we have examined
that the propagation of the wave is only along to longitude of the Earth as
illustrated in figure 6(d) for large magnitude of the Coriolis force, and this
figure 6 general show how the resultant velocity depends on the magnitude of
Coriolis force.

(a) A contour map that describe the resultant velocity at t = 9.1sec

(b) A contour map that describe the resultant velocity at t = 115.1sec

(c) A contour map that describe the resultant velocity at t = 115.1sec

(d) A contour map that describe the resultant velocity at t = 136.1sec

Figure 6:  Contour plot for velocity,$\vec{U}=(u^{2}+v^{2})^{0.5}$ , From top
to bottom: for small (left column) and large (right column) magnitude of
Coriolis force

##  7 Summary and Conclusions

In this article, we propose an efficient computational strategy to deal with
thermodynamic and hydrodynamic properties of the viscous atmospheric motion in
two dimension with considering temperature-dependent viscous coefficient. The
dynamics of the atmosphere, governed by partial differential equation without
any approximation ,and without considering latitude-dependent acceleration due
to gravity. The numerical solution for those governed equations was solved by
applying the finite difference method with applying some sort of horizontal
air mass density as a perturbation to the atmosphere at a longitude of
$5\Delta\lambda$ . Based on this initial boundary condition with taking
temperature-dependent transport coefficient in to account, we obtain the
propagation for each atmospheric parameter and presented in graphically as a
function of geometrically position and time. All of the parameters oscillating
with respect to time and satisfy the characteristics of atmospheric wave.

Finally, the effect of the Coriolis force on resultant velocity were also
discussed by plotting contour lines for the resultant velocity for different
magnitude of Coriolis force, then we also obtain an interesting wave phenomena
for the respective rotation of the Coriolis force. Generally, the above
research result highly sensitive to the initial given value of the parameters
,longitude and latitude grid size,and on time scale. Our future work shall be
towards evolution of three dimensional governed equation taking compressible
ionized fluid with latitudinal dependent acceleration due to gravity.

## Acknowledgments

The first author gratefully acknowledges financial support from Addis Ababa
University and Mizan-Tepi University for enabling him to carry out this
research. The authors would also like to thank The International Science
Programme, Uppsala University, Sweden for the support they have provided to
our research group.

## References

  * (1) D. G. Andrews, An introduction to atmospheric physics.  Cambridge University Press, 2010.
  * (2) J. A. Curry and P. J. Webster, Thermodynamics of atmospheres and oceans.  Elsevier, 1998.
  * (3) J. Denur, “Condensation: Passenger not driver in atmospheric thermodynamics,” Entropy, vol. 18, no. 12, p. 417, 2016.
  * (4) F. Cairo, “Atmospheric thermodynamics,” in Thermodynamics-Interaction Studies-Solids, Liquids and Gases, IntechOpen, 2011.
  * (5) M. L. Salby, Fundamentals of atmospheric physics.  Elsevier, 1996.
  * (6) G. K. Vallis, “Geophysical fluid dynamics: whence, whither and why?,” Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, vol. 472, no. 2192, p. 20160140, 2016.
  * (7) P. R. Childs, Rotating flow.  Elsevier, 2010.
  * (8) J. M. Wallace and P. V. Hobbs, Atmospheric science: an introductory survey, vol. 92.  Elsevier, 2006.
  * (9) M. Z. Jacobson and M. Z. Jacobson, Fundamentals of atmospheric modeling.  Cambridge university press, 2005.
  * (10) N. Nikitin, “Finite-difference method for incompressible navier–stokes equations in arbitrary orthogonal curvilinear coordinates,” Journal of Computational Physics, vol. 217, no. 2, pp. 759–781, 2006.
  * (11) M. Burger, “Numerical methods for incompressible flow,” Lecture Notes, 2010\.
  * (12) G. Reis, I. Tasso, L. Souza, and J. Cuminato, “A compact finite differences exact projection method for the navier–stokes equations on a staggered grid with fourth-order spatial precision,” Computers & Fluids, vol. 118, pp. 19–31, 2015.
  * (13) E. G. Tsega and V. Katiyar, “Finite element solution of the two-dimensional incompressible navier-stokes equations using matlab.,” Applications & Applied Mathematics, vol. 13, no. 1, 2018.
  * (14) D. Kolmogorov, “Finite volume methods for incompressible navier-stokes equations on collocated grids with nonconformal interfaces,” 2014.
  * (15) D. Nath, M. Kalra, and P. Munshi, “Numerical simulation of time-dependent navier–stokes and mhd equations using a meshless method based on fundamental and particular solutions,” Engineering Analysis with Boundary Elements, vol. 67, pp. 81–95, 2016.
  * (16) Z. Sedaghatjoo, M. Dehghan, and H. Hosseinzadeh, “Numerical solution of 2d navier–stokes equation discretized via boundary elements method and finite difference approximation,” Engineering Analysis with Boundary Elements, vol. 96, pp. 64–77, 2018.
  * (17) E. Monteiro and E. Torlaschi, “On the dynamic interpretation of the virtual temperature,” Journal of the atmospheric sciences, vol. 64, no. 8, pp. 2975–2979, 2007.
  * (18) A. J. Smits and J.-P. Dussauge, Turbulent shear layers in supersonic flow.  Springer Science & Business Media, 2006.
  * (19) W. Zdunkowski and A. Bott, Dynamics of the Atmosphere: A course in theoretical Meteorology.  Cambridge University Press, 2003.
  * (20) R. S. Saks, “Cauchy problem for navier-stokes equations, fourier method,” Ufim. Math. Zh, vol. 3, no. 1, pp. 53–79, 2011.
  * (21) S. G. Georgiev and G. Davidi, “Existence and smoothness of navier-stokes equations,” arXiv preprint arXiv:1806.10081, 2018.
  * (22) C.-H. Bruneau and M. Saad, “The 2d lid-driven cavity problem revisited,” Computers & fluids, vol. 35, no. 3, pp. 326–348, 2006.

##  8 Appendix

###  8.1 The distribution of atmospheric parameters with respect to
geometrically position

(a) The plots of $\vec{v}(t,\lambda)$ at $t=100sec$

(b) The plots of $\vec{v}(t,\lambda)$ at $t=200sec$

Figure 7:  The distribution of resultant velocity at 100sec(Fig.7(a)) ,and
200sec(Fig.7(b)) with respect to longitude, and latitude.

(a) The plots of $T(t,\lambda)$ at $t=100sec$

(b) The plots of $T(t,\lambda)$ at $t=200sec$

Figure 8:  The distribution of temperature at 100sec(Fig.8(a)) ,and
200sec(Fig.8(b)) with respect to longitude, and latitude.

(a) The plots of $P(t,\lambda)$ at $t=100sec$

(b) The plots of $P(t,\lambda)$ at $t=200sec$

Figure 9:  The distribution of pressure at 100sec(Fig.9(a)) ,and
200sec(Fig.9(b)) with respect to longitude, and latitude.


#  $W$-Types in Categories of Coalgebras

Taichi Uemura

###### Abstract

We construct $W$-types in the category of coalgebras for a cartesian comonad.
It generalizes the constructions of $W$-types in presheaf toposes and gluing
toposes.

##  1 Introduction

$W$-type is an important feature of Martin-Löf’s dependent type theory [Mar82,
NPS90] and allows us to define a wide range of inductive types. Its
categorical counterpart is the initial algebra for a polynomial endofunctor
[MP00, GH04].

In this paper we construct $W$-types in the category of coalgebras for a
cartesian comonad. This is a generalization of the constructions of $W$-types
in presheaf toposes and Freyd cover given by Moerdijk and Palmgren [MP00] and
gluing $\Pi W$-pretoposes given by van den Berg [Ber06].

In Section 2 we review the notion of $W$-type. In Section 3 we describe
pushforwards in the category of coalgebras for a cartesian comonad. In Section
4 we show the main theorem (Theorem 35) and give some applications. In Section
5 we show a technical lemma used in the proof of the main theorem.

##  2 $W$-Types in Categories

We review the notions of polynomial, algebra and $W$-type. First we recall the
notion of algebra for an endofunctor.

######  Definition 1.

Let $P:\mathcal{E}\to\mathcal{E}$ be an endofunctor on a category
$\mathcal{E}$. A _$P$ -algebra_ consists of an object $X\in\mathcal{E}$ and a
morphism $s_{X}:PX\to X$. A _morphism_ of $P$-algebras $(X,s_{X})\to(Y,s_{Y})$
is a morphism $h:X\to Y$ in $\mathcal{E}$ such that $h\circ s_{X}=s_{Y}\circ
Ph$. We shall denote by $\mathrm{Alg}(P)$ the category of $P$-algebras and
morphisms of $P$-algebras, and by $U_{P}:\mathrm{Alg}(P)\to\mathcal{E}$ the
obvious forgetful functor. An _initial $P$-algebra_ is an initial object in
the category $\mathrm{Alg}(P)$.

######  Definition 2.

Let $P:\mathcal{E}\to\mathcal{E}$ and $Q:\mathcal{F}\to\mathcal{F}$ be
endofunctors. A _lax morphism $P\to Q$_ is a pair $(H,\sigma)$ consisting of a
functor $H:\mathcal{E}\to\mathcal{F}$ and a natural transformation
$\sigma:QH\Rightarrow HP$. A _strong morphism $P\to Q$_ is a lax morphism
$(H,\sigma):P\to Q$ such that $\sigma$ is an natural isomorphism.

######  Proposition 3.

Let $P:\mathcal{E}\to\mathcal{E}$ and $Q:\mathcal{F}\to\mathcal{F}$ be
endofunctors. A lax morphism $(H,\sigma):P\to Q$ induces a functor
$\tilde{H}:\mathrm{Alg}(P)\to\mathrm{Alg}(Q)$ such that
$U_{Q}\tilde{H}=HU_{P}$ defined by $\tilde{H}(X,s)=(HX,Hs\circ\sigma(X))$.

The following is analogous to the adjoint lifting theorem for (co)algebras for
(co)monads by Johnstone [Joh75] and Keigher [Kei75].

######  Proposition 4.

Let $P:\mathcal{E}\to\mathcal{E}$ and $Q:\mathcal{F}\to\mathcal{F}$ be
endofunctors and $(H,\sigma):P\to Q$ a strong morphism. Suppose that $H$ has a
right adjoint $R$. Then the induced functor
$\tilde{H}:\mathrm{Alg}(P)\to\mathrm{Alg}(Q)$ has a right adjoint
$\tilde{R}:\mathrm{Alg}(Q)\to\mathrm{Alg}(P)$ such that
$U_{P}\tilde{R}=RU_{Q}$.

###### Proof.

Let $\eta$ and $\varepsilon$ denote the unit and counit, respectively, of the
adjunction $H\dashv R$. The functor $R$ is part of a lax morphism $Q\to P$
with the mate of $\sigma^{-1}$

${PR}$${RHPR}$${RQHR}$${RQ.}$$\scriptstyle{\eta
PR}$$\scriptstyle{R\sigma^{-1}R}$$\scriptstyle{RQ\varepsilon}$

Hence we have a functor $\tilde{R}:\mathrm{Alg}(Q)\to\mathrm{Alg}(P)$ such
that $U_{P}\tilde{R}=RU_{Q}$. One can show that $\eta$ and $\varepsilon$
defines natural transformations $1\Rightarrow\tilde{R}\tilde{H}$ and
$\tilde{H}\tilde{R}\Rightarrow 1$ respectively, so $\tilde{R}$ is the right
adjoint to $\tilde{H}$. ∎

$W$-types are defined as the initial algebras for endofunctors represented by
polynomials.

######  Notation 5.

Let $\mathcal{E}$ be a locally cartesian closed category. For a morphism
$f:I\to J$ in $\mathcal{E}$, we shall denote by $f^{*}$ the pullback functor
$\mathcal{E}/J\to\mathcal{E}/I$, by $f_{!}$ or $\Sigma^{\mathcal{E}}_{f}$ its
left adjoint, and by $f_{*}$ or $\Pi^{\mathcal{E}}_{f}$ its right adjoint.

$\leavevmode\hbox to80.97pt{\vbox
to38.71pt{\pgfpicture\makeatletter\hbox{\hskip
40.48256pt\lower-25.49854pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{
}\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{
}\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox
to0.0pt{\pgfsys@beginscope\pgfsys@invoke{
}{}{}{}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{\offinterlineskip{}{}{{{}}{{}}}{{{}}}{{}{}{{ {}{}}}{ {}{}}
{{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-40.48256pt}{-8.65971pt}\pgfsys@invoke{
}\hbox{\vbox{\halign{\pgf@matrix@init@row\pgf@matrix@step@column{\pgf@matrix@startcell#\pgf@matrix@endcell}&#\pgf@matrix@padding&&\pgf@matrix@step@column{\pgf@matrix@startcell#\pgf@matrix@endcell}&#\pgf@matrix@padding\cr\hfil\hskip
13.90968pt\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}}
{{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-9.60414pt}{0.0pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{${\mathcal{E}/I}$}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}}}&\hskip
13.90968pt\hfil&\hfil\hskip 38.57286pt\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}}
{{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-10.26735pt}{0.0pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{${\mathcal{E}/J}$}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}&\hskip
14.57289pt\hfil\cr}}}\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}}{{{{}}}{{}}{{}}}} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}} {}{ {}{}{}}{}{ {}{}{}}{}{ {}{}{}} {{{{{}}{
{}{}}{}{}{{}{}}}}}{}{{{{{}}{
{}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{{{}{}}}\hbox{\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}}\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{{}}{}{}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{}{{}}{}{{{{}}}{{{}}}}{{}}{{{}}{{}}}{}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{{{}}{{}}}{}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{}{{}}{}{{}}
{}{}{}{}{{{}{}}}{}{{}}{}{}{}{{{}{}}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{0.39998pt}\pgfsys@invoke{
}{}{}{}{}{{}}{}{}{{}}\pgfsys@moveto{-12.4632pt}{2.45137pt}\pgfsys@lineto{10.73682pt}{2.45137pt}\pgfsys@stroke\pgfsys@invoke{
}{{}{{}}{}{}{{}}{{{}}}}{{}{{}}{}{}{{}}{{{}}{{{}}{\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{10.9368pt}{2.45137pt}\pgfsys@invoke{
}\pgfsys@invoke{ \lxSVG@closescope }\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}{{}}}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} {
}{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-3.30905pt}{6.19302pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{$\scriptstyle{f_{!}}$}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{ {}{}{}}{}{ {}{}{}}{}{
{}{}{}} {{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{
{}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}{}{}{{{}{}}}\hbox{\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}}\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{{}}{}{}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{}{{}}{}{{{{}}}{{{}}}}{{}}{{{}}{{}}}{}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{{{}}{{}}}{}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{{}}{}{}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
{{}}{}{{}}{}{{}}
{}{}{}{}{{{}{}}}{}{{}}{}{}{}{{{}{}}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{0.39998pt}\pgfsys@invoke{
}{}{}{}{}{{}}{}{}{{}}\pgfsys@moveto{-12.4632pt}{-14.7708pt}\pgfsys@lineto{10.73682pt}{-14.7708pt}\pgfsys@stroke\pgfsys@invoke{
}{{}{{}}{}{}{{}}{{{}}}}{{}{{}}{}{}{{}}{{{}}{{{}}{\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{10.9368pt}{-14.7708pt}\pgfsys@invoke{
}\pgfsys@invoke{ \lxSVG@closescope }\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}{{}}}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} {
}{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-3.7535pt}{-21.98466pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{$\scriptstyle{f_{*}}$}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{ {}{}{}}{}{ {}{}{}}
{{{{{}}{ {}{}}{}{}{{}{}}}}}{}{{{{{}}{
{}{}}{}{}{{}{}}}}}{{}}{}{}{}{}{}{{{}{}}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{0.39998pt}\pgfsys@invoke{
}{}{}{}{}{{}}{}{}{{}}\pgfsys@moveto{11.13678pt}{-6.15971pt}\pgfsys@lineto{-12.06323pt}{-6.15971pt}\pgfsys@stroke\pgfsys@invoke{
}{{}{{}}{}{}{{}}{{{}}}}{{}{{}}{}{}{{}}{{{}}{{{}}{\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{-1.0}{0.0}{0.0}{-1.0}{-12.26321pt}{-6.15971pt}\pgfsys@invoke{
}\pgfsys@invoke{ \lxSVG@closescope }\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}}{{}}}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{
}{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}}
{\pgfsys@beginscope\pgfsys@invoke{
}\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{
}\pgfsys@rect{-5.90627pt}{-11.88885pt}{10.48611pt}{11.45828pt}\pgfsys@fill\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope}{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-3.7535pt}{-8.375pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{$\scriptstyle{f^{*}}$}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{
{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\quad f_{!}\dashv
f^{*}\dashv f_{*}$

We call $f_{*}$ the _pushforward along $f$_.

For a functor $H:\mathcal{E}\to\mathcal{F}$ and an object $I\in\mathcal{E}$,
we denote by $H/I:\mathcal{E}/I\to\mathcal{F}/HI$ the functor $(f:X\to
I)\mapsto(Hf:HX\to HI)$.

######  Definition 6.

Let $\mathcal{E}$ be a locally cartesian closed category. For objects
$I,J\in\mathcal{E}$, a _polynomial_ from $I$ to $J$ is a triple $(f,g,h)$ of
morphisms of the form

${I}$${A}$${B}$${J.}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$

For a polynomial $(f,g,h)$ from $I$ to $J$, we define a functor
$P_{f,g,h}:\mathcal{E}/I\to\mathcal{E}/J$ to be $f_{!}g_{*}h^{*}$. We say a
functor $P:\mathcal{E}/I\to\mathcal{E}/J$ is represented by a polynomial
$(f,g,h)$ from $I$ to $J$ when $P$ is isomorphic to $P_{f,g,h}$. We shall
denote by $\mathbf{Poly}_{\mathcal{E}}(I,J)$ the class of functors
$P:\mathcal{E}/I\to\mathcal{E}/J$ that are represented by some polynomial from
$I$ to $J$. We often omit the subscript and simply write $\mathbf{Poly}(I,J)$
when the category $\mathcal{E}$ is clear from the context.

######  Definition 7.

Let $\mathcal{E}$ be a locally cartesian closed category. For an object
$I\in\mathcal{E}$, an _endopolynomial_ on $I$ is a polynomial of the form

${I}$${A}$${B}$${I.}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$

We say $\mathcal{E}$ _has $W$-types_ or is a locally cartesian closed category
_with $W$-types_ if, for any endopolynomial $(f,g,h)$ on any object $I$, there
exists an initial $P_{f,g,h}$-algebra.

######  Remark 8.

$W$-types in this paper are what are called dependent $W$-types or indexed
$W$-types in the literature. Gambino and Hyland [GH04] showed that a locally
cartesian closed category has all non-dependent $W$-types if and only if it
has all dependent $W$-types. So our terminology “having $W$-types” coincides
with that of Moerdijk and Palmgren [MP00].

######  Definition 9.

Let $\mathcal{E}$ and $\mathcal{F}$ be locally cartesian closed categories and
$H:\mathcal{E}\to\mathcal{F}$ a locally cartesian closed functor, namely a
functor that preserves finite limits and pushforwards. By definition, for an
endopolynomial $(f,g,h)$ on an object $I\in\mathcal{E}$, the functor
$H/I:\mathcal{E}/I\to\mathcal{F}/HI$ is part of a strong morphism
$P_{f,g,h}\to P_{Hf,Hg,Hh}$. Suppose $\mathcal{E}$ and $\mathcal{F}$ have
$W$-types. We say $H$ _preserves $W$-types_ if the induced functor
$\mathrm{Alg}(P_{f,g,h})\to\mathrm{Alg}(P_{Hf,Hg,Hh})$ preserves initial
objects for any endopolynomial $(f,g,h)$ in $\mathcal{E}$.

By Proposition 4 we have the following.

######  Proposition 10.

Let $\mathcal{E}$ and $\mathcal{F}$ be locally cartesian closed categories
with $W$-types and $H:\mathcal{E}\to\mathcal{F}$ a locally cartesian closed
functor. If $H$ has a right adjoint, then $H$ preserves $W$-types.

The class of functors represented by polynomials is closed under several
constructions.

######  Proposition 11.

Let $\mathcal{E}$ be a locally cartesian closed category.

  1. 1.

For any object $I\in\mathcal{E}$, the identity functor
$\mathcal{E}/I\to\mathcal{E}/I$ belongs to $\mathbf{Poly}(I,I)$.

  2. 2.

For functors $P:\mathcal{E}/I\to\mathcal{E}/J$ and
$Q:\mathcal{E}/J\to\mathcal{E}/K$, if $P$ belongs to $\mathbf{Poly}(I,J)$ and
$Q$ belongs to $\mathbf{Poly}(J,K)$, then $QP$ belongs to
$\mathbf{Poly}(I,K)$.

###### Proof.

The identity functor $\mathcal{E}/I\to\mathcal{E}/I$ is represented by the
polynomial $(1_{I},1_{I},1_{I})$. For the composition, see [GK13]. ∎

######  Proposition 12.

Let $\mathcal{E}$ be a locally cartesian closed category and
$P:\mathcal{E}/I\to\mathcal{E}/J$ a functor. If $P$ belongs to
$\mathbf{Poly}(I,J)$, then $P/K$ belongs to $\mathbf{Poly}(K,PK)$ for any
object $K\in\mathcal{E}/I$.

###### Proof.

Suppose that $P$ is represented by a polynomial
${I}$${A}$${B}$${J.}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$
Consider the following diagram,

${g^{*}g_{*}h^{*}K}$${g_{*}h^{*}K}$${PK}$${K}$${h^{*}K}$${I}$${X}$${Y}$${J}$$\scriptstyle{g^{\prime}}$$\scriptstyle{\varepsilon}$${\lrcorner}$$\scriptstyle{\eta}$$\scriptstyle{\sim}$$\scriptstyle{h^{\prime}}$${\llcorner}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$

where the left and middle squares are pullbacks, $\varepsilon$ is the counit
of the adjunction $g^{*}\dashv g_{*}$, and $\eta:g_{*}h^{*}K\to PK$ is an
isomorphism. Then the functor $P/K:\mathcal{E}/K\to\mathcal{E}/PK$ is
represented by the polynomial $(\eta,g^{\prime},h^{\prime}\varepsilon)$. ∎

We introduce the notion of _class of polynomial functors_ which is a
generalization of the family of classes of functors
$(\mathbf{Poly}_{\mathcal{E}}(I,J))_{I,J\in\mathcal{E}}$. This generalization
is necessary to apply Theorem 35 on the existence of $W$-types for a wide
range of categorical constructions (see Section 4.1 and 4.2).

######  Definition 13.

Let $\mathcal{E}$ be a locally cartesian closed category with $W$-types. A
_class of polynomial functors_ consists of a class $\mathscr{P}(I,J)$ of
functors $\mathcal{E}/I\to\mathcal{E}/J$ for each pair of objects
$I,J\in\mathcal{E}$ satisfying the following conditions.

  1. 1.

If $P:\mathcal{E}/I\to\mathcal{E}/J$ belongs to $\mathbf{Poly}(I,J)$, then it
also belongs to $\mathscr{P}(I,J)$.

  2. 2.

If $P:\mathcal{E}/I\to\mathcal{E}/J$ belongs to $\mathscr{P}(I,J)$ and
$Q:\mathcal{E}/J\to\mathcal{E}/K$ belongs to $\mathscr{P}(J,K)$, then $QP$
belongs to $\mathscr{P}(I,K)$.

  3. 3.

If $P:\mathcal{E}/I\to\mathcal{E}/J$ belongs to $\mathscr{P}(I,J)$ and $P\cong
Q$, then $Q$ belongs to $\mathscr{P}(I,J)$.

  4. 4.

If $P:\mathcal{E}/I\to\mathcal{E}/J$ belongs to $\mathscr{P}(I,J)$, then
$P/K:\mathcal{E}/K\to\mathcal{E}/PK$ belongs to $\mathscr{P}(K,PK)$ for any
object $K\in\mathcal{E}/I$.

  5. 5.

For any endofunctor $P:\mathcal{E}/I\to\mathcal{E}/I$ that belongs to
$\mathscr{P}(I,I)$, there exists an initial $P$-algebra.

######  Example 14.

For a locally cartesian closed category $\mathcal{E}$ with $W$-types, the
classes $(\mathbf{Poly}(I,J))_{I,J\in\mathcal{E}}$ form a class of polynomial
functors by Proposition 11 and 12.

######  Example 15.

Let $\mathscr{P}$ be a class of polynomial functors on a locally cartesian
closed category $\mathcal{E}$ with $W$-types. For an object $K\in\mathcal{E}$
and objects $I,J\in\mathcal{E}/K$, we define a class $\mathscr{P}/K(I,J)$ of
functors $(\mathcal{E}/K)/I\to(\mathcal{E}/K)/J$ to be the class of functors
that belong to $\mathscr{P}(I,J)$ under the identification
$(\mathcal{E}/K)/I\cong\mathcal{E}/I$ and
$(\mathcal{E}/K)/J\cong\mathcal{E}/J$. Then
$(\mathscr{P}/K(I,J))_{I,J\in\mathcal{E}/K}$ form a class of polynomial
functors on $\mathcal{E}/K$.

######  Remark 16.

Clearly $\mathbf{Poly}_{\mathcal{E}/K}\subset\mathbf{Poly}_{\mathcal{E}}/K$
holds, but $\mathbf{Poly}_{\mathcal{E}}/K\subset\mathbf{Poly}_{\mathcal{E}/K}$
need not hold.

###  2.1 The Characterization Theorem

In some nice category $\mathcal{E}$, $W$-types have a nice characterization
due to van den Berg [Ber05]. To achieve this characterization, the category
$\mathcal{E}$ should be extensive [CLW93].

######  Definition 17.

An _extensive category_ is a category $\mathcal{E}$ with finite coproduct such
that, for any objects $A,B\in\mathcal{E}$, the coproduct functor

$+:\mathcal{E}/A\times\mathcal{E}/B\to\mathcal{E}/(A+B)$

is an equivalence of categories.

When $\mathcal{E}$ is locally cartesian closed, the extensivity of
$\mathcal{E}$ is equivalent to much simpler conditions.

######  Definition 18.

Let $\mathcal{E}$ be a category with finite coproducts. We say a binary
coproduct $A+B$ in $\mathcal{E}$ is _disjoint_ if the inclusions $A\to A+B$
and $B\to A+B$ are monic and the pullback of these inclusions is the initial
object.

######  Proposition 19.

Let $\mathcal{E}$ be a locally cartesian closed category with finite
coproducts. The following conditions are equivalent.

  1. 1.

$\mathcal{E}$ is extensive.

  2. 2.

Binary coproducts in $\mathcal{E}$ are disjoint.

  3. 3.

The binary coproduct $1+1$ is disjoint.

###### Proof.

It is known that a category with finite coproducts is extensive if and only if
binary coproducts are universal and disjoint [CLW93, Proposition 2.14]. Binary
coproducts in a locally cartesian closed category $\mathcal{E}$ are always
universal because pullback functors have right adjoints. Hence the conditions
1 and 2 are equivalent. Trivially 2 implies 3. Suppose that the coproduct
$1+1$ is disjoint. To show that any binary coproduct $A+B$ is disjoint, it
suffices to show that the pullback of the inclusions $A\to A+B$ and $B\to A+B$
is the initial object [CLW93, Proposition 2.13] because binary coproducts are
universal. Now we have a morphism $A\times_{A+B}B\to 1\times_{1+1}1\cong 0$.
Since $\mathcal{E}$ is cartesian closed, the initial object is strict [Joh02,
A1.5.12]. Hence $A\times_{A+B}B$ is the initial object. ∎

######  Definition 20.

Let $\mathcal{E}$ be a category. We say an object $A\in\mathcal{E}$ is _well-
founded_ if any monomorphism $X\rightarrowtail A$ into $A$ is an isomorphism.

######  Definition 21.

Let $P:\mathcal{E}\to\mathcal{E}$ be an endofunctor on a category. A _fixed
point of $P$_ is a $P$-algebra $(X,s)$ such that $s:PX\to X$ is an
isomorphism.

######  Theorem 22 (Characterization Theorem).

Let $\mathcal{E}$ be an extensive locally cartesian closed category with a
natural number object and
${I}$${A}$${B}$${I}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$ an
endopolynomial in $\mathcal{E}$. For a $P_{f,g,h}$-algebra $(X,s_{X})$, the
following conditions are equivalent.

  1. 1.

$(X,s_{X})$ is an initial $P_{f,g,h}$-algebra.

  2. 2.

$(X,s_{X})$ is a well-founded fixed point of $P_{f,g,h}$, namely a fixed point
of $P_{f,g,h}$ that is well-founded in the category $\mathrm{Alg}(P_{f,g,h})$.

###### Proof.

The proof is similar to [Ber05, Theorem 26]. ∎

##  3 Comonads

We review the theory of (cartesian) comonads.

######  Notation 23.

Let $G$ be a comonad on a category $\mathcal{E}$. We will refer to the counit
and comultiplication of $G$ as $\varepsilon_{G}:G\Rightarrow 1$ and
$\delta_{G}:G\Rightarrow GG$ respectively. We denote by $\mathcal{E}_{G}$ the
category of $G$-coalgebras, by $U_{G}:\mathcal{E}_{G}\to\mathcal{E}$ the
forgetful functor and by $F_{G}$ the right adjoint to $U_{G}$ such that
$U_{G}F_{G}=G$. We will refer to the unit of the adjunction $U_{G}\dashv
F_{G}$ as $\eta_{G}:1\Rightarrow F_{G}U_{G}$.

######  Definition 24.

Let $\mathcal{E}$ be a cartesian category. A _cartesian comonad_ on
$\mathcal{E}$ is a comonad $G$ on $\mathcal{E}$ whose underlying functor
$\mathcal{E}\to\mathcal{E}$ preserves finite limits.

The following Lemma 25 is well-known.

######  Lemma 25.

Let $G$ be a comonad on a category $\mathcal{E}$.

  1. 1.

The forgetful functor $U_{G}:\mathcal{E}_{G}\to\mathcal{E}$ creates colimits.

  2. 2.

If $G$ is cartesian, then $U_{G}:\mathcal{E}_{G}\to\mathcal{E}$ creates finite
limits.

######  Proposition 26.

Let $G$ be a cartesian comonad on a cartesian category $\mathcal{E}$. If
$\mathcal{E}$ is locally cartesian closed, then so is $\mathcal{E}_{G}$.

Proposition 26 is a well-known fact [Joh02, A4.2.1]. We concretely describe
the construction of pushforward functors.

First we recall the adjoint lifting theorem [Joh75].

######  Definition 27.

Let $\mathcal{E}$ and $\mathcal{F}$ be categories, $G$ a comonad on
$\mathcal{E}$ and $H$ a comonad on $\mathcal{F}$. An _oplax morphism_ $G\to H$
consists of a functor $S:\mathcal{E}\to\mathcal{F}$ and a natural
transformation $\sigma:SG\Rightarrow HS$ satisfying
$\varepsilon_{H}S\circ\sigma=S\varepsilon_{G}$ and
$\delta_{H}S\circ\sigma=H\sigma\circ\sigma G\circ S\delta_{G}$.

######  Proposition 28.

Let $\mathcal{E}$ and $\mathcal{F}$ be categories, $G$ a comonad on
$\mathcal{E}$, $H$ a comonad on $\mathcal{F}$ and
$S:\mathcal{E}\to\mathcal{F}$ a functor. A natural transformation
$\sigma:SG\Rightarrow HS$ that makes $S$ an oplax morphism $G\to H$
bijectively corresponds to a functor $T:\mathcal{E}_{G}\to\mathcal{F}_{H}$
such that $U_{H}T=SU_{G}$.

######  Proposition 29 (Adjoint Lifting Theorem).

Let $\mathcal{E}$ and $\mathcal{F}$ be cartesian categories, $G$ a cartesian
comonad on $\mathcal{E}$, $H$ a cartesian comonad on $\mathcal{F}$ and
$(S,\sigma):G\to H$ an oplax morphism. Let
$T:\mathcal{E}_{G}\to\mathcal{F}_{H}$ denote the corresponding functor such
that $U_{H}T=SU_{G}$. If $S:\mathcal{E}\to\mathcal{F}$ has a right adjoint
$R:\mathcal{F}\to\mathcal{E}$ with unit $i$ and counit $e$, then $T$ has a
right adjoint defined by the equalizer of the following coreflexive pair:

${F_{G}RU_{H}}$${F_{G}RHU_{H}}$${F_{G}RU_{H}}$$\scriptstyle{\varphi_{1}}$$\scriptstyle{\varphi_{2}}$$\scriptstyle{F_{G}R\varepsilon_{H}U_{H}}$

$\varphi_{1}$ is the composite

${F_{G}RU_{H}}$${F_{G}U_{G}F_{G}RU_{H}=F_{G}GRU_{H}}$${F_{G}RHU_{H}}$$\scriptstyle{\eta_{G}F_{G}RU_{H}}$$\scriptstyle{F_{G}\tilde{\sigma}U_{H}}$

where $\tilde{\sigma}:GR\to RH$ is the mate of $\sigma$, namely the composite

${GR}$${RSGR}$${RHSR}$${RH;}$$\scriptstyle{iGR}$$\scriptstyle{R\sigma
R}$$\scriptstyle{RHe}$

$\varphi_{2}$ is $F_{G}RU_{H}\eta_{H}:F_{G}RU_{H}\to
F_{G}RU_{H}F_{H}U_{H}=F_{G}RHU_{H}$.

A slice of a category of coalgebras is again a category of coalgebras in the
following sense. Let $G$ be a cartesian comonad on a cartesian category
$\mathcal{E}$. For a $G$-coalgebra $(A,\alpha)$, we define a functor
$G_{\alpha}:\mathcal{E}/A\to\mathcal{E}/A$ to be the composite

${\mathcal{E}/A}$${\mathcal{E}/GA}$${\mathcal{E}/A.}$$\scriptstyle{G/A}$$\scriptstyle{\alpha^{*}}$

One can show that $G_{\alpha}$ is equipped with a comonad structure. By
definition $G_{\alpha}$ is cartesian. For a morphism of $G$-coalgebras
$f:(A,\alpha)\to(B,\beta)$, the canonical natural transformation
$G_{\alpha}f^{*}\Rightarrow f^{*}G_{\beta}$ is an isomorphism. The category
$(\mathcal{E}/A)_{G_{\alpha}}$ of $G_{\alpha}$-coalgebras is naturally
isomorphic to the slice category $\mathcal{E}_{G}/(A,\alpha)$.

Now we can describe pushforwards in a category of coalgebras. Let
$f:(A,\alpha)\to(B,\beta)$ be a morphism of $G$-coalgebras. We identify slice
categories $\mathcal{E}_{G}/(A,\alpha)$ with $(\mathcal{E}/A)_{G_{\alpha}}$.
By Proposition 29 the pushforward $\Pi^{\mathcal{E}_{G}}_{f}$ is the equalizer
of the following coreflexive pair:

${F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}}$${F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}U_{G_{\alpha}}}$${F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}}$$\scriptstyle{\varphi_{1}}$$\scriptstyle{\varphi_{2}}$$\scriptstyle{F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}\varepsilon_{G_{\alpha}}U_{G_{\alpha}}}$

$\varphi_{1}$ is the composite

${F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}}$${F_{G_{\beta}}U_{G_{\beta}}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}=F_{G_{\beta}}G_{\beta}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}}$${F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}U_{G_{\alpha}}}$$\scriptstyle{\eta_{G_{\beta}}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}}$$\scriptstyle{F_{G_{\beta}}\sigma
U_{G_{\alpha}}}$

where
$\sigma:G_{\beta}\Pi^{\mathcal{E}}_{f}\to\Pi^{\mathcal{E}}_{f}G_{\alpha}$ is
the mate of the natural isomorphism $f^{*}G_{\beta}\cong G_{\alpha}f^{*}$;
$\varphi_{2}$ is
$F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}\eta_{G_{\alpha}}:F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}\to
F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}F_{G_{\alpha}}U_{G_{\alpha}}=F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}U_{G_{\alpha}}$.

The following Proposition 30 describes algebras in the category of coalgebras
for a comonad.

######  Proposition 30.

Let $G$ be a comonad on a category $\mathcal{E}$ and $(P,\sigma)$ an oplax
morphism $G\to G$. Let $Q:\mathcal{E}_{G}\to\mathcal{E}_{G}$ denote the
corresponding functor such that $U_{G}Q=PU_{G}$. The forgetful functor $U_{G}$
induces a functor $\mathrm{Alg}(Q)\to\mathrm{Alg}(P)$. Since $(G,\sigma)$ is a
lax morphism $P\to P$, we have a functor $H:\mathrm{Alg}(P)\to\mathrm{Alg}(P)$
defined by $H(X,s)=(GX,Gs\circ\sigma(X))$.

  1. 1.

$H$ is part of a comonad on $\mathrm{Alg}(P)$.

  2. 2.

$U_{P}H=GU_{P}$ and $(U_{P},1)$ is an oplax morphism $H\to G$. Now we have a
commutative diagram

${\mathcal{E}_{G}}$${\mathrm{Alg}(P)_{H}}$${\mathcal{E}}$${\mathrm{Alg}(Q)}$${\mathrm{Alg}(P)}$$\scriptstyle{U_{G}}$$\scriptstyle{U_{H}}$$\scriptstyle{U_{Q}}$$\scriptstyle{U_{P}}$

  3. 3.

The category $\mathrm{Alg}(Q)$ of $Q$-algebras is isomorphic over
$\mathcal{E}_{G}\times_{\mathcal{E}}\mathrm{Alg}(P)$ to the category
$\mathrm{Alg}(P)_{H}$ of $H$-coalgebras.

  4. 4.

For any initial $P$-algebra $(W,s)$, there exists a unique initial $Q$-algebra
$(W^{\prime},s^{\prime})$ such that $U_{G}W^{\prime}=W$ and
$U_{G}s^{\prime}=s$.

###### Proof.

1 and 2 are straightforward. To see 3, observe that both a $Q$-algebra and a
$H$-coalgebra consist of the following data:

  * •

an object $A\in\mathcal{E}$;

  * •

a morphism $\alpha:A\to GA$;

  * •

a morphism $s:PA\to A$

such that $\alpha$ is a $G$-coalgebra and the following diagram commutes.

${PA}$${PGA}$${GPA}$${A}$${GA}$$\scriptstyle{P\alpha}$$\scriptstyle{s}$$\scriptstyle{\sigma(A)}$$\scriptstyle{Gs}$$\scriptstyle{\alpha}$

4 follows from 3 and Lemma 25. ∎

######  Corollary 31.

Let $G$ be a cartesian comonad on a cartesian category $\mathcal{E}$ with
finite coproducts. Then the forgetful functor
$U_{G}:\mathcal{E}_{G}\to\mathcal{E}$ creates natural number objects.

###### Proof.

By Lemma 25, the diagram

${\mathcal{E}_{G}}$${\mathcal{E}_{G}}$${\mathcal{E}}$${\mathcal{E}}$$\scriptstyle{1_{\mathcal{E}_{G}}+(-)}$$\scriptstyle{U_{G}}$$\scriptstyle{U_{G}}$$\scriptstyle{1_{\mathcal{E}}+(-)}$

commutes. Then use Proposition 30. ∎

##  4 $W$-Types in Categories of Coalgebras

We show the main theorem: the existence of $W$-types in the category of
coalgebras for a cartesian comonad. We also give some applications of this
theorem.

######  Lemma 32.

Let $\mathcal{E}$ be an extensive locally cartesian closed category. If
$\mathcal{E}$ has $W$-types, then it has a natural number object.

###### Proof.

Because the natural number object is the initial algebra for the associated
functor of the polynomial

${1}$${0+1}$${1+1}$${1.}$

∎

######  Lemma 33.

Let $G$ be a cartesian comonad on a locally cartesian closed category
$\mathcal{E}$. If $\mathcal{E}$ is an extensive category, then so is
$\mathcal{E}_{G}$.

###### Proof.

By Lemma 25, the binary coproduct $1+1$ in $\mathcal{E}_{G}$ is disjoint. Then
use Proposition 19. ∎

######  Lemma 34.

Let $\mathcal{E}$ be a locally cartesian closed category,
$P_{0},P_{1}:\mathcal{E}\to\mathcal{E}$ endofunctors and
$\varphi,\psi:P_{0}\Rightarrow P_{1}$ and $\varepsilon:P_{1}\Rightarrow P_{0}$
natural transformations such that $\varepsilon\varphi=\varepsilon\psi=1$. Let
$\iota:P\Rightarrow P_{0}$ denote the equalizer of $\varphi$ and $\psi$.
Suppose that $P_{0}$ preserves pullbacks and $P_{1}$ preserves monomorphisms.
If $P_{0}$ and $P_{1}$ have initial algebras, then $P$ has a well-founded
fixed point.

We will prove Lemma 34 in Section 5.

######  Theorem 35.

Let $\mathcal{E}$ be an extensive locally cartesian closed category with
$W$-types, $\mathscr{P}$ a class of polynomial functors on $\mathcal{E}$ and
$G$ a cartesian comonad on $\mathcal{E}$. Suppose that the underlying functor
$\mathcal{E}\to\mathcal{E}$ of $G$ belongs to $\mathscr{P}(1,1)$. Then the
category $\mathcal{E}_{G}$ of $G$-coalgebras has $W$-types.

###### Proof.

Let

${(I,\iota)}$${(A,\alpha)}$${(B,\beta)}$${(I,\iota)}$$\scriptstyle{h}$$\scriptstyle{g}$$\scriptstyle{f}$

be an endopolynomial in $\mathcal{E}_{G}$. Since $f_{!}$ preserves equalizers,
the endofunctor
$P_{f,g,h}:\mathcal{E}_{G}/(I,\iota)\to\mathcal{E}_{G}/(I,\iota)$ is an
equalizer of the form

${P_{f,g,h}}$${P_{0}}$${P_{1}}$$\scriptstyle{\varphi}$$\scriptstyle{\psi}$

where $P_{0}=f_{!}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}U_{G_{\alpha}}h^{*}$ and
$P_{1}=f_{!}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}U_{G_{\alpha}}h^{*}$,
and both $\varphi$ and $\psi$ are sections of a natural transformation
$P_{1}\Rightarrow P_{0}$ (see Section 3). Since the forgetful functor
$U_{G}:\mathcal{E}_{G}\to\mathcal{E}$ creates finite limits, we have
$P_{0}=f_{!}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}h^{*}U_{G_{\iota}}$ and
$P_{1}=f_{!}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}G_{\alpha}h^{*}U_{G_{\iota}}$.
We define $Q_{0}:\mathcal{E}/I\to\mathcal{E}/I$ to be
$f_{!}G_{\beta}\Pi^{\mathcal{E}}_{f}h^{*}$ and
$Q_{1}:\mathcal{E}/I\to\mathcal{E}/I$ to be
$f_{!}G_{\beta}\Pi^{\mathcal{E}}_{f}G_{\alpha}h^{*}$. Then we have
$U_{G_{\iota}}P_{0}=U_{G_{\iota}}f_{!}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}h^{*}U_{G_{\iota}}=f_{!}U_{\beta}F_{G_{\beta}}\Pi^{\mathcal{E}}_{f}h^{*}U_{G_{\iota}}=f_{!}G_{\beta}\Pi^{\mathcal{E}}_{f}h^{*}U_{G_{\iota}}=Q_{0}U_{G_{\iota}}$
and similarly $U_{G_{\iota}}P_{1}=Q_{1}U_{G_{\iota}}$. Since $Q_{0}$ and
$Q_{1}$ belong to $\mathscr{P}(I,I)$ by construction, they have initial
algebras, and so do $P_{0}$ and $P_{1}$ by Proposition 30. By construction
$P_{0}$ and $P_{1}$ preserve pullbacks, and thus there exists a well-founded
fixed point $(W,s)$ of $P_{f,g,h}$ by Lemma 34. By Theorem 22 $(W,s)$ is an
initial $P_{f,g,h}$-algebra, because $\mathcal{E}_{G}$ has a natural number
object by Lemma 32 and Corollary 31 and is extensive by Lemma 33. ∎

###  4.1 Application: Internal Diagrams

Let $C$ be an internal category in a locally cartesian closed category
$\mathcal{E}$. We denote by $\partial_{0}$ and $\partial_{1}$ the domain and
codomain morphisms ${C_{1}}$${C_{0}}$ respectively. The category
$\mathcal{E}^{C}$ of internal diagrams on $C$ is isomorphic to the category of
coalgebras for the cartesian comonad

${\mathcal{E}/C_{0}}$${\mathcal{E}/C_{1}}$${\mathcal{E}/C_{0}}$$\scriptstyle{\partial_{1}^{*}}$$\scriptstyle{(\partial_{0})_{*}}$

on $\mathcal{E}/C_{0}$. It is known that the diagonal functor
$\Delta:\mathcal{E}\to\mathcal{E}^{C}$ is a locally cartesian closed functor.

######  Corollary 36.

Let $\mathcal{E}$ be an extensive locally cartesian closed category and $C$ an
internal category in $\mathcal{E}$. If $\mathcal{E}$ has $W$-types, then so
does the category $\mathcal{E}^{C}$ of internal diagrams on $C$. Moreover, the
diagonal functor $\Delta:\mathcal{E}\to\mathcal{E}^{C}$ preserves $W$-types.

###### Proof.

Apply Theorem 35 with $\mathscr{P}=\mathbf{Poly}_{\mathcal{E}}/C_{0}$. The
preservation of $W$-types follows from Proposition 10 because $\Delta$ has a
right adjoint. ∎

###  4.2 Application: Gluing

Let $H:\mathcal{E}_{1}\to\mathcal{E}_{2}$ be a cartesian functor between
locally cartesian closed categories. Since the comma category
$(\mathcal{E}_{2}\downarrow H)$ is isomorphic to the category of coalgebras
for the cartesian comonad $(X_{1},X_{2})\mapsto(X_{1},HX_{1}\times X_{2})$ on
$\mathcal{E}_{1}\times\mathcal{E}_{2}$, it is locally cartesian closed. From
the construction of pushforwards described in Section 3 we know that the
projection $\pi_{1}:(\mathcal{E}_{2}\downarrow H)\to\mathcal{E}_{1}$ is a
locally cartesian closed functor.

######  Corollary 37.

Let $H:\mathcal{E}_{1}\to\mathcal{E}_{2}$ be a cartesian functor between
extensive locally cartesian closed categories. If $\mathcal{E}_{1}$ and
$\mathcal{E}_{2}$ have $W$-types, then so does $(\mathcal{E}_{2}\downarrow
H)$. Moreover, the projection $\pi_{1}:(\mathcal{E}_{2}\downarrow
H)\to\mathcal{E}_{1}$ preserves $W$-types.

To show Corollary 37, we define an appropriate class of polynomial functors on
$\mathcal{E}_{1}\times\mathcal{E}_{2}$.

######  Definition 38.

Let $\mathcal{E}_{1}$ and $\mathcal{E}_{2}$ be locally cartesian closed
categories with $W$-types and $\mathscr{P}_{1}$ and $\mathscr{P}_{2}$ classes
of polynomial functors on $\mathcal{E}_{1}$ and $\mathcal{E}_{2}$
respectively. For objects
$(I_{1},I_{2}),(J_{1},J_{2})\in\mathcal{E}_{1}\times\mathcal{E}_{2}$, we
define a class
$\mathscr{P}_{1}\rtimes\mathscr{P}_{2}((I_{1},I_{2}),(J_{1},J_{2}))$ of
functors
$(\mathcal{E}_{1}\times\mathcal{E}_{2})/(I_{1},I_{2})\cong\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}\to\mathcal{E}_{1}/J_{1}\times\mathcal{E}_{2}/J_{2}\cong(\mathcal{E}_{1}\times\mathcal{E}_{2})/(J_{1},J_{2})$
to be the class of functors of the form $(F_{1}\circ\pi_{1},F_{2})$ with
$F_{1}:\mathcal{E}_{1}/I_{1}\to\mathcal{E}_{1}/J_{1}$ and
$F_{2}:\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}\to\mathcal{E}_{2}/J_{2}$
such that $F_{1}$ belongs to $\mathscr{P}_{1}(I_{1},J_{1})$ and $F_{2}(K,-)$
belongs to $\mathscr{P}_{2}(I_{2},J_{2})$ for every
$K\in\mathcal{E}_{1}/I_{1}$.

######  Proposition 39.

For classes $\mathscr{P}_{1}$ and $\mathscr{P}_{2}$ of polynomial functors on
locally cartesian closed categories with $W$-types $\mathcal{E}_{1}$ and
$\mathcal{E}_{2}$ respectively, $\mathscr{P}_{1}\rtimes\mathscr{P}_{2}$ is a
class of polynomial functors on $\mathcal{E}_{1}\times\mathcal{E}_{2}$.

###### Proof.

A functor of the form $F_{1}\times F_{2}$ with
$F_{1}\in\mathscr{P}_{1}(I_{1},J_{1})$ and
$F_{2}\in\mathscr{P}_{2}(I_{2},J_{2})$ belongs to
$\mathscr{P}_{1}\rtimes\mathscr{P}_{2}((I_{1},I_{2}),(J_{1},J_{2}))$, and thus
$\mathbf{Poly}_{\mathcal{E}_{1}\times\mathcal{E}_{2}}((I_{1},I_{2}),(J_{1},J_{2}))\subset\mathscr{P}_{1}\rtimes\mathscr{P}_{2}$.
It is also clear that $\mathscr{P}_{1}\rtimes\mathscr{P}_{2}$ is closed under
isomorphism. To see that it is closed under composition, let
$F_{1}:\mathcal{E}_{1}/I_{1}\to\mathcal{E}_{1}/J_{1}$,
$F_{2}:\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}\to\mathcal{E}_{2}/J_{2}$,
$G_{1}:\mathcal{E}_{1}/J_{1}\to\mathcal{E}_{1}/K_{1}$ and
$G_{2}:\mathcal{E}_{1}/J_{1}\times\mathcal{E}_{2}/J_{2}\to\mathcal{E}_{2}/K_{2}$
be functors such that $F_{1}\in\mathscr{P}_{1}(I_{1},J_{1}))$,
$G_{1}\in\mathscr{P}_{1}(J_{1},K_{1})$,
$F_{2}(X_{1},-)\in\mathscr{P}_{2}(I_{2},J_{2})$ and
$G_{2}(Y_{1},-)\in\mathscr{P}_{2}(J_{2},K_{2})$ for any
$X_{1}\in\mathcal{E}_{1}/I_{1}$ and $Y_{1}\in\mathcal{E}_{1}/J_{1}$. Then we
have
$(G_{1}\pi_{1},G_{2})\circ(F_{1}\pi_{1},F_{2})=(G_{1}F_{1}\pi_{1},G_{2}(F_{1}\pi_{1},F_{2}))$
and $G_{1}F_{1}\in\mathscr{P}_{1}(I_{1},K_{1})$ and
$G_{2}(F_{1}\pi_{1},F_{2})(X_{1},-)=G_{2}(F_{1}(X_{1}),-)\circ
F_{2}(X_{1},-)\in\mathscr{P}_{2}(I_{2},K_{2})$ for any
$X_{1}\in\mathcal{E}_{1}/I_{1}$.

To show that $\mathscr{P}_{1}\rtimes\mathscr{P}_{2}$ is closed under slice,
let $F_{1}:\mathcal{E}_{1}/I_{1}\to\mathcal{E}_{1}/J_{1}$ and
$F_{2}:\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}\to\mathcal{E}_{2}/J_{2}$
be functors and
$(K_{1},K_{2})\in\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}$ objects
such that $F_{1}\in\mathscr{P}_{1}(I_{1},J_{1})$ and
$F_{2}(X_{1},-)\in\mathscr{P}_{2}(I_{2},J_{2})$ for any
$X_{1}\in\mathcal{E}_{1}/I_{1}$. Then we have
$(F_{1}\pi_{1},F_{2})/(K_{1},K_{2})=((F_{1}/K_{1})\pi_{1},F_{2}/(K_{1},K_{2}))$
and $F_{1}/K_{1}\in\mathscr{P}_{1}(K_{1},FK_{1})$. We also have
$(F_{2}/(K_{1},K_{2}))(X_{1},-)\in\mathscr{P}_{2}(K_{2},F_{2}(K_{1},K_{2}))$
for any $X_{1}\in\mathcal{E}_{1}/K_{1}$ because it is the composite

${\mathcal{E}_{1}/K_{1}}$${\mathcal{E}_{2}/F_{2}(X_{1},K_{2})}$${\mathcal{E}_{2}/F_{2}(K_{1},K_{2}).}$$\scriptstyle{F_{2}(X_{1},-)/K_{2}}$$\scriptstyle{(X_{1})_{!}}$

Finally we show the existence of initial algebras. Let
$F_{1}:\mathcal{E}_{1}/I_{1}\to\mathcal{E}_{1}/I_{1}$ and
$F_{2}:\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}\to\mathcal{E}_{2}/I_{2}$
be functors such that $F_{1}\in\mathscr{P}_{1}(I_{1},I_{1})$ and
$F_{2}(X_{1},-)\in\mathscr{P}_{2}(I_{2},I_{2})$ for any
$X_{1}\in\mathcal{E}_{1}/I_{1}$. Let $(W_{1},s_{1})$ be the initial
$F_{1}$-algebra and $(W_{2},s_{2})$ the initial $F_{2}(W_{1},-)$-algebra. Then
the object $(W_{1},W_{2})\in\mathcal{E}_{1}/I_{1}\times\mathcal{E}_{2}/I_{2}$
and the morphism
$(s_{1},s_{2}):(F_{1}W_{1},F_{2}(W_{1},W_{2}))\to(W_{1},W_{2})$ form a
$(F_{1}\pi_{1},F_{2})$-algebra. Let
$(t_{1},t_{2}):(F_{1}X_{1},F_{2}(X_{1},X_{2}))\to(X_{1},X_{2})$ be another
$(F_{1}\pi_{1},F_{2})$-algebra. A morphism
$((W_{1},W_{2}),(s_{1},s_{2}))\to((X_{1},X_{2}),(t_{1},t_{2}))$ of
$(F_{1}\pi_{1},F_{2})$-algebras consists of a morphism $h_{1}:W_{1}\to X_{1}$
and $h_{2}:W_{2}\to X_{2}$ such that $h_{1}\circ s_{1}=t_{1}\circ F_{1}h_{1}$
and $h_{2}\circ s_{2}=t_{2}\circ F_{2}(h_{1},h_{2})$. The second condition is
equivalent to that $h_{2}$ is a morphism of $F_{2}(W_{1},-)$-algebras
$(W_{2},s_{2})\to(X_{2},t_{2}\circ F_{2}(h_{1},X_{2}))$. Hence, there exists a
unique pair of morphisms $(h_{1},h_{2})$ satisfying these conditions by the
initiality of $(W_{1},s_{1})$ and $(W_{2},s_{2})$. ∎

###### Proof of Corollary 37.

Apply Theorem 35 with
$\mathscr{P}=\mathbf{Poly}_{\mathcal{E}_{1}}\rtimes\mathbf{Poly}_{\mathcal{E}_{2}}$.
The preservation of $W$-types follows from Proposition 10 because $\pi_{1}$
has a right adjoint. ∎

##  5 Algebras for the Equalizer of a Coreflexive Pair

In this section we prove Lemma 34: the existence of a well-founded fixed point
for an endofunctor defined as the equalizer of a coreflexive pair.

######  Lemma 40.

Suppose that we are given the following commutative diagram in a cartesian
category

${X}$${Y}$${Z}$${A}$${B}$${C}$$\scriptstyle{u}$$\scriptstyle{v}$$\scriptstyle{p}$$\scriptstyle{q}$$\scriptstyle{f}$$\scriptstyle{g}$

where $A$ is the equalizer of $f$ and $g$, $X$ is the equalizer of $u$ and
$v$, and $q$ is a monomorphism. Then the induced morphism $X\to A$ is the
pullback of $p$ along $A\to B$.

###### Proof.

For a morphism $h:W\to Y$, the following conditions are equivalent.

  * •

$h$ factors through $X$

  * •

$uh=vh$

  * •

$quh=qvh$

  * •

$fph=gph$

  * •

$ph$ factors through $A$

∎

###### Proof of Lemma 34.

Let $s_{0}:P_{0}W_{0}\to W_{0}$ and $s_{1}:P_{1}W_{1}\to W_{1}$ be initial
$P_{0}$\- and $P_{1}$-algebras respectively. By the initiality of $W_{0}$ and
$W_{1}$, we have morphisms $u,v:W_{0}\to W_{1}$ and $e:W_{1}\to W_{0}$ such
that $u\circ s_{0}=s_{1}\circ\varphi\circ P_{0}u$, $v\circ
s_{0}=s_{1}\circ\psi\circ P_{0}v$, $e\circ s_{1}=s_{0}\circ\varepsilon\circ
P_{1}e$ and $eu=ev=1$. Let $i:W\to W_{0}$ be the equalizer of $u$ and $v$.
Consider the diagram

${PW}$${P_{0}W}$${P_{1}W}$${PW_{0}}$${P_{0}W_{0}}$${P_{1}W_{0}}$${PW_{1}}$${P_{0}W_{1}}$${P_{1}W_{1}}$$\scriptstyle{\iota(W)}$$\scriptstyle{Pi}$$\scriptstyle{\varphi(W)}$$\scriptstyle{\psi(W)}$$\scriptstyle{P_{0}i}$$\scriptstyle{P_{1}i}$$\scriptstyle{\iota(W_{0})}$$\scriptstyle{Pu}$$\scriptstyle{Pv}$$\scriptstyle{\varphi(W_{0})}$$\scriptstyle{\psi(W_{0})}$$\scriptstyle{P_{0}u}$$\scriptstyle{P_{0}v}$$\scriptstyle{P_{1}u}$$\scriptstyle{P_{1}v}$$\scriptstyle{\iota(W_{1})}$$\scriptstyle{\varphi(W_{1})}$$\scriptstyle{\psi(W_{1})}$

where all rows are equalizers. Since $P_{1}$ preserves monomorphisms, $PW$ is
the pullback of $PW_{0}$ along $P_{0}i:P_{0}W\to P_{0}W_{0}$ by Lemma 40 .
$P_{0}$ also preserves monomorphisms because it preserves pullbacks. Therefore
$PW$ is the intersection of $PW_{0}$ and $P_{0}W$ in the poset of subobjects
of $P_{0}W_{0}$. For a morphism $f:Z\to P_{0}W_{0}$, the following conditions
are equivalent.

  1. 1.

$f$ factors through $PW$.

  2. 2.

$\varphi(W_{0})\circ f=\psi(W_{0})\circ f$ and $P_{0}u\circ f=P_{0}v\circ f$.

  3. 3.

$P_{1}u\circ\varphi(W_{0})\circ f=P_{1}v\circ\psi(W_{0})\circ f$.

  4. 4.

$\varphi(W_{1})\circ P_{0}u\circ f=\psi(W_{1})\circ P_{0}v\circ f$.

The conditions 1 and 2 are equivalent by definition. The conditions 3 and 4
are equivalent by the naturality of $\varphi$ and $\psi$. From 2, we have 3 as
$P_{1}u\circ\varphi(W_{0})\circ f=P_{1}u\circ\psi(W_{0})\circ
f=\psi(W_{1})\circ P_{0}u\circ f=\psi(W_{1})\circ P_{0}v\circ
f=P_{1}v\circ\psi(W_{0})\circ f$. 3 and 4 imply 2 because $eu=ev=1$ and
$\varepsilon\varphi=\varepsilon\psi=1$. Hence, $PW$ is also an equalizer of
$\varphi(W_{1})\circ P_{0}u$ and $\psi(W_{1})\circ P_{0}v$. In the following
diagram,

${PW}$${P_{0}W_{0}}$${P_{1}W_{1}}$${W}$${W_{0}}$${W_{1}}$$\scriptstyle{s}$$\scriptstyle{\varphi(W_{1})\circ
P_{0}u}$$\scriptstyle{\psi(W_{1})\circ
P_{0}v}$$\scriptstyle{s_{0}}$$\scriptstyle{s_{1}}$$\scriptstyle{i}$$\scriptstyle{u}$$\scriptstyle{v}$

all rows are equalizers and $s_{0}$ and $s_{1}$ are isomorphisms, and thus the
morphism $PW\to W_{0}$ factors as $i\circ s$ with an isomorphism $s:PW\to W$.

We show that $(W,s)$ is a well-founded $P$-algebra. Let $(X,t:PX\to X)$ be a
$P$-algebra and $j:X\rightarrowtail W$ a monomorphism that is a morphism of
$P$-algebras. Let $X_{0}$ denote the pushforward $i_{*}X$. Since $i$ is a
monomorphism, we have a pullback

${X}$${X_{0}}$${W}$${W_{0}.}$$\scriptstyle{i}$

Hence, it suffices to show that the monomorphism $X_{0}\to W_{0}$ is an
isomorphism. To prove this, it is enough to see that $X_{0}$ carries a
$P_{0}$-algebra structure over $s_{0}:P_{0}W_{0}\to W_{0}$, that is, the
composite ${P_{0}X_{0}}$${P_{0}W_{0}}$${W_{0}}$$\scriptstyle{s_{0}}$ factors
through $X_{0}\rightarrowtail W_{0}$.

${P_{0}X_{0}}$${X_{0}}$${P_{0}W_{0}}$${W_{0}}$$\scriptstyle{s_{0}}$

Since $X_{0}=i_{*}X$ and $i^{*}P_{0}W_{0}\cong PW$, it is equivalent to that
the composite ${i^{*}P_{0}X_{0}}$${i^{*}P_{0}W_{0}\cong
PW}$${W}$$\scriptstyle{s}$ factors through $X\rightarrowtail W$. Since $X$ has
a $P$-algebra structure over $s:PW\to W$, it suffices to show that
$i^{*}P_{0}X_{0}\to PW$ factors through $PX\rightarrowtail PW$. Now $P$ is the
equalizer of $\varphi,\psi:P_{0}\Rightarrow P_{1}$ and $P_{1}X\to P_{1}W$ is a
monomorphism, and thus the square

${PX}$${P_{0}X}$${PW}$${P_{0}W}$$\scriptstyle{\iota(W)}$

is a pullback by Lemma 40. Hence, to show that $i^{*}P_{0}X_{0}\to PW$ factors
through $PX$, it suffices to show that the composite
${i^{*}P_{0}X_{0}}$${PW}$${P_{0}W}$$\scriptstyle{\iota(W)}$ factors through
$P_{0}X$. Since $P_{0}$ preserves pullbacks, we have a pullback

${P_{0}X}$${P_{0}X_{0}}$${P_{0}W}$${P_{0}W_{0},}$$\scriptstyle{P_{0}i}$

and thus it is enough to show that the composite
${i^{*}P_{0}X_{0}}$${PW}$${P_{0}W}$${P_{0}W_{0}}$$\scriptstyle{\iota(W)}$$\scriptstyle{P_{0}i}$
factors through $P_{0}X_{0}\to P_{0}W_{0}$. But this is true because
$i^{*}P_{0}X_{0}$ is the pullback

${i^{*}P_{0}X_{0}}$${P_{0}X_{0}}$${PW}$${PW_{0}}$${P_{0}W_{0}}$$\scriptstyle{Pi}$$\scriptstyle{\iota(W_{0})}$

and $\iota(W_{0})\circ Pi=P_{0}i\circ\iota(W)$ by the naturality of $\iota$. ∎

## References

  * [Ber05] Benno Berg  “Inductive types and exact completion”  In _Annals of Pure and Applied Logic_ 134.2, 2005, pp. 95–121  DOI: 10.1016/j.apal.2004.09.003
  * [Ber06] Benno Berg  “Predicative topos theory and models for constructive set theory”, 2006
  * [CLW93] Aurelio Carboni, Stephen Lack and R.F.C. Walters  “Introduction to extensive and distributive categories”  In _Journal of Pure and Applied Algebra_ 84.2, 1993, pp. 145–158  DOI: 10.1016/0022-4049(93)90035-R
  * [GH04] Nicola Gambino and Martin Hyland  “Wellfounded Trees and Dependent Polynomial Functors”  In _Types for Proofs and Programs: International Workshop, TYPES 2003, Torino, Italy, April 30 - May 4, 2003, Revised Selected Papers_ Berlin, Heidelberg: Springer Berlin Heidelberg, 2004, pp. 210–225  DOI: 10.1007/978-3-540-24849-1˙14
  * [GK13] Nicola Gambino and Joachim Kock  “Polynomial functors and polynomial monads”  In _Mathematical Proceedings of the Cambridge Philosophical Society_ 154.1 Cambridge University Press, 2013, pp. 153–192  DOI: 10.1017/S0305004112000394
  * [Joh02] Peter T. Johnstone  “Sketches of an Elephant : A Topos Theory Compendium Volume 1” 43, Oxford Logic Guides  Oxford University Press, Hardcover, 2002
  * [Joh75] Peter T. Johnstone  “Adjoint Lifting Theorems for Categories of Algebras”  In _Bulletin of the London Mathematical Society_ 7.3, 1975, pp. 294–297  DOI: 10.1112/blms/7.3.294
  * [Kei75] William F. Keigher  “Adjunctions and comonads in differential algebra”  In _Pacific Journal of Mathematics_ 59.1, 1975, pp. 99–112  DOI: 10.2140/pjm.1975.59.99
  * [Mar82] Per Martin-Löf  “Constructive Mathematics and Computer Programming”  In _Studies in Logic and the Foundations of Mathematics_ 104, 1982, pp. 153–175  DOI: 10.1016/S0049-237X(09)70189-2
  * [MP00] Ieke Moerdijk and Erik Palmgren  “Wellfounded trees in categories”  In _Annals of Pure and Applied Logic_ 104.1, 2000, pp. 189–218  DOI: 10.1016/S0168-0072(00)00012-9
  * [NPS90] Bengt Nordström, Kent Petersson and Jan M. Smith  “Programming in Martin-Löf’s Type Theory: An Introduction”  Oxford University Press, 1990