Theory intreal

Parents

Contents

Type operators

(none)

Constants

Definitions

INT_CEILING_defINT_FLOOR_deffrac_defis_int_defreal_of_int

Theorems

INT_CEILINGINT_CEILING'INT_CEILING_ADD_NUMINT_CEILING_BOUNDSINT_CEILING_BOUNDS'INT_CEILING_COMPUTEINT_CEILING_INT_FLOORINT_CEILING_NEGINT_CEILING_SUB_NUMINT_FLOORINT_FLOOR'INT_FLOOR_ADD_NUMINT_FLOOR_BOUNDSINT_FLOOR_BOUNDS'INT_FLOOR_EQNSINT_FLOOR_MONOINT_FLOOR_NEGINT_FLOOR_SUB1INT_FLOOR_SUB_NUMINT_FLOOR_SUCINT_FLOOR_SUMINT_FLOOR_SUM_NUMINT_FLOOR_computeINT_NUM_CEILINGINT_NUM_FLOORint_floor_1ints_exist_in_gapsis_int_altis_int_eq_frac_0is_int_thmreal_of_int_11real_of_int_EQNreal_of_int_addreal_of_int_defreal_of_int_lereal_of_int_ltreal_of_int_monotonicreal_of_int_mulreal_of_int_negreal_of_int_numreal_of_int_sub

Definitions

⊢ ∀x. ⌈x⌉ = LEAST_INT i. x ≤ real_of_int i
⊢ ∀x. ⌊x⌋ = LEAST_INT i. x < real_of_int (i + 1)
⊢ ∀x. frac x = x − real_of_int ⌊x⌋
⊢ ∀x. is_int x ⇔ x = real_of_int ⌊x⌋
⊢ ∀i. real_of_int i = if i < 0 then -&Num (-i) else &Num i

Theorems

⊢ ∀r i. ⌈r⌉ = i ⇔ real_of_int (i − 1) < r ∧ r ≤ real_of_int i
⊢ ∀r i. ⌈r⌉ = i ⇔ r ≤ real_of_int i ∧ real_of_int i < r + 1
⊢ ⌈x + &n⌉ = ⌈x⌉ + &n ∧ ⌈&n + x⌉ = ⌈x⌉ + &n
⊢ ∀r. real_of_int (⌈r⌉ − 1) < r ∧ r ≤ real_of_int ⌈r⌉
⊢ ∀r. r ≤ real_of_int ⌈r⌉ ∧ real_of_int ⌈r⌉ < r + 1
⊢ ⌈0⌉ = 0 ∧
  ⌈&m⌉ = (let i = ⌊&m⌋ in if real_of_int i = &m then i else i + 1) ∧
  ⌈-&m⌉ = (let i = ⌊-&m⌋ in if real_of_int i = -&m then i else i + 1) ∧
  (⌈&NUMERAL (BIT1 m) / &NUMERAL (BIT1 n)⌉ =
   (let
      i = ⌊&NUMERAL (BIT1 m) / &NUMERAL (BIT1 n)⌋
    in
      if real_of_int i = &NUMERAL (BIT1 m) / &NUMERAL (BIT1 n) then i
      else i + 1) ∧
   ⌈&NUMERAL (BIT2 m) / &NUMERAL (BIT1 n)⌉ =
   (let
      i = ⌊&NUMERAL (BIT2 m) / &NUMERAL (BIT1 n)⌋
    in
      if real_of_int i = &NUMERAL (BIT2 m) / &NUMERAL (BIT1 n) then i
      else i + 1) ∧
   ⌈&NUMERAL (BIT1 m) / &NUMERAL (BIT2 n)⌉ =
   (let
      i = ⌊&NUMERAL (BIT1 m) / &NUMERAL (BIT2 n)⌋
    in
      if real_of_int i = &NUMERAL (BIT1 m) / &NUMERAL (BIT2 n) then i
      else i + 1) ∧
   ⌈&NUMERAL (BIT2 m) / &NUMERAL (BIT2 n)⌉ =
   (let
      i = ⌊&NUMERAL (BIT2 m) / &NUMERAL (BIT2 n)⌋
    in
      if real_of_int i = &NUMERAL (BIT2 m) / &NUMERAL (BIT2 n) then i
      else i + 1)) ∧
  ⌈-&NUMERAL (BIT1 m) / &NUMERAL (BIT1 n)⌉ =
  (let
     i = ⌊-&NUMERAL (BIT1 m) / &NUMERAL (BIT1 n)⌋
   in
     if real_of_int i = -&NUMERAL (BIT1 m) / &NUMERAL (BIT1 n) then i
     else i + 1) ∧
  ⌈-&NUMERAL (BIT2 m) / &NUMERAL (BIT1 n)⌉ =
  (let
     i = ⌊-&NUMERAL (BIT2 m) / &NUMERAL (BIT1 n)⌋
   in
     if real_of_int i = -&NUMERAL (BIT2 m) / &NUMERAL (BIT1 n) then i
     else i + 1) ∧
  ⌈-&NUMERAL (BIT1 m) / &NUMERAL (BIT2 n)⌉ =
  (let
     i = ⌊-&NUMERAL (BIT1 m) / &NUMERAL (BIT2 n)⌋
   in
     if real_of_int i = -&NUMERAL (BIT1 m) / &NUMERAL (BIT2 n) then i
     else i + 1) ∧
  ⌈-&NUMERAL (BIT2 m) / &NUMERAL (BIT2 n)⌉ =
  (let
     i = ⌊-&NUMERAL (BIT2 m) / &NUMERAL (BIT2 n)⌋
   in
     if real_of_int i = -&NUMERAL (BIT2 m) / &NUMERAL (BIT2 n) then i
     else i + 1)
