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

Theorem dceqnconst 13641
Description: Decidability of real number equality 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 redcwlpo 13637 for more discussion of decidability of real number equality. (Contributed by BJ and Jim Kingdon, 24-Jun-2024.) (Revised by Jim Kingdon, 23-Jul-2024.)
Assertion
Ref Expression
dceqnconst (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Distinct variable group:   𝑥,𝑓

Proof of Theorem dceqnconst
Dummy variables 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 reex 7866 . . . 4 ℝ ∈ V
21mptex 5693 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V)
4 0zd 9179 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
5 1zzd 9194 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
6 eqeq1 2164 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 = 0 ↔ 𝑦 = 0))
76dcbid 824 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 = 0 ↔ DECID 𝑦 = 0))
87rspccva 2815 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 = 0)
94, 5, 8ifcldcd 3540 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 = 0, 0, 1) ∈ ℤ)
109fmpttd 5622 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ)
11 0re 7878 . . . . . 6 0 ∈ ℝ
12 0zd 9179 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
13 1zzd 9194 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
14 eqid 2157 . . . . . . . . . . 11 0 = 0
1514orci 721 . . . . . . . . . 10 (0 = 0 ∨ ¬ 0 = 0)
16 df-dc 821 . . . . . . . . . 10 (DECID 0 = 0 ↔ (0 = 0 ∨ ¬ 0 = 0))
1715, 16mpbir 145 . . . . . . . . 9 DECID 0 = 0
1817a1i 9 . . . . . . . 8 (⊤ → DECID 0 = 0)
1912, 13, 18ifcldcd 3540 . . . . . . 7 (⊤ → if(0 = 0, 0, 1) ∈ ℤ)
2019mptru 1344 . . . . . 6 if(0 = 0, 0, 1) ∈ ℤ
21 eqeq1 2164 . . . . . . . 8 (𝑦 = 0 → (𝑦 = 0 ↔ 0 = 0))
2221ifbid 3526 . . . . . . 7 (𝑦 = 0 → if(𝑦 = 0, 0, 1) = if(0 = 0, 0, 1))
23 eqid 2157 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))
2422, 23fvmptg 5544 . . . . . 6 ((0 ∈ ℝ ∧ if(0 = 0, 0, 1) ∈ ℤ) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1))
2511, 20, 24mp2an 423 . . . . 5 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1)
2614iftruei 3511 . . . . 5 if(0 = 0, 0, 1) = 0
2725, 26eqtri 2178 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0
2827a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0)
29 1ne0 8901 . . . . . 6 1 ≠ 0
30 eqeq1 2164 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 = 0 ↔ 𝑧 = 0))
3130ifbid 3526 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 = 0, 0, 1) = if(𝑧 = 0, 0, 1))
32 rpre 9567 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3332adantl 275 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
34 0zd 9179 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
35 1zzd 9194 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
36 eqeq1 2164 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 = 0 ↔ 𝑧 = 0))
3736dcbid 824 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 = 0 ↔ DECID 𝑧 = 0))
38 simpl 108 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 = 0)
3937, 38, 33rspcdva 2821 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 = 0)
4034, 35, 39ifcldcd 3540 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) ∈ ℤ)
4123, 31, 33, 40fvmptd3 5561 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = if(𝑧 = 0, 0, 1))
42 rpne0 9576 . . . . . . . . . . 11 (𝑧 ∈ ℝ+𝑧 ≠ 0)
4342neneqd 2348 . . . . . . . . . 10 (𝑧 ∈ ℝ+ → ¬ 𝑧 = 0)
4443iffalsed 3515 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 = 0, 0, 1) = 1)
4544adantl 275 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) = 1)
4641, 45eqtrd 2190 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = 1)
4746neeq1d 2345 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4829, 47mpbiri 167 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
4948ralrimiva 2530 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
50 fveq2 5468 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5150neeq1d 2345 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
5251cbvralv 2680 . . . 4 (∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0)
5349, 52sylib 121 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0)
5410, 28, 533jca 1162 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
55 feq1 5302 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ))
56 fveq1 5467 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0))
5756eqeq1d 2166 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0))
58 fveq1 5467 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5958neeq1d 2345 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6059ralbidv 2457 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6155, 57, 603anbi123d 1294 . 2 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0) ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0)))
623, 54, 61elabd 2857 1 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wo 698  DECID wdc 820  w3a 963   = wceq 1335  wtru 1336  wex 1472  wcel 2128  wne 2327  wral 2435  Vcvv 2712  ifcif 3505  cmpt 4025  wf 5166  cfv 5170  cr 7731  0cc0 7732  1c1 7733  cz 9167  +crp 9560
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 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4079  ax-sep 4082  ax-pow 4135  ax-pr 4169  ax-un 4393  ax-setind 4496  ax-cnex 7823  ax-resscn 7824  ax-1cn 7825  ax-1re 7826  ax-icn 7827  ax-addcl 7828  ax-addrcl 7829  ax-mulcl 7830  ax-addcom 7832  ax-addass 7834  ax-distr 7836  ax-i2m1 7837  ax-0lt1 7838  ax-0id 7840  ax-rnegex 7841  ax-cnre 7843  ax-pre-ltirr 7844  ax-pre-ltwlin 7845  ax-pre-lttrn 7846  ax-pre-ltadd 7848
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-if 3506  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-iun 3851  df-br 3966  df-opab 4026  df-mpt 4027  df-id 4253  df-xp 4592  df-rel 4593  df-cnv 4594  df-co 4595  df-dm 4596  df-rn 4597  df-res 4598  df-ima 4599  df-iota 5135  df-fun 5172  df-fn 5173  df-f 5174  df-f1 5175  df-fo 5176  df-f1o 5177  df-fv 5178  df-riota 5780  df-ov 5827  df-oprab 5828  df-mpo 5829  df-pnf 7914  df-mnf 7915  df-xr 7916  df-ltxr 7917  df-le 7918  df-sub 8048  df-neg 8049  df-inn 8834  df-z 9168  df-rp 9561
This theorem is referenced by:  dcapnconstALT  13643
  Copyright terms: Public domain W3C validator