Constructive lattice completion The Dedekind–MacNeille Completion is the generalized way of completing an arbitrary lattice $L$. We will call $C$ the Dedekind–MacNeille completion of $L$ (I will not go into the details of the Completion but see the comment below.) The completion includes an embedding $i: L \to C$ which preserves existing arbitrary meets and joins. The completion is universal in the sense that for any other complete lattice $C'$ and map $f: L \to C'$ that preserves arbitrary meets and joins there exists a unique map $g: C \to C'$ which preserves arbitrary meets and joins such that $f = g \circ i$. (I'm still learning category theory so please let me know if any of the above is incorrect.)
I have found an alternative completion specifically for Heyting algebras, which instead of considering the powerset of a Heyting algebra $H$ only considers the subsets of $H$ which are called complete ideals. Which are essentially ideals that additionally contain the join of any subset of the ideal, if that join exists. This completion must be equivalent to the Dedekind–MacNeille Completion by the universal property, right?
This is of interest to me because I want to peform a completion in a setting that does not have access to the powerset axiom (particularly CZF). The standard approach is to develop lattice theory for classes and give up the fact that the completion of an arbitrary lattice is provably a set. Before I pursue this I want to tie up this loose end in my mind. Because initially I was under the impression that I may be able to collect the complete ideals into a set without use of the powerset axiom, but that seems to not be the case.
 A: I claim that for lattices, the Dedekind-MacNeille completion is generally different from simply the collection of all ideals that are closed under taking all least upper bounds.
If $X$ is a poset, and $A\subseteq X$, then let ${\uparrow}A$ be the set of all upper bounds of $A$, and let ${\downarrow}A$ be the set of all lower bounds of $A$ (if there is any possible confusion about the set $X$, then write ${\uparrow}_{X}A$ for ${\uparrow}A$ and ${\downarrow}_{X}A$ for ${\downarrow}A$).
The Dedekind-MacNeille completion $DM(X)$ of a poset $X$ is typically defined to be the collection of all sets of the form ${\downarrow}A$ where $A\subseteq X$. Equivalently, $DM(X)$ is the collection of all subsets $A\subseteq X$ such that $A={\downarrow\uparrow}A$. Clearly, each set of the form ${\downarrow}A$ is downwards closed and also closed under taking all least upper bounds. However, I claim that even for lattices, there are subsets that are closed under taking all least upper bounds which are not of the form  ${\downarrow}A$.
If $C$ is a set and $\lambda$ is a cardinal, then define $P_{\lambda}(C)$ to be $\{R\subseteq C:|R|<\lambda\}$. Let $A,B$ be infinite sets with $A\subseteq B,A\neq B$. Then let $X=P_{\omega}(B)$. Then whenever $\mathcal{R}\subseteq P_{\omega}(A)$ is a subset with a least upper bound in $X$, we necessarily have $\bigvee\mathcal{R}\in P_{\omega}(A)$, so
$P_{\omega}(A)$ is an ideal in $X$ closed under taking all least upper bounds. On the other hand, ${\uparrow}_{X}P_{\omega}(A)=\emptyset$, so ${\downarrow_{X}\uparrow_{X}}P_{\omega}(A)=X$, so the ideal $P_{\omega}(A)$ is not contained in the Dedekind-MacNeille completion of $X$.
It is well known that if $B$ is a Boolean algebra, then the Dedekind-MacNeille completion $DM(B)$ is also a Boolean algebra, and $DM(B)$ is simply the collection of all complete ideals of $B$.
A: Joseph Van Name’s answer is correct for the general case. However, the OP indicated in comments that they are interested in the case where $L$ is a Heyting algebra, and then it turns out that the Dedekind–MacNeille completion can be constructed by taking the set of complete ideals of $L$ ordered by inclusion. (I’m frankly quite surprised, since for Heyting algebras, typically ideals are broken, and what works are filters. But here it seems to be the opposite.)
Using the notation in Joseph Van Name’s answer, it suffices to show that if $I\subseteq L$ is a complete ideal, and $a\in{\downarrow\uparrow}I$, then $a\in I$. Now, if $c\in L$ is any element such that $a\land b\le c$ for all $b\in I$, then $a\to c\in{\uparrow}I$, hence $a\le a\to c$, i.e., $a\le c$. Thus, we have established
$$a=\bigvee\{a\land b:b\in I\}=\bigvee\{b\in I:b\le a\}.$$
Since $I$ is a complete ideal, it follows that $a\in I$.
It is also easy to check that the Dedekind–MacNeille completion of $L$ is a Heyting algebra, with relative pseudocomplement operation (extending that of $L$) defined for complete ideals $I$, $J$ by
$$I\to J=\{a\in L:I\cap{\downarrow}a\subseteq J\}.$$
In particular, $I\to J$ is itself a complete ideal: if $a=\bigvee_ia_i$ with $a_i\in I\to J$, and $b\in I\cap{\downarrow}a$, then $b\land a_i\in J$ for each $i$, and $b=\bigvee_i(b\land a_i)$, hence $b\in J$.
