It is basically the same proof as (part of) the proof that the relation "being connected by a path" is an equivalence relation, which is a well known fact.
Suppose is a metric space, where both A and B are path-connected. Suppose as well that A and B have a common, path-connected set, K. Is S path connected as well?
I think it is. Here's a proof I worked out:
Take any p and q in S. We can assume that p is in A and q is in B since if both p and q were in A, there would exist a path between them by path-connectedness of A. Same deal if both p and q were in B. Anyway, we know that , so take any . By path-connectedness of A, there is a path from p to z. That is, there is a continuous map such that f(a) = p and f(b) = z. Now, by path-connectedness of B, there is a continuous map such that g(c) = z and g(d) = q. Let h(x) = g(x - b + c). Note that this is just the function g "shifted over". We see that g(c) = h(b) and g(d) = h(d + b - c). Thus h is a continuous map from [b, d + b - c] to B such that h(b) = g(c) = z and h(d + b - c) = g(d) = q. Thus h is a path from p to q.
Consider the function defined as follows: I(x) = f(x) if x is in [a,b] and I(x) = h(x) = g(x -b + c) if x is in [b, d + b - c]. The only point we need only to worry about for continuity of I(x) is x = b. Note that f(b) = z
and h(b) = g(b - b + c) = g(c) = z. Thus I(x) is also continuous at
x = b and obviously for all other x in the interval, thus I(x) is continuous on [a, d + b - c]. Note I(a) = f(a) = p and I(d + b - c) = h(d + b - c) = g(d) = q. Thus I(x) is a path from p to q and the metric space S is path-connected.
I don't see any flaw in my proof, but I didn't use the fact that a subset of A and B's intersection is path-connected. So I'm wondering if my proof is okay?
P.S. What you said is true for an arbitrary number of intersecting (no need for the intersection to be path connected) path connected subspaces.
what you write is of course true.
Nevertheless, he only needs this for a special case, for functions defined on intervals intersecting in single point, which is quite easy to prove (I am tempted to say trivial) and perhaps more appropriate for beginner's level.
Anyway, thank you for a useful comment.
I googled to find some link to gluing lemma (and to find whether it is on wikipedia).
I found this Gluing lemma - Topospaces and at the same time I stumbled upon the website Topospaces which I did not know before.
this post (they have similar names) and so you can imagine my wonderment at their lack of mentioning the gluing lemma.
I was aware of that website by the way