Metamath Proof Explorer


Theorem relexpsucnnr

Description: A reduction for relation exponentiation to the right. (Contributed by RP, 22-May-2020)

Ref Expression
Assertion relexpsucnnr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) )

Proof

Step Hyp Ref Expression
1 eqidd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) )
2 simprr ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅𝑛 = ( 𝑁 + 1 ) ) ) → 𝑛 = ( 𝑁 + 1 ) )
3 dmeq ( 𝑟 = 𝑅 → dom 𝑟 = dom 𝑅 )
4 rneq ( 𝑟 = 𝑅 → ran 𝑟 = ran 𝑅 )
5 3 4 uneq12d ( 𝑟 = 𝑅 → ( dom 𝑟 ∪ ran 𝑟 ) = ( dom 𝑅 ∪ ran 𝑅 ) )
6 5 reseq2d ( 𝑟 = 𝑅 → ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) = ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) )
7 eqidd ( 𝑟 = 𝑅 → 1 = 1 )
8 coeq2 ( 𝑟 = 𝑅 → ( 𝑥𝑟 ) = ( 𝑥𝑅 ) )
9 8 mpoeq3dv ( 𝑟 = 𝑅 → ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) = ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) )
10 id ( 𝑟 = 𝑅𝑟 = 𝑅 )
11 10 mpteq2dv ( 𝑟 = 𝑅 → ( 𝑧 ∈ V ↦ 𝑟 ) = ( 𝑧 ∈ V ↦ 𝑅 ) )
12 7 9 11 seqeq123d ( 𝑟 = 𝑅 → seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) = seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) )
13 12 fveq1d ( 𝑟 = 𝑅 → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) )
14 6 13 ifeq12d ( 𝑟 = 𝑅 → if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) )
15 14 ad2antrl ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅 ∧ ( 𝑁 + 1 ) = ( 𝑁 + 1 ) ) ) → if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) )
16 15 a1i ( 𝑛 = ( 𝑁 + 1 ) → ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅 ∧ ( 𝑁 + 1 ) = ( 𝑁 + 1 ) ) ) → if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) ) )
17 eqeq1 ( 𝑛 = ( 𝑁 + 1 ) → ( 𝑛 = ( 𝑁 + 1 ) ↔ ( 𝑁 + 1 ) = ( 𝑁 + 1 ) ) )
18 17 anbi2d ( 𝑛 = ( 𝑁 + 1 ) → ( ( 𝑟 = 𝑅𝑛 = ( 𝑁 + 1 ) ) ↔ ( 𝑟 = 𝑅 ∧ ( 𝑁 + 1 ) = ( 𝑁 + 1 ) ) ) )
19 18 anbi2d ( 𝑛 = ( 𝑁 + 1 ) → ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅𝑛 = ( 𝑁 + 1 ) ) ) ↔ ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅 ∧ ( 𝑁 + 1 ) = ( 𝑁 + 1 ) ) ) ) )
20 eqeq1 ( 𝑛 = ( 𝑁 + 1 ) → ( 𝑛 = 0 ↔ ( 𝑁 + 1 ) = 0 ) )
21 fveq2 ( 𝑛 = ( 𝑁 + 1 ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) )
22 20 21 ifbieq2d ( 𝑛 = ( 𝑁 + 1 ) → if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) ) )
23 22 eqeq1d ( 𝑛 = ( 𝑁 + 1 ) → ( if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) ↔ if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ ( 𝑁 + 1 ) ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) ) )
24 16 19 23 3imtr4d ( 𝑛 = ( 𝑁 + 1 ) → ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅𝑛 = ( 𝑁 + 1 ) ) ) → if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) ) )
25 2 24 mpcom ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅𝑛 = ( 𝑁 + 1 ) ) ) → if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) )
26 elex ( 𝑅𝑉𝑅 ∈ V )
27 26 adantr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑅 ∈ V )
28 simpr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑁 ∈ ℕ )
29 28 peano2nnd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑁 + 1 ) ∈ ℕ )
30 29 nnnn0d ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑁 + 1 ) ∈ ℕ0 )
31 dmexg ( 𝑅𝑉 → dom 𝑅 ∈ V )
32 rnexg ( 𝑅𝑉 → ran 𝑅 ∈ V )
33 unexg ( ( dom 𝑅 ∈ V ∧ ran 𝑅 ∈ V ) → ( dom 𝑅 ∪ ran 𝑅 ) ∈ V )
34 31 32 33 syl2anc ( 𝑅𝑉 → ( dom 𝑅 ∪ ran 𝑅 ) ∈ V )
35 resiexg ( ( dom 𝑅 ∪ ran 𝑅 ) ∈ V → ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) ∈ V )
36 34 35 syl ( 𝑅𝑉 → ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) ∈ V )
37 36 adantr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) ∈ V )
38 fvexd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ∈ V )
39 37 38 ifcld ( ( 𝑅𝑉𝑁 ∈ ℕ ) → if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) ∈ V )
40 1 25 27 30 39 ovmpod ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) = if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) )
41 nnne0 ( ( 𝑁 + 1 ) ∈ ℕ → ( 𝑁 + 1 ) ≠ 0 )
42 41 neneqd ( ( 𝑁 + 1 ) ∈ ℕ → ¬ ( 𝑁 + 1 ) = 0 )
43 29 42 syl ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ¬ ( 𝑁 + 1 ) = 0 )
44 43 iffalsed ( ( 𝑅𝑉𝑁 ∈ ℕ ) → if ( ( 𝑁 + 1 ) = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) ) = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) )
45 elnnuz ( 𝑁 ∈ ℕ ↔ 𝑁 ∈ ( ℤ ‘ 1 ) )
46 45 biimpi ( 𝑁 ∈ ℕ → 𝑁 ∈ ( ℤ ‘ 1 ) )
47 46 adantl ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑁 ∈ ( ℤ ‘ 1 ) )
48 seqp1 ( 𝑁 ∈ ( ℤ ‘ 1 ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) ( ( 𝑧 ∈ V ↦ 𝑅 ) ‘ ( 𝑁 + 1 ) ) ) )
49 47 48 syl ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) ( ( 𝑧 ∈ V ↦ 𝑅 ) ‘ ( 𝑁 + 1 ) ) ) )
50 ovex ( 𝑁 + 1 ) ∈ V
51 simpl ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑅𝑉 )
52 eqidd ( 𝑧 = ( 𝑁 + 1 ) → 𝑅 = 𝑅 )
53 eqid ( 𝑧 ∈ V ↦ 𝑅 ) = ( 𝑧 ∈ V ↦ 𝑅 )
54 52 53 fvmptg ( ( ( 𝑁 + 1 ) ∈ V ∧ 𝑅𝑉 ) → ( ( 𝑧 ∈ V ↦ 𝑅 ) ‘ ( 𝑁 + 1 ) ) = 𝑅 )
55 50 51 54 sylancr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( 𝑧 ∈ V ↦ 𝑅 ) ‘ ( 𝑁 + 1 ) ) = 𝑅 )
56 55 oveq2d ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) ( ( 𝑧 ∈ V ↦ 𝑅 ) ‘ ( 𝑁 + 1 ) ) ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) 𝑅 ) )
57 nfcv 𝑎 ( 𝑥𝑅 )
58 nfcv 𝑏 ( 𝑥𝑅 )
59 nfcv 𝑥 ( 𝑎𝑅 )
60 nfcv 𝑦 ( 𝑎𝑅 )
61 simpl ( ( 𝑥 = 𝑎𝑦 = 𝑏 ) → 𝑥 = 𝑎 )
62 61 coeq1d ( ( 𝑥 = 𝑎𝑦 = 𝑏 ) → ( 𝑥𝑅 ) = ( 𝑎𝑅 ) )
63 57 58 59 60 62 cbvmpo ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) = ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) )
64 oveq ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) = ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) 𝑅 ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) 𝑅 ) )
65 63 64 mp1i ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) 𝑅 ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) 𝑅 ) )
66 eqidd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) = ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) )
67 simprl ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑎 = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∧ 𝑏 = 𝑅 ) ) → 𝑎 = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) )
68 67 coeq1d ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑎 = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∧ 𝑏 = 𝑅 ) ) → ( 𝑎𝑅 ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∘ 𝑅 ) )
69 fvexd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∈ V )
70 fvex ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∈ V
71 coexg ( ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∈ V ∧ 𝑅𝑉 ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∘ 𝑅 ) ∈ V )
72 70 51 71 sylancr ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∘ 𝑅 ) ∈ V )
73 66 68 69 27 72 ovmpod ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑎 ∈ V , 𝑏 ∈ V ↦ ( 𝑎𝑅 ) ) 𝑅 ) = ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∘ 𝑅 ) )
74 simpr ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → 𝑛 = 𝑁 )
75 74 eqeq1d ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → ( 𝑛 = 0 ↔ 𝑁 = 0 ) )
76 6 adantr ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) = ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) )
77 12 adantr ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) = seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) )
78 77 74 fveq12d ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) )
79 75 76 78 ifbieq12d ( ( 𝑟 = 𝑅𝑛 = 𝑁 ) → if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( 𝑁 = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ) )
80 79 adantl ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) ∧ ( 𝑟 = 𝑅𝑛 = 𝑁 ) ) → if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) = if ( 𝑁 = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ) )
81 28 nnnn0d ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑁 ∈ ℕ0 )
82 37 69 ifcld ( ( 𝑅𝑉𝑁 ∈ ℕ ) → if ( 𝑁 = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ) ∈ V )
83 1 80 27 81 82 ovmpod ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) = if ( 𝑁 = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ) )
84 nnne0 ( 𝑁 ∈ ℕ → 𝑁 ≠ 0 )
85 84 adantl ( ( 𝑅𝑉𝑁 ∈ ℕ ) → 𝑁 ≠ 0 )
86 85 neneqd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ¬ 𝑁 = 0 )
87 86 iffalsed ( ( 𝑅𝑉𝑁 ∈ ℕ ) → if ( 𝑁 = 0 , ( I ↾ ( dom 𝑅 ∪ ran 𝑅 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ) = ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) )
88 83 87 eqtr2d ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) = ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) )
89 88 coeq1d ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ∘ 𝑅 ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) )
90 65 73 89 3eqtrd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ 𝑁 ) ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) 𝑅 ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) )
91 49 56 90 3eqtrd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑅 ) ) , ( 𝑧 ∈ V ↦ 𝑅 ) ) ‘ ( 𝑁 + 1 ) ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) )
92 40 44 91 3eqtrd ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) )
93 df-relexp 𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) )
94 oveq ( ↑𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) → ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) )
95 oveq ( ↑𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) → ( 𝑅𝑟 𝑁 ) = ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) )
96 95 coeq1d ( ↑𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) → ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) )
97 94 96 eqeq12d ( ↑𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) → ( ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) ↔ ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) ) )
98 97 imbi2d ( ↑𝑟 = ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) → ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) ) ↔ ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) ) ) )
99 93 98 ax-mp ( ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) ) ↔ ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) ( 𝑁 + 1 ) ) = ( ( 𝑅 ( 𝑟 ∈ V , 𝑛 ∈ ℕ0 ↦ if ( 𝑛 = 0 , ( I ↾ ( dom 𝑟 ∪ ran 𝑟 ) ) , ( seq 1 ( ( 𝑥 ∈ V , 𝑦 ∈ V ↦ ( 𝑥𝑟 ) ) , ( 𝑧 ∈ V ↦ 𝑟 ) ) ‘ 𝑛 ) ) ) 𝑁 ) ∘ 𝑅 ) ) )
100 92 99 mpbir ( ( 𝑅𝑉𝑁 ∈ ℕ ) → ( 𝑅𝑟 ( 𝑁 + 1 ) ) = ( ( 𝑅𝑟 𝑁 ) ∘ 𝑅 ) )