This is something I’m exploring in my current novel…
Take a computer program. It’s a set of code. Duplicate it, copy it, and run it on multiple machines. All of those copies are still the same computer program.
Take an artificial intelligence program, an A.I., and duplicate it the same way. Run it on multiple computers. Are they all the same program?
Take a person. You, for example. Send yourself back in time three days, so you can go have dinner with yourself. You’re both sitting at a table in a restaurant together. Are both of them actually you?
Step back into the time machine and go back to when you were ten years old. Are you and your ten-year-old self still the same person? Are you both you? Even though just about every cell in your body has been swapped out with new ones? You both think you’re you.
Step into an instant matter transporter (and, yes, I know this has been done in Star Trek) and something goes wrong. You’ve been duplicated down to the atomic level, and now you and the other you are standing right next to each other. You’re so identical that a molecular scanner can’t tell you apart. Are you both you? You both think you’re “you.”
Step into an instant matter transporter. It zaps you 1000 lightyears away, and also 1000 years into the past. But the way it works is that it instantly disassembles you at an atomic level, and then reassembles you — but not the same atoms, they’re quantum entangled atoms 1000 lightyears away, 1000 years in the past. The result is an exact duplicate of you in another space and time. You think you’re “you.” But are you … you?
You step back into the instant matter transporter, and get zapped back home, 1000 lightyears across space, 1000 years into the future — back to the time when you first left — and are reassembled again. An exact copy, the only one in existence, but now twice removed from the original. Are you still you?