Metamath Proof Explorer


Theorem sgrp2rid2ex

Description: A small semigroup (with two elements) with two right identities which are different. (Contributed by AV, 10-Feb-2020)

Ref Expression
Hypotheses mgm2nsgrp.s 𝑆 = { 𝐴 , 𝐵 }
mgm2nsgrp.b ( Base ‘ 𝑀 ) = 𝑆
sgrp2nmnd.o ( +g𝑀 ) = ( 𝑥𝑆 , 𝑦𝑆 ↦ if ( 𝑥 = 𝐴 , 𝐴 , 𝐵 ) )
sgrp2nmnd.p = ( +g𝑀 )
Assertion sgrp2rid2ex ( ( ♯ ‘ 𝑆 ) = 2 → ∃ 𝑥𝑆𝑧𝑆𝑦𝑆 ( 𝑥𝑧 ∧ ( 𝑦 𝑥 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) )

Proof

Step Hyp Ref Expression
1 mgm2nsgrp.s 𝑆 = { 𝐴 , 𝐵 }
2 mgm2nsgrp.b ( Base ‘ 𝑀 ) = 𝑆
3 sgrp2nmnd.o ( +g𝑀 ) = ( 𝑥𝑆 , 𝑦𝑆 ↦ if ( 𝑥 = 𝐴 , 𝐴 , 𝐵 ) )
4 sgrp2nmnd.p = ( +g𝑀 )
5 1 hashprdifel ( ( ♯ ‘ 𝑆 ) = 2 → ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) )
6 simp1 ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → 𝐴𝑆 )
7 simp2 ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → 𝐵𝑆 )
8 simpl3 ( ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) ∧ 𝑦𝑆 ) → 𝐴𝐵 )
9 8 ralrimiva ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → ∀ 𝑦𝑆 𝐴𝐵 )
10 1 2 3 4 sgrp2rid2 ( ( 𝐴𝑆𝐵𝑆 ) → ∀ 𝑥𝑆𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 )
11 oveq2 ( 𝑥 = 𝐴 → ( 𝑦 𝑥 ) = ( 𝑦 𝐴 ) )
12 11 eqeq1d ( 𝑥 = 𝐴 → ( ( 𝑦 𝑥 ) = 𝑦 ↔ ( 𝑦 𝐴 ) = 𝑦 ) )
13 12 ralbidv ( 𝑥 = 𝐴 → ( ∀ 𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 ↔ ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 ) )
14 13 rspcv ( 𝐴𝑆 → ( ∀ 𝑥𝑆𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 → ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 ) )
15 14 adantr ( ( 𝐴𝑆𝐵𝑆 ) → ( ∀ 𝑥𝑆𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 → ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 ) )
16 10 15 mpd ( ( 𝐴𝑆𝐵𝑆 ) → ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 )
17 16 3adant3 ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 )
18 oveq2 ( 𝑥 = 𝐵 → ( 𝑦 𝑥 ) = ( 𝑦 𝐵 ) )
19 18 eqeq1d ( 𝑥 = 𝐵 → ( ( 𝑦 𝑥 ) = 𝑦 ↔ ( 𝑦 𝐵 ) = 𝑦 ) )
20 19 ralbidv ( 𝑥 = 𝐵 → ( ∀ 𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 ↔ ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 ) )
21 20 rspcv ( 𝐵𝑆 → ( ∀ 𝑥𝑆𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 → ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 ) )
22 21 adantl ( ( 𝐴𝑆𝐵𝑆 ) → ( ∀ 𝑥𝑆𝑦𝑆 ( 𝑦 𝑥 ) = 𝑦 → ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 ) )
23 10 22 mpd ( ( 𝐴𝑆𝐵𝑆 ) → ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 )
24 23 3adant3 ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 )
25 r19.26-3 ( ∀ 𝑦𝑆 ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) ↔ ( ∀ 𝑦𝑆 𝐴𝐵 ∧ ∀ 𝑦𝑆 ( 𝑦 𝐴 ) = 𝑦 ∧ ∀ 𝑦𝑆 ( 𝑦 𝐵 ) = 𝑦 ) )
26 9 17 24 25 syl3anbrc ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → ∀ 𝑦𝑆 ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) )
27 6 7 26 3jca ( ( 𝐴𝑆𝐵𝑆𝐴𝐵 ) → ( 𝐴𝑆𝐵𝑆 ∧ ∀ 𝑦𝑆 ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) ) )
28 neeq1 ( 𝑥 = 𝐴 → ( 𝑥𝑧𝐴𝑧 ) )
29 biidd ( 𝑥 = 𝐴 → ( ( 𝑦 𝑧 ) = 𝑦 ↔ ( 𝑦 𝑧 ) = 𝑦 ) )
30 28 12 29 3anbi123d ( 𝑥 = 𝐴 → ( ( 𝑥𝑧 ∧ ( 𝑦 𝑥 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ↔ ( 𝐴𝑧 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ) )
31 30 ralbidv ( 𝑥 = 𝐴 → ( ∀ 𝑦𝑆 ( 𝑥𝑧 ∧ ( 𝑦 𝑥 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ↔ ∀ 𝑦𝑆 ( 𝐴𝑧 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ) )
32 neeq2 ( 𝑧 = 𝐵 → ( 𝐴𝑧𝐴𝐵 ) )
33 biidd ( 𝑧 = 𝐵 → ( ( 𝑦 𝐴 ) = 𝑦 ↔ ( 𝑦 𝐴 ) = 𝑦 ) )
34 oveq2 ( 𝑧 = 𝐵 → ( 𝑦 𝑧 ) = ( 𝑦 𝐵 ) )
35 34 eqeq1d ( 𝑧 = 𝐵 → ( ( 𝑦 𝑧 ) = 𝑦 ↔ ( 𝑦 𝐵 ) = 𝑦 ) )
36 32 33 35 3anbi123d ( 𝑧 = 𝐵 → ( ( 𝐴𝑧 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ↔ ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) ) )
37 36 ralbidv ( 𝑧 = 𝐵 → ( ∀ 𝑦𝑆 ( 𝐴𝑧 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) ↔ ∀ 𝑦𝑆 ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) ) )
38 31 37 rspc2ev ( ( 𝐴𝑆𝐵𝑆 ∧ ∀ 𝑦𝑆 ( 𝐴𝐵 ∧ ( 𝑦 𝐴 ) = 𝑦 ∧ ( 𝑦 𝐵 ) = 𝑦 ) ) → ∃ 𝑥𝑆𝑧𝑆𝑦𝑆 ( 𝑥𝑧 ∧ ( 𝑦 𝑥 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) )
39 5 27 38 3syl ( ( ♯ ‘ 𝑆 ) = 2 → ∃ 𝑥𝑆𝑧𝑆𝑦𝑆 ( 𝑥𝑧 ∧ ( 𝑦 𝑥 ) = 𝑦 ∧ ( 𝑦 𝑧 ) = 𝑦 ) )