Metamath Proof Explorer


Theorem relexp1g

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

Ref Expression
Assertion relexp1g R V R r 1 = R

Proof

Step Hyp Ref Expression
1 df-relexp r = r V , n 0 if n = 0 I dom r ran r seq 1 x V , y V x r z V r n
2 1 a1i R V r = r V , n 0 if n = 0 I dom r ran r seq 1 x V , y V x r z V r n
3 simprr R V r = R n = 1 n = 1
4 ax-1ne0 1 0
5 neeq1 n = 1 n 0 1 0
6 4 5 mpbiri n = 1 n 0
7 3 6 syl R V r = R n = 1 n 0
8 7 neneqd R V r = R n = 1 ¬ n = 0
9 8 iffalsed R V r = R n = 1 if n = 0 I dom r ran r seq 1 x V , y V x r z V r n = seq 1 x V , y V x r z V r n
10 simprl R V r = R n = 1 r = R
11 10 mpteq2dv R V r = R n = 1 z V r = z V R
12 11 seqeq3d R V r = R n = 1 seq 1 x V , y V x r z V r = seq 1 x V , y V x r z V R
13 12 3 fveq12d R V r = R n = 1 seq 1 x V , y V x r z V r n = seq 1 x V , y V x r z V R 1
14 1z 1
15 eqidd R V r = R n = 1 z V R = z V R
16 eqidd R V r = R n = 1 z = 1 R = R
17 1ex 1 V
18 17 a1i R V r = R n = 1 1 V
19 simpl R V r = R n = 1 R V
20 15 16 18 19 fvmptd R V r = R n = 1 z V R 1 = R
21 14 20 seq1i R V r = R n = 1 seq 1 x V , y V x r z V R 1 = R
22 9 13 21 3eqtrd R V r = R n = 1 if n = 0 I dom r ran r seq 1 x V , y V x r z V r n = R
23 elex R V R V
24 1nn0 1 0
25 24 a1i R V 1 0
26 2 22 23 25 23 ovmpod R V R r 1 = R