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

Theorem dceqnconst 14091
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 14087 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 7908 . . . 4 ℝ ∈ V
21mptex 5722 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V)
4 0zd 9224 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
5 1zzd 9239 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
6 eqeq1 2177 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 = 0 ↔ 𝑦 = 0))
76dcbid 833 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 = 0 ↔ DECID 𝑦 = 0))
87rspccva 2833 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 = 0)
94, 5, 8ifcldcd 3561 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 = 0, 0, 1) ∈ ℤ)
109fmpttd 5651 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ)
11 0re 7920 . . . . . 6 0 ∈ ℝ
12 0zd 9224 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
13 1zzd 9239 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
14 eqid 2170 . . . . . . . . . . 11 0 = 0
1514orci 726 . . . . . . . . . 10 (0 = 0 ∨ ¬ 0 = 0)
16 df-dc 830 . . . . . . . . . 10 (DECID 0 = 0 ↔ (0 = 0 ∨ ¬ 0 = 0))
1715, 16mpbir 145 . . . . . . . . 9 DECID 0 = 0
1817a1i 9 . . . . . . . 8 (⊤ → DECID 0 = 0)
1912, 13, 18ifcldcd 3561 . . . . . . 7 (⊤ → if(0 = 0, 0, 1) ∈ ℤ)
2019mptru 1357 . . . . . 6 if(0 = 0, 0, 1) ∈ ℤ
21 eqeq1 2177 . . . . . . . 8 (𝑦 = 0 → (𝑦 = 0 ↔ 0 = 0))
2221ifbid 3547 . . . . . . 7 (𝑦 = 0 → if(𝑦 = 0, 0, 1) = if(0 = 0, 0, 1))
23 eqid 2170 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))
2422, 23fvmptg 5572 . . . . . 6 ((0 ∈ ℝ ∧ if(0 = 0, 0, 1) ∈ ℤ) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1))
2511, 20, 24mp2an 424 . . . . 5 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = if(0 = 0, 0, 1)
2614iftruei 3532 . . . . 5 if(0 = 0, 0, 1) = 0
2725, 26eqtri 2191 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0
2827a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0)
29 1ne0 8946 . . . . . 6 1 ≠ 0
30 eqeq1 2177 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 = 0 ↔ 𝑧 = 0))
3130ifbid 3547 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 = 0, 0, 1) = if(𝑧 = 0, 0, 1))
32 rpre 9617 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3332adantl 275 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
34 0zd 9224 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
35 1zzd 9239 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
36 eqeq1 2177 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 = 0 ↔ 𝑧 = 0))
3736dcbid 833 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 = 0 ↔ DECID 𝑧 = 0))
38 simpl 108 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 = 0)
3937, 38, 33rspcdva 2839 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 = 0)
4034, 35, 39ifcldcd 3561 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) ∈ ℤ)
4123, 31, 33, 40fvmptd3 5589 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = if(𝑧 = 0, 0, 1))
42 rpne0 9626 . . . . . . . . . . 11 (𝑧 ∈ ℝ+𝑧 ≠ 0)
4342neneqd 2361 . . . . . . . . . 10 (𝑧 ∈ ℝ+ → ¬ 𝑧 = 0)
4443iffalsed 3536 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 = 0, 0, 1) = 1)
4544adantl 275 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) = 1)
4641, 45eqtrd 2203 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = 1)
4746neeq1d 2358 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4829, 47mpbiri 167 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
4948ralrimiva 2543 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
50 fveq2 5496 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5150neeq1d 2358 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
5251cbvralv 2696 . . . 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 1172 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ ∧ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
55 feq1 5330 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ))
56 fveq1 5495 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0))
5756eqeq1d 2179 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0))
58 fveq1 5495 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5958neeq1d 2358 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6059ralbidv 2470 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6155, 57, 603anbi123d 1307 . 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 2875 1 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∃𝑓(𝑓:ℝ⟶ℤ ∧ (𝑓‘0) = 0 ∧ ∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wo 703  DECID wdc 829  w3a 973   = wceq 1348  wtru 1349  wex 1485  wcel 2141  wne 2340  wral 2448  Vcvv 2730  ifcif 3526  cmpt 4050  wf 5194  cfv 5198  cr 7773  0cc0 7774  1c1 7775  cz 9212  +crp 9610
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 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4104  ax-sep 4107  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-addcom 7874  ax-addass 7876  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-0id 7882  ax-rnegex 7883  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-ltadd 7890
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-id 4278  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-f1 5203  df-fo 5204  df-f1o 5205  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-inn 8879  df-z 9213  df-rp 9611
This theorem is referenced by:  dcapnconstALT  14093
  Copyright terms: Public domain W3C validator