Metamath Proof Explorer


Theorem relexp1g

Description: A relation composed once is itself. (Contributed by RP, 22-May-2020)

Ref Expression
Assertion relexp1g RVRr1=R

Proof

Step Hyp Ref Expression
1 df-relexp r=rV,n0ifn=0Idomrranrseq1xV,yVxrzVrn
2 1 a1i RVr=rV,n0ifn=0Idomrranrseq1xV,yVxrzVrn
3 simprr RVr=Rn=1n=1
4 ax-1ne0 10
5 neeq1 n=1n010
6 4 5 mpbiri n=1n0
7 3 6 syl RVr=Rn=1n0
8 7 neneqd RVr=Rn=1¬n=0
9 8 iffalsed RVr=Rn=1ifn=0Idomrranrseq1xV,yVxrzVrn=seq1xV,yVxrzVrn
10 simprl RVr=Rn=1r=R
11 10 mpteq2dv RVr=Rn=1zVr=zVR
12 11 seqeq3d RVr=Rn=1seq1xV,yVxrzVr=seq1xV,yVxrzVR
13 12 3 fveq12d RVr=Rn=1seq1xV,yVxrzVrn=seq1xV,yVxrzVR1
14 1z 1
15 eqidd RVr=Rn=1zVR=zVR
16 eqidd RVr=Rn=1z=1R=R
17 1ex 1V
18 17 a1i RVr=Rn=11V
19 simpl RVr=Rn=1RV
20 15 16 18 19 fvmptd RVr=Rn=1zVR1=R
21 14 20 seq1i RVr=Rn=1seq1xV,yVxrzVR1=R
22 9 13 21 3eqtrd RVr=Rn=1ifn=0Idomrranrseq1xV,yVxrzVrn=R
23 elex RVRV
24 1nn0 10
25 24 a1i RV10
26 2 22 23 25 23 ovmpod RVRr1=R