Metamath Proof Explorer


Theorem smndex1mnd

Description: The monoid of endofunctions on NN0 restricted to the modulo function I and the constant functions ( GK ) is a monoid. (Contributed by AV, 16-Feb-2024)

Ref Expression
Hypotheses smndex1ibas.m 𝑀 = ( EndoFMnd ‘ ℕ0 )
smndex1ibas.n 𝑁 ∈ ℕ
smndex1ibas.i 𝐼 = ( 𝑥 ∈ ℕ0 ↦ ( 𝑥 mod 𝑁 ) )
smndex1ibas.g 𝐺 = ( 𝑛 ∈ ( 0 ..^ 𝑁 ) ↦ ( 𝑥 ∈ ℕ0𝑛 ) )
smndex1mgm.b 𝐵 = ( { 𝐼 } ∪ 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } )
smndex1mgm.s 𝑆 = ( 𝑀s 𝐵 )
Assertion smndex1mnd 𝑆 ∈ Mnd

Proof

Step Hyp Ref Expression
1 smndex1ibas.m 𝑀 = ( EndoFMnd ‘ ℕ0 )
2 smndex1ibas.n 𝑁 ∈ ℕ
3 smndex1ibas.i 𝐼 = ( 𝑥 ∈ ℕ0 ↦ ( 𝑥 mod 𝑁 ) )
4 smndex1ibas.g 𝐺 = ( 𝑛 ∈ ( 0 ..^ 𝑁 ) ↦ ( 𝑥 ∈ ℕ0𝑛 ) )
5 smndex1mgm.b 𝐵 = ( { 𝐼 } ∪ 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } )
6 smndex1mgm.s 𝑆 = ( 𝑀s 𝐵 )
7 1 2 3 4 5 6 smndex1sgrp 𝑆 ∈ Smgrp
8 nn0ex 0 ∈ V
9 8 mptex ( 𝑥 ∈ ℕ0 ↦ ( 𝑥 mod 𝑁 ) ) ∈ V
10 3 9 eqeltri 𝐼 ∈ V
11 10 snid 𝐼 ∈ { 𝐼 }
12 elun1 ( 𝐼 ∈ { 𝐼 } → 𝐼 ∈ ( { 𝐼 } ∪ 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } ) )
13 11 12 ax-mp 𝐼 ∈ ( { 𝐼 } ∪ 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } )
14 13 5 eleqtrri 𝐼𝐵
15 id ( 𝐼𝐵𝐼𝐵 )
16 coeq1 ( 𝑎 = 𝐼 → ( 𝑎𝑏 ) = ( 𝐼𝑏 ) )
17 16 eqeq1d ( 𝑎 = 𝐼 → ( ( 𝑎𝑏 ) = 𝑏 ↔ ( 𝐼𝑏 ) = 𝑏 ) )
18 coeq2 ( 𝑎 = 𝐼 → ( 𝑏𝑎 ) = ( 𝑏𝐼 ) )
19 18 eqeq1d ( 𝑎 = 𝐼 → ( ( 𝑏𝑎 ) = 𝑏 ↔ ( 𝑏𝐼 ) = 𝑏 ) )
20 17 19 anbi12d ( 𝑎 = 𝐼 → ( ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ↔ ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 ) ) )
21 20 ralbidv ( 𝑎 = 𝐼 → ( ∀ 𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ↔ ∀ 𝑏𝐵 ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 ) ) )
22 21 adantl ( ( 𝐼𝐵𝑎 = 𝐼 ) → ( ∀ 𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ↔ ∀ 𝑏𝐵 ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 ) ) )
23 1 2 3 4 5 6 smndex1mndlem ( 𝑏𝐵 → ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 ) )
24 23 rgen 𝑏𝐵 ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 )
25 24 a1i ( 𝐼𝐵 → ∀ 𝑏𝐵 ( ( 𝐼𝑏 ) = 𝑏 ∧ ( 𝑏𝐼 ) = 𝑏 ) )
26 15 22 25 rspcedvd ( 𝐼𝐵 → ∃ 𝑎𝐵𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) )
27 14 26 ax-mp 𝑎𝐵𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 )
28 1 2 3 4 5 smndex1basss 𝐵 ⊆ ( Base ‘ 𝑀 )
29 ssel ( 𝐵 ⊆ ( Base ‘ 𝑀 ) → ( 𝑎𝐵𝑎 ∈ ( Base ‘ 𝑀 ) ) )
30 ssel ( 𝐵 ⊆ ( Base ‘ 𝑀 ) → ( 𝑏𝐵𝑏 ∈ ( Base ‘ 𝑀 ) ) )
31 29 30 anim12d ( 𝐵 ⊆ ( Base ‘ 𝑀 ) → ( ( 𝑎𝐵𝑏𝐵 ) → ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) ) )
32 28 31 ax-mp ( ( 𝑎𝐵𝑏𝐵 ) → ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) )
33 eqid ( Base ‘ 𝑀 ) = ( Base ‘ 𝑀 )
34 snex { 𝐼 } ∈ V
35 ovex ( 0 ..^ 𝑁 ) ∈ V
36 snex { ( 𝐺𝑛 ) } ∈ V
37 35 36 iunex 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } ∈ V
38 34 37 unex ( { 𝐼 } ∪ 𝑛 ∈ ( 0 ..^ 𝑁 ) { ( 𝐺𝑛 ) } ) ∈ V
39 5 38 eqeltri 𝐵 ∈ V
40 eqid ( +g𝑀 ) = ( +g𝑀 )
41 6 40 ressplusg ( 𝐵 ∈ V → ( +g𝑀 ) = ( +g𝑆 ) )
42 39 41 ax-mp ( +g𝑀 ) = ( +g𝑆 )
43 42 eqcomi ( +g𝑆 ) = ( +g𝑀 )
44 1 33 43 efmndov ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( 𝑎 ( +g𝑆 ) 𝑏 ) = ( 𝑎𝑏 ) )
45 44 eqeq1d ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ↔ ( 𝑎𝑏 ) = 𝑏 ) )
46 43 oveqi ( 𝑏 ( +g𝑆 ) 𝑎 ) = ( 𝑏 ( +g𝑀 ) 𝑎 )
47 1 33 40 efmndov ( ( 𝑏 ∈ ( Base ‘ 𝑀 ) ∧ 𝑎 ∈ ( Base ‘ 𝑀 ) ) → ( 𝑏 ( +g𝑀 ) 𝑎 ) = ( 𝑏𝑎 ) )
48 47 ancoms ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( 𝑏 ( +g𝑀 ) 𝑎 ) = ( 𝑏𝑎 ) )
49 46 48 eqtrid ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( 𝑏 ( +g𝑆 ) 𝑎 ) = ( 𝑏𝑎 ) )
50 49 eqeq1d ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ↔ ( 𝑏𝑎 ) = 𝑏 ) )
51 45 50 anbi12d ( ( 𝑎 ∈ ( Base ‘ 𝑀 ) ∧ 𝑏 ∈ ( Base ‘ 𝑀 ) ) → ( ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ) ↔ ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ) )
52 32 51 syl ( ( 𝑎𝐵𝑏𝐵 ) → ( ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ) ↔ ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ) )
53 52 ralbidva ( 𝑎𝐵 → ( ∀ 𝑏𝐵 ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ) ↔ ∀ 𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) ) )
54 53 rexbiia ( ∃ 𝑎𝐵𝑏𝐵 ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ) ↔ ∃ 𝑎𝐵𝑏𝐵 ( ( 𝑎𝑏 ) = 𝑏 ∧ ( 𝑏𝑎 ) = 𝑏 ) )
55 27 54 mpbir 𝑎𝐵𝑏𝐵 ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 )
56 1 2 3 4 5 6 smndex1bas ( Base ‘ 𝑆 ) = 𝐵
57 56 eqcomi 𝐵 = ( Base ‘ 𝑆 )
58 eqid ( +g𝑆 ) = ( +g𝑆 )
59 57 58 ismnddef ( 𝑆 ∈ Mnd ↔ ( 𝑆 ∈ Smgrp ∧ ∃ 𝑎𝐵𝑏𝐵 ( ( 𝑎 ( +g𝑆 ) 𝑏 ) = 𝑏 ∧ ( 𝑏 ( +g𝑆 ) 𝑎 ) = 𝑏 ) ) )
60 7 55 59 mpbir2an 𝑆 ∈ Mnd