I believe if you have documented proof of damage that is specific to this tenant and is beyond what would be considered normal wear and tear, then you will be okay. If it were me, I would keep the deposit and apply it to the carpet. If the tenant wants to challenge then they will take you to small claims court. Then it will boil down to your documentation (ie before and after pictures) and whether the judge views the damage as beyond wear and tear.