Metamath Proof Explorer


Theorem rankf

Description: The domain and range of the rank function. (Contributed by Mario Carneiro, 28-May-2013) (Revised by Mario Carneiro, 12-Sep-2013)

Ref Expression
Assertion rankf rank : R1 On On

Proof

Step Hyp Ref Expression
1 df-rank rank = x V y On | x R1 suc y
2 1 funmpt2 Fun rank
3 mptv x V y On | x R1 suc y = x z | z = y On | x R1 suc y
4 1 3 eqtri rank = x z | z = y On | x R1 suc y
5 4 dmeqi dom rank = dom x z | z = y On | x R1 suc y
6 dmopab dom x z | z = y On | x R1 suc y = x | z z = y On | x R1 suc y
7 abeq1 x | z z = y On | x R1 suc y = R1 On x z z = y On | x R1 suc y x R1 On
8 rankwflemb x R1 On y On x R1 suc y
9 intexrab y On x R1 suc y y On | x R1 suc y V
10 isset y On | x R1 suc y V z z = y On | x R1 suc y
11 8 9 10 3bitrri z z = y On | x R1 suc y x R1 On
12 7 11 mpgbir x | z z = y On | x R1 suc y = R1 On
13 6 12 eqtri dom x z | z = y On | x R1 suc y = R1 On
14 5 13 eqtri dom rank = R1 On
15 df-fn rank Fn R1 On Fun rank dom rank = R1 On
16 2 14 15 mpbir2an rank Fn R1 On
17 rabn0 y On | x R1 suc y y On x R1 suc y
18 8 17 bitr4i x R1 On y On | x R1 suc y
19 intex y On | x R1 suc y y On | x R1 suc y V
20 vex x V
21 1 fvmpt2 x V y On | x R1 suc y V rank x = y On | x R1 suc y
22 20 21 mpan y On | x R1 suc y V rank x = y On | x R1 suc y
23 19 22 sylbi y On | x R1 suc y rank x = y On | x R1 suc y
24 ssrab2 y On | x R1 suc y On
25 oninton y On | x R1 suc y On y On | x R1 suc y y On | x R1 suc y On
26 24 25 mpan y On | x R1 suc y y On | x R1 suc y On
27 23 26 eqeltrd y On | x R1 suc y rank x On
28 18 27 sylbi x R1 On rank x On
29 28 rgen x R1 On rank x On
30 ffnfv rank : R1 On On rank Fn R1 On x R1 On rank x On
31 16 29 30 mpbir2an rank : R1 On On