Metamath Proof Explorer


Theorem ringsubdi

Description: Ring multiplication distributes over subtraction. ( subdi analog.) (Contributed by Jeff Madsen, 19-Jun-2010) (Revised by Mario Carneiro, 2-Jul-2014)

Ref Expression
Hypotheses ringsubdi.b
|- B = ( Base ` R )
ringsubdi.t
|- .x. = ( .r ` R )
ringsubdi.m
|- .- = ( -g ` R )
ringsubdi.r
|- ( ph -> R e. Ring )
ringsubdi.x
|- ( ph -> X e. B )
ringsubdi.y
|- ( ph -> Y e. B )
ringsubdi.z
|- ( ph -> Z e. B )
Assertion ringsubdi
|- ( ph -> ( X .x. ( Y .- Z ) ) = ( ( X .x. Y ) .- ( X .x. Z ) ) )

Proof

Step Hyp Ref Expression
1 ringsubdi.b
 |-  B = ( Base ` R )
2 ringsubdi.t
 |-  .x. = ( .r ` R )
3 ringsubdi.m
 |-  .- = ( -g ` R )
4 ringsubdi.r
 |-  ( ph -> R e. Ring )
5 ringsubdi.x
 |-  ( ph -> X e. B )
6 ringsubdi.y
 |-  ( ph -> Y e. B )
7 ringsubdi.z
 |-  ( ph -> Z e. B )
8 ringgrp
 |-  ( R e. Ring -> R e. Grp )
9 4 8 syl
 |-  ( ph -> R e. Grp )
10 eqid
 |-  ( invg ` R ) = ( invg ` R )
11 1 10 grpinvcl
 |-  ( ( R e. Grp /\ Z e. B ) -> ( ( invg ` R ) ` Z ) e. B )
12 9 7 11 syl2anc
 |-  ( ph -> ( ( invg ` R ) ` Z ) e. B )
13 eqid
 |-  ( +g ` R ) = ( +g ` R )
14 1 13 2 ringdi
 |-  ( ( R e. Ring /\ ( X e. B /\ Y e. B /\ ( ( invg ` R ) ` Z ) e. B ) ) -> ( X .x. ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) ) = ( ( X .x. Y ) ( +g ` R ) ( X .x. ( ( invg ` R ) ` Z ) ) ) )
15 4 5 6 12 14 syl13anc
 |-  ( ph -> ( X .x. ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) ) = ( ( X .x. Y ) ( +g ` R ) ( X .x. ( ( invg ` R ) ` Z ) ) ) )
16 1 2 10 4 5 7 ringmneg2
 |-  ( ph -> ( X .x. ( ( invg ` R ) ` Z ) ) = ( ( invg ` R ) ` ( X .x. Z ) ) )
17 16 oveq2d
 |-  ( ph -> ( ( X .x. Y ) ( +g ` R ) ( X .x. ( ( invg ` R ) ` Z ) ) ) = ( ( X .x. Y ) ( +g ` R ) ( ( invg ` R ) ` ( X .x. Z ) ) ) )
18 15 17 eqtrd
 |-  ( ph -> ( X .x. ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) ) = ( ( X .x. Y ) ( +g ` R ) ( ( invg ` R ) ` ( X .x. Z ) ) ) )
19 1 13 10 3 grpsubval
 |-  ( ( Y e. B /\ Z e. B ) -> ( Y .- Z ) = ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) )
20 6 7 19 syl2anc
 |-  ( ph -> ( Y .- Z ) = ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) )
21 20 oveq2d
 |-  ( ph -> ( X .x. ( Y .- Z ) ) = ( X .x. ( Y ( +g ` R ) ( ( invg ` R ) ` Z ) ) ) )
22 1 2 ringcl
 |-  ( ( R e. Ring /\ X e. B /\ Y e. B ) -> ( X .x. Y ) e. B )
23 4 5 6 22 syl3anc
 |-  ( ph -> ( X .x. Y ) e. B )
24 1 2 ringcl
 |-  ( ( R e. Ring /\ X e. B /\ Z e. B ) -> ( X .x. Z ) e. B )
25 4 5 7 24 syl3anc
 |-  ( ph -> ( X .x. Z ) e. B )
26 1 13 10 3 grpsubval
 |-  ( ( ( X .x. Y ) e. B /\ ( X .x. Z ) e. B ) -> ( ( X .x. Y ) .- ( X .x. Z ) ) = ( ( X .x. Y ) ( +g ` R ) ( ( invg ` R ) ` ( X .x. Z ) ) ) )
27 23 25 26 syl2anc
 |-  ( ph -> ( ( X .x. Y ) .- ( X .x. Z ) ) = ( ( X .x. Y ) ( +g ` R ) ( ( invg ` R ) ` ( X .x. Z ) ) ) )
28 18 21 27 3eqtr4d
 |-  ( ph -> ( X .x. ( Y .- Z ) ) = ( ( X .x. Y ) .- ( X .x. Z ) ) )