ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  flqeqceilz GIF version

Theorem flqeqceilz 9400
Description: A rational number is an integer iff its floor equals its ceiling. (Contributed by Jim Kingdon, 11-Oct-2021.)
Assertion
Ref Expression
flqeqceilz (𝐴 ∈ ℚ → (𝐴 ∈ ℤ ↔ (⌊‘𝐴) = (⌈‘𝐴)))

Proof of Theorem flqeqceilz
StepHypRef Expression
1 flid 9366 . . 3 (𝐴 ∈ ℤ → (⌊‘𝐴) = 𝐴)
2 ceilid 9397 . . 3 (𝐴 ∈ ℤ → (⌈‘𝐴) = 𝐴)
31, 2eqtr4d 2117 . 2 (𝐴 ∈ ℤ → (⌊‘𝐴) = (⌈‘𝐴))
4 flqcl 9355 . . . . . 6 (𝐴 ∈ ℚ → (⌊‘𝐴) ∈ ℤ)
5 zq 8792 . . . . . 6 ((⌊‘𝐴) ∈ ℤ → (⌊‘𝐴) ∈ ℚ)
64, 5syl 14 . . . . 5 (𝐴 ∈ ℚ → (⌊‘𝐴) ∈ ℚ)
7 qdceq 9333 . . . . 5 (((⌊‘𝐴) ∈ ℚ ∧ 𝐴 ∈ ℚ) → DECID (⌊‘𝐴) = 𝐴)
86, 7mpancom 413 . . . 4 (𝐴 ∈ ℚ → DECID (⌊‘𝐴) = 𝐴)
9 exmiddc 778 . . . 4 (DECID (⌊‘𝐴) = 𝐴 → ((⌊‘𝐴) = 𝐴 ∨ ¬ (⌊‘𝐴) = 𝐴))
108, 9syl 14 . . 3 (𝐴 ∈ ℚ → ((⌊‘𝐴) = 𝐴 ∨ ¬ (⌊‘𝐴) = 𝐴))
11 eqeq1 2088 . . . . . . 7 ((⌊‘𝐴) = 𝐴 → ((⌊‘𝐴) = (⌈‘𝐴) ↔ 𝐴 = (⌈‘𝐴)))
1211adantr 270 . . . . . 6 (((⌊‘𝐴) = 𝐴𝐴 ∈ ℚ) → ((⌊‘𝐴) = (⌈‘𝐴) ↔ 𝐴 = (⌈‘𝐴)))
13 ceilqidz 9398 . . . . . . . . 9 (𝐴 ∈ ℚ → (𝐴 ∈ ℤ ↔ (⌈‘𝐴) = 𝐴))
14 eqcom 2084 . . . . . . . . 9 ((⌈‘𝐴) = 𝐴𝐴 = (⌈‘𝐴))
1513, 14syl6bb 194 . . . . . . . 8 (𝐴 ∈ ℚ → (𝐴 ∈ ℤ ↔ 𝐴 = (⌈‘𝐴)))
1615biimprd 156 . . . . . . 7 (𝐴 ∈ ℚ → (𝐴 = (⌈‘𝐴) → 𝐴 ∈ ℤ))
1716adantl 271 . . . . . 6 (((⌊‘𝐴) = 𝐴𝐴 ∈ ℚ) → (𝐴 = (⌈‘𝐴) → 𝐴 ∈ ℤ))
1812, 17sylbid 148 . . . . 5 (((⌊‘𝐴) = 𝐴𝐴 ∈ ℚ) → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))
1918ex 113 . . . 4 ((⌊‘𝐴) = 𝐴 → (𝐴 ∈ ℚ → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ)))
20 flqle 9360 . . . . 5 (𝐴 ∈ ℚ → (⌊‘𝐴) ≤ 𝐴)
21 df-ne 2247 . . . . . 6 ((⌊‘𝐴) ≠ 𝐴 ↔ ¬ (⌊‘𝐴) = 𝐴)
22 necom 2330 . . . . . . 7 ((⌊‘𝐴) ≠ 𝐴𝐴 ≠ (⌊‘𝐴))
23 qltlen 8806 . . . . . . . . . . 11 (((⌊‘𝐴) ∈ ℚ ∧ 𝐴 ∈ ℚ) → ((⌊‘𝐴) < 𝐴 ↔ ((⌊‘𝐴) ≤ 𝐴𝐴 ≠ (⌊‘𝐴))))
246, 23mpancom 413 . . . . . . . . . 10 (𝐴 ∈ ℚ → ((⌊‘𝐴) < 𝐴 ↔ ((⌊‘𝐴) ≤ 𝐴𝐴 ≠ (⌊‘𝐴))))
25 breq1 3796 . . . . . . . . . . . . . 14 ((⌊‘𝐴) = (⌈‘𝐴) → ((⌊‘𝐴) < 𝐴 ↔ (⌈‘𝐴) < 𝐴))
2625adantl 271 . . . . . . . . . . . . 13 ((𝐴 ∈ ℚ ∧ (⌊‘𝐴) = (⌈‘𝐴)) → ((⌊‘𝐴) < 𝐴 ↔ (⌈‘𝐴) < 𝐴))
27 ceilqge 9392 . . . . . . . . . . . . . . 15 (𝐴 ∈ ℚ → 𝐴 ≤ (⌈‘𝐴))
28 qre 8791 . . . . . . . . . . . . . . . . 17 (𝐴 ∈ ℚ → 𝐴 ∈ ℝ)
29 ceilqcl 9390 . . . . . . . . . . . . . . . . . 18 (𝐴 ∈ ℚ → (⌈‘𝐴) ∈ ℤ)
3029zred 8550 . . . . . . . . . . . . . . . . 17 (𝐴 ∈ ℚ → (⌈‘𝐴) ∈ ℝ)
3128, 30lenltd 7294 . . . . . . . . . . . . . . . 16 (𝐴 ∈ ℚ → (𝐴 ≤ (⌈‘𝐴) ↔ ¬ (⌈‘𝐴) < 𝐴))
32 pm2.21 580 . . . . . . . . . . . . . . . 16 (¬ (⌈‘𝐴) < 𝐴 → ((⌈‘𝐴) < 𝐴𝐴 ∈ ℤ))
3331, 32syl6bi 161 . . . . . . . . . . . . . . 15 (𝐴 ∈ ℚ → (𝐴 ≤ (⌈‘𝐴) → ((⌈‘𝐴) < 𝐴𝐴 ∈ ℤ)))
3427, 33mpd 13 . . . . . . . . . . . . . 14 (𝐴 ∈ ℚ → ((⌈‘𝐴) < 𝐴𝐴 ∈ ℤ))
3534adantr 270 . . . . . . . . . . . . 13 ((𝐴 ∈ ℚ ∧ (⌊‘𝐴) = (⌈‘𝐴)) → ((⌈‘𝐴) < 𝐴𝐴 ∈ ℤ))
3626, 35sylbid 148 . . . . . . . . . . . 12 ((𝐴 ∈ ℚ ∧ (⌊‘𝐴) = (⌈‘𝐴)) → ((⌊‘𝐴) < 𝐴𝐴 ∈ ℤ))
3736ex 113 . . . . . . . . . . 11 (𝐴 ∈ ℚ → ((⌊‘𝐴) = (⌈‘𝐴) → ((⌊‘𝐴) < 𝐴𝐴 ∈ ℤ)))
3837com23 77 . . . . . . . . . 10 (𝐴 ∈ ℚ → ((⌊‘𝐴) < 𝐴 → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ)))
3924, 38sylbird 168 . . . . . . . . 9 (𝐴 ∈ ℚ → (((⌊‘𝐴) ≤ 𝐴𝐴 ≠ (⌊‘𝐴)) → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ)))
4039expd 254 . . . . . . . 8 (𝐴 ∈ ℚ → ((⌊‘𝐴) ≤ 𝐴 → (𝐴 ≠ (⌊‘𝐴) → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))))
4140com3r 78 . . . . . . 7 (𝐴 ≠ (⌊‘𝐴) → (𝐴 ∈ ℚ → ((⌊‘𝐴) ≤ 𝐴 → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))))
4222, 41sylbi 119 . . . . . 6 ((⌊‘𝐴) ≠ 𝐴 → (𝐴 ∈ ℚ → ((⌊‘𝐴) ≤ 𝐴 → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))))
4321, 42sylbir 133 . . . . 5 (¬ (⌊‘𝐴) = 𝐴 → (𝐴 ∈ ℚ → ((⌊‘𝐴) ≤ 𝐴 → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))))
4420, 43mpdi 42 . . . 4 (¬ (⌊‘𝐴) = 𝐴 → (𝐴 ∈ ℚ → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ)))
4519, 44jaoi 669 . . 3 (((⌊‘𝐴) = 𝐴 ∨ ¬ (⌊‘𝐴) = 𝐴) → (𝐴 ∈ ℚ → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ)))
4610, 45mpcom 36 . 2 (𝐴 ∈ ℚ → ((⌊‘𝐴) = (⌈‘𝐴) → 𝐴 ∈ ℤ))
473, 46impbid2 141 1 (𝐴 ∈ ℚ → (𝐴 ∈ ℤ ↔ (⌊‘𝐴) = (⌈‘𝐴)))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 102  wb 103  wo 662  DECID wdc 776   = wceq 1285  wcel 1434  wne 2246   class class class wbr 3793  cfv 4932   < clt 7215  cle 7216  cz 8432  cq 8785  cfl 9350  cceil 9351
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2064  ax-sep 3904  ax-pow 3956  ax-pr 3972  ax-un 4196  ax-setind 4288  ax-cnex 7129  ax-resscn 7130  ax-1cn 7131  ax-1re 7132  ax-icn 7133  ax-addcl 7134  ax-addrcl 7135  ax-mulcl 7136  ax-mulrcl 7137  ax-addcom 7138  ax-mulcom 7139  ax-addass 7140  ax-mulass 7141  ax-distr 7142  ax-i2m1 7143  ax-0lt1 7144  ax-1rid 7145  ax-0id 7146  ax-rnegex 7147  ax-precex 7148  ax-cnre 7149  ax-pre-ltirr 7150  ax-pre-ltwlin 7151  ax-pre-lttrn 7152  ax-pre-apti 7153  ax-pre-ltadd 7154  ax-pre-mulgt0 7155  ax-pre-mulext 7156  ax-arch 7157
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1687  df-eu 1945  df-mo 1946  df-clab 2069  df-cleq 2075  df-clel 2078  df-nfc 2209  df-ne 2247  df-nel 2341  df-ral 2354  df-rex 2355  df-reu 2356  df-rmo 2357  df-rab 2358  df-v 2604  df-sbc 2817  df-csb 2910  df-dif 2976  df-un 2978  df-in 2980  df-ss 2987  df-pw 3392  df-sn 3412  df-pr 3413  df-op 3415  df-uni 3610  df-int 3645  df-iun 3688  df-br 3794  df-opab 3848  df-mpt 3849  df-id 4056  df-po 4059  df-iso 4060  df-xp 4377  df-rel 4378  df-cnv 4379  df-co 4380  df-dm 4381  df-rn 4382  df-res 4383  df-ima 4384  df-iota 4897  df-fun 4934  df-fn 4935  df-f 4936  df-fv 4940  df-riota 5499  df-ov 5546  df-oprab 5547  df-mpt2 5548  df-1st 5798  df-2nd 5799  df-pnf 7217  df-mnf 7218  df-xr 7219  df-ltxr 7220  df-le 7221  df-sub 7348  df-neg 7349  df-reap 7742  df-ap 7749  df-div 7828  df-inn 8107  df-n0 8356  df-z 8433  df-q 8786  df-rp 8816  df-fl 9352  df-ceil 9353
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator