What is the precise statement of the theorem that allows us to "localize" our knowledge of derivatives? Most introductory calculus courses feature a proof that
Proposition 1. For the function $f : \mathbb{R} \rightarrow \mathbb{R}$ such that $x \in \mathbb{R} \Rightarrow f(x)=x^2$ it holds that $x \in \mathbb{R} \Rightarrow f'(x)=2x$.
In practice though, we freely use the following stronger result.
Proposition 2. For all partial functions $f : \mathbb{R} \rightarrow \mathbb{R}$, setting $X = \mathrm{dom}(f)$, we have that for all $x \in X$, if there exists a neighborhood of $x$ that is a subset of $X$, call it $A$, such that $a \in A \Rightarrow f(a)=a^2$, then we have $f'(x)=2x$.
What is the precise statement of the theorem that lets us get from the sentences that we actually prove, like Proposition 1, to the sentences we actually use, like Proposition 2?

I’ll give a first try in answering this:
How about: Let $f : D_f → ℝ$ and $g : D_g → ℝ$ be differentiable in an open set $D ⊂ D_f ∩ D_g$. If $f|_D = g|_D$, then $f'|_D = g'|_D$.
I feel this is not what you want. Did I misunderstand you?