⊢ ∀r. ⌈r⌉ = (let i = ⌊r⌋ in if real_of_int i = r then i else i + 1)
⊢ ∀x. ⌈-x⌉ = -⌊x⌋
⊢ ⌈x − &n⌉ = ⌈x⌉ − &n ∧ ⌈&n − x⌉ = ⌈-x⌉ + &n
⊢ ∀r i. ⌊r⌋ = i ⇔ real_of_int i ≤ r ∧ r < real_of_int (i + 1)
⊢ ∀r i. ⌊r⌋ = i ⇔ r − 1 < real_of_int i ∧ real_of_int i ≤ r
⊢ ⌊x + &n⌋ = ⌊x⌋ + &n ∧ ⌊&n + x⌋ = ⌊x⌋ + &n
⊢ ∀r. real_of_int ⌊r⌋ ≤ r ∧ r < real_of_int (⌊r⌋ + 1)
⊢ ∀r. r − 1 < real_of_int ⌊r⌋ ∧ real_of_int ⌊r⌋ ≤ r
⊢ (∀n. ⌊&n⌋ = &n) ∧ (∀n. ⌊-&n⌋ = -&n) ∧
  (∀n m. 0 < m ⇒ ⌊&n / &m⌋ = &n / &m) ∧ ∀n m. 0 < m ⇒ ⌊-&n / &m⌋ = -&n / &m
⊢ x < y ⇒ ⌊x⌋ ≤ ⌊y⌋
⊢ ∀x. ⌊-x⌋ = -⌈x⌉
⊢ ⌊x − 1⌋ = ⌊x⌋ − 1
⊢ ⌊x − &n⌋ = ⌊x⌋ − &n ∧ ⌊&n − x⌋ = ⌊-x⌋ + &n
⊢ ⌊x + 1⌋ = ⌊x⌋ + 1
⊢ ⌊x + real_of_int y⌋ = ⌊x⌋ + y ∧ ⌊real_of_int y + x⌋ = ⌊x⌋ + y
⊢ ⌊x + &n⌋ = ⌊x⌋ + &n ∧ ⌊&n + x⌋ = ⌊x⌋ + &n
⊢ ⌊&n⌋ = &n ∧ ⌊-&n⌋ = -&n ∧
  (⌊&NUMERAL (BIT1 n) / &NUMERAL (BIT1 m)⌋ =
   &NUMERAL (BIT1 n) / &NUMERAL (BIT1 m) ∧
   ⌊&NUMERAL (BIT1 n) / &NUMERAL (BIT2 m)⌋ =
   &NUMERAL (BIT1 n) / &NUMERAL (BIT2 m) ∧
   ⌊&NUMERAL (BIT2 n) / &NUMERAL (BIT1 m)⌋ =
   &NUMERAL (BIT2 n) / &NUMERAL (BIT1 m) ∧
   ⌊&NUMERAL (BIT2 n) / &NUMERAL (BIT2 m)⌋ =
   &NUMERAL (BIT2 n) / &NUMERAL (BIT2 m)) ∧
  ⌊-&NUMERAL (BIT1 n) / &NUMERAL (BIT1 m)⌋ =
  -&NUMERAL (BIT1 n) / &NUMERAL (BIT1 m) ∧
  ⌊-&NUMERAL (BIT1 n) / &NUMERAL (BIT2 m)⌋ =
  -&NUMERAL (BIT1 n) / &NUMERAL (BIT2 m) ∧
  ⌊-&NUMERAL (BIT2 n) / &NUMERAL (BIT1 m)⌋ =
  -&NUMERAL (BIT2 n) / &NUMERAL (BIT1 m) ∧
  ⌊-&NUMERAL (BIT2 n) / &NUMERAL (BIT2 m)⌋ =
  -&NUMERAL (BIT2 n) / &NUMERAL (BIT2 m)
⊢ ∀r. 0 ≤ r ⇒ &clg r = ⌈r⌉
⊢ ∀r. 0 ≤ r ⇒ &flr r = ⌊r⌋
⊢ ⌊&n⌋ = &n ∧ ⌊-&n⌋ = -&n
⊢ ∀a b. a + 1 < b ⇒ ∃i. a < real_of_int i ∧ real_of_int i < b
⊢ ∀x. is_int x ⇔ x = real_of_int ⌈x⌉
⊢ ∀x. is_int x ⇔ frac x = 0
⊢ ∀x. is_int x ⇔ ⌊x⌋ = ⌈x⌉
⊢ real_of_int m = real_of_int n ⇔ m = n
⊢ (real_of_int i = &n ⇔ i = &n) ∧ (&n = real_of_int i ⇔ i = &n) ∧
  (real_of_int i = -&n ⇔ i = -&n) ∧ (-&n = real_of_int i ⇔ i = -&n)
⊢ real_of_int (m + n) = real_of_int m + real_of_int n
⊢ ∀i. real_of_int i = if i < 0 then -&Num (-i) else &Num i
⊢ real_of_int m ≤ real_of_int n ⇔ m ≤ n
⊢ real_of_int m < real_of_int n ⇔ m < n
⊢ ∀i j. i < j ⇒ real_of_int i < real_of_int j
⊢ real_of_int (m * n) = real_of_int m * real_of_int n
⊢ real_of_int (-m) = -real_of_int m
⊢ real_of_int (&n) = &n
⊢ real_of_int (m − n) = real_of_int m − real_of_int n