Metamath Proof Explorer


Theorem fdc1

Description: Variant of fdc with no specified base value. (Contributed by Jeff Madsen, 18-Jun-2010)

Ref Expression
Hypotheses fdc1.1 𝐴 ∈ V
fdc1.2 𝑀 ∈ ℤ
fdc1.3 𝑍 = ( ℤ𝑀 )
fdc1.4 𝑁 = ( 𝑀 + 1 )
fdc1.5 ( 𝑎 = ( 𝑓𝑀 ) → ( 𝜁𝜎 ) )
fdc1.6 ( 𝑎 = ( 𝑓 ‘ ( 𝑘 − 1 ) ) → ( 𝜑𝜓 ) )
fdc1.7 ( 𝑏 = ( 𝑓𝑘 ) → ( 𝜓𝜒 ) )
fdc1.8 ( 𝑎 = ( 𝑓𝑛 ) → ( 𝜃𝜏 ) )
fdc1.9 ( 𝜂 → ∃ 𝑎𝐴 𝜁 )
fdc1.10 ( 𝜂𝑅 Fr 𝐴 )
fdc1.11 ( ( 𝜂𝑎𝐴 ) → ( 𝜃 ∨ ∃ 𝑏𝐴 𝜑 ) )
fdc1.12 ( ( ( 𝜂𝜑 ) ∧ ( 𝑎𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑎 )
Assertion fdc1 ( 𝜂 → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )

Proof

Step Hyp Ref Expression
1 fdc1.1 𝐴 ∈ V
2 fdc1.2 𝑀 ∈ ℤ
3 fdc1.3 𝑍 = ( ℤ𝑀 )
4 fdc1.4 𝑁 = ( 𝑀 + 1 )
5 fdc1.5 ( 𝑎 = ( 𝑓𝑀 ) → ( 𝜁𝜎 ) )
6 fdc1.6 ( 𝑎 = ( 𝑓 ‘ ( 𝑘 − 1 ) ) → ( 𝜑𝜓 ) )
7 fdc1.7 ( 𝑏 = ( 𝑓𝑘 ) → ( 𝜓𝜒 ) )
8 fdc1.8 ( 𝑎 = ( 𝑓𝑛 ) → ( 𝜃𝜏 ) )
9 fdc1.9 ( 𝜂 → ∃ 𝑎𝐴 𝜁 )
10 fdc1.10 ( 𝜂𝑅 Fr 𝐴 )
11 fdc1.11 ( ( 𝜂𝑎𝐴 ) → ( 𝜃 ∨ ∃ 𝑏𝐴 𝜑 ) )
12 fdc1.12 ( ( ( 𝜂𝜑 ) ∧ ( 𝑎𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑎 )
13 eleq1w ( 𝑐 = 𝑎 → ( 𝑐𝐴𝑎𝐴 ) )
14 13 anbi2d ( 𝑐 = 𝑎 → ( ( 𝜂𝑐𝐴 ) ↔ ( 𝜂𝑎𝐴 ) ) )
15 sbceq2a ( 𝑐 = 𝑎 → ( [ 𝑐 / 𝑎 ] 𝜁𝜁 ) )
16 14 15 anbi12d ( 𝑐 = 𝑎 → ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) ↔ ( ( 𝜂𝑎𝐴 ) ∧ 𝜁 ) ) )
17 16 imbi1d ( 𝑐 = 𝑎 → ( ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) ) ↔ ( ( ( 𝜂𝑎𝐴 ) ∧ 𝜁 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) ) ) )
18 sbsbc ( [ 𝑑 / 𝑎 ] 𝜑[ 𝑑 / 𝑎 ] 𝜑 )
19 nfv 𝑎 𝜓
20 19 6 sbhypf ( 𝑑 = ( 𝑓 ‘ ( 𝑘 − 1 ) ) → ( [ 𝑑 / 𝑎 ] 𝜑𝜓 ) )
21 18 20 bitr3id ( 𝑑 = ( 𝑓 ‘ ( 𝑘 − 1 ) ) → ( [ 𝑑 / 𝑎 ] 𝜑𝜓 ) )
22 sbsbc ( [ 𝑑 / 𝑎 ] 𝜃[ 𝑑 / 𝑎 ] 𝜃 )
23 nfv 𝑎 𝜏
24 23 8 sbhypf ( 𝑑 = ( 𝑓𝑛 ) → ( [ 𝑑 / 𝑎 ] 𝜃𝜏 ) )
25 22 24 bitr3id ( 𝑑 = ( 𝑓𝑛 ) → ( [ 𝑑 / 𝑎 ] 𝜃𝜏 ) )
26 simprl ( ( 𝜂 ∧ ( 𝑐𝐴[ 𝑐 / 𝑎 ] 𝜁 ) ) → 𝑐𝐴 )
27 10 adantr ( ( 𝜂 ∧ ( 𝑐𝐴[ 𝑐 / 𝑎 ] 𝜁 ) ) → 𝑅 Fr 𝐴 )
28 nfv 𝑎 ( 𝜂𝑑𝐴 )
29 nfsbc1v 𝑎 [ 𝑑 / 𝑎 ] 𝜃
30 nfcv 𝑎 𝐴
31 nfsbc1v 𝑎 [ 𝑑 / 𝑎 ] 𝜑
32 30 31 nfrex 𝑎𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑
33 29 32 nfor 𝑎 ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 )
34 28 33 nfim 𝑎 ( ( 𝜂𝑑𝐴 ) → ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) )
35 eleq1w ( 𝑎 = 𝑑 → ( 𝑎𝐴𝑑𝐴 ) )
36 35 anbi2d ( 𝑎 = 𝑑 → ( ( 𝜂𝑎𝐴 ) ↔ ( 𝜂𝑑𝐴 ) ) )
37 sbceq1a ( 𝑎 = 𝑑 → ( 𝜃[ 𝑑 / 𝑎 ] 𝜃 ) )
38 sbceq1a ( 𝑎 = 𝑑 → ( 𝜑[ 𝑑 / 𝑎 ] 𝜑 ) )
39 38 rexbidv ( 𝑎 = 𝑑 → ( ∃ 𝑏𝐴 𝜑 ↔ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) )
40 37 39 orbi12d ( 𝑎 = 𝑑 → ( ( 𝜃 ∨ ∃ 𝑏𝐴 𝜑 ) ↔ ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) ) )
41 36 40 imbi12d ( 𝑎 = 𝑑 → ( ( ( 𝜂𝑎𝐴 ) → ( 𝜃 ∨ ∃ 𝑏𝐴 𝜑 ) ) ↔ ( ( 𝜂𝑑𝐴 ) → ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) ) ) )
42 34 41 11 chvarfv ( ( 𝜂𝑑𝐴 ) → ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) )
43 42 adantlr ( ( ( 𝜂 ∧ ( 𝑐𝐴[ 𝑐 / 𝑎 ] 𝜁 ) ) ∧ 𝑑𝐴 ) → ( [ 𝑑 / 𝑎 ] 𝜃 ∨ ∃ 𝑏𝐴 [ 𝑑 / 𝑎 ] 𝜑 ) )
44 nfv 𝑎 𝜂
45 44 31 nfan 𝑎 ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 )
46 nfv 𝑎 ( 𝑑𝐴𝑏𝐴 )
47 45 46 nfan 𝑎 ( ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) )
48 nfv 𝑎 𝑏 𝑅 𝑑
49 47 48 nfim 𝑎 ( ( ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑑 )
50 38 anbi2d ( 𝑎 = 𝑑 → ( ( 𝜂𝜑 ) ↔ ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ) )
51 35 anbi1d ( 𝑎 = 𝑑 → ( ( 𝑎𝐴𝑏𝐴 ) ↔ ( 𝑑𝐴𝑏𝐴 ) ) )
52 50 51 anbi12d ( 𝑎 = 𝑑 → ( ( ( 𝜂𝜑 ) ∧ ( 𝑎𝐴𝑏𝐴 ) ) ↔ ( ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) ) ) )
53 breq2 ( 𝑎 = 𝑑 → ( 𝑏 𝑅 𝑎𝑏 𝑅 𝑑 ) )
54 52 53 imbi12d ( 𝑎 = 𝑑 → ( ( ( ( 𝜂𝜑 ) ∧ ( 𝑎𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑎 ) ↔ ( ( ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑑 ) ) )
55 49 54 12 chvarfv ( ( ( 𝜂[ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑑 )
56 55 adantllr ( ( ( ( 𝜂 ∧ ( 𝑐𝐴[ 𝑐 / 𝑎 ] 𝜁 ) ) ∧ [ 𝑑 / 𝑎 ] 𝜑 ) ∧ ( 𝑑𝐴𝑏𝐴 ) ) → 𝑏 𝑅 𝑑 )
57 1 2 3 4 21 7 25 26 27 43 56 fdc ( ( 𝜂 ∧ ( 𝑐𝐴[ 𝑐 / 𝑎 ] 𝜁 ) ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( ( 𝑓𝑀 ) = 𝑐𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )
58 57 anassrs ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( ( 𝑓𝑀 ) = 𝑐𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )
59 idd ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ) )
60 dfsbcq ( ( 𝑓𝑀 ) = 𝑐 → ( [ ( 𝑓𝑀 ) / 𝑎 ] 𝜁[ 𝑐 / 𝑎 ] 𝜁 ) )
61 fvex ( 𝑓𝑀 ) ∈ V
62 61 5 sbcie ( [ ( 𝑓𝑀 ) / 𝑎 ] 𝜁𝜎 )
63 60 62 bitr3di ( ( 𝑓𝑀 ) = 𝑐 → ( [ 𝑐 / 𝑎 ] 𝜁𝜎 ) )
64 63 biimpcd ( [ 𝑐 / 𝑎 ] 𝜁 → ( ( 𝑓𝑀 ) = 𝑐𝜎 ) )
65 64 adantl ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ( 𝑓𝑀 ) = 𝑐𝜎 ) )
66 65 anim1d ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ( ( 𝑓𝑀 ) = 𝑐𝜏 ) → ( 𝜎𝜏 ) ) )
67 idd ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 → ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )
68 59 66 67 3anim123d ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( ( 𝑓𝑀 ) = 𝑐𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) → ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) ) )
69 68 eximdv ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ∃ 𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( ( 𝑓𝑀 ) = 𝑐𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) → ∃ 𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) ) )
70 69 reximdv ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ( ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( ( 𝑓𝑀 ) = 𝑐𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) ) )
71 58 70 mpd ( ( ( 𝜂𝑐𝐴 ) ∧ [ 𝑐 / 𝑎 ] 𝜁 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )
72 17 71 chvarvv ( ( ( 𝜂𝑎𝐴 ) ∧ 𝜁 ) → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )
73 72 9 r19.29a ( 𝜂 → ∃ 𝑛𝑍𝑓 ( 𝑓 : ( 𝑀 ... 𝑛 ) ⟶ 𝐴 ∧ ( 𝜎𝜏 ) ∧ ∀ 𝑘 ∈ ( 𝑁 ... 𝑛 ) 𝜒 ) )