Proof of private keys ownership for multiple addresses In a two party coinjoin consists of Mr Seller and Mr Buyer.
Mr Seller has set A of sender addresses/input and set B of receiver addresses (output)
Mr Buyer has set C of sender addresses/input and set D of receiver addresses (Output)
Assume all input/output are addresses (P2PK or P2PKH and none of them are script).
How does Mr Seller prove to others that set A and set B addresses belong to him? Is there any other way to prove than proving the address one by one which can be very long. On top of that set B addresses are hashes.
Mr Seller also need to cooperation from Mr Buyer to provide proof that
set C and Set D address belong to Mr Buyer.
This is a requirement from IRS audit department who wanted proof of payment amount from
the given invoice record.
Why would you prove ownership of inputs/outputs in two-party coinjoin? This data upon publishing would make the coinjoin efforts obsolete and would totally cancel all anonymity set in this specific transaction.
For input you could use some specific wallet setup where inputs would be in separate xpub derivation path, and outputs in separate.
Even with point 2. you'd have to post the outputs as the list of addresses if you don't want to leak pubkeys?

This looks to me like an XY problem and your requirements are contradicting themselves. Could you explain what you're trying to achieve?