I think you are applying the concept to the wrong scenario (I mean stop thinking input/output messages). I propose you to take the stuff this way:
Pedersen commitments, as other flavours, have two main properties: hiding and binding (be careful, non bLinding!! ;) ):
- hiding means they hide the original message
- binding means that once a PC is bound to a message, it's not possible to provide another message different from the original one and resulting in the same commitment value (in that sense commitments equality is a proof of equal messages)
Given different commitment kinds, these two properties can be honoured by various degrees: for PC, binding is a computational, essentially meaning that if PC wasn't binding, the discrete logarithm problem would be broken: but DLP is assumed hard, so PC is assumed binding :) A quick proof of that (just let me use additive notation and let's assume the message is just a number):
$C = mG +bH$
where $C$ is the commitment, $m$ the original message, $b$ the bLinding factor (this time the L is ok ;) ), random and known only to the party producing the commitment, $G$ and $H$ are generators, but be careful: even if they belong to the same EC group, so there exist $j$ so that:
$H = jG$
that $j$ is unknown to everyone (it's reasonably possible to come up to this scenario, the heuristics about it are usually called NUMS).
Now the juicy part of the proof:
if the original author of the commitment pretend a second message $m_2$ has the same commitment $C$, it means he has found a second blinding factor $b_2$ so that:
$mG + bH = m_2G + b_2H$
but in that case a few of algebra lead us to:
$H = \frac{m_2 -m}{b-b_2} G$
So:
$\frac{m_2 -m}{b-b_2} = j$
But $j$ was unknown to everybody, so we have just found a non-hard way to break DLP :-)
You can find a lot more about all of this in the first 6 pages of https://github.com/AdamISZ/from0k2bp/blob/master/from0k2bp.pdf
This was to answer about Pedersen commitments, but one last thing: the fact that you are speaking about transaction, inputs, outputs.. well that makes me think the use case you have in mind is the value balance in privacy coins TXs: if so, that's a bigger topic than just commitments, even if commitments have an important role: if you want to take a glance, e.g. Monero currently handles that issue in this way: https://www.bybaro.it/tss/RctCheatsheet20210604.pdf (disclaimer 1: it's not easy, and needs a previous knowledge of other topics in https://www.bybaro.it/tss - disclaimer 2: I'm the author of those infographics)
FOLLOW UP TO TRY TO EXPLAIN PROOF LOGIC TO OP
It seems my proof about computational binding of PC has confused the OP about the validity of DLP hardness assumption. My educated guess that's because of lack of habit with proving techniques, so I try to make more explicit previous "reductio ad absurdum".
We have seen that (brush up above if needed):
$C(m)=C(m_2) \Rightarrow j = \frac{m_2 -m}{b-b_2} \Rightarrow$ DLP is broken
but DLP hardness is ASSUMED to hold (it's a matter of faith based on years of clever guys attempts), so how to reconcile the fact DLP isn't broken with the above chain of implications which is so simple that cannot hide any subtle error? We check where those implications lead to when the chain conclusion is false:
- if $j \neq \frac{m_2 -m}{b-b_2} \Leftarrow$ DLP is NOT broken
(meaning that if DLP is NOT broken, $j$ cannot be calculated by means of that simple fraction)
because of the truth table of a true implication. And the same with the first implication:
- $C(m) \neq C(m_2) \Leftarrow j \neq \frac{m_2 -m}{b-b_2}$
Putting all together we get:
$C(m) \neq C(m_2) \Leftarrow j \neq \frac{m_2 -m}{b-b_2} \Leftarrow$ DLP is NOT broken
(NOTE that I reversed the arrow hoping it can help the understanding, usually the hypothesis and the thesis are the inverted ones, keeping the implication arrow pointing right-wise).
So we have proved that, holding the hardness of DLP (which -I stress again- is ASSUMED to hold), $m$ and $m_2$ cannot have the same commitment value: that's why binding property of PC is said to be computational: it's safe until the computational capabilities of the adversaries will not exceed the common ones (which, btw, do not permit to break DLP either)