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

Theorem dcapnconst 15475
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 15457 for more discussion of decidability of real number apartness.

This is a weaker form of dceqnconst 15474 and in fact this theorem can be proved using dceqnconst 15474 as shown at dcapnconstALT 15476. (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 7992 . . . 4 ℝ ∈ V
21mptex 5772 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) ∈ V)
4 1zzd 9330 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
5 0zd 9315 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
6 breq1 4028 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 # 0 ↔ 𝑦 # 0))
76dcbid 839 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 # 0 ↔ DECID 𝑦 # 0))
87rspccva 2859 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 # 0)
94, 5, 8ifcldcd 3589 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 # 0, 1, 0) ∈ ℤ)
109fmpttd 5701 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ)
11 0re 8005 . . . . . 6 0 ∈ ℝ
12 1zzd 9330 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
13 0zd 9315 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
14 0cn 7997 . . . . . . . . . . . 12 0 ∈ ℂ
15 apirr 8610 . . . . . . . . . . . 12 (0 ∈ ℂ → ¬ 0 # 0)
1614, 15ax-mp 5 . . . . . . . . . . 11 ¬ 0 # 0
1716olci 733 . . . . . . . . . 10 (0 # 0 ∨ ¬ 0 # 0)
18 df-dc 836 . . . . . . . . . 10 (DECID 0 # 0 ↔ (0 # 0 ∨ ¬ 0 # 0))
1917, 18mpbir 146 . . . . . . . . 9 DECID 0 # 0
2019a1i 9 . . . . . . . 8 (⊤ → DECID 0 # 0)
2112, 13, 20ifcldcd 3589 . . . . . . 7 (⊤ → if(0 # 0, 1, 0) ∈ ℤ)
2221mptru 1373 . . . . . 6 if(0 # 0, 1, 0) ∈ ℤ
23 breq1 4028 . . . . . . . 8 (𝑦 = 0 → (𝑦 # 0 ↔ 0 # 0))
2423ifbid 3574 . . . . . . 7 (𝑦 = 0 → if(𝑦 # 0, 1, 0) = if(0 # 0, 1, 0))
25 eqid 2189 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))
2624, 25fvmptg 5621 . . . . . 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 3562 . . . . 5 if(0 # 0, 1, 0) = 0
2927, 28eqtri 2210 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0
3029a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0)
31 1ne0 9036 . . . . . 6 1 ≠ 0
32 breq1 4028 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 # 0 ↔ 𝑧 # 0))
3332ifbid 3574 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 # 0, 1, 0) = if(𝑧 # 0, 1, 0))
34 rpre 9712 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3534adantl 277 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
36 1zzd 9330 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
37 0zd 9315 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
38 breq1 4028 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 # 0 ↔ 𝑧 # 0))
3938dcbid 839 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 # 0 ↔ DECID 𝑧 # 0))
40 simpl 109 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 # 0)
4139, 40, 35rspcdva 2865 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 # 0)
4236, 37, 41ifcldcd 3589 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 # 0, 1, 0) ∈ ℤ)
4325, 33, 35, 42fvmptd3 5639 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = if(𝑧 # 0, 1, 0))
44 rpap0 9722 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 # 0)
4544iftrued 3560 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 # 0, 1, 0) = 1)
4645adantl 277 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 # 0, 1, 0) = 1)
4743, 46eqtrd 2222 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = 1)
4847neeq1d 2378 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4931, 48mpbiri 168 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 # 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0)
5049ralrimiva 2563 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0)
51 fveq2 5542 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥))
5251neeq1d 2378 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
5352cbvralv 2722 . . . 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 1179 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
56 feq1 5374 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)):ℝ⟶ℤ))
57 fveq1 5541 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0))
5857eqeq1d 2198 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘0) = 0))
59 fveq1 5541 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥))
6059neeq1d 2378 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
6160ralbidv 2490 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 # 0, 1, 0))‘𝑥) ≠ 0))
6256, 58, 613anbi123d 1323 . 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 2901 1 (∀𝑥 ∈ ℝ DECID 𝑥 # 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 104  wo 709  DECID wdc 835  w3a 980   = wceq 1364  wtru 1365  wex 1503  wcel 2160  wne 2360  wral 2468  Vcvv 2756  ifcif 3553   class class class wbr 4025  cmpt 4086  wf 5238  cfv 5242  cc 7856  cr 7857  0cc0 7858  1c1 7859   # cap 8586  cz 9303  +crp 9705
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 615  ax-in2 616  ax-io 710  ax-5 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2162  ax-14 2163  ax-ext 2171  ax-coll 4140  ax-sep 4143  ax-pow 4199  ax-pr 4234  ax-un 4458  ax-setind 4561  ax-cnex 7949  ax-resscn 7950  ax-1cn 7951  ax-1re 7952  ax-icn 7953  ax-addcl 7954  ax-addrcl 7955  ax-mulcl 7956  ax-mulrcl 7957  ax-addcom 7958  ax-mulcom 7959  ax-addass 7960  ax-mulass 7961  ax-distr 7962  ax-i2m1 7963  ax-0lt1 7964  ax-1rid 7965  ax-0id 7966  ax-rnegex 7967  ax-precex 7968  ax-cnre 7969  ax-pre-ltirr 7970  ax-pre-ltwlin 7971  ax-pre-lttrn 7972  ax-pre-apti 7973  ax-pre-ltadd 7974  ax-pre-mulgt0 7975
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-nf 1472  df-sb 1774  df-eu 2041  df-mo 2042  df-clab 2176  df-cleq 2182  df-clel 2185  df-nfc 2321  df-ne 2361  df-nel 2456  df-ral 2473  df-rex 2474  df-reu 2475  df-rab 2477  df-v 2758  df-sbc 2982  df-csb 3077  df-dif 3151  df-un 3153  df-in 3155  df-ss 3162  df-if 3554  df-pw 3599  df-sn 3620  df-pr 3621  df-op 3623  df-uni 3832  df-int 3867  df-iun 3910  df-br 4026  df-opab 4087  df-mpt 4088  df-id 4318  df-xp 4657  df-rel 4658  df-cnv 4659  df-co 4660  df-dm 4661  df-rn 4662  df-res 4663  df-ima 4664  df-iota 5203  df-fun 5244  df-fn 5245  df-f 5246  df-f1 5247  df-fo 5248  df-f1o 5249  df-fv 5250  df-riota 5861  df-ov 5909  df-oprab 5910  df-mpo 5911  df-pnf 8042  df-mnf 8043  df-xr 8044  df-ltxr 8045  df-le 8046  df-sub 8178  df-neg 8179  df-reap 8580  df-ap 8587  df-inn 8969  df-z 9304  df-rp 9706
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator