Metamath Proof Explorer


Theorem nnwos

Description: Well-ordering principle: any nonempty set of positive integers has a least element (schema form). (Contributed by NM, 17-Aug-2001)

Ref Expression
Hypothesis nnwos.1 x=yφψ
Assertion nnwos xφxφyψxy

Proof

Step Hyp Ref Expression
1 nnwos.1 x=yφψ
2 nfrab1 _xx|φ
3 nfcv _yx|φ
4 2 3 nnwof x|φx|φxx|φyx|φxy
5 ssrab2 x|φ
6 5 biantrur x|φx|φx|φ
7 rabn0 x|φxφ
8 6 7 bitr3i x|φx|φxφ
9 df-rex xx|φyx|φxyxxx|φyx|φxy
10 rabid xx|φxφ
11 df-ral yx|φxyyyx|φxy
12 1 elrab yx|φyψ
13 12 imbi1i yx|φxyyψxy
14 impexp yψxyyψxy
15 13 14 bitri yx|φxyyψxy
16 15 albii yyx|φxyyyψxy
17 11 16 bitri yx|φxyyyψxy
18 10 17 anbi12i xx|φyx|φxyxφyyψxy
19 18 exbii xxx|φyx|φxyxxφyyψxy
20 df-ral yψxyyyψxy
21 20 anbi2i xφyψxyxφyyψxy
22 anass xφyψxyxφyψxy
23 21 22 bitr3i xφyyψxyxφyψxy
24 23 exbii xxφyyψxyxxφyψxy
25 df-rex xφyψxyxxφyψxy
26 24 25 bitr4i xxφyyψxyxφyψxy
27 9 19 26 3bitri xx|φyx|φxyxφyψxy
28 4 8 27 3imtr3i xφxφyψxy