Hello @GautamG-045, Below is the response from the product team, hope it is helpful with your initial query.
The logic required in this example would need to be implemented by the application that is updating/creating the new digital twin. Depending on the case, the application may need to query information about related twins to perform such checks.
You may be interested in checking DTDL Validator - Code Samples | Microsoft Learn in case that helps.
Please comment in the below section if you need further help in this regard!
If the response is helpful, please click "Accept Answer" and upvote it.