Metamath Proof Explorer


Theorem smndex1iidm

Description: The modulo function I is idempotent. (Contributed by AV, 12-Feb-2024)

Ref Expression
Hypotheses smndex1ibas.m No typesetting found for |- M = ( EndoFMnd ` NN0 ) with typecode |-
smndex1ibas.n N
smndex1ibas.i I=x0xmodN
Assertion smndex1iidm II=I

Proof

Step Hyp Ref Expression
1 smndex1ibas.m Could not format M = ( EndoFMnd ` NN0 ) : No typesetting found for |- M = ( EndoFMnd ` NN0 ) with typecode |-
2 smndex1ibas.n N
3 smndex1ibas.i I=x0xmodN
4 nn0re y0y
5 nnrp NN+
6 2 5 ax-mp N+
7 modabs2 yN+ymodNmodN=ymodN
8 4 6 7 sylancl y0ymodNmodN=ymodN
9 8 eqcomd y0ymodN=ymodNmodN
10 9 mpteq2ia y0ymodN=y0ymodNmodN
11 oveq1 x=yxmodN=ymodN
12 11 cbvmptv x0xmodN=y0ymodN
13 3 12 eqtri I=y0ymodN
14 nn0z y0y
15 14 anim2i Ny0Ny
16 15 ancomd Ny0yN
17 zmodcl yNymodN0
18 16 17 syl Ny0ymodN0
19 13 a1i NI=y0ymodN
20 3 a1i NI=x0xmodN
21 oveq1 x=ymodNxmodN=ymodNmodN
22 18 19 20 21 fmptco NII=y0ymodNmodN
23 2 22 ax-mp II=y0ymodNmodN
24 10 13 23 3eqtr4ri II=I