The problem is this is false too. Just modify my example a bit:
y = x if x > 0 else x if x < 0 else 0
The problem is this is false too. Just modify my example a bit:
Here we clearly have y'(0) = 1, yet autodiff would seem to give y'(0) = 0.