Suppose I upload a file to ipfs, but at this time many parts of the file already exist in ipfs. So is the file I uploaded a link to the existing fragment of the saved part?

Suppose I upload a file to ipfs, but at this time many parts of the file already exist in ipfs. So is the file I uploaded a link to the existing fragment of the saved part?

Depends, nothing garentees this but if by luck, you are using the same algorithm, the same ipld sector, the same chunker and the same options (such as sharding), yes you will share the same hash and so a link to other fragments too. (btw, this is somehow likely because almost everyone uses the default)

If your files are even a tiny bit different it’s no, currently there is no smart things like separating the file in meaningfull section to hoppefuly reuse.