Metamath Proof Explorer


Theorem sgrp2nmndlem1

Description: Lemma 1 for sgrp2nmnd : M is a magma, even if A = B ( M is the trivial magma in this case, see mgmb1mgm1 ). (Contributed by AV, 29-Jan-2020)

Ref Expression
Hypotheses mgm2nsgrp.s 𝑆 = { 𝐴 , 𝐵 }
mgm2nsgrp.b ( Base ‘ 𝑀 ) = 𝑆
sgrp2nmnd.o ( +g𝑀 ) = ( 𝑥𝑆 , 𝑦𝑆 ↦ if ( 𝑥 = 𝐴 , 𝐴 , 𝐵 ) )
Assertion sgrp2nmndlem1 ( ( 𝐴𝑉𝐵𝑊 ) → 𝑀 ∈ Mgm )

Proof

Step Hyp Ref Expression
1 mgm2nsgrp.s 𝑆 = { 𝐴 , 𝐵 }
2 mgm2nsgrp.b ( Base ‘ 𝑀 ) = 𝑆
3 sgrp2nmnd.o ( +g𝑀 ) = ( 𝑥𝑆 , 𝑦𝑆 ↦ if ( 𝑥 = 𝐴 , 𝐴 , 𝐵 ) )
4 prid1g ( 𝐴𝑉𝐴 ∈ { 𝐴 , 𝐵 } )
5 4 1 eleqtrrdi ( 𝐴𝑉𝐴𝑆 )
6 prid2g ( 𝐵𝑊𝐵 ∈ { 𝐴 , 𝐵 } )
7 6 1 eleqtrrdi ( 𝐵𝑊𝐵𝑆 )
8 2 eqcomi 𝑆 = ( Base ‘ 𝑀 )
9 ne0i ( 𝐴𝑆𝑆 ≠ ∅ )
10 9 adantr ( ( 𝐴𝑆𝐵𝑆 ) → 𝑆 ≠ ∅ )
11 simpll ( ( ( 𝐴𝑆𝐵𝑆 ) ∧ ( 𝑥𝑆𝑦𝑆 ) ) → 𝐴𝑆 )
12 simplr ( ( ( 𝐴𝑆𝐵𝑆 ) ∧ ( 𝑥𝑆𝑦𝑆 ) ) → 𝐵𝑆 )
13 8 3 10 11 12 opifismgm ( ( 𝐴𝑆𝐵𝑆 ) → 𝑀 ∈ Mgm )
14 5 7 13 syl2an ( ( 𝐴𝑉𝐵𝑊 ) → 𝑀 ∈ Mgm )