Metamath Proof Explorer


Theorem grpridd

Description: Deduce right identity from left inverse and left identity in an associative structure (such as a group). (Contributed by NM, 10-Aug-2013) (Proof shortened by Mario Carneiro, 6-Jan-2015)

Ref Expression
Hypotheses grprinvlem.c ( ( 𝜑𝑥𝐵𝑦𝐵 ) → ( 𝑥 + 𝑦 ) ∈ 𝐵 )
grprinvlem.o ( 𝜑𝑂𝐵 )
grprinvlem.i ( ( 𝜑𝑥𝐵 ) → ( 𝑂 + 𝑥 ) = 𝑥 )
grprinvlem.a ( ( 𝜑 ∧ ( 𝑥𝐵𝑦𝐵𝑧𝐵 ) ) → ( ( 𝑥 + 𝑦 ) + 𝑧 ) = ( 𝑥 + ( 𝑦 + 𝑧 ) ) )
grprinvlem.n ( ( 𝜑𝑥𝐵 ) → ∃ 𝑦𝐵 ( 𝑦 + 𝑥 ) = 𝑂 )
Assertion grpridd ( ( 𝜑𝑥𝐵 ) → ( 𝑥 + 𝑂 ) = 𝑥 )

Proof

Step Hyp Ref Expression
1 grprinvlem.c ( ( 𝜑𝑥𝐵𝑦𝐵 ) → ( 𝑥 + 𝑦 ) ∈ 𝐵 )
2 grprinvlem.o ( 𝜑𝑂𝐵 )
3 grprinvlem.i ( ( 𝜑𝑥𝐵 ) → ( 𝑂 + 𝑥 ) = 𝑥 )
4 grprinvlem.a ( ( 𝜑 ∧ ( 𝑥𝐵𝑦𝐵𝑧𝐵 ) ) → ( ( 𝑥 + 𝑦 ) + 𝑧 ) = ( 𝑥 + ( 𝑦 + 𝑧 ) ) )
5 grprinvlem.n ( ( 𝜑𝑥𝐵 ) → ∃ 𝑦𝐵 ( 𝑦 + 𝑥 ) = 𝑂 )
6 oveq1 ( 𝑦 = 𝑛 → ( 𝑦 + 𝑥 ) = ( 𝑛 + 𝑥 ) )
7 6 eqeq1d ( 𝑦 = 𝑛 → ( ( 𝑦 + 𝑥 ) = 𝑂 ↔ ( 𝑛 + 𝑥 ) = 𝑂 ) )
8 7 cbvrexvw ( ∃ 𝑦𝐵 ( 𝑦 + 𝑥 ) = 𝑂 ↔ ∃ 𝑛𝐵 ( 𝑛 + 𝑥 ) = 𝑂 )
9 5 8 sylib ( ( 𝜑𝑥𝐵 ) → ∃ 𝑛𝐵 ( 𝑛 + 𝑥 ) = 𝑂 )
10 4 caovassg ( ( 𝜑 ∧ ( 𝑢𝐵𝑣𝐵𝑤𝐵 ) ) → ( ( 𝑢 + 𝑣 ) + 𝑤 ) = ( 𝑢 + ( 𝑣 + 𝑤 ) ) )
11 10 adantlr ( ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) ∧ ( 𝑢𝐵𝑣𝐵𝑤𝐵 ) ) → ( ( 𝑢 + 𝑣 ) + 𝑤 ) = ( 𝑢 + ( 𝑣 + 𝑤 ) ) )
12 simprl ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → 𝑥𝐵 )
13 simprrl ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → 𝑛𝐵 )
14 11 12 13 12 caovassd ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( ( 𝑥 + 𝑛 ) + 𝑥 ) = ( 𝑥 + ( 𝑛 + 𝑥 ) ) )
15 simprrr ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( 𝑛 + 𝑥 ) = 𝑂 )
16 1 2 3 4 5 12 13 15 grprinvd ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( 𝑥 + 𝑛 ) = 𝑂 )
17 16 oveq1d ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( ( 𝑥 + 𝑛 ) + 𝑥 ) = ( 𝑂 + 𝑥 ) )
18 15 oveq2d ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( 𝑥 + ( 𝑛 + 𝑥 ) ) = ( 𝑥 + 𝑂 ) )
19 14 17 18 3eqtr3d ( ( 𝜑 ∧ ( 𝑥𝐵 ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) ) → ( 𝑂 + 𝑥 ) = ( 𝑥 + 𝑂 ) )
20 19 anassrs ( ( ( 𝜑𝑥𝐵 ) ∧ ( 𝑛𝐵 ∧ ( 𝑛 + 𝑥 ) = 𝑂 ) ) → ( 𝑂 + 𝑥 ) = ( 𝑥 + 𝑂 ) )
21 9 20 rexlimddv ( ( 𝜑𝑥𝐵 ) → ( 𝑂 + 𝑥 ) = ( 𝑥 + 𝑂 ) )
22 21 3 eqtr3d ( ( 𝜑𝑥𝐵 ) → ( 𝑥 + 𝑂 ) = 𝑥 )