TITLE: How do you define the strict infinity groupoids in Homotopy Type Theory?
QUESTION [17 upvotes]: In the setting of Homotopy Type Theory, how would you construct $\mathrm{isStrict} : U \rightarrow U$ which is inhabited exactly when the first type is (equivalent to?) a strict $\infty$-groupoid?
The "obvious" (to me, at least) approach is that if you have a strict $\infty$-groupoid you want associativity to be a judgemental equality and not just a propositional equality.  However, there's a major problem with that approach, which is that composition itself has many different definitions which are all propositionally equal but not judgementally equal.  Furthemore, by univalence, you shouldn't be able to distinguish between the types which are strict $\infty$-groupoids and the types which are equivalent to strict $\infty$-groupoids.  (Similarly, isSet actually detects the property of being a $0$-type instead of being a set.)  So is there an alternative approach?

REPLY [27 votes]: I realize I'm dropping in long after all the excitement is over.  However, I'd like to point out an implicit assumption which is (seemingly) inherent in the original question as well as some of the answers: namely, that "being strict" is a property of $\infty$-groupoids, rather than a structure put on an $\infty$-groupoid.  
It is reasonable to suppose we have some kind of realization functor
$$ \Re: St\infty Gpd \to \infty Gpd,$$
so that the homotopy groups of the space $\Re G$ naturally coincide with the homotopy groups of the strict infinty groupoid $G$.  (This notion is due to Simpson, http://arxiv.org/abs/math/9810059).
Since there are notions of weak equivalence for both $\infty Gpd$ and $St\infty Gpd$, these both give (weak) $(\infty,1)$-categories, and $\Re$ is a functor between them.  If $\Re$ happened to be fully faithful as a functor of $(\infty,1)$-categories, it would be reasonable to regard strictness as a property of $\infty$-groupoids.  However, there no reason to think that is the case: being strict is not a property.
It is, of course, licit to ask "which $\infty$-groupoids are in the essential image of $\Re$", and to call that $\mathtt{isStrict}$.  However, if $\Re$ is not fully faithful, then knowledge of $\mathtt{isStrict}$ is not at all the same as "defining strict infinity groupoids".  (The same issue appears in Mike's variant involving the forgetful functor $H\mathbb{Z}Mod\to Spectra$.)
Actually, there is no need to speculate here.  There are theorems:

The category $St\infty Gpd$ is equivalent to the category $Crs$ of "crossed-complexes" (Brown-Higgins, http://groupoids.org.uk/pdffiles/x-comp.pdf).
There is a closed model structure on $Crs$, where the weak equivalences are what you expect (Brown-Golasinski, http://groupoids.org.uk/pdffiles/RB-golskyrev.pdf; see also Ara-Metayer, http://arxiv.org/abs/1010.2599).
There is an adjoint pair
$$ \pi\colon sSet \rightleftarrows Crs :N$$
where the "nerve" functor $N$ is an example of a realization functor $\Re$.  Furthermore, this adjunction is a Quillen pair relating the Brown-Golasinski model structure on $Crs$ with the Kan-Quillen model structure on $sSet$.  (Brown-Higgins, http://groupoids.org.uk/pdffiles/crossedcomplexclass.pdf; I don't think they say "Quillen pair", but they prove what is needed in section 6.)
The derived functor of $N$ is evidently not fully-faithful.  In fact (Ara, http://arxiv.org/abs/1206.2945), the homotopy category of simply connected strict $\infty$-groupoids is equivalent to $\mathcal{D}_{\geq2}(Ab)$, and any realization functor takes such objects to the evident products of Eilenberg-MacLane spaces.  There are many more maps between Eilenberg-MacLane spaces than come from the derived category, so no realization functor can be fully faithful.

It's still reasonable to ask if strictness is a structure on an $\infty$-groupoid (e.g., if $\Re$ is monadic in the $\infty$-categorical sense).  For that matter, it's reasonable to ask if "weakness" is a structure on a strict $\infty$-groupoid (e.g., if the $\infty$-categorical left adjoint to $\Re$, modelled by $\pi$ in the Brown-Higgins paper, is comonadic).  These seem like interesting questions.
Note: in the above, "strict $\infty$-groupoid" means a strict $\infty$-category in which all $k$-morphisms have inverses.  There is also a more general notion of "quasistrict $\infty$-groupoid", in which $k$-morphisms have weak inverses.  I gather less is known about these; see the paper by Ara referenced above.