# Constant-Time Complete Visibility for Robots with Lights: The Asynchronous Case +
## 6 Stage 1-Interior Depletion
### Stage 1.1-Making Corners of \(\mathbf{P}\) the Corners of \(\mathbf{P}^{\prime}\)
The following lemma deals with visibility of the neighboring corners. **Lemma 12**. : _Corner \(c_{i}\) of \(\mathbf{P}^{\prime}\) sees both neighboring corners \(c_{i-1}\) and \(c_{i+1}\)._  
Proof. : Since \(c_{i}\), \(c_{i-1}\), and \(c_{i+1}\) were the endpoints of \(S_{a}\) and \(S_{b}\) of \(\mathbf{P}\) and now moved to their \(EA(*)\), the remaining side robots in \(S_{a}\) and \(S_{b}\) do not block the view of \(c_{i}\) to see both \(c_{i-1}\) and \(c_{i+1}\). This is because \(c_{i}\) and \(c_{i-1}\) and \(c_{i}\) and \(c_{i+1}\) are not in the sides \(S_{a}\) and \(S_{b}\) anymore, and the interior robots of \(\mathbf{P}\) remain as interior in \(\mathbf{P}^{\prime}\) (Lemma 9). Corner \(c_{i}\) waits until \(r_{a}\) and \(c_{i-1}\) satisfy one of the conditions below for side \(S_{a}\) and \(r_{b}\) and \(c_{i+1}\) satisfy a corresponding condition for side \(S_{b}\). 1. If \(r_{a}\) is corner \(c_{i-1}\), then \(c_{i-1}\) has color \(\in\{\texttt{corner1},\texttt{corner2},\texttt{corner3},\texttt{corner}\}\). 2. If \(r_{a}\) is the only side robot on \(S_{a}\), then \(r_{a}\) has color side1 and \(c_{i-1}\) has color \(\in\{\texttt{corner1},\texttt{corner2},\texttt{corner3},\texttt{corner}\}\). Figure 10: An illustration of how a corner \(c_{0}\) of \(\mathbf{P}\) moves during Stage 1.1. * If \(r_{a}\) is one of multiple side robots on \(S_{a}\), then \(r_{a}\) has color special and \(c_{i-1}\) has color \(\in\) {corner1, corner2, corner3, corner}. When the robots of both sides adjacent to \(c_{i}\) satisfy the appropriate conditions, then \(c_{i}\) takes a color changing action as follows. If at least one robot is inside corner triangle \(T(c_{i})\) (defined with respect to \(\mathbf{P}^{\prime}\)), then change color to corner2. Otherwise, if at least one robot is in the interior of \(\mathbf{P}^{\prime}\), then change color to corner3, but, if no robot is in the interior of \(\mathbf{P}^{\prime}\), change color to corner. Lemma 13: _When Stage 1.1 finishes, all the corners of \(\mathbf{P}^{\prime}\) are colored \(\in\) {corner2, corner3, corner}._  
Proof. : If there is a corner of \(\mathbf{P}^{\prime}\) with color start, ready, ready_moving, then either condition \(C1\) or conditions \(C2\) and \(C3\) do not hold for at least one corner of \(\mathbf{P}^{\prime}\) with color corner1, and that corner cannot change its color to corner2, corner3, or corner. Lemma 14: _All corners of \(\mathbf{P}^{\prime}\) are colored \(\in\) {corner2, corner3, corner} in (at most) one epoch after they are colored corner1._  
Proof. : The proof is immediate since, after all corners of \(\mathbf{P}^{\prime}\) are colored corner1, either condition \(C1\) or both \(C2\) and \(C3\) hold for each corner of \(\mathbf{P}^{\prime}\). The corollary below follows from Lemmas 11 and 14. Corollary 1: _Stage 1.1 finishes in (at most) four epochs._  
Stage 1.2: Positioning the Robots Inside Corner Triangles of the Corners of \(\mathbf{P}^{\prime}\) on the Corner Line Segments  
Note that after Stage 1.1 finishes, the corner robots of \(\mathbf{P}^{\prime}\) have color corner2, corner3, or corner. The side robots of \(\mathbf{P}\) have color sidel or special. The interior robots of \(\mathbf{P}^{\prime}\) have color start. We first provide an high level overview of an algorithm that finishes Stage 1.2 in \(\mathcal{O}(\log N)\) epochs and then provide details of an algorithm that runs Stage 1.2 in \(\mathcal{O}(1)\) epochs. The \(\mathcal{O}(\log N)\)-epoch algorithm for Stage 1.2 works as follows. The goal is to move all the interior robots inside corner triangles to position them on the corner line segments \(CL_{i}\). First, two robots are positioned on \(CL_{i}\) of each triangle sequentially, if no such two robots are already on \(CL_{i}\). In fact, the robots that are closest to \(CL_{i}\) are chosen to perform those actions. Others remain stationary. Those robots that now moved to \(CL_{i}\) are colored differently to indicate that they are on that line segment. This can be done in \(\mathcal{O}(1)\) epochs.