We know that in general, there is no smooth manifold structure on $Hom(X,\, Y)$ where $X$ and $Y$ are smooth manifolds, but under *certain nice conditions* (see <https://ncatlab.org/nlab/show/manifold+structure+of+mapping+spaces>) we can give a smooth structure on $Hom(X, \, Y)$.


Let $\mathcal{G}$ and $\mathcal{H}$ be two Lie groupoids. Now let us consider the category $Hom(\mathcal{G}, \, \mathcal{H})$ whose objects are homomorphisms of Lie groupoids and the morphisms are smooth natural isomorphisms.



> 
> **Question 1.** Under what conditions on $\mathcal{G}$ and $\mathcal{H}$, we have a (canonical) Lie groupoid structure on $Hom(\mathcal{G}, \, \mathcal{H})$?
> 
> 
> 



> 
> **Question 2.** Is $Hom(\mathcal{G}, \, \mathcal{H})$ always a diffelogical groupoid in general?
> 
> 
> 


It would be also great if someone can suggest some literature in this direction.



Is there any Lie groupoid structure on $Hom(\mathcal{G}, \mathcal{H})$ where $\mathcal{G}$ and $\mathcal{H}$ are Lie groupoids?
As Dmitri points out, given a cartesian closed category $S$, the groupoid of functors and natural transformations between fixed internal groupoids $X$ and $Y$ is again an internal groupoid: this result goes back to Charles Ehresmann, but it is not difficult to write down this construction directly.


However, since you mentioned the infinite dimensional manifolds of smooth maps between manifolds, then I'd like to push back against Dmitri's claim of 'almost never', since you clearly aren't just thinking of manifolds as being finite dimensional.


In


* DMR, Raymond Vozzo, *Smooth loop stacks of differentiable stacks and gerbes*, Cahiers de Topologie et Géométrie Différentielle Catégoriques, Vol LIX no 2 (2018) pp 95-141 [journal version](http://cahierstgdc.com/index.php/volume-lix-2018/), [arXiv:1602.07973](https://arxiv.org/abs/1602.07973)


we show that given a finite open cover $\{U\_i\}$ of $I$, or of $S^1$ with the property that triple intersections are empty, the hom-groupoid $\mathbf{LieGpd}(\check{C}(U),X)$ is a Fréchet Lie groupoid for any finite-dimensional Lie groupoid $X$. Here $\check{C}(U)$ is the Lie groupoid with objects $\bigsqcup\_i U\_i$ and morphisms $\bigsqcup\_{i,j} U\_i\cap U\_j$. A priori this is just a diffeological groupoid but we show the spaces of objects and morphisms are Fréchet manifolds and the source and target maps are submersions (in the strong sense that there are submersion charts, not that tangent spaces map surjectively).


In the short announcement paper


* DMR, Raymond Vozzo, *The smooth Hom-stack of an orbifold*, In: Wood D., de Gier J., Praeger C., Tao T. (eds) 2016 MATRIX Annals. MATRIX Book Series, vol 1 (2018) doi:[10.1007/978-3-319-72299-3\_3](https://doi.org/10.1007/978-3-319-72299-3_3), [arXiv:1610.05904](https://arxiv.org/abs/1610.05904), [MATRIX hosted version](https://www.matrix-inst.org.au/2016-matrix-annals/)


we make the more general claim that given a compact manifold $M$, and a finite open cover satisfying a certain minimality condition (and a topological condition on finite intersections of their closures), the analogous hom-groupoid is also a Fréchet Lie groupoid. The longer paper containing the more delicate proofs for this case is still in preparation, but halted due to other commitments by its authors.


I suspect that these results might be able to be pushed a tiny bit further, say to the case where $\check{C}(U)$ is replaced by the analogous thing that arises from a finite open cover of a compact orbifold, but that is just intuition, we aren't pursuing that line of inquiry.


**Added** I should have said, given a compact manifold $M$, the groupoid $\mathbf{LieGpd}(M,X)$ is Fréchet–Lie as well. If one is wiling to have more general smooth manifolds, then taking $M$ to be non-compact this is a Lie groupoid modelled on merely locally convex spaces. The topology has to be chosen carefully, it's the sort of thing my co-author Alexander Schmeding works on.


