Metamath Proof Explorer


Theorem grpsubsub4

Description: Double group subtraction ( subsub4 analog). (Contributed by Mario Carneiro, 2-Dec-2014)

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

Proof

Step Hyp Ref Expression
1 grpsubadd.b 𝐵 = ( Base ‘ 𝐺 )
2 grpsubadd.p + = ( +g𝐺 )
3 grpsubadd.m = ( -g𝐺 )
4 simpl ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝐺 ∈ Grp )
5 1 3 grpsubcl ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( 𝑋 𝑌 ) ∈ 𝐵 )
6 5 3adant3r3 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 𝑌 ) ∈ 𝐵 )
7 simpr3 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑍𝐵 )
8 1 2 3 grpnpcan ( ( 𝐺 ∈ Grp ∧ ( 𝑋 𝑌 ) ∈ 𝐵𝑍𝐵 ) → ( ( ( 𝑋 𝑌 ) 𝑍 ) + 𝑍 ) = ( 𝑋 𝑌 ) )
9 4 6 7 8 syl3anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( 𝑋 𝑌 ) 𝑍 ) + 𝑍 ) = ( 𝑋 𝑌 ) )
10 9 oveq1d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( ( 𝑋 𝑌 ) 𝑍 ) + 𝑍 ) + 𝑌 ) = ( ( 𝑋 𝑌 ) + 𝑌 ) )
11 1 3 grpsubcl ( ( 𝐺 ∈ Grp ∧ ( 𝑋 𝑌 ) ∈ 𝐵𝑍𝐵 ) → ( ( 𝑋 𝑌 ) 𝑍 ) ∈ 𝐵 )
12 4 6 7 11 syl3anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) 𝑍 ) ∈ 𝐵 )
13 simpr2 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑌𝐵 )
14 1 2 grpass ( ( 𝐺 ∈ Grp ∧ ( ( ( 𝑋 𝑌 ) 𝑍 ) ∈ 𝐵𝑍𝐵𝑌𝐵 ) ) → ( ( ( ( 𝑋 𝑌 ) 𝑍 ) + 𝑍 ) + 𝑌 ) = ( ( ( 𝑋 𝑌 ) 𝑍 ) + ( 𝑍 + 𝑌 ) ) )
15 4 12 7 13 14 syl13anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( ( 𝑋 𝑌 ) 𝑍 ) + 𝑍 ) + 𝑌 ) = ( ( ( 𝑋 𝑌 ) 𝑍 ) + ( 𝑍 + 𝑌 ) ) )
16 1 2 3 grpnpcan ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵𝑌𝐵 ) → ( ( 𝑋 𝑌 ) + 𝑌 ) = 𝑋 )
17 16 3adant3r3 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) + 𝑌 ) = 𝑋 )
18 10 15 17 3eqtr3d ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( ( 𝑋 𝑌 ) 𝑍 ) + ( 𝑍 + 𝑌 ) ) = 𝑋 )
19 simpr1 ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → 𝑋𝐵 )
20 1 2 grpcl ( ( 𝐺 ∈ Grp ∧ 𝑍𝐵𝑌𝐵 ) → ( 𝑍 + 𝑌 ) ∈ 𝐵 )
21 4 7 13 20 syl3anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑍 + 𝑌 ) ∈ 𝐵 )
22 1 2 3 grpsubadd ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵 ∧ ( 𝑍 + 𝑌 ) ∈ 𝐵 ∧ ( ( 𝑋 𝑌 ) 𝑍 ) ∈ 𝐵 ) ) → ( ( 𝑋 ( 𝑍 + 𝑌 ) ) = ( ( 𝑋 𝑌 ) 𝑍 ) ↔ ( ( ( 𝑋 𝑌 ) 𝑍 ) + ( 𝑍 + 𝑌 ) ) = 𝑋 ) )
23 4 19 21 12 22 syl13anc ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 ( 𝑍 + 𝑌 ) ) = ( ( 𝑋 𝑌 ) 𝑍 ) ↔ ( ( ( 𝑋 𝑌 ) 𝑍 ) + ( 𝑍 + 𝑌 ) ) = 𝑋 ) )
24 18 23 mpbird ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( 𝑋 ( 𝑍 + 𝑌 ) ) = ( ( 𝑋 𝑌 ) 𝑍 ) )
25 24 eqcomd ( ( 𝐺 ∈ Grp ∧ ( 𝑋𝐵𝑌𝐵𝑍𝐵 ) ) → ( ( 𝑋 𝑌 ) 𝑍 ) = ( 𝑋 ( 𝑍 + 𝑌 ) ) )