Metamath Proof Explorer


Theorem grpsubadd

Description: Relationship between group subtraction and addition. (Contributed by NM, 31-Mar-2014)

Ref Expression
Hypotheses grpsubadd.b 𝐵 = ( Base ‘ 𝐺 )
grpsubadd.p + = ( +g𝐺 )
grpsubadd.m = ( -g𝐺 )
Assertion grpsubadd ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) = 𝑍 ↔ ( 𝑍 + 𝑌 ) = 𝑋 ) )

Proof

Step Hyp Ref Expression
1 grpsubadd.b 𝐵 = ( Base ‘ 𝐺 )
2 grpsubadd.p + = ( +g𝐺 )
3 grpsubadd.m = ( -g𝐺 )
4 eqid ( invg𝐺 ) = ( invg𝐺 )
5 1 2 4 3 grpsubval ( ( 𝑋𝐵𝑌𝐵 ) → ( 𝑋 𝑌 ) = ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) )
6 5 3adant3 ( ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) → ( 𝑋 𝑌 ) = ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) )
7 6 adantl ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 𝑌 ) = ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) )
8 7 eqeq1d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) = 𝑍 ↔ ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑍 ) )
9 simpl ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝐺 ∈ Grp )
10 simpr1 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑋𝐵 )
11 1 4 grpinvcl ( ( 𝐺 ∈ Grp ∧ 𝑌𝐵 ) → ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 )
12 11 3ad2antr2 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 )
13 1 2 grpcl ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵 ∧ ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 ) → ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵 )
14 9 10 12 13 syl3anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵 )
15 simpr3 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑍𝐵 )
16 simpr2 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑌𝐵 )
17 1 2 grprcan ( ( 𝐺 ∈ Grp ∧ ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵𝑍𝐵𝑌𝐵 ) ) → ( ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = ( 𝑍 + 𝑌 ) ↔ ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑍 ) )
18 9 14 15 16 17 syl13anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = ( 𝑍 + 𝑌 ) ↔ ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑍 ) )
19 1 2 grpass ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵 ∧ ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵𝑌𝐵 ) ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = ( 𝑋 + ( ( ( invg𝐺 ) ‘ 𝑌 ) + 𝑌 ) ) )
20 9 10 12 16 19 syl13anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = ( 𝑋 + ( ( ( invg𝐺 ) ‘ 𝑌 ) + 𝑌 ) ) )
21 eqid ( 0g𝐺 ) = ( 0g𝐺 )
22 1 2 21 4 grplinv ( ( 𝐺 ∈ Grp ∧ 𝑌𝐵 ) → ( ( ( invg𝐺 ) ‘ 𝑌 ) + 𝑌 ) = ( 0g𝐺 ) )
23 22 3ad2antr2 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( invg𝐺 ) ‘ 𝑌 ) + 𝑌 ) = ( 0g𝐺 ) )
24 23 oveq2d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 + ( ( ( invg𝐺 ) ‘ 𝑌 ) + 𝑌 ) ) = ( 𝑋 + ( 0g𝐺 ) ) )
25 1 2 21 grprid ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵 ) → ( 𝑋 + ( 0g𝐺 ) ) = 𝑋 )
26 25 3ad2antr1 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 + ( 0g𝐺 ) ) = 𝑋 )
27 20 24 26 3eqtrd ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = 𝑋 )
28 27 eqeq1d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + 𝑌 ) = ( 𝑍 + 𝑌 ) ↔ 𝑋 = ( 𝑍 + 𝑌 ) ) )
29 8 18 28 3bitr2d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) = 𝑍𝑋 = ( 𝑍 + 𝑌 ) ) )
30 eqcom ( 𝑋 = ( 𝑍 + 𝑌 ) ↔ ( 𝑍 + 𝑌 ) = 𝑋 )
31 29 30 bitrdi ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) = 𝑍 ↔ ( 𝑍 + 𝑌 ) = 𝑋 ) )