ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  exfzdc GIF version

Theorem exfzdc 9378
Description: Decidability of the existence of an integer defined by a decidable proposition. (Contributed by Jim Kingdon, 28-Jan-2022.)
Hypotheses
Ref Expression
exfzdc.1 (𝜑𝑀 ∈ ℤ)
exfzdc.2 (𝜑𝑁 ∈ ℤ)
exfzdc.3 ((𝜑𝑛 ∈ (𝑀...𝑁)) → DECID 𝜓)
Assertion
Ref Expression
exfzdc (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)
Distinct variable groups:   𝑛,𝑀   𝑛,𝑁   𝜑,𝑛
Allowed substitution hint:   𝜓(𝑛)

Proof of Theorem exfzdc
Dummy variables 𝑤 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 exfzdc.1 . . . . 5 (𝜑𝑀 ∈ ℤ)
2 exfzdc.2 . . . . 5 (𝜑𝑁 ∈ ℤ)
3 eluz 8765 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
41, 2, 3syl2anc 403 . . . 4 (𝜑 → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
54biimpar 291 . . 3 ((𝜑𝑀𝑁) → 𝑁 ∈ (ℤ𝑀))
6 simpl 107 . . 3 ((𝜑𝑀𝑁) → 𝜑)
7 eluzfz2 9179 . . . 4 (𝑁 ∈ (ℤ𝑀) → 𝑁 ∈ (𝑀...𝑁))
8 oveq2 5571 . . . . . . . 8 (𝑤 = 𝑀 → (𝑀...𝑤) = (𝑀...𝑀))
98rexeqdv 2561 . . . . . . 7 (𝑤 = 𝑀 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑀)𝜓))
109dcbid 782 . . . . . 6 (𝑤 = 𝑀 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑀)𝜓))
1110imbi2d 228 . . . . 5 (𝑤 = 𝑀 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓)))
12 oveq2 5571 . . . . . . . 8 (𝑤 = 𝑦 → (𝑀...𝑤) = (𝑀...𝑦))
1312rexeqdv 2561 . . . . . . 7 (𝑤 = 𝑦 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑦)𝜓))
1413dcbid 782 . . . . . 6 (𝑤 = 𝑦 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑦)𝜓))
1514imbi2d 228 . . . . 5 (𝑤 = 𝑦 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓)))
16 oveq2 5571 . . . . . . . 8 (𝑤 = (𝑦 + 1) → (𝑀...𝑤) = (𝑀...(𝑦 + 1)))
1716rexeqdv 2561 . . . . . . 7 (𝑤 = (𝑦 + 1) → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1817dcbid 782 . . . . . 6 (𝑤 = (𝑦 + 1) → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1918imbi2d 228 . . . . 5 (𝑤 = (𝑦 + 1) → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
20 oveq2 5571 . . . . . . . 8 (𝑤 = 𝑁 → (𝑀...𝑤) = (𝑀...𝑁))
2120rexeqdv 2561 . . . . . . 7 (𝑤 = 𝑁 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
2221dcbid 782 . . . . . 6 (𝑤 = 𝑁 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑁)𝜓))
2322imbi2d 228 . . . . 5 (𝑤 = 𝑁 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)))
24 eluzfz1 9178 . . . . . . . . 9 (𝑁 ∈ (ℤ𝑀) → 𝑀 ∈ (𝑀...𝑁))
2524adantl 271 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ (𝑀...𝑁))
26 exfzdc.3 . . . . . . . . . 10 ((𝜑𝑛 ∈ (𝑀...𝑁)) → DECID 𝜓)
2726ralrimiva 2439 . . . . . . . . 9 (𝜑 → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
2827adantr 270 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
29 nfsbc1v 2842 . . . . . . . . . 10 𝑛[𝑀 / 𝑛]𝜓
3029nfdc 1590 . . . . . . . . 9 𝑛DECID [𝑀 / 𝑛]𝜓
31 sbceq1a 2833 . . . . . . . . . 10 (𝑛 = 𝑀 → (𝜓[𝑀 / 𝑛]𝜓))
3231dcbid 782 . . . . . . . . 9 (𝑛 = 𝑀 → (DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3330, 32rspc 2704 . . . . . . . 8 (𝑀 ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3425, 28, 33sylc 61 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID [𝑀 / 𝑛]𝜓)
351adantr 270 . . . . . . . . . . 11 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ ℤ)
36 fzsn 9212 . . . . . . . . . . 11 (𝑀 ∈ ℤ → (𝑀...𝑀) = {𝑀})
3735, 36syl 14 . . . . . . . . . 10 ((𝜑𝑁 ∈ (ℤ𝑀)) → (𝑀...𝑀) = {𝑀})
3837rexeqdv 2561 . . . . . . . . 9 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓 ↔ ∃𝑛 ∈ {𝑀}𝜓))
39 rexsns 3450 . . . . . . . . 9 (∃𝑛 ∈ {𝑀}𝜓[𝑀 / 𝑛]𝜓)
4038, 39syl6bb 194 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓[𝑀 / 𝑛]𝜓))
4140dcbid 782 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → (DECID𝑛 ∈ (𝑀...𝑀)𝜓DECID [𝑀 / 𝑛]𝜓))
4234, 41mpbird 165 . . . . . 6 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID𝑛 ∈ (𝑀...𝑀)𝜓)
4342expcom 114 . . . . 5 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓))
44 simpr 108 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...𝑦)𝜓)
45 fzofzp1 9365 . . . . . . . . . . . . 13 (𝑦 ∈ (𝑀..^𝑁) → (𝑦 + 1) ∈ (𝑀...𝑁))
4645ad2antrr 472 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑦 + 1) ∈ (𝑀...𝑁))
4727ad2antlr 473 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
48 nfsbc1v 2842 . . . . . . . . . . . . . 14 𝑛[(𝑦 + 1) / 𝑛]𝜓
4948nfdc 1590 . . . . . . . . . . . . 13 𝑛DECID [(𝑦 + 1) / 𝑛]𝜓
50 sbceq1a 2833 . . . . . . . . . . . . . 14 (𝑛 = (𝑦 + 1) → (𝜓[(𝑦 + 1) / 𝑛]𝜓))
5150dcbid 782 . . . . . . . . . . . . 13 (𝑛 = (𝑦 + 1) → (DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5249, 51rspc 2704 . . . . . . . . . . . 12 ((𝑦 + 1) ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5346, 47, 52sylc 61 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID [(𝑦 + 1) / 𝑛]𝜓)
54 rexsns 3450 . . . . . . . . . . . 12 (∃𝑛 ∈ {(𝑦 + 1)}𝜓[(𝑦 + 1) / 𝑛]𝜓)
5554dcbii 781 . . . . . . . . . . 11 (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID [(𝑦 + 1) / 𝑛]𝜓)
5653, 55sylibr 132 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ {(𝑦 + 1)}𝜓)
57 dcor 877 . . . . . . . . . 10 (DECID𝑛 ∈ (𝑀...𝑦)𝜓 → (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓)))
5844, 56, 57sylc 61 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
59 rexun 3162 . . . . . . . . . 10 (∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6059dcbii 781 . . . . . . . . 9 (DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6158, 60sylibr 132 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓)
62 elfzouz 9290 . . . . . . . . . . . 12 (𝑦 ∈ (𝑀..^𝑁) → 𝑦 ∈ (ℤ𝑀))
6362ad2antrr 472 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → 𝑦 ∈ (ℤ𝑀))
64 fzsuc 9214 . . . . . . . . . . 11 (𝑦 ∈ (ℤ𝑀) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6563, 64syl 14 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6665rexeqdv 2561 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓 ↔ ∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6766dcbid 782 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6861, 67mpbird 165 . . . . . . 7 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)
6968exp31 356 . . . . . 6 (𝑦 ∈ (𝑀..^𝑁) → (𝜑 → (DECID𝑛 ∈ (𝑀...𝑦)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
7069a2d 26 . . . . 5 (𝑦 ∈ (𝑀..^𝑁) → ((𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
7111, 15, 19, 23, 43, 70fzind2 9377 . . . 4 (𝑁 ∈ (𝑀...𝑁) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
727, 71syl 14 . . 3 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
735, 6, 72sylc 61 . 2 ((𝜑𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
74 rex0 3281 . . . . 5 ¬ ∃𝑛 ∈ ∅ 𝜓
75 zltnle 8530 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
762, 1, 75syl2anc 403 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
7776biimpar 291 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → 𝑁 < 𝑀)
78 fzn 9189 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
791, 2, 78syl2anc 403 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8079adantr 270 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8177, 80mpbid 145 . . . . . 6 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑀...𝑁) = ∅)
8281rexeqdv 2561 . . . . 5 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ↔ ∃𝑛 ∈ ∅ 𝜓))
8374, 82mtbiri 633 . . . 4 ((𝜑 ∧ ¬ 𝑀𝑁) → ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓)
8483olcd 686 . . 3 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
85 df-dc 777 . . 3 (DECID𝑛 ∈ (𝑀...𝑁)𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
8684, 85sylibr 132 . 2 ((𝜑 ∧ ¬ 𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
87 zdcle 8557 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → DECID 𝑀𝑁)
88 exmiddc 778 . . . 4 (DECID 𝑀𝑁 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
8987, 88syl 14 . . 3 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
901, 2, 89syl2anc 403 . 2 (𝜑 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
9173, 86, 90mpjaodan 745 1 (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 102  wb 103  wo 662  DECID wdc 776   = wceq 1285  wcel 1434  wral 2353  wrex 2354  [wsbc 2824  cun 2980  c0 3267  {csn 3416   class class class wbr 3805  cfv 4952  (class class class)co 5563  1c1 7096   + caddc 7098   < clt 7267  cle 7268  cz 8484  cuz 8752  ...cfz 9157  ..^cfzo 9281
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-sep 3916  ax-pow 3968  ax-pr 3992  ax-un 4216  ax-setind 4308  ax-cnex 7181  ax-resscn 7182  ax-1cn 7183  ax-1re 7184  ax-icn 7185  ax-addcl 7186  ax-addrcl 7187  ax-mulcl 7188  ax-addcom 7190  ax-addass 7192  ax-distr 7194  ax-i2m1 7195  ax-0lt1 7196  ax-0id 7198  ax-rnegex 7199  ax-cnre 7201  ax-pre-ltirr 7202  ax-pre-ltwlin 7203  ax-pre-lttrn 7204  ax-pre-apti 7205  ax-pre-ltadd 7206
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rab 2362  df-v 2612  df-sbc 2825  df-csb 2918  df-dif 2984  df-un 2986  df-in 2988  df-ss 2995  df-nul 3268  df-pw 3402  df-sn 3422  df-pr 3423  df-op 3425  df-uni 3622  df-int 3657  df-iun 3700  df-br 3806  df-opab 3860  df-mpt 3861  df-id 4076  df-xp 4397  df-rel 4398  df-cnv 4399  df-co 4400  df-dm 4401  df-rn 4402  df-res 4403  df-ima 4404  df-iota 4917  df-fun 4954  df-fn 4955  df-f 4956  df-fv 4960  df-riota 5519  df-ov 5566  df-oprab 5567  df-mpt2 5568  df-1st 5818  df-2nd 5819  df-pnf 7269  df-mnf 7270  df-xr 7271  df-ltxr 7272  df-le 7273  df-sub 7400  df-neg 7401  df-inn 8159  df-n0 8408  df-z 8485  df-uz 8753  df-fz 9158  df-fzo 9282
This theorem is referenced by:  prmind2  10709
  Copyright terms: Public domain W3C validator