This is a cross-post from [MSE](https://math.stackexchange.com/questions/2473216/do-trivial-homotopy-groups-imply-existence-of-boundary-preserving-homotopies).


Let $N$ be a smooth $d$-dimensional connected orientable manifold which have the following property:



> 
> For every smooth $d$-dimensional manifold $M$ with **non-empty boundary**, and for every smooth maps $f\_0,f\_1:M \to N$ such that $f\_0|\_{\partial M}=f\_1|\_{\partial M}$, there exist a (smooth) homotopy $f\_t$ which respects the boundary, i.e such that $f\_0|\_{\partial M}=f\_t|\_{\partial M}$ for all $t$.
> 
> 
> 


(Note I am only testing $N$ with "sources" $M$ of the same dimension.)


$N=\mathbb{R}^d$ is an example; take $f\_t=tf\_0+(1-t)f\_1$.


A necessary condition for $N$ to have this property is $\pi\_k(N)=\{1\}$ for $1 \le k \le d$. (See below if interested). One can [show](https://math.stackexchange.com/questions/2473216/do-trivial-homotopy-groups-imply-existence-of-boundary-preserving-homotopies#comment5124504_2473216) then that the theorems of Whitehead and Hurewicz imply $N$ is contractible.



> 
> **Question:** If $N$ is contractible, does it have the property?
> 
> 
> 


(For a start, let's try to see if there exists a continuous boundary respecting homotopy, and worry later about smoothing it).




---


*Proof that $\pi\_k(N)=\{1\}$ is necessary:*


Suppose $N$ has the property, and let $\alpha\_1,\alpha\_2:(\mathbb{S}^k,p) \to (N,q)$. Since $\mathbb{S}^k \cong D^k /\partial D^k$ We can think of the $\alpha\_i$ as maps $D^k \to N$ taking the boundary $\partial D^k$ to $q$.


Let $M=D^k \times \mathbb{R}^{d-k}$, and define $f\_i:M \to N$ by $$ f\_i(t,x)=\alpha\_i(t).$$


Then $f\_0|\_{\partial M}=f\_1|\_{\partial M}$. By assumption, there exist a boundary respecting homotopy $f\_s$;


Now $f\_s(\cdot,0)$ is a homotopy of $\alpha\_1,\alpha\_2$ fixing the boundary.



Do trivial homotopy groups imply existence of boundary preserving homotopies?
Let me first talk only about continuous maps. Your question becomes equivalent to asking whether every map from $\partial (M\times I) \to N$ (for $I$ the interval) can be extended to $M\times I$. This follows from the following two facts. 


1) $\partial (M\times I) \to M\times I$ is cofibration.


2) If $i: A \to B$ is a cofibration, $X$ is any space and $f: A \to X$ and $g: B \to X$ are maps such that $gi \simeq f$, then there exists a $g': B \to X$ such that $g'i = f$. 


We apply this to the case $A = \partial (M\times I)$, $B = M\times I$ and take $g$ to be a constant map; as $N$ is contractible the corresponding triangle commutes up to homotopy and we can use (2). 


Proof of 1): The inclusion $\partial (M\times I) \to M\times I$ is a neighborhood deformation retract (NDR) since it has a collar. (This is true for every topological manifold with boundary by Brown's *Locally flat imbeddings of topological manifolds*, but there is of course a simpler argument available in our case.) Every NDR is a cofibration. 


Proof of 2): Let $H: A \times I \to X$ be a homotopy with $H|\_{A\times 0} = gi$ and $H|\_{A\times 1} = f$. Because $i$ is a cofibration, we can extend this to a map $H': B \times I$ that agrees with $H$ on $A\times I$. We set $g' = H'|\_{B\times 1}$. 


To obtain a smooth homotopy, one should first make sure that our map $M\times I \to N$ is smooth on a neighborhood of the boundary using a collar; then one can apply a smooth approximation theorem that does not change the map on a given closed subset such that the map was already smooth in a neighborhood of it. 


