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

Theorem exfzdc 10196
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 9500 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
41, 2, 3syl2anc 409 . . . 4 (𝜑 → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
54biimpar 295 . . 3 ((𝜑𝑀𝑁) → 𝑁 ∈ (ℤ𝑀))
6 simpl 108 . . 3 ((𝜑𝑀𝑁) → 𝜑)
7 eluzfz2 9988 . . . 4 (𝑁 ∈ (ℤ𝑀) → 𝑁 ∈ (𝑀...𝑁))
8 oveq2 5861 . . . . . . . 8 (𝑤 = 𝑀 → (𝑀...𝑤) = (𝑀...𝑀))
98rexeqdv 2672 . . . . . . 7 (𝑤 = 𝑀 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑀)𝜓))
109dcbid 833 . . . . . 6 (𝑤 = 𝑀 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑀)𝜓))
1110imbi2d 229 . . . . 5 (𝑤 = 𝑀 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓)))
12 oveq2 5861 . . . . . . . 8 (𝑤 = 𝑦 → (𝑀...𝑤) = (𝑀...𝑦))
1312rexeqdv 2672 . . . . . . 7 (𝑤 = 𝑦 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑦)𝜓))
1413dcbid 833 . . . . . 6 (𝑤 = 𝑦 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑦)𝜓))
1514imbi2d 229 . . . . 5 (𝑤 = 𝑦 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓)))
16 oveq2 5861 . . . . . . . 8 (𝑤 = (𝑦 + 1) → (𝑀...𝑤) = (𝑀...(𝑦 + 1)))
1716rexeqdv 2672 . . . . . . 7 (𝑤 = (𝑦 + 1) → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1817dcbid 833 . . . . . 6 (𝑤 = (𝑦 + 1) → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1918imbi2d 229 . . . . 5 (𝑤 = (𝑦 + 1) → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
20 oveq2 5861 . . . . . . . 8 (𝑤 = 𝑁 → (𝑀...𝑤) = (𝑀...𝑁))
2120rexeqdv 2672 . . . . . . 7 (𝑤 = 𝑁 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
2221dcbid 833 . . . . . 6 (𝑤 = 𝑁 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑁)𝜓))
2322imbi2d 229 . . . . 5 (𝑤 = 𝑁 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)))
24 eluzfz1 9987 . . . . . . . . 9 (𝑁 ∈ (ℤ𝑀) → 𝑀 ∈ (𝑀...𝑁))
2524adantl 275 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ (𝑀...𝑁))
26 exfzdc.3 . . . . . . . . . 10 ((𝜑𝑛 ∈ (𝑀...𝑁)) → DECID 𝜓)
2726ralrimiva 2543 . . . . . . . . 9 (𝜑 → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
2827adantr 274 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
29 nfsbc1v 2973 . . . . . . . . . 10 𝑛[𝑀 / 𝑛]𝜓
3029nfdc 1652 . . . . . . . . 9 𝑛DECID [𝑀 / 𝑛]𝜓
31 sbceq1a 2964 . . . . . . . . . 10 (𝑛 = 𝑀 → (𝜓[𝑀 / 𝑛]𝜓))
3231dcbid 833 . . . . . . . . 9 (𝑛 = 𝑀 → (DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3330, 32rspc 2828 . . . . . . . 8 (𝑀 ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3425, 28, 33sylc 62 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID [𝑀 / 𝑛]𝜓)
351adantr 274 . . . . . . . . . . 11 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ ℤ)
36 fzsn 10022 . . . . . . . . . . 11 (𝑀 ∈ ℤ → (𝑀...𝑀) = {𝑀})
3735, 36syl 14 . . . . . . . . . 10 ((𝜑𝑁 ∈ (ℤ𝑀)) → (𝑀...𝑀) = {𝑀})
3837rexeqdv 2672 . . . . . . . . 9 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓 ↔ ∃𝑛 ∈ {𝑀}𝜓))
39 rexsns 3622 . . . . . . . . 9 (∃𝑛 ∈ {𝑀}𝜓[𝑀 / 𝑛]𝜓)
4038, 39bitrdi 195 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓[𝑀 / 𝑛]𝜓))
4140dcbid 833 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → (DECID𝑛 ∈ (𝑀...𝑀)𝜓DECID [𝑀 / 𝑛]𝜓))
4234, 41mpbird 166 . . . . . 6 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID𝑛 ∈ (𝑀...𝑀)𝜓)
4342expcom 115 . . . . 5 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓))
44 simpr 109 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...𝑦)𝜓)
45 fzofzp1 10183 . . . . . . . . . . . . 13 (𝑦 ∈ (𝑀..^𝑁) → (𝑦 + 1) ∈ (𝑀...𝑁))
4645ad2antrr 485 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑦 + 1) ∈ (𝑀...𝑁))
4727ad2antlr 486 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
48 nfsbc1v 2973 . . . . . . . . . . . . . 14 𝑛[(𝑦 + 1) / 𝑛]𝜓
4948nfdc 1652 . . . . . . . . . . . . 13 𝑛DECID [(𝑦 + 1) / 𝑛]𝜓
50 sbceq1a 2964 . . . . . . . . . . . . . 14 (𝑛 = (𝑦 + 1) → (𝜓[(𝑦 + 1) / 𝑛]𝜓))
5150dcbid 833 . . . . . . . . . . . . 13 (𝑛 = (𝑦 + 1) → (DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5249, 51rspc 2828 . . . . . . . . . . . 12 ((𝑦 + 1) ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5346, 47, 52sylc 62 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID [(𝑦 + 1) / 𝑛]𝜓)
54 rexsns 3622 . . . . . . . . . . . 12 (∃𝑛 ∈ {(𝑦 + 1)}𝜓[(𝑦 + 1) / 𝑛]𝜓)
5554dcbii 835 . . . . . . . . . . 11 (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID [(𝑦 + 1) / 𝑛]𝜓)
5653, 55sylibr 133 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ {(𝑦 + 1)}𝜓)
57 dcor 930 . . . . . . . . . 10 (DECID𝑛 ∈ (𝑀...𝑦)𝜓 → (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓)))
5844, 56, 57sylc 62 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
59 rexun 3307 . . . . . . . . . 10 (∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6059dcbii 835 . . . . . . . . 9 (DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6158, 60sylibr 133 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓)
62 elfzouz 10107 . . . . . . . . . . . 12 (𝑦 ∈ (𝑀..^𝑁) → 𝑦 ∈ (ℤ𝑀))
6362ad2antrr 485 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → 𝑦 ∈ (ℤ𝑀))
64 fzsuc 10025 . . . . . . . . . . 11 (𝑦 ∈ (ℤ𝑀) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6563, 64syl 14 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6665rexeqdv 2672 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓 ↔ ∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6766dcbid 833 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6861, 67mpbird 166 . . . . . . 7 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)
6968exp31 362 . . . . . 6 (𝑦 ∈ (𝑀..^𝑁) → (𝜑 → (DECID𝑛 ∈ (𝑀...𝑦)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
7069a2d 26 . . . . 5 (𝑦 ∈ (𝑀..^𝑁) → ((𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
7111, 15, 19, 23, 43, 70fzind2 10195 . . . 4 (𝑁 ∈ (𝑀...𝑁) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
727, 71syl 14 . . 3 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
735, 6, 72sylc 62 . 2 ((𝜑𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
74 rex0 3432 . . . . 5 ¬ ∃𝑛 ∈ ∅ 𝜓
75 zltnle 9258 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
762, 1, 75syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
7776biimpar 295 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → 𝑁 < 𝑀)
78 fzn 9998 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
791, 2, 78syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8079adantr 274 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8177, 80mpbid 146 . . . . . 6 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑀...𝑁) = ∅)
8281rexeqdv 2672 . . . . 5 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ↔ ∃𝑛 ∈ ∅ 𝜓))
8374, 82mtbiri 670 . . . 4 ((𝜑 ∧ ¬ 𝑀𝑁) → ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓)
8483olcd 729 . . 3 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
85 df-dc 830 . . 3 (DECID𝑛 ∈ (𝑀...𝑁)𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
8684, 85sylibr 133 . 2 ((𝜑 ∧ ¬ 𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
87 zdcle 9288 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → DECID 𝑀𝑁)
88 exmiddc 831 . . . 4 (DECID 𝑀𝑁 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
8987, 88syl 14 . . 3 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
901, 2, 89syl2anc 409 . 2 (𝜑 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
9173, 86, 90mpjaodan 793 1 (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  wo 703  DECID wdc 829   = wceq 1348  wcel 2141  wral 2448  wrex 2449  [wsbc 2955  cun 3119  c0 3414  {csn 3583   class class class wbr 3989  cfv 5198  (class class class)co 5853  1c1 7775   + caddc 7777   < clt 7954  cle 7955  cz 9212  cuz 9487  ...cfz 9965  ..^cfzo 10098
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-sep 4107  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-addcom 7874  ax-addass 7876  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-0id 7882  ax-rnegex 7883  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-apti 7889  ax-pre-ltadd 7890
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-id 4278  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1st 6119  df-2nd 6120  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-inn 8879  df-n0 9136  df-z 9213  df-uz 9488  df-fz 9966  df-fzo 10099
This theorem is referenced by:  prmind2  12074
  Copyright terms: Public domain W3C validator