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

Theorem dceqnconst 13938
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 13934 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 7887 . . . 4 ℝ ∈ V
21mptex 5711 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V)
4 0zd 9203 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
5 1zzd 9218 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
6 eqeq1 2172 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 = 0 ↔ 𝑦 = 0))
76dcbid 828 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 = 0 ↔ DECID 𝑦 = 0))
87rspccva 2829 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 = 0)
94, 5, 8ifcldcd 3555 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 = 0, 0, 1) ∈ ℤ)
109fmpttd 5640 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ)
11 0re 7899 . . . . . 6 0 ∈ ℝ
12 0zd 9203 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
13 1zzd 9218 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
14 eqid 2165 . . . . . . . . . . 11 0 = 0
1514orci 721 . . . . . . . . . 10 (0 = 0 ∨ ¬ 0 = 0)
16 df-dc 825 . . . . . . . . . 10 (DECID 0 = 0 ↔ (0 = 0 ∨ ¬ 0 = 0))
1715, 16mpbir 145 . . . . . . . . 9 DECID 0 = 0
1817a1i 9 . . . . . . . 8 (⊤ → DECID 0 = 0)
1912, 13, 18ifcldcd 3555 . . . . . . 7 (⊤ → if(0 = 0, 0, 1) ∈ ℤ)
2019mptru 1352 . . . . . 6 if(0 = 0, 0, 1) ∈ ℤ
21 eqeq1 2172 . . . . . . . 8 (𝑦 = 0 → (𝑦 = 0 ↔ 0 = 0))
2221ifbid 3541 . . . . . . 7 (𝑦 = 0 → if(𝑦 = 0, 0, 1) = if(0 = 0, 0, 1))
23 eqid 2165 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))
2422, 23fvmptg 5562 . . . . . 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 3526 . . . . 5 if(0 = 0, 0, 1) = 0
2725, 26eqtri 2186 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0
2827a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0)
29 1ne0 8925 . . . . . 6 1 ≠ 0
30 eqeq1 2172 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 = 0 ↔ 𝑧 = 0))
3130ifbid 3541 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 = 0, 0, 1) = if(𝑧 = 0, 0, 1))
32 rpre 9596 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3332adantl 275 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
34 0zd 9203 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
35 1zzd 9218 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
36 eqeq1 2172 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 = 0 ↔ 𝑧 = 0))
3736dcbid 828 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 = 0 ↔ DECID 𝑧 = 0))
38 simpl 108 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 = 0)
3937, 38, 33rspcdva 2835 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 = 0)
4034, 35, 39ifcldcd 3555 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) ∈ ℤ)
4123, 31, 33, 40fvmptd3 5579 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = if(𝑧 = 0, 0, 1))
42 rpne0 9605 . . . . . . . . . . 11 (𝑧 ∈ ℝ+𝑧 ≠ 0)
4342neneqd 2357 . . . . . . . . . 10 (𝑧 ∈ ℝ+ → ¬ 𝑧 = 0)
4443iffalsed 3530 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 = 0, 0, 1) = 1)
4544adantl 275 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) = 1)
4641, 45eqtrd 2198 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = 1)
4746neeq1d 2354 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4829, 47mpbiri 167 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
4948ralrimiva 2539 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
50 fveq2 5486 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5150neeq1d 2354 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
5251cbvralv 2692 . . . 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 1167 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
55 feq1 5320 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ))
56 fveq1 5485 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0))
5756eqeq1d 2174 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0))
58 fveq1 5485 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5958neeq1d 2354 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6059ralbidv 2466 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6155, 57, 603anbi123d 1302 . 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 2871 1 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wo 698  DECID wdc 824  w3a 968   = wceq 1343  wtru 1344  wex 1480  wcel 2136  wne 2336  wral 2444  Vcvv 2726  ifcif 3520  cmpt 4043  wf 5184  cfv 5188  cr 7752  0cc0 7753  1c1 7754  cz 9191  +crp 9589
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-coll 4097  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-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-if 3521  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-f1 5193  df-fo 5194  df-f1o 5195  df-fv 5196  df-riota 5798  df-ov 5845  df-oprab 5846  df-mpo 5847  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-z 9192  df-rp 9590
This theorem is referenced by:  dcapnconstALT  13940
  Copyright terms: Public domain W3C validator