composition and invertibility of 2-morphisms in a quasi-category I have two very basic and concrete question about composition and invertibility of 2-morphisms in quasi-categories (which are a specific model for $(\infty, 1)$-categories).
Let $C$ be a quasi-category, so it's a simplicial set (which I view as a sequence of sets $C_0, C_1, \ldots$ with various face and degeneracy maps) where the inner horns can be filled. My understanding is that what are called 2-morphisms are the elements of $C_2$.

*

*What is the definition of a composition of two 2-morphisms (or a reference for where this is precisely stated)?

I'm not sure which 2-morphisms are composable. I just realized the following is probably wrong because I am trying to compose a 2-morphism from $0 \to 3$ with a 2-morphism from $2 \to 3$.
If $\sigma_1$ is a 2-simplex of $C$ $\sigma_1:0 \to 1 \to 3$ and $\sigma_2:1 \to 2 \to 3$ is another 2-simplex (I'm being slopping and writing $0, 1, 2$ instead of $w, x, y$ to denote $0$-simplices or objects in the hope it will make the horn filling easier to follow) then my guess to compute/define their composition as follows:
horn fill $0 \to 1 \to 2$ to a 2-simplex $\sigma_3$
now we have enough to fill the horn $\Lambda_1^3$ to get the 2-simplex $\sigma_4:0 \to 2 \to 3$ and this is an answer for a composition of $\sigma_1$ and $\sigma_2$. Is this correct?



*In an $(\infty, 1)$ category, the $n>1$ morphisms are invertible (up to higher morphism). So given a 2-morphism $\sigma_1:0 \to 1 \to 3$ representing intuitively $h\sim g \circ f$ how do we use horn filling to find the inverse? What does being invertible even mean - I'm guessing that there is a 2-simplex $\sigma_2$ such that "composing" $\sigma_1$ and $\sigma_2$ as above we get a something homotopic to $id \circ h \sim h$? I actually don't understand what it means for a 2-morphism to be invertible.
I guess each object or zero simplex gives rise to a degenerate n-simplex, and this is an identity $n$-morphism.

 A: "Composability" and "invertibility" are not, as you've noted, really the relevant primitive notions in a quasicategory. But horn-filling accounts for all the possibilities you want. The way to make this all make sense is to consider your quasicategory as generalizing the nerve of a 2-category. Given a 2-category $\mathcal K$, its nerve has $0$-simplices the objects of $\mathcal K$ and 1-simplices the 1-morphisms; a 2-simplex with boundary
\begin{array}{ccc}
x&\xrightarrow{f}&y\\&\searrow \scriptsize{h}&\downarrow \scriptsize g\\&&z
\end{array}
is a 2-morphism $\alpha:g\circ f\to h$. Higher simplices then arise from pasting diagrams in $\mathcal K$, much as for the nerve of an ordinary category. Thus the 2-simplices in a quasicategory aren't quite what you think of when you picture a 2-morphism; if $f$ is an identity, though, then such a 2-simplex corresponds precisely to a 2-morphism $g\to h$.
With this perspective, the construction you suggest does indeed capture the notion of composition of $\sigma_1$ and $\sigma_2$. Specifically, if the edges $0\to 1$ and $1\to 2$ are degenerate, then choosing the doubly degenerate 2-simplex for the $0\to 1\to 2$ face defines a composite $\sigma_1\circ \sigma_2$ that agrees with the composite in the 2-category $\mathcal K$ in case your quasicategory is the nerve of $\mathcal K$.
As for invertibility, we can tell a similar story. Given $\sigma_1$ with, again, $0\to 1$ degenerate, one can construct an "inverse" by filling a horn with $\sigma_1$ as the $0\to 1\to 3$ face, the $0\to 1\to 2$ face double degenerate, and the $0\to 2\to 3$ face degenerate on the nondegenerate edge of $\sigma_1$. Again, in case your quasicategory is the nerve of the 2-category $\mathcal K$, this reconstructs the inverse of the 2-morphism represented by $\sigma_1$.
Your construction gives a good generalization of composition to 2-morphisms, but in fact the most natural notion of composition of 2-morphisms in a quasicategory is to compose together any three 2-morphisms that fit together into an outer horn. That is, there's no good reason, from the perspective of the quasicategory, to focus on filling horns where the $0\to 1\to 2$ face is degenerate.
On the other hand, to talk about invertibility in a quasicategory it really helps to make some edges degenerate. If we picture a 2-simplex as a 2-morphism $(g,f)\to h$, then it doesn't make sense to ask for an inverse $h\to (g,f)$. A quasicategorical way of stating formally that a quasicategory "is" an $(\infty,1)$-category is, then, that "every special outer horn has a filler", where an outer horn is special if its $0\to 1$ edge (in the case of a 0-horn) or its $n-1\to n$ edge (in the case of an $n$-horn) is an equivalence (which means it might as well be degenerate.)
A: Based on Kevin Arlin's answer here is my revised understanding (decided to post as an answer because not enough space for a comment)
For composition fill, in the $\Lambda^3_1$-horn

and for inverse here is an argument using just filling inner horns:

