  In this note we generalize the construction, due to Ghilardi, of the free
Heyting algebra generated by a finite distributive lattice, to the case of
arbitrary distributive lattices. Categorically, this provides an explicit
construction of a left adjoint to the inclusion of Heyting algebras in the
category of distributive lattices This is shown to have several applications,
both old and new, in the study of Heyting algebras: (1) it allows a more
concrete description of colimits of Heyting algebras, as well as, via duality
theory, limits of Esakia spaces, by knowing their description over distributive
lattices and Priestley spaces; (2) It allows a direct proof of the amalgamation
property for Heyting algebras, and of related facts; (3) it allows a proof of
the fact that the category of Heyting algebras is co-distributive. We also
study some generalizations and variations of this construction to different
settings. First, we analyse some subvarieties of Heyting algebras -- such as
Boolean algebras, $\mathsf{KC}$ and $\mathsf{LC}$ algebras, and show how the
construction can be adapted to this setting. Second, we study the relationship
between the category of image-finite posets with p-morphisms and the category
of posets with monotone maps, showing that a variation of the above ideas
provides us with an appropriate general idea.
