Users' Mathboxes Mathbox for Jim Kingdon < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >   Mathboxes  >  dcapnconst GIF version

Theorem dcapnconst 14579
Description: Decidability of real number apartness implies the existence of a certain non-constant function from real numbers to integers. Variation of Exercise 11.6(i) of [HoTT], p. (varies). See trilpo 14562 for more discussion of decidability of real number apartness.

This is a weaker form of dceqnconst 14578 and in fact this theorem can be proved using dceqnconst 14578 as shown at dcapnconstALT 14580. (Contributed by BJ and Jim Kingdon, 24-Jun-2024.)

Assertion
Ref Expression
dcapnconst (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Distinct variable group:   𝑥,𝑓

Proof of Theorem dcapnconst
Dummy variables 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 reex 7940 . . . 4 ℝ ∈ V
21mptex 5739 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) ∈ V)
4 1zzd 9274 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
5 0zd 9259 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
6 breq1 4004 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 # 0 ↔ 𝑦 # 0))
76dcbid 838 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 # 0 ↔ DECID 𝑦 # 0))
87rspccva 2840 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 # 0)
94, 5, 8ifcldcd 3570 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 # 0, 1, 0) ∈ ℤ)
109fmpttd 5668 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ)
11 0re 7952 . . . . . 6 0 ∈ ℝ
12 1zzd 9274 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
13 0zd 9259 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
14 0cn 7944 . . . . . . . . . . . 12 0 ∈ ℂ
15 apirr 8556 . . . . . . . . . . . 12 (0 ∈ ℂ → ¬ 0 # 0)
1614, 15ax-mp 5 . . . . . . . . . . 11 ¬ 0 # 0
1716olci 732 . . . . . . . . . 10 (0 # 0 ∨ ¬ 0 # 0)
18 df-dc 835 . . . . . . . . . 10 (DECID 0 # 0 ↔ (0 # 0 ∨ ¬ 0 # 0))
1917, 18mpbir 146 . . . . . . . . 9 DECID 0 # 0
2019a1i 9 . . . . . . . 8 (⊤ → DECID 0 # 0)
2112, 13, 20ifcldcd 3570 . . . . . . 7 (⊤ → if(0 # 0, 1, 0) ∈ ℤ)
2221mptru 1362 . . . . . 6 if(0 # 0, 1, 0) ∈ ℤ
23 breq1 4004 . . . . . . . 8 (𝑦 = 0 → (𝑦 # 0 ↔ 0 # 0))
2423ifbid 3555 . . . . . . 7 (𝑦 = 0 → if(𝑦 # 0, 1, 0) = if(0 # 0, 1, 0))
25 eqid 2177 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))
2624, 25fvmptg 5589 . . . . . 6 ((0 ∈ ℝ ∧ if(0 # 0, 1, 0) ∈ ℤ) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = if(0 # 0, 1, 0))
2711, 22, 26mp2an 426 . . . . 5 ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = if(0 # 0, 1, 0)
2816iffalsei 3543 . . . . 5 if(0 # 0, 1, 0) = 0
2927, 28eqtri 2198 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0
3029a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0)
31 1ne0 8981 . . . . . 6 1 ≠ 0
32 breq1 4004 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 # 0 ↔ 𝑧 # 0))
3332ifbid 3555 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 # 0, 1, 0) = if(𝑧 # 0, 1, 0))
34 rpre 9654 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3534adantl 277 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
36 1zzd 9274 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
37 0zd 9259 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
38 breq1 4004 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 # 0 ↔ 𝑧 # 0))
3938dcbid 838 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 # 0 ↔ DECID 𝑧 # 0))
40 simpl 109 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 # 0)
4139, 40, 35rspcdva 2846 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 # 0)
4236, 37, 41ifcldcd 3570 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 # 0, 1, 0) ∈ ℤ)
4325, 33, 35, 42fvmptd3 5606 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = if(𝑧 # 0, 1, 0))
44 rpap0 9664 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 # 0)
4544iftrued 3541 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 # 0, 1, 0) = 1)
4645adantl 277 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 # 0, 1, 0) = 1)
4743, 46eqtrd 2210 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = 1)
4847neeq1d 2365 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4931, 48mpbiri 168 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0)
5049ralrimiva 2550 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0)
51 fveq2 5512 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥))
5251neeq1d 2365 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
5352cbvralv 2703 . . . 4 (∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0)
5450, 53sylib 122 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0)
5510, 30, 543jca 1177 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
56 feq1 5345 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ))
57 fveq1 5511 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0))
5857eqeq1d 2186 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0))
59 fveq1 5511 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥))
6059neeq1d 2365 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
6160ralbidv 2477 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
6256, 58, 613anbi123d 1312 . 2 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → ((𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0) ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0)))
633, 55, 62elabd 2882 1 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 104  wo 708  DECID wdc 834  w3a 978   = wceq 1353  wtru 1354  wex 1492  wcel 2148  wne 2347  wral 2455  Vcvv 2737  ifcif 3534   class class class wbr 4001  cmpt 4062  wf 5209  cfv 5213  cc 7804  cr 7805  0cc0 7806  1c1 7807   # cap 8532  cz 9247  +crp 9647
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-coll 4116  ax-sep 4119  ax-pow 4172  ax-pr 4207  ax-un 4431  ax-setind 4534  ax-cnex 7897  ax-resscn 7898  ax-1cn 7899  ax-1re 7900  ax-icn 7901  ax-addcl 7902  ax-addrcl 7903  ax-mulcl 7904  ax-mulrcl 7905  ax-addcom 7906  ax-mulcom 7907  ax-addass 7908  ax-mulass 7909  ax-distr 7910  ax-i2m1 7911  ax-0lt1 7912  ax-1rid 7913  ax-0id 7914  ax-rnegex 7915  ax-precex 7916  ax-cnre 7917  ax-pre-ltirr 7918  ax-pre-ltwlin 7919  ax-pre-lttrn 7920  ax-pre-apti 7921  ax-pre-ltadd 7922  ax-pre-mulgt0 7923
This theorem depends on definitions:  df-bi 117  df-dc 835  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rab 2464  df-v 2739  df-sbc 2963  df-csb 3058  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-if 3535  df-pw 3577  df-sn 3598  df-pr 3599  df-op 3601  df-uni 3809  df-int 3844  df-iun 3887  df-br 4002  df-opab 4063  df-mpt 4064  df-id 4291  df-xp 4630  df-rel 4631  df-cnv 4632  df-co 4633  df-dm 4634  df-rn 4635  df-res 4636  df-ima 4637  df-iota 5175  df-fun 5215  df-fn 5216  df-f 5217  df-f1 5218  df-fo 5219  df-f1o 5220  df-fv 5221  df-riota 5826  df-ov 5873  df-oprab 5874  df-mpo 5875  df-pnf 7988  df-mnf 7989  df-xr 7990  df-ltxr 7991  df-le 7992  df-sub 8124  df-neg 8125  df-reap 8526  df-ap 8533  df-inn 8914  df-z 9248  df-rp 9648
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator