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

Theorem dceqnconst 14463
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 14459 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 7936 . . . 4 ℝ ∈ V
21mptex 5738 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V)
4 0zd 9254 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
5 1zzd 9269 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
6 eqeq1 2184 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 = 0 ↔ 𝑦 = 0))
76dcbid 838 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 = 0 ↔ DECID 𝑦 = 0))
87rspccva 2840 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 = 0)
94, 5, 8ifcldcd 3569 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 = 0, 0, 1) ∈ ℤ)
109fmpttd 5667 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ)
11 0re 7948 . . . . . 6 0 ∈ ℝ
12 0zd 9254 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
13 1zzd 9269 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
14 eqid 2177 . . . . . . . . . . 11 0 = 0
1514orci 731 . . . . . . . . . 10 (0 = 0 ∨ ¬ 0 = 0)
16 df-dc 835 . . . . . . . . . 10 (DECID 0 = 0 ↔ (0 = 0 ∨ ¬ 0 = 0))
1715, 16mpbir 146 . . . . . . . . 9 DECID 0 = 0
1817a1i 9 . . . . . . . 8 (⊤ → DECID 0 = 0)
1912, 13, 18ifcldcd 3569 . . . . . . 7 (⊤ → if(0 = 0, 0, 1) ∈ ℤ)
2019mptru 1362 . . . . . 6 if(0 = 0, 0, 1) ∈ ℤ
21 eqeq1 2184 . . . . . . . 8 (𝑦 = 0 → (𝑦 = 0 ↔ 0 = 0))
2221ifbid 3555 . . . . . . 7 (𝑦 = 0 → if(𝑦 = 0, 0, 1) = if(0 = 0, 0, 1))
23 eqid 2177 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))
2422, 23fvmptg 5588 . . . . . 6 ((0 ∈ ℝ ∧ if(0 = 0, 0, 1) ∈ ℤ) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1))
2511, 20, 24mp2an 426 . . . . 5 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1)
2614iftruei 3540 . . . . 5 if(0 = 0, 0, 1) = 0
2725, 26eqtri 2198 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0
2827a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0)
29 1ne0 8976 . . . . . 6 1 ≠ 0
30 eqeq1 2184 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 = 0 ↔ 𝑧 = 0))
3130ifbid 3555 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 = 0, 0, 1) = if(𝑧 = 0, 0, 1))
32 rpre 9647 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3332adantl 277 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
34 0zd 9254 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
35 1zzd 9269 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
36 eqeq1 2184 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 = 0 ↔ 𝑧 = 0))
3736dcbid 838 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 = 0 ↔ DECID 𝑧 = 0))
38 simpl 109 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 = 0)
3937, 38, 33rspcdva 2846 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 = 0)
4034, 35, 39ifcldcd 3569 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) ∈ ℤ)
4123, 31, 33, 40fvmptd3 5605 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = if(𝑧 = 0, 0, 1))
42 rpne0 9656 . . . . . . . . . . 11 (𝑧 ∈ ℝ+𝑧 ≠ 0)
4342neneqd 2368 . . . . . . . . . 10 (𝑧 ∈ ℝ+ → ¬ 𝑧 = 0)
4443iffalsed 3544 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 = 0, 0, 1) = 1)
4544adantl 277 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) = 1)
4641, 45eqtrd 2210 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = 1)
4746neeq1d 2365 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4829, 47mpbiri 168 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
4948ralrimiva 2550 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
50 fveq2 5511 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5150neeq1d 2365 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
5251cbvralv 2703 . . . 4 (∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0)
5349, 52sylib 122 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0)
5410, 28, 533jca 1177 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
55 feq1 5344 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ))
56 fveq1 5510 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0))
5756eqeq1d 2186 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0))
58 fveq1 5510 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5958neeq1d 2365 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6059ralbidv 2477 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6155, 57, 603anbi123d 1312 . 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 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  cmpt 4061  wf 5208  cfv 5212  cr 7801  0cc0 7802  1c1 7803  cz 9242  +crp 9640
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 4115  ax-sep 4118  ax-pow 4171  ax-pr 4206  ax-un 4430  ax-setind 4533  ax-cnex 7893  ax-resscn 7894  ax-1cn 7895  ax-1re 7896  ax-icn 7897  ax-addcl 7898  ax-addrcl 7899  ax-mulcl 7900  ax-addcom 7902  ax-addass 7904  ax-distr 7906  ax-i2m1 7907  ax-0lt1 7908  ax-0id 7910  ax-rnegex 7911  ax-cnre 7913  ax-pre-ltirr 7914  ax-pre-ltwlin 7915  ax-pre-lttrn 7916  ax-pre-ltadd 7918
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 3576  df-sn 3597  df-pr 3598  df-op 3600  df-uni 3808  df-int 3843  df-iun 3886  df-br 4001  df-opab 4062  df-mpt 4063  df-id 4290  df-xp 4629  df-rel 4630  df-cnv 4631  df-co 4632  df-dm 4633  df-rn 4634  df-res 4635  df-ima 4636  df-iota 5174  df-fun 5214  df-fn 5215  df-f 5216  df-f1 5217  df-fo 5218  df-f1o 5219  df-fv 5220  df-riota 5825  df-ov 5872  df-oprab 5873  df-mpo 5874  df-pnf 7984  df-mnf 7985  df-xr 7986  df-ltxr 7987  df-le 7988  df-sub 8120  df-neg 8121  df-inn 8909  df-z 9243  df-rp 9641
This theorem is referenced by:  dcapnconstALT  14465
  Copyright terms: Public domain W3C validator