Metamath Proof Explorer


Theorem smndex1igid

Description: The composition of the modulo function I and a constant function ( GK ) results in ( GK ) itself. (Contributed by AV, 14-Feb-2024) Avoid ax-rep . (Revised by GG, 2-Apr-2026)

Ref Expression
Hypotheses smndex1ibas.m ⊢ M = EndoFMnd ⁡ ℕ 0
smndex1ibas.n ⊢ N ∈ ℕ
smndex1ibas.i ⊢ I = x ∈ ℕ 0 ⟼ x mod N
smndex1ibas.g ⊢ G = n ∈ 0 ..^ N ⟼ x ∈ ℕ 0 ⟼ n
Assertion smndex1igid ⊢ K ∈ 0 ..^ N → I ∘ G ⁡ K = G ⁡ K

Proof

Step Hyp Ref Expression
1 smndex1ibas.m ⊢ M = EndoFMnd ⁡ ℕ 0
2 smndex1ibas.n ⊢ N ∈ ℕ
3 smndex1ibas.i ⊢ I = x ∈ ℕ 0 ⟼ x mod N
4 smndex1ibas.g ⊢ G = n ∈ 0 ..^ N ⟼ x ∈ ℕ 0 ⟼ n
5 fconstmpt ⊢ ℕ 0 × K = x ∈ ℕ 0 ⟼ K
6 5 eqcomi ⊢ x ∈ ℕ 0 ⟼ K = ℕ 0 × K
7 6 a1i ⊢ K ∈ 0 ..^ N → x ∈ ℕ 0 ⟼ K = ℕ 0 × K
8 7 coeq2d ⊢ K ∈ 0 ..^ N → I ∘ x ∈ ℕ 0 ⟼ K = I ∘ ℕ 0 × K
9 id ⊢ n = K → n = K
10 9 mpteq2dv ⊢ n = K → x ∈ ℕ 0 ⟼ n = x ∈ ℕ 0 ⟼ K
11 nn0ex ⊢ ℕ 0 ∈ V
12 snex ⊢ K ∈ V
13 11 12 xpex ⊢ ℕ 0 × K ∈ V
14 5 13 eqeltrri ⊢ x ∈ ℕ 0 ⟼ K ∈ V
15 10 4 14 fvmpt ⊢ K ∈ 0 ..^ N → G ⁡ K = x ∈ ℕ 0 ⟼ K
16 15 coeq2d ⊢ K ∈ 0 ..^ N → I ∘ G ⁡ K = I ∘ x ∈ ℕ 0 ⟼ K
17 oveq1 ⊢ x = K → x mod N = K mod N
18 zmodidfzoimp ⊢ K ∈ 0 ..^ N → K mod N = K
19 17 18 sylan9eqr ⊢ K ∈ 0 ..^ N ∧ x = K → x mod N = K
20 elfzonn0 ⊢ K ∈ 0 ..^ N → K ∈ ℕ 0
21 3 19 20 20 fvmptd2 ⊢ K ∈ 0 ..^ N → I ⁡ K = K
22 21 eqcomd ⊢ K ∈ 0 ..^ N → K = I ⁡ K
23 22 sneqd ⊢ K ∈ 0 ..^ N → K = I ⁡ K
24 23 xpeq2d ⊢ K ∈ 0 ..^ N → ℕ 0 × K = ℕ 0 × I ⁡ K
25 15 5 eqtr4di ⊢ K ∈ 0 ..^ N → G ⁡ K = ℕ 0 × K
26 ovex ⊢ x mod N ∈ V
27 26 3 fnmpti ⊢ I Fn ℕ 0
28 fcoconst ⊢ I Fn ℕ 0 ∧ K ∈ ℕ 0 → I ∘ ℕ 0 × K = ℕ 0 × I ⁡ K
29 27 20 28 sylancr ⊢ K ∈ 0 ..^ N → I ∘ ℕ 0 × K = ℕ 0 × I ⁡ K
30 24 25 29 3eqtr4d ⊢ K ∈ 0 ..^ N → G ⁡ K = I ∘ ℕ 0 × K
31 8 16 30 3eqtr4d ⊢ K ∈ 0 ..^ N → I ∘ G ⁡ K = G ⁡ K