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

Theorem exfzdc 10049
 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 9364 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
41, 2, 3syl2anc 409 . . . 4 (𝜑 → (𝑁 ∈ (ℤ𝑀) ↔ 𝑀𝑁))
54biimpar 295 . . 3 ((𝜑𝑀𝑁) → 𝑁 ∈ (ℤ𝑀))
6 simpl 108 . . 3 ((𝜑𝑀𝑁) → 𝜑)
7 eluzfz2 9844 . . . 4 (𝑁 ∈ (ℤ𝑀) → 𝑁 ∈ (𝑀...𝑁))
8 oveq2 5790 . . . . . . . 8 (𝑤 = 𝑀 → (𝑀...𝑤) = (𝑀...𝑀))
98rexeqdv 2636 . . . . . . 7 (𝑤 = 𝑀 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑀)𝜓))
109dcbid 824 . . . . . 6 (𝑤 = 𝑀 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑀)𝜓))
1110imbi2d 229 . . . . 5 (𝑤 = 𝑀 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓)))
12 oveq2 5790 . . . . . . . 8 (𝑤 = 𝑦 → (𝑀...𝑤) = (𝑀...𝑦))
1312rexeqdv 2636 . . . . . . 7 (𝑤 = 𝑦 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑦)𝜓))
1413dcbid 824 . . . . . 6 (𝑤 = 𝑦 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑦)𝜓))
1514imbi2d 229 . . . . 5 (𝑤 = 𝑦 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑦)𝜓)))
16 oveq2 5790 . . . . . . . 8 (𝑤 = (𝑦 + 1) → (𝑀...𝑤) = (𝑀...(𝑦 + 1)))
1716rexeqdv 2636 . . . . . . 7 (𝑤 = (𝑦 + 1) → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1817dcbid 824 . . . . . 6 (𝑤 = (𝑦 + 1) → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓))
1918imbi2d 229 . . . . 5 (𝑤 = (𝑦 + 1) → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...(𝑦 + 1))𝜓)))
20 oveq2 5790 . . . . . . . 8 (𝑤 = 𝑁 → (𝑀...𝑤) = (𝑀...𝑁))
2120rexeqdv 2636 . . . . . . 7 (𝑤 = 𝑁 → (∃𝑛 ∈ (𝑀...𝑤)𝜓 ↔ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
2221dcbid 824 . . . . . 6 (𝑤 = 𝑁 → (DECID𝑛 ∈ (𝑀...𝑤)𝜓DECID𝑛 ∈ (𝑀...𝑁)𝜓))
2322imbi2d 229 . . . . 5 (𝑤 = 𝑁 → ((𝜑DECID𝑛 ∈ (𝑀...𝑤)𝜓) ↔ (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓)))
24 eluzfz1 9843 . . . . . . . . 9 (𝑁 ∈ (ℤ𝑀) → 𝑀 ∈ (𝑀...𝑁))
2524adantl 275 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ (𝑀...𝑁))
26 exfzdc.3 . . . . . . . . . 10 ((𝜑𝑛 ∈ (𝑀...𝑁)) → DECID 𝜓)
2726ralrimiva 2508 . . . . . . . . 9 (𝜑 → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
2827adantr 274 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
29 nfsbc1v 2931 . . . . . . . . . 10 𝑛[𝑀 / 𝑛]𝜓
3029nfdc 1638 . . . . . . . . 9 𝑛DECID [𝑀 / 𝑛]𝜓
31 sbceq1a 2922 . . . . . . . . . 10 (𝑛 = 𝑀 → (𝜓[𝑀 / 𝑛]𝜓))
3231dcbid 824 . . . . . . . . 9 (𝑛 = 𝑀 → (DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3330, 32rspc 2787 . . . . . . . 8 (𝑀 ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [𝑀 / 𝑛]𝜓))
3425, 28, 33sylc 62 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID [𝑀 / 𝑛]𝜓)
351adantr 274 . . . . . . . . . . 11 ((𝜑𝑁 ∈ (ℤ𝑀)) → 𝑀 ∈ ℤ)
36 fzsn 9878 . . . . . . . . . . 11 (𝑀 ∈ ℤ → (𝑀...𝑀) = {𝑀})
3735, 36syl 14 . . . . . . . . . 10 ((𝜑𝑁 ∈ (ℤ𝑀)) → (𝑀...𝑀) = {𝑀})
3837rexeqdv 2636 . . . . . . . . 9 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓 ↔ ∃𝑛 ∈ {𝑀}𝜓))
39 rexsns 3570 . . . . . . . . 9 (∃𝑛 ∈ {𝑀}𝜓[𝑀 / 𝑛]𝜓)
4038, 39syl6bb 195 . . . . . . . 8 ((𝜑𝑁 ∈ (ℤ𝑀)) → (∃𝑛 ∈ (𝑀...𝑀)𝜓[𝑀 / 𝑛]𝜓))
4140dcbid 824 . . . . . . 7 ((𝜑𝑁 ∈ (ℤ𝑀)) → (DECID𝑛 ∈ (𝑀...𝑀)𝜓DECID [𝑀 / 𝑛]𝜓))
4234, 41mpbird 166 . . . . . 6 ((𝜑𝑁 ∈ (ℤ𝑀)) → DECID𝑛 ∈ (𝑀...𝑀)𝜓)
4342expcom 115 . . . . 5 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑀)𝜓))
44 simpr 109 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ (𝑀...𝑦)𝜓)
45 fzofzp1 10036 . . . . . . . . . . . . 13 (𝑦 ∈ (𝑀..^𝑁) → (𝑦 + 1) ∈ (𝑀...𝑁))
4645ad2antrr 480 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑦 + 1) ∈ (𝑀...𝑁))
4727ad2antlr 481 . . . . . . . . . . . 12 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → ∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓)
48 nfsbc1v 2931 . . . . . . . . . . . . . 14 𝑛[(𝑦 + 1) / 𝑛]𝜓
4948nfdc 1638 . . . . . . . . . . . . 13 𝑛DECID [(𝑦 + 1) / 𝑛]𝜓
50 sbceq1a 2922 . . . . . . . . . . . . . 14 (𝑛 = (𝑦 + 1) → (𝜓[(𝑦 + 1) / 𝑛]𝜓))
5150dcbid 824 . . . . . . . . . . . . 13 (𝑛 = (𝑦 + 1) → (DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5249, 51rspc 2787 . . . . . . . . . . . 12 ((𝑦 + 1) ∈ (𝑀...𝑁) → (∀𝑛 ∈ (𝑀...𝑁)DECID 𝜓DECID [(𝑦 + 1) / 𝑛]𝜓))
5346, 47, 52sylc 62 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID [(𝑦 + 1) / 𝑛]𝜓)
54 rexsns 3570 . . . . . . . . . . . 12 (∃𝑛 ∈ {(𝑦 + 1)}𝜓[(𝑦 + 1) / 𝑛]𝜓)
5554dcbii 826 . . . . . . . . . . 11 (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID [(𝑦 + 1) / 𝑛]𝜓)
5653, 55sylibr 133 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ {(𝑦 + 1)}𝜓)
57 dcor 920 . . . . . . . . . 10 (DECID𝑛 ∈ (𝑀...𝑦)𝜓 → (DECID𝑛 ∈ {(𝑦 + 1)}𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓)))
5844, 56, 57sylc 62 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
59 rexun 3261 . . . . . . . . . 10 (∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6059dcbii 826 . . . . . . . . 9 (DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓DECID (∃𝑛 ∈ (𝑀...𝑦)𝜓 ∨ ∃𝑛 ∈ {(𝑦 + 1)}𝜓))
6158, 60sylibr 133 . . . . . . . 8 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → DECID𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓)
62 elfzouz 9960 . . . . . . . . . . . 12 (𝑦 ∈ (𝑀..^𝑁) → 𝑦 ∈ (ℤ𝑀))
6362ad2antrr 480 . . . . . . . . . . 11 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → 𝑦 ∈ (ℤ𝑀))
64 fzsuc 9881 . . . . . . . . . . 11 (𝑦 ∈ (ℤ𝑀) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6563, 64syl 14 . . . . . . . . . 10 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (𝑀...(𝑦 + 1)) = ((𝑀...𝑦) ∪ {(𝑦 + 1)}))
6665rexeqdv 2636 . . . . . . . . 9 (((𝑦 ∈ (𝑀..^𝑁) ∧ 𝜑) ∧ DECID𝑛 ∈ (𝑀...𝑦)𝜓) → (∃𝑛 ∈ (𝑀...(𝑦 + 1))𝜓 ↔ ∃𝑛 ∈ ((𝑀...𝑦) ∪ {(𝑦 + 1)})𝜓))
6766dcbid 824 . . . . . . . 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 10048 . . . 4 (𝑁 ∈ (𝑀...𝑁) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
727, 71syl 14 . . 3 (𝑁 ∈ (ℤ𝑀) → (𝜑DECID𝑛 ∈ (𝑀...𝑁)𝜓))
735, 6, 72sylc 62 . 2 ((𝜑𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
74 rex0 3385 . . . . 5 ¬ ∃𝑛 ∈ ∅ 𝜓
75 zltnle 9125 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
762, 1, 75syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ ¬ 𝑀𝑁))
7776biimpar 295 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → 𝑁 < 𝑀)
78 fzn 9854 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
791, 2, 78syl2anc 409 . . . . . . . 8 (𝜑 → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8079adantr 274 . . . . . . 7 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑁 < 𝑀 ↔ (𝑀...𝑁) = ∅))
8177, 80mpbid 146 . . . . . 6 ((𝜑 ∧ ¬ 𝑀𝑁) → (𝑀...𝑁) = ∅)
8281rexeqdv 2636 . . . . 5 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ↔ ∃𝑛 ∈ ∅ 𝜓))
8374, 82mtbiri 665 . . . 4 ((𝜑 ∧ ¬ 𝑀𝑁) → ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓)
8483olcd 724 . . 3 ((𝜑 ∧ ¬ 𝑀𝑁) → (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
85 df-dc 821 . . 3 (DECID𝑛 ∈ (𝑀...𝑁)𝜓 ↔ (∃𝑛 ∈ (𝑀...𝑁)𝜓 ∨ ¬ ∃𝑛 ∈ (𝑀...𝑁)𝜓))
8684, 85sylibr 133 . 2 ((𝜑 ∧ ¬ 𝑀𝑁) → DECID𝑛 ∈ (𝑀...𝑁)𝜓)
87 zdcle 9152 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → DECID 𝑀𝑁)
88 exmiddc 822 . . . 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 820   = wceq 1332   ∈ wcel 1481  ∀wral 2417  ∃wrex 2418  [wsbc 2913   ∪ cun 3074  ∅c0 3368  {csn 3532   class class class wbr 3937  ‘cfv 5131  (class class class)co 5782  1c1 7646   + caddc 7648   < clt 7825   ≤ cle 7826  ℤcz 9079  ℤ≥cuz 9351  ...cfz 9822  ..^cfzo 9951 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 1424  ax-7 1425  ax-gen 1426  ax-ie1 1470  ax-ie2 1471  ax-8 1483  ax-10 1484  ax-11 1485  ax-i12 1486  ax-bndl 1487  ax-4 1488  ax-13 1492  ax-14 1493  ax-17 1507  ax-i9 1511  ax-ial 1515  ax-i5r 1516  ax-ext 2122  ax-sep 4054  ax-pow 4106  ax-pr 4139  ax-un 4363  ax-setind 4460  ax-cnex 7736  ax-resscn 7737  ax-1cn 7738  ax-1re 7739  ax-icn 7740  ax-addcl 7741  ax-addrcl 7742  ax-mulcl 7743  ax-addcom 7745  ax-addass 7747  ax-distr 7749  ax-i2m1 7750  ax-0lt1 7751  ax-0id 7753  ax-rnegex 7754  ax-cnre 7756  ax-pre-ltirr 7757  ax-pre-ltwlin 7758  ax-pre-lttrn 7759  ax-pre-apti 7760  ax-pre-ltadd 7761 This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1335  df-fal 1338  df-nf 1438  df-sb 1737  df-eu 2003  df-mo 2004  df-clab 2127  df-cleq 2133  df-clel 2136  df-nfc 2271  df-ne 2310  df-nel 2405  df-ral 2422  df-rex 2423  df-reu 2424  df-rab 2426  df-v 2691  df-sbc 2914  df-csb 3008  df-dif 3078  df-un 3080  df-in 3082  df-ss 3089  df-nul 3369  df-pw 3517  df-sn 3538  df-pr 3539  df-op 3541  df-uni 3745  df-int 3780  df-iun 3823  df-br 3938  df-opab 3998  df-mpt 3999  df-id 4223  df-xp 4553  df-rel 4554  df-cnv 4555  df-co 4556  df-dm 4557  df-rn 4558  df-res 4559  df-ima 4560  df-iota 5096  df-fun 5133  df-fn 5134  df-f 5135  df-fv 5139  df-riota 5738  df-ov 5785  df-oprab 5786  df-mpo 5787  df-1st 6046  df-2nd 6047  df-pnf 7827  df-mnf 7828  df-xr 7829  df-ltxr 7830  df-le 7831  df-sub 7960  df-neg 7961  df-inn 8746  df-n0 9003  df-z 9080  df-uz 9352  df-fz 9823  df-fzo 9952 This theorem is referenced by:  prmind2  11838
 Copyright terms: Public domain W3C validator