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

Theorem dceqnconst 13571
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 13567 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 7845 . . . 4 ℝ ∈ V
21mptex 5686 . . 3 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V
32a1i 9 . 2 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) ∈ V)
4 0zd 9158 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 0 ∈ ℤ)
5 1zzd 9173 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → 1 ∈ ℤ)
6 eqeq1 2161 . . . . . . 7 (𝑥 = 𝑦 → (𝑥 = 0 ↔ 𝑦 = 0))
76dcbid 824 . . . . . 6 (𝑥 = 𝑦 → (DECID 𝑥 = 0 ↔ DECID 𝑦 = 0))
87rspccva 2812 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → DECID 𝑦 = 0)
94, 5, 8ifcldcd 3536 . . . 4 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑦 ∈ ℝ) → if(𝑦 = 0, 0, 1) ∈ ℤ)
109fmpttd 5615 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ)
11 0re 7857 . . . . . 6 0 ∈ ℝ
12 0zd 9158 . . . . . . . 8 (⊤ → 0 ∈ ℤ)
13 1zzd 9173 . . . . . . . 8 (⊤ → 1 ∈ ℤ)
14 eqid 2154 . . . . . . . . . . 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 3536 . . . . . . 7 (⊤ → if(0 = 0, 0, 1) ∈ ℤ)
2019mptru 1341 . . . . . 6 if(0 = 0, 0, 1) ∈ ℤ
21 eqeq1 2161 . . . . . . . 8 (𝑦 = 0 → (𝑦 = 0 ↔ 0 = 0))
2221ifbid 3522 . . . . . . 7 (𝑦 = 0 → if(𝑦 = 0, 0, 1) = if(0 = 0, 0, 1))
23 eqid 2154 . . . . . . 7 (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))
2422, 23fvmptg 5537 . . . . . 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 3507 . . . . 5 if(0 = 0, 0, 1) = 0
2725, 26eqtri 2175 . . . 4 ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0
2827a1i 9 . . 3 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0)
29 1ne0 8880 . . . . . 6 1 ≠ 0
30 eqeq1 2161 . . . . . . . . . 10 (𝑦 = 𝑧 → (𝑦 = 0 ↔ 𝑧 = 0))
3130ifbid 3522 . . . . . . . . 9 (𝑦 = 𝑧 → if(𝑦 = 0, 0, 1) = if(𝑧 = 0, 0, 1))
32 rpre 9545 . . . . . . . . . 10 (𝑧 ∈ ℝ+𝑧 ∈ ℝ)
3332adantl 275 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 𝑧 ∈ ℝ)
34 0zd 9158 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 0 ∈ ℤ)
35 1zzd 9173 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → 1 ∈ ℤ)
36 eqeq1 2161 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑥 = 0 ↔ 𝑧 = 0))
3736dcbid 824 . . . . . . . . . . 11 (𝑥 = 𝑧 → (DECID 𝑥 = 0 ↔ DECID 𝑧 = 0))
38 simpl 108 . . . . . . . . . . 11 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ∀𝑥 ∈ ℝ DECID 𝑥 = 0)
3937, 38, 33rspcdva 2818 . . . . . . . . . 10 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → DECID 𝑧 = 0)
4034, 35, 39ifcldcd 3536 . . . . . . . . 9 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) ∈ ℤ)
4123, 31, 33, 40fvmptd3 5554 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = if(𝑧 = 0, 0, 1))
42 rpne0 9554 . . . . . . . . . . 11 (𝑧 ∈ ℝ+𝑧 ≠ 0)
4342neneqd 2345 . . . . . . . . . 10 (𝑧 ∈ ℝ+ → ¬ 𝑧 = 0)
4443iffalsed 3511 . . . . . . . . 9 (𝑧 ∈ ℝ+ → if(𝑧 = 0, 0, 1) = 1)
4544adantl 275 . . . . . . . 8 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → if(𝑧 = 0, 0, 1) = 1)
4641, 45eqtrd 2187 . . . . . . 7 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = 1)
4746neeq1d 2342 . . . . . 6 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ 1 ≠ 0))
4829, 47mpbiri 167 . . . . 5 ((∀𝑥 ∈ ℝ DECID 𝑥 = 0 ∧ 𝑧 ∈ ℝ+) → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
4948ralrimiva 2527 . . . 4 (∀𝑥 ∈ ℝ DECID 𝑥 = 0 → ∀𝑧 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0)
50 fveq2 5461 . . . . . 6 (𝑧 = 𝑥 → ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5150neeq1d 2342 . . . . 5 (𝑧 = 𝑥 → (((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑧) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
5251cbvralv 2677 . . . 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 5295 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓:ℝ⟶ℤ ↔ (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)):ℝ⟶ℤ))
56 fveq1 5460 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓‘0) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0))
5756eqeq1d 2163 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓‘0) = 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘0) = 0))
58 fveq1 5460 . . . . 5 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (𝑓𝑥) = ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥))
5958neeq1d 2342 . . . 4 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → ((𝑓𝑥) ≠ 0 ↔ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6059ralbidv 2454 . . 3 (𝑓 = (𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1)) → (∀𝑥 ∈ ℝ+ (𝑓𝑥) ≠ 0 ↔ ∀𝑥 ∈ ℝ+ ((𝑦 ∈ ℝ ↦ if(𝑦 = 0, 0, 1))‘𝑥) ≠ 0))
6155, 57, 603anbi123d 1291 . 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 2853 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 1332  wtru 1333  wex 1469  wcel 2125  wne 2324  wral 2432  Vcvv 2709  ifcif 3501  cmpt 4021  wf 5159  cfv 5163  cr 7710  0cc0 7711  1c1 7712  cz 9146  +crp 9538
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 1424  ax-7 1425  ax-gen 1426  ax-ie1 1470  ax-ie2 1471  ax-8 1481  ax-10 1482  ax-11 1483  ax-i12 1484  ax-bndl 1486  ax-4 1487  ax-17 1503  ax-i9 1507  ax-ial 1511  ax-i5r 1512  ax-13 2127  ax-14 2128  ax-ext 2136  ax-coll 4075  ax-sep 4078  ax-pow 4130  ax-pr 4164  ax-un 4388  ax-setind 4490  ax-cnex 7802  ax-resscn 7803  ax-1cn 7804  ax-1re 7805  ax-icn 7806  ax-addcl 7807  ax-addrcl 7808  ax-mulcl 7809  ax-addcom 7811  ax-addass 7813  ax-distr 7815  ax-i2m1 7816  ax-0lt1 7817  ax-0id 7819  ax-rnegex 7820  ax-cnre 7822  ax-pre-ltirr 7823  ax-pre-ltwlin 7824  ax-pre-lttrn 7825  ax-pre-ltadd 7827
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1335  df-fal 1338  df-nf 1438  df-sb 1740  df-eu 2006  df-mo 2007  df-clab 2141  df-cleq 2147  df-clel 2150  df-nfc 2285  df-ne 2325  df-nel 2420  df-ral 2437  df-rex 2438  df-reu 2439  df-rab 2441  df-v 2711  df-sbc 2934  df-csb 3028  df-dif 3100  df-un 3102  df-in 3104  df-ss 3111  df-if 3502  df-pw 3541  df-sn 3562  df-pr 3563  df-op 3565  df-uni 3769  df-int 3804  df-iun 3847  df-br 3962  df-opab 4022  df-mpt 4023  df-id 4248  df-xp 4585  df-rel 4586  df-cnv 4587  df-co 4588  df-dm 4589  df-rn 4590  df-res 4591  df-ima 4592  df-iota 5128  df-fun 5165  df-fn 5166  df-f 5167  df-f1 5168  df-fo 5169  df-f1o 5170  df-fv 5171  df-riota 5770  df-ov 5817  df-oprab 5818  df-mpo 5819  df-pnf 7893  df-mnf 7894  df-xr 7895  df-ltxr 7896  df-le 7897  df-sub 8027  df-neg 8028  df-inn 8813  df-z 9147  df-rp 9539
This theorem is referenced by:  dcapnconstALT  13573
  Copyright terms: Public domain W3C validator