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

Theorem exfzdc 10175
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 9479 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
41, 2, 3syl2anc 409 . . . 4 (𝜑 → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
54biimpar 295 . . 3 ((𝜑𝑀𝑁) → 𝑁 ∈ (ℤ𝑀))
6 simpl 108 . . 3 ((𝜑𝑀𝑁) → 𝜑)
7 eluzfz2 9967 . . . 4 (𝑁 ∈ (ℤ𝑀) → 𝑁 ∈ (𝑀...𝑁))
8 oveq2 5850 . . . . . . . 8 (𝑤 = 𝑀 → (𝑀...𝑤) = (𝑀...𝑀))
98rexeqdv 2668 . . . . . . 7 (𝑤 = 𝑀 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑀)𝜓))
109dcbid 828 . . . . . 6 (𝑤 = 𝑀 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑀)𝜓))
1110imbi2d 229 . . . . 5 (𝑤 = 𝑀 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓)))
12 oveq2 5850 . . . . . . . 8 (𝑤 = 𝑦 → (𝑀...𝑤) = (𝑀...𝑦))
1312rexeqdv 2668 . . . . . . 7 (𝑤 = 𝑦 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑦)𝜓))
1413dcbid 828 . . . . . 6 (𝑤 = 𝑦 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑦)𝜓))
1514imbi2d 229 . . . . 5 (𝑤 = 𝑦 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓)))
16 oveq2 5850 . . . . . . . 8 (𝑤 = (𝑦 + 1) → (𝑀...𝑤) = (𝑀...(𝑦 + 1)))
1716rexeqdv 2668 . . . . . . 7 (𝑤 = (𝑦 + 1) → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1817dcbid 828 . . . . . 6 (𝑤 = (𝑦 + 1) → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1918imbi2d 229 . . . . 5 (𝑤 = (𝑦 + 1) → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
20 oveq2 5850 . . . . . . . 8 (𝑤 = 𝑁 → (𝑀...𝑤) = (𝑀...𝑁))
2120rexeqdv 2668 . . . . . . 7 (𝑤 = 𝑁 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
2221dcbid 828 . . . . . 6 (𝑤 = 𝑁 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑁)𝜓))
2322imbi2d 229 . . . . 5 (𝑤 = 𝑁 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)))
24 eluzfz1 9966 . . . . . . . . 9 (𝑁 ∈ (ℤ𝑀) → 𝑀 ∈ (𝑀...𝑁))
2524adantl 275 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ (𝑀...𝑁))
26 exfzdc.3 . . . . . . . . . 10 ((𝜑𝑛 ∈ (𝑀...𝑁)) → DECID 𝜓)
2726ralrimiva 2539 . . . . . . . . 9 (𝜑 → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
2827adantr 274 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
29 nfsbc1v 2969 . . . . . . . . . 10 𝑛[𝑀 / 𝑛]𝜓
3029nfdc 1647 . . . . . . . . 9 𝑛DECID [𝑀 / 𝑛]𝜓
31 sbceq1a 2960 . . . . . . . . . 10 (𝑛 = 𝑀 → (𝜓[𝑀 / 𝑛]𝜓))
3231dcbid 828 . . . . . . . . 9 (𝑛 = 𝑀 → (DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3330, 32rspc 2824 . . . . . . . 8 (𝑀 ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3425, 28, 33sylc 62 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID [𝑀 / 𝑛]𝜓)
351adantr 274 . . . . . . . . . . 11 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ ℤ)
36 fzsn 10001 . . . . . . . . . . 11 (𝑀 ∈ ℤ → (𝑀...𝑀) = {𝑀})
3735, 36syl 14 . . . . . . . . . 10 ((𝜑𝑁 ∈ (ℤ𝑀)) → (𝑀...𝑀) = {𝑀})
3837rexeqdv 2668 . . . . . . . . 9 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓 ↔ ∃𝑛 ∈ {𝑀}𝜓))
39 rexsns 3615 . . . . . . . . 9 (∃𝑛 ∈ {𝑀}𝜓[𝑀 / 𝑛]𝜓)
4038, 39bitrdi 195 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓[𝑀 / 𝑛]𝜓))
4140dcbid 828 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → (DECID𝑛 ∈ (𝑀...𝑀)𝜓DECID [𝑀 / 𝑛]𝜓))
4234, 41mpbird 166 . . . . . 6 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID𝑛 ∈ (𝑀...𝑀)𝜓)
4342expcom 115 . . . . 5 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓))
44 simpr 109 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...𝑦)𝜓)
45 fzofzp1 10162 . . . . . . . . . . . . 13 (𝑦 ∈ (𝑀..^𝑁) → (𝑦 + 1) ∈ (𝑀...𝑁))
4645ad2antrr 480 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑦 + 1) ∈ (𝑀...𝑁))
4727ad2antlr 481 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
48 nfsbc1v 2969 . . . . . . . . . . . . . 14 𝑛[(𝑦 + 1) / 𝑛]𝜓
4948nfdc 1647 . . . . . . . . . . . . 13 𝑛DECID [(𝑦 + 1) / 𝑛]𝜓
50 sbceq1a 2960 . . . . . . . . . . . . . 14 (𝑛 = (𝑦 + 1) → (𝜓[(𝑦 + 1) / 𝑛]𝜓))
5150dcbid 828 . . . . . . . . . . . . 13 (𝑛 = (𝑦 + 1) → (DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5249, 51rspc 2824 . . . . . . . . . . . 12 ((𝑦 + 1) ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5346, 47, 52sylc 62 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID [(𝑦 + 1) / 𝑛]𝜓)
54 rexsns 3615 . . . . . . . . . . . 12 (∃𝑛 ∈ {(𝑦 + 1)}𝜓[(𝑦 + 1) / 𝑛]𝜓)
5554dcbii 830 . . . . . . . . . . 11 (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID [(𝑦 + 1) / 𝑛]𝜓)
5653, 55sylibr 133 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ {(𝑦 + 1)}𝜓)
57 dcor 925 . . . . . . . . . 10 (DECID𝑛 ∈ (𝑀...𝑦)𝜓 → (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓)))
5844, 56, 57sylc 62 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
59 rexun 3302 . . . . . . . . . 10 (∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6059dcbii 830 . . . . . . . . 9 (DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6158, 60sylibr 133 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓)
62 elfzouz 10086 . . . . . . . . . . . 12 (𝑦 ∈ (𝑀..^𝑁) → 𝑦 ∈ (ℤ𝑀))
6362ad2antrr 480 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → 𝑦 ∈ (ℤ𝑀))
64 fzsuc 10004 . . . . . . . . . . 11 (𝑦 ∈ (ℤ𝑀) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6563, 64syl 14 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6665rexeqdv 2668 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓 ↔ ∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6766dcbid 828 . . . . . . . 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 10174 . . . 4 (𝑁 ∈ (𝑀...𝑁) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
727, 71syl 14 . . 3 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
735, 6, 72sylc 62 . 2 ((𝜑𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
74 rex0 3426 . . . . 5 ¬ ∃𝑛 ∈ ∅ 𝜓
75 zltnle 9237 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
762, 1, 75syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
7776biimpar 295 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → 𝑁 < 𝑀)
78 fzn 9977 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
791, 2, 78syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8079adantr 274 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8177, 80mpbid 146 . . . . . 6 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑀...𝑁) = ∅)
8281rexeqdv 2668 . . . . 5 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ↔ ∃𝑛 ∈ ∅ 𝜓))
8374, 82mtbiri 665 . . . 4 ((𝜑 ∧ ¬ 𝑀𝑁) → ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓)
8483olcd 724 . . 3 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
85 df-dc 825 . . 3 (DECID𝑛 ∈ (𝑀...𝑁)𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
8684, 85sylibr 133 . 2 ((𝜑 ∧ ¬ 𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
87 zdcle 9267 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → DECID 𝑀𝑁)
88 exmiddc 826 . . . 4 (DECID 𝑀𝑁 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
8987, 88syl 14 . . 3 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
901, 2, 89syl2anc 409 . 2 (𝜑 → (𝑀𝑁 ∨ ¬ 𝑀𝑁))
9173, 86, 90mpjaodan 788 1 (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  wo 698  DECID wdc 824   = wceq 1343  wcel 2136  wral 2444  wrex 2445  [wsbc 2951  cun 3114  c0 3409  {csn 3576   class class class wbr 3982  cfv 5188  (class class class)co 5842  1c1 7754   + caddc 7756   < clt 7933  cle 7934  cz 9191  cuz 9466  ...cfz 9944  ..^cfzo 10077
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 604  ax-in2 605  ax-io 699  ax-5 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-sep 4100  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-cnex 7844  ax-resscn 7845  ax-1cn 7846  ax-1re 7847  ax-icn 7848  ax-addcl 7849  ax-addrcl 7850  ax-mulcl 7851  ax-addcom 7853  ax-addass 7855  ax-distr 7857  ax-i2m1 7858  ax-0lt1 7859  ax-0id 7861  ax-rnegex 7862  ax-cnre 7864  ax-pre-ltirr 7865  ax-pre-ltwlin 7866  ax-pre-lttrn 7867  ax-pre-apti 7868  ax-pre-ltadd 7869
This theorem depends on definitions:  df-bi 116  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-nel 2432  df-ral 2449  df-rex 2450  df-reu 2451  df-rab 2453  df-v 2728  df-sbc 2952  df-csb 3046  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-nul 3410  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-int 3825  df-iun 3868  df-br 3983  df-opab 4044  df-mpt 4045  df-id 4271  df-xp 4610  df-rel 4611  df-cnv 4612  df-co 4613  df-dm 4614  df-rn 4615  df-res 4616  df-ima 4617  df-iota 5153  df-fun 5190  df-fn 5191  df-f 5192  df-fv 5196  df-riota 5798  df-ov 5845  df-oprab 5846  df-mpo 5847  df-1st 6108  df-2nd 6109  df-pnf 7935  df-mnf 7936  df-xr 7937  df-ltxr 7938  df-le 7939  df-sub 8071  df-neg 8072  df-inn 8858  df-n0 9115  df-z 9192  df-uz 9467  df-fz 9945  df-fzo 10078
This theorem is referenced by:  prmind2  12052
  Copyright terms: Public domain W3C validator