tau'(x_i)) - \sum_{i=1}^{p-1} p^{-1}\binom{p}{i} \tau'(x_i)^{i}\epsilon_i^{p-i}.
$$
This extends to a $\delta$-structure on $S [\![ \epsilon_1, \dots, \epsilon_n]\!]$ with the desired properties. 

Finally, applying the $q$-PD envelope \cite[Lemma~16.10]{BS} construction over $(S,J)$ to the $(p, [p]_q)$-completely flat $\delta$-$S$-algebra $S [\![ \epsilon_1, \dots, \epsilon_n]\!]$ and the regular sequence $\epsilon_1,\dots, \epsilon_n$, we obtain $(\tilde{S}, \tilde{J})$. We denote by $f:(S,J)\xr{} (\tilde{S},\tilde{J})$ and $\tau: (\tilde{R}, I\tilde{R}) \xr{} (\tilde{S}, \tilde{J})$ the induced morphisms in $(R/D)_{q-\mathrm{crys}}$.

In order to show that $(\tilde{S}, \tilde{J})$ is the coproduct of $(S, J)$ and $(\tilde{R}, I\tilde{R})$, we can use the universal property of a $q$-PD envelope. For morphisms $g_{S}: S\xr{} T$ and $g_{\tilde{R}}: \tilde{R} \xr{} T$ in $(R/D)_{q-\mathrm{crys}}$, it suffices to show that there is a unique morphism of $\delta$-rings $g:S [\![ \epsilon_1, \dots, \epsilon_n]\!] \xr{} T$ such that $g\circ \tau=g_{\tilde{R}}$, $g\circ f = g_{S}$, and which maps the ideal $(\epsilon_1, \dots, \epsilon_n)$ into the $q$-PD ideal of $T$. Only the morphism of $S$-algebras induced by $\epsilon_i \mapsto g_{\tilde{R}}(x_i)-g_S(\tau'(x_i))$ satisfies these properties.   

We still need to show the existence of a section $\tilde{S}\xr{} S$ in the category of $S$-modules. 
Let $\gamma_p(a)=\frac{\phi(a)}{[p]_q}-\delta(a)$, we have $\gamma_p(\tilde{J})\subset \tilde{J}$. 
We set $\gamma_1={\rm id}_{\tilde{S}}$, $\gamma_{p^k}=\gamma_p\circ \gamma_{p^{k-1}}$, for all $k\geq 1$, and for any positive integer $i$ with $p$-adic expansion $i=\sum_{k=0}^{\infty} i_k p^k$, 
we set $\gamma_i(a) = \prod_{k=0}^{\infty} \gamma_{p^k}(a)^{i_k}$. This defines maps $\gamma_i: \tilde{J}\xr{} \tilde{J}$. 

For each $I=(i_1,\dots, i_n)\in \mathbb{Z}_{\geq 0}^n$, we set 
\begin{equation}\label{equation-gamma-I}
\Gamma_I:= \prod_{\substack{j=1\\i_j\neq 0}}^{n} \gamma_{i_j}(\epsilon_j),
\end{equation}
and claim that  
\begin{equation}\label{equation-lots-of-sections}
\left(\bigoplus_{I\in \mathbb{Z}_{\geq 0}^n} S \cdot \Gamma_I \right)^{\wedge} \xr{} \tilde{S},
\end{equation}
is an isomorphism of $S$-modules, where the left hand side is the derived $(p,[p]_q)$-completion. Indeed, $(p,[p]_q)$-completion is the same as $(p,q-1)$-completion, and by the derived Nakayama lemma it suffices to show the isomorphism after derived base change $\otimes^L_{S} S/(p,q-1)$. Both modules are $(p,[p]_q)$-completely flat, hence derived base change reduces to simple base change $\otimes_S S/(p,q-1)$. After reduction modulo $q-1$ the map already becomes an isomorphism. Indeed, $\tilde{S}/q-1$ is the $p$-completion of the pd-envelope of $S/(q-1)[\![ \epsilon_1, \dots, \epsilon_n]\!]$ along $(\epsilon_1, \dots, \epsilon_n)$, and 
$$
\Gamma_I \equiv \prod_j \frac{\epsilon_j^{i_j}}{[i_j!]_p} \mod q-1,
$$ 
where $[n]_p$ denotes the largest $p$-power dividing $n$.

By using \eqref{equation-lots-of-sections} and projecting to the summand corresponding to $I=0$, we obtain the desired section.
\end{proof}
\end{proposition} 


\subsection{$q$-crystals}
For a $D$-algebra $E$, we have the abelian category of derived $(p,[p]_q)$-complete $E$-modules  ${\rm Mod}^{\wedge}_E$ at our disposal (see Appendix \ref{appendix-descent}). For a morphism of $D$-algebras $f:E\xr{} E'$, there is a right exact base change functor  
$$
f^*:{\rm Mod}^{\wedge}_E \xr{} {\rm Mod}^{\wedge}_{E'}, \quad M\mapsto E'\widehat{\otimes}_E M. 
$$


\begin{definition}[$q$-crystals]

A {\em $q$-crystal on $(R/D)_{q-\mathrm{crys}}$} is a derived $(p,[p]_q)$-complete $E$-module $M_E$ for each $(E,J)\in (R/D)_{q-\mathrm{crys}}$ together with isomorphisms 
$$
M_f:f^*M_E \xr{} M_{E'}, 
$$
for each $f: (E,J)\xr{} (E',J')$ in $(R/D)_{q-\mathrm{crys}}$ that satisfy 
$$
M_{g\circ f} =  M_g\circ g^*(M_f)
$$
for all $f: (E,J)\xr{} (E',J')$ and $g: (E',J') \xr{} (E'', J'')$.

A {\em morphism of $q$-crystals} $u$ consists of a morphism of derived $(p,[p]_q)$-complete $E$-modules 
$$
u_E: M_E \xr{} M'_{E}
$$ 
for every $(E,J)$ in $(R/D)_{q-\mathrm{crys}}$ such that 
$$
u_{E'}\circ M_f = M'_f \circ  f^*(u_E)
$$
for all $f: (E,J)\xr{} (E',J')$.

We denote the category of $q$-crystals by $q{\rm -Cris}(R/D)$.

A $q$-crystal $M$ is called {\em $(p,[p]_q)$-completely flat} if $M_E$ is $(p,[p]_q)$-completely flat for every $(E,J)$ in $(R/D)_{q-\mathrm{crys}}$ (see Appendix \ref{appendix-completely-flat} for the definition of $(p,[p]_q)$-completely flat modules).
\end{definition}

\subsection{}\label{subsection-stratifiactions}
Let $\tilde{R}$ be as in Proposition \ref{proposition-retractions}. As a first step towards understanding $q{\rm -Cris}(R/D)$, we will outline which objects $q$-crystals induce on $\tilde{R}$. This will lead to the definition of {\em $q$-HPD stratifications}. The main result in this section will be an equivalence of categories between $q$-crystals and $q$-HPD stratifications if coordinates exist. This is analogous to the equivalence for the crystalline theory \cite[\textsection6]{BO}. 

Consider the diagram 
\begin{equation} \label{equation-delta-diagram}
\xymatrix{ \tilde{R} \ar@<1ex>[r]^-{\delta^1_0} \ar@<-1ex>[r]_-{\delta_1^1} &  \tilde{R}[\![ \epsilon_1,\dots,\epsilon_n]\!]  \ar@<3ex>[r]^-{\delta^2_0} \ar@<0ex>[r]^-{\delta^2_1} \ar@<-3ex>[r]^-{\delta^2_2} &  \tilde{R}[\![ \epsilon_1,\dots,\epsilon_n, \tau_1, \dots, \tau_n ]\!]},
\end{equation}
where $\delta^1_0(x_i)=