I'm taking an intro to proof via number theory class and I'm trying to prove that if a|b and b|c then a|c. So you write down there exist integers k and m such that ka = b and mb = c. Then you substitute ka in for b in the second equation and write (mk)a = c (by associative property). We know (mk) is an integer by the Closure property and so a|c. My question is, how do we know substitution is allowed (or is it not)? Is this something that can be proven from the Axioms of the Integers or something inherent in equivalence relations? Any insight would be awesome thank you!
Using axioms, you can prove
If $x=y$ then $nx=ny$.
It follows that $ka=b$ implies $m(ka)=mb$.
By properties of equality and associativity of multiplication we have