Metamath Proof Explorer


Theorem grpnpcan

Description: Cancellation law for subtraction ( npcan analog). (Contributed by NM, 19-Apr-2014)

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

Proof

Step Hyp Ref Expression
1 grpsubadd.b 𝐵 = ( Base ‘ 𝐺 )
2 grpsubadd.p + = ( +g𝐺 )
3 grpsubadd.m = ( -g𝐺 )
4 eqid ( invg𝐺 ) = ( invg𝐺 )
5 1 4 grpinvcl ( ( 𝐺 ∈ Grp ∧ 𝑌𝐵 ) → ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 )
6 5 3adant2 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 )
7 1 2 grpcl ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵 ∧ ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 ) → ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵 )
8 6 7 syld3an3 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵 )
9 1 2 4 3 grpsubval ( ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ∈ 𝐵 ∧ ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ( ( invg𝐺 ) ‘ 𝑌 ) ) = ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + ( ( invg𝐺 ) ‘ ( ( invg𝐺 ) ‘ 𝑌 ) ) ) )
10 8 6 9 syl2anc ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ( ( invg𝐺 ) ‘ 𝑌 ) ) = ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + ( ( invg𝐺 ) ‘ ( ( invg𝐺 ) ‘ 𝑌 ) ) ) )
11 1 2 3 grppncan ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵 ∧ ( ( invg𝐺 ) ‘ 𝑌 ) ∈ 𝐵 ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑋 )
12 6 11 syld3an3 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑋 )
13 1 2 4 3 grpsubval ( ( 𝑋𝐵𝑌𝐵 ) → ( 𝑋 𝑌 ) = ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) )
14 13 3adant1 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( 𝑋 𝑌 ) = ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) )
15 14 eqcomd ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) = ( 𝑋 𝑌 ) )
16 1 4 grpinvinv ( ( 𝐺 ∈ Grp ∧ 𝑌𝐵 ) → ( ( invg𝐺 ) ‘ ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑌 )
17 16 3adant2 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( invg𝐺 ) ‘ ( ( invg𝐺 ) ‘ 𝑌 ) ) = 𝑌 )
18 15 17 oveq12d ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( 𝑋 + ( ( invg𝐺 ) ‘ 𝑌 ) ) + ( ( invg𝐺 ) ‘ ( ( invg𝐺 ) ‘ 𝑌 ) ) ) = ( ( 𝑋 𝑌 ) + 𝑌 ) )
19 10 12 18 3eqtr3rd ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( 𝑋 𝑌 ) + 𝑌 ) = 𝑋 )