Metamath Proof Explorer


Theorem nnacan

Description: Cancellation law for addition of natural numbers. (Contributed by NM, 27-Oct-1995) (Revised by Mario Carneiro, 15-Nov-2014)

Ref Expression
Assertion nnacan ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( ( 𝐴 +o 𝐵 ) = ( 𝐴 +o 𝐶 ) ↔ 𝐵 = 𝐶 ) )

Proof

Step Hyp Ref Expression
1 nnaword ( ( 𝐵 ∈ ω ∧ 𝐶 ∈ ω ∧ 𝐴 ∈ ω ) → ( 𝐵𝐶 ↔ ( 𝐴 +o 𝐵 ) ⊆ ( 𝐴 +o 𝐶 ) ) )
2 1 3comr ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( 𝐵𝐶 ↔ ( 𝐴 +o 𝐵 ) ⊆ ( 𝐴 +o 𝐶 ) ) )
3 nnaword ( ( 𝐶 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐴 ∈ ω ) → ( 𝐶𝐵 ↔ ( 𝐴 +o 𝐶 ) ⊆ ( 𝐴 +o 𝐵 ) ) )
4 3 3com13 ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( 𝐶𝐵 ↔ ( 𝐴 +o 𝐶 ) ⊆ ( 𝐴 +o 𝐵 ) ) )
5 2 4 anbi12d ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( ( 𝐵𝐶𝐶𝐵 ) ↔ ( ( 𝐴 +o 𝐵 ) ⊆ ( 𝐴 +o 𝐶 ) ∧ ( 𝐴 +o 𝐶 ) ⊆ ( 𝐴 +o 𝐵 ) ) ) )
6 5 bicomd ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( ( ( 𝐴 +o 𝐵 ) ⊆ ( 𝐴 +o 𝐶 ) ∧ ( 𝐴 +o 𝐶 ) ⊆ ( 𝐴 +o 𝐵 ) ) ↔ ( 𝐵𝐶𝐶𝐵 ) ) )
7 eqss ( ( 𝐴 +o 𝐵 ) = ( 𝐴 +o 𝐶 ) ↔ ( ( 𝐴 +o 𝐵 ) ⊆ ( 𝐴 +o 𝐶 ) ∧ ( 𝐴 +o 𝐶 ) ⊆ ( 𝐴 +o 𝐵 ) ) )
8 eqss ( 𝐵 = 𝐶 ↔ ( 𝐵𝐶𝐶𝐵 ) )
9 6 7 8 3bitr4g ( ( 𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω ) → ( ( 𝐴 +o 𝐵 ) = ( 𝐴 +o 𝐶 ) ↔ 𝐵 = 𝐶 ) )