Generalized Categories for "Higher Homotopy Groupoids" I was thinking about the definition of higher homotopy groups $\pi_n$ of a topological space in comparison to the common extremely formal fundamental groupoid construction of $\pi_1$. I'd like to be able to do a similar construction in higher dimensions, and so I was wondering whether a principle similar to the following has been explored. Alas, the idea of these higher groupoids being a category fails for obvious reasons. We'll call this thing a groupesque. I won't give a definition of a groupesque in general - one of my questions is whether such a definition already exists - but I will describe the structure of the "homotopy groupesque." (The name is very conscious - the description that follows is grotesque.)
Throughout, consider all $n$-spheres, including $n$-spheres which are the boundary of $(n+1)$-disks, as being based spaces with a canonically chosen basepoint. Also, I may forget to apply the prefix "homotopy class of" to the word "map"; I apologize, and clarify ahead of time that every map in this post is actually considered up to homotopy.
The setup for the problem is quite long, but I imagine that a reader with an answer won't need to read much of it before they know exactly what I'm asking.

In the fundamental groupoid, our objects are points and maps are homotopy classes paths, maps $I^1\to X$ with appropriate boundary. In particular, our hom-sets are associated, as in any category, to pairs (a,b) of points. Equivalently, they are associated to maps $S^0=\partial I^1\to X$. This latter description has the convenient property that $\hom(a,b)$ is the set of homotopy classes of maps, relative the boundary, which "restrict to (a,b)" in the sense just described.
In the homotopy groupesques $\Pi_n$, we'd like our morphisms to be classes of maps $D^n\to X$ relative the boundary, and we'd like hom-sets to be associated to homotopy classes of maps $S^{n-1}\to X$, so that $\hom(f)$ is the set classes of maps $D^n\to X$ with $f$ as their boundary map (up to homotopy).
The "automorphism groups" of this groupesque in the traditional sense should end up being the hom-groups of constant map; this is nice, since these maps factor through maps from spheres.
But we still have no concept of composition, so when should there be a composition map on $\hom(f)\times\hom(g)$, and which hom-group does it land in? Note that the maps $f:S^{n-1}\to X$ that we're associating hom-sets to are actually elements of some automorphism group of $\Pi_{n-1}$, the previous homotopy groupesque. Basically, we'll say that we we can compose maps at $f$ with maps at $g$ is they lie in the same automorphism group, and hence if we can compose $f$ and $f$ as maps in $\Pi_{n-1}$. (This is where the basedness of all our spheres comes into play. We can compose them if and only if they map the baspoint to the same point.) In particular, composition runs $\hom(f)\times\hom(g)\to\hom(f\star g)$.
Note that this doesn't correspond in any obvious way with the case $n=1$: composition of those maps has nothing to do with a basepoint. This is an acceptable chimera.
Inductively, we can now check that the "automorphism groups" are genuinely what I just claimed they are, but this is where it gets interesting: there is always a composition $\hom(f)\times\hom(f)$ for any $f$, but if it happens to land in $\hom(f)$, then this implies that $f\star f=f$, which is if and only if $f$ is homotopically trivial.
Note that since maps no longer have a "source and target," it is not clear what an inverse is at all in general. However, when $f$ is homotopically trivial and we have a monoid structure this is clear. In that case, we can see that inverses to exist, and that our group structure corresponds to that of the higher homotopy group.
One last note: be sure that you see that $\Pi_1\neq\Pi$! The first homotopy groupesque is not the fundamental groupoid! In particular, hom-sets are associated to homotopy classes of maps $S^0\to X$, so we basically ended up with the skeleton of $\Pi$.

Finally, the questions:


*

*Does this even make sense? There are so many places I could've gone astray while formulating this in the first place, that it's possible that something went wrong and these "groupesques" do not encode the homotopy groups at all.


*Is this a higher category? I've thought and thought and I just can't seem to get it this object into that framework. The major issue is that even with an $\infty$-category structure, $n$-morphisms are attached to a pair of $(n-1)$-morphisms. It's not clear where "pairs" of anything comes into the picture here. (The higher-category approach seems to give "groups of maps from the $n$-torus" maybe, but not from the sphere.)


*Do groupesques as a generalization of groupoids have a name? Is there a broader generalization of categories where hom-sets are associated to a single thing (rather than two), and some rule describes when a composition is defined and where it lands? (A traditional category is then one where the "single thing" is a pair of objects, and the "rule" checks whether the target of the first equals the source of the last.)

 A: If you have an idea, first try it out for n=2, i.e. a (weak) 2-groupoid, but before doing that first look at the various non-technical descriptions of this problem in Ronnie Brown's work. (He has various introductory articles on his website. His http://www.groupoids.org.uk/hdaweb2.html is a good place to start.)  Doing things using n-cubes is easier than trying to do it with n-discs. 
