I think this can also be done in a simpler, more performant way with some native PHP functions. Something like:

```php
$parentAtoms = $this->normalizer()->normalize($path)->atoms();
$childAtoms = $this->normalizer()->normalize($this)->atoms();
$diff = array_diff_assoc($childAtoms, $parentAtoms);

return $this->factory()->createFromAtoms(
    array_merge(
        array_fill(
            0,
            count($parentAtoms) - (count($childAtoms) - count($diff)),
            static::PARENT_ATOM
        ),
        $diff
    ),
    false
);
```