The hook deflects up to the undercut y during assembly and snaps back once it clears the mating part. Colour shows the strain level (green → orange → red).
$$\varepsilon = \frac{3\,h\,y}{2\,L^{2}}, \qquad y_{\text{perm}} = \frac{2\,\varepsilon_{\text{perm}}\,L^{2}}{3\,h}$$
Maximum strain ε at the root and the allowable undercut y_perm. h: root thickness, L: beam length, y: undercut. Strain scales with thickness and inversely with the square of length.
$$P = \frac{3\,E\,I\,y}{L^{3}}, \qquad I = \frac{b\,h^{3}}{12}$$
Deflection force P (the force to bend the hook to the undercut y). E: Young's modulus, I: second moment of area, b: width.
$$W = P\cdot\frac{\mu+\tan\alpha}{1-\mu\tan\alpha}, \qquad W' = P\cdot\frac{\mu+\tan\alpha'}{1-\mu\tan\alpha'}$$
Insertion force W and removal force W'. μ: friction coefficient, α: insertion lead angle, α': return angle. When the denominator reaches zero or below, the joint becomes self-locking (permanent).