Note that Ronnie's approach does not get models for all homotopy types, but I doubt yours will either (if you can adapt it so as to work in detail). 
An essential step is to get to understand what a Kan complex is!!! There are numerous introductions to simplicial sets available on the web or in books, which explain what they are and why they are thought to be thought of as being weak inifinity groupoids. Look on the links from my n-lab page for some introductory articles (pdf format).
A: Here is some background. In 1965 I noticed that the proof of the van Kampen theorem for the fundamental groupoid seemed to generalise to dimension 2, but there was a lack of a suitable gadget, a homotopy double groupoid. I also noticed that a proof due to J.F. Adams that any map $ S^r \to S^n$ for $ r < n $ is inessential (7.6.1 of Topology and Groupoids) should have algebraic consequences, but again there was no appropriate algebraic gadget. Nine years later we had found out a lot about double groupoids and crossed modules, but were still lacking the homotopy double groupoid! Then Philip Higgins and I did a strategic analysis which went as follows: 


*

*J.H.C. Whitehead had a subtle theorem on $\pi_2(X \cup_\lambda e^2_\lambda,X,x)$ as a free crossed $\pi_1(X,x)$-module. This was an example, maybe the only then  example, of a $2$-dimensional universal property in homotopy theory. (here is a link to an  exposition of Whitehead's proof). 

*If our conjectured $2$-dimensional van Kampen theorem was to be any good it should have Whitehead's theorem as a corollary. 

*Whitehead's  theorem was about relative homotopy groups. 

*So we should look for homotopy double groupoids in a relative situation, i.e. a space $X$ and a subspace $A$. 

*The simplest way of doing this we could think of was to consider 

as in the above diagram maps of a square into $X$ which takes the edges into $A$ and the vertices to a subset $C$ of $A$ and to take homotopy classes of these rel vertices of the square. The proof that this works and gives  a strict double groupoid is not entirely trivial! To my knowledge, this was the first example of a strict higher homotopy groupoid. 
To our delight, this went swimmingly, and we were able to prove a $2$-d van Kampen theorem which had Whitehead's theorem as a Corollary. In fact we computed for example $\pi_2(X \cup_f CA,X,x)$ with Whitehead's theorem the case $A$ (not now a subspace) was a wedge of circles. 
R. Brown amd P.J. Higgins, ``On the connection between the second
relative homotopy groups of some related spaces'', Proc.
London Math.  Soc. (3) 36 (1978) 193-212.
Another surprise was that the submitted paper was asked to be withdrawn, in order not to embarrass the editor and two international authorities! A request for more information got another referee and a request (order?) to cut the paper by one third.  So the final paper had no pictures, and some slicker arguments. 
We also managed to work out the results for filtered spaces, and so all dimensions, and these were published in JPAA, 1981. See the book on Nonabelian algebraic topology. 
I emphasise that the basic methods were cubical, and we were unlikely  to conjecture let alone  prove these results using globular or simplicial methods. 
I like to think that these methods fulfill the dreams of the topologists of the early 20th century to find higher dimensional versions of the nonabelian fundamental group, since the nonabelian nature of the fundamental group was known to be useful in geometry and analysis.  
Over to you, reader, to get such  applications! 
Added 28 April: The contrast with what are  called in the literature "fundamental higher groupoids'' is that:(i)  those do not generalise the usual fundamental groupoid since they are not strict, and are just  singular complexes; (ii)  while they do satisfy some version of what is called the "small simplex theorem" that  does not  directly imply  strict colimit theorems in higher dimensions of a nonabelian type; (iii) the versions of higher groupoids we have worked with are strict structures, are defined non trivially for filtered spaces or $n$-cubes of spaces, and satisfy  nonabelian  colimit theorems with consequences not so far obtainable by other means. See for example the nonabelian tensor product of groups. 
These ideas relate  to and are aimed at relative homotopy theory, and $n$-adic homotopy theory, and I hope are seen in low dimensions as relevant to geometric group theory and  to geometric topology. 
The point is that one needs to evaluate what different approaches do and do not do, to compare and contrast. 
See also the question and answer to Infinity-categories vs Kan complexes 
Aug 5, 2014. The diagram there suggests  how convenient cubical methods are for multiple compositions, compared with simplicial or globular methods. 
July 7, 2014: A presentation   I gave to a workshop at the IHP,  Paris, June 5, 2014, entitled "Intuitions for cubical methods in nonabelian algebraic topology" is available on my preprint page. 
See also this stackexchange answer on homotopical excision in dim 2. 
Aug 5, 2014 A point should be made about the book on Nonabelian Algebraic Topology referred to above, and the foundations of algebraic topology, and in particular of homology theory. A key idea there is that of formal sums of geometric elements, an idea introduced by Poincaré. A definition of boundary then allows the notion of cycle, and boundary.  The more geometric method, as in this book, is that a "chain" is defined for a filtered space, and in dimension > $1$ is an element of a relative homotopy group. The "composition" of such chains is the composition in the relative homotopy groups. However cubical homotopy groupoids are used to prove many crucial properties of such chains. 
