Mode of #cas

enclose

An interval that holds every value of an expression on a box, with upper, absolute and center bounds, all proved.

#cas [enclose x in [a, b]] e
gives an interval with rational endpoints that holds every value of e for x in [a,b], and proves it.
#cas [enclose x in [a, b], y in [c, d]] e
the same on a box, with one binding for each variable, up to 8.
#cas [enclose] e
encloses a closed expression.
cega [enclose x in [a, b]] e
proves a goal from the same query: an enclosure, an upper bound, an absolute bound or an approximation.

When I want to know what a function does on a box, enclose is where I start, before I think about plotting it. You get an interval the function can’t leave, and a theorem about Mathlib’s real functions that says so. The same certificate gives the report three more statements: an upper bound, a bound on the absolute value, and a center with a radius.

Details and Options

  • For the printed interval [lo,hi] the first theorem is ∀x∈[a,b],lo≤e∧e≤hi, stated with Set.Icc, with one more ∀ for each further binding.
  • The next steps prove e≤u for the upper bound, |e|≤m for the absolute bound and |e−c|≤r for the center c and the radius r.
  • The enclosure is valid, and not always tight. (depth := n) first bisects the box, up to n levels deep, which can make it tighter.
  • Each binding has rational literal endpoints with a≤b, such as -1, 3/2 or 0.1. A box has at most 8 coordinates (cega.maxDimension).
  • e is written in the calculator grammar of N, with |x| as well. Every subexpression must be defined on the whole box: denominators stay away from zero and the arguments of log stay positive.
  • An endpoint is printed exactly when its rational is short, at most 24 characters, and otherwise rounded outward to 6 decimal places. The details show the exact rationals.
  • (prec := n) sets the number of Taylor terms for exp, series terms for log and binary digits for square roots together, and (expOrder := n), (logTerms := n) and (sqrtDigits := n) set them one at a time. The defaults are 8, 10 and 12.
  • (digits := d) first tries the digit evaluator of N and prints d decimal places.
  • set_option cega.maxPrecision n (default 256) and set_option cega.maxRefinementWork n (default 4096) cap the precision and the work of a subdivision.
  • The tactics cega and cas take the box from hypotheses such as 0 ≤ x and x ≤ 1, so the bounds go straight into proofs.
  • cega (arith := F) [enclose ...] e rounds the enclosure endpoints outward into the format F, such as binary64. (arith := "exact") overrides a float default set by cega.arithmetic. The flag [use_floats] belongs to bare cega, and the query takes the arithmetic option instead. #cas [enclose ...] uses exact rational endpoints. Certificates has more on the two arithmetics.
  • With CASOracle.Numeric imported, #cas [enclose x in [a, b], oracle := gappa] e asks Gappa for the bounds of an expression built from +, -, *, /, natural powers, sqrt and absolute values. The bounds are rounded outward, and bare cega proves them again from the box. See oracle.

Examples (21)#

Basic Examples (3)

A polynomial on [0,1], with its four bounds:

In[1]:=
#cas [enclose x in [0, 1]] (x ^ 2 + x)
Out[1]=

certified interval in ℝ

[0, 2]
[0, 2]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
2
Absolute bound
2
Center and radius
1 ± 1

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 0 ≤ x ^ 2 + x ∧ x ^ 2 + x ≤ 2

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 0 ≤ x ^ 2 + x ∧ x ^ 2 + x ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, x ^ 2 + x ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |x ^ 2 + x| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |x ^ 2 + x - 1| ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn ((𝕏[0].pow 2).add 𝕏[0]))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑0 / ↑1) (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn ((𝕏[0].pow 2).add 𝕏[0]))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn ((𝕏[0].pow 2).add 𝕏[0]) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn ((𝕏[0].pow 2).add 𝕏[0])) (fun x ↦ ↑1 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

The sine on [0,1]. Decimal endpoints are rounded outward:

In[2]:=
#cas [enclose x in [0, 1]] (sin x)
Out[2]=

certified interval in ℝ

[0, 0.841471]
[0, 0.841471]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
0.841471
Absolute bound
0.841471
Center and radius
≈0.420735 ± 0.420736

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 0 ≤ Real.sin x ∧ Real.sin x ≤ 0.841471

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 0 ≤ Real.sin x ∧ Real.sin x ≤ 0.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, Real.sin x ≤ 0.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |Real.sin x| ≤ 0.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |Real.sin x - 0.420735| ≤ 0.420736

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑0 / ↑1) (↑286337738405724074564845076175058320435 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑286337738405724074564845076175058320435 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].sin x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑286337738405724074564845076175058320435 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].sin)
      (fun x ↦ ↑286337738405724074564845076175058320435 / ↑680564733841876926926749214863536422912)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑286337738405724074564845076175058320435 / ↑680564733841876926926749214863536422912)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [0, 286337738405724074564845076175058320435/340282366920938463463374607431768211456]

A closed expression needs no binding:

In[3]:=
#cas [enclose] (sqrt 2)
Out[3]=

certified interval in ℝ

[181128, 57934096]
[181/128, 5793/4096]
Domain
closed real expression
Upper bound
5793/4096
Absolute bound
5793/4096
Center and radius
11585/8192 ± 1/8192

Checked by Lean’s kernel: Enclosure of the input

181 / 128 ≤ √2 ∧ √2 ≤ 5793 / 4096

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    181 / 128 ≤ √2 ∧ √2 ≤ 5793 / 4096

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    √2 ≤ 5793 / 4096

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    |√2| ≤ 5793 / 4096

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    |√2 - 11585 / 8192| ≤ 1 / 8192

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑181 / ↑128) (↑5793 / ↑4096)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑5793 / ↑4096)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑5793 / ↑4096)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt) (fun x ↦ ↑11585 / ↑8192)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑1 / ↑8192)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: none
    Certified domain: closed real expression
  • Certified numerical guarantee

    Guarantee: the real value lies in the output interval

Scope (4)

Two variables, each with its own interval:

In[4]:=
#cas [enclose x in [0, 1], y in [0, 1]] (x * y + sin y)
Out[4]=

certified interval in ℝ

[0, 1.841471]
[0, 1.841471]
Domain
x ∈ [0, 1], y ∈ [0, 1] ⊆ ℝ^2
Input (scalar map ℝ^2 → ℝ)
(x * y + sin y)
Upper bound
1.841471
Absolute bound
1.841471
Center and radius
≈0.920735 ± 0.920736

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, ∀ y ∈ Set.Icc 0 1, 0 ≤ x * y + Real.sin y ∧ x * y + Real.sin y ≤ 1.841471

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, ∀ y ∈ Set.Icc 0 1, 0 ≤ x * y + Real.sin y ∧ x * y + Real.sin y ≤ 1.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, ∀ y ∈ Set.Icc 0 1, x * y + Real.sin y ≤ 1.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, ∀ y ∈ Set.Icc 0 1, |x * y + Real.sin y| ≤ 1.841471

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, ∀ y ∈ Set.Icc 0 1, |x * y + Real.sin y - 0.920735| ≤ 0.920736

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn ((𝕏[0].mul 𝕏[1]).add 𝕏[1].sin))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯, CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get
          coordinate)
      (↑0 / ↑1) (↑626620105326662538028219683606826531891 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn ((𝕏[0].mul 𝕏[1]).add 𝕏[1].sin))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯, CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get
          coordinate)
      (↑626620105326662538028219683606826531891 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn ((𝕏[0].mul 𝕏[1]).add 𝕏[1].sin) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯, CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get
          coordinate)
      (↑626620105326662538028219683606826531891 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn ((𝕏[0].mul 𝕏[1]).add 𝕏[1].sin))
      (fun x ↦ ↑626620105326662538028219683606826531891 / ↑680564733841876926926749214863536422912)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯, CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get
          coordinate)
      (↑626620105326662538028219683606826531891 / ↑680564733841876926926749214863536422912)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x, y
    Certified domain: x ∈ [0, 1], y ∈ [0, 1] ⊆ ℝ^2
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [0, 626620105326662538028219683606826531891/340282366920938463463374607431768211456]

A rational function and an exponential:

In[5]:=
#cas [enclose x in [0, 1]] (x / (1 + x))
Out[5]=

certified interval in ℝ

[0, 12]
[0, 1/2]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
1/2
Absolute bound
1/2
Center and radius
1/4 ± 1/4

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 0 ≤ x / (1 + x) ∧ x / (1 + x) ≤ 1 / 2

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 0 ≤ x / (1 + x) ∧ x / (1 + x) ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, x / (1 + x) ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |x / (1 + x)| ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |x / (1 + x) - 1 / 4| ≤ 1 / 4

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add 𝕏[0])))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑0 / ↑1) (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add 𝕏[0])))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦ |CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add 𝕏[0])) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add 𝕏[0])))
      (fun x ↦ ↑1 / ↑4)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑4)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
In[6]:=
#cas [enclose x in [9 / 10, 11 / 10]] (x * exp (-x))
Out[6]=

certified interval in ℝ

[0.356443, 0.379316]
[0.356443, 0.379316]
Domain
x ∈ [9/10, 11/10] ⊆ ℝ
Upper bound
0.379316
Absolute bound
0.379316
Center and radius
≈0.367879 ± 0.011437

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (9 / 10) (11 / 10), 0.356443 ≤ x * Real.exp (-x) ∧ x * Real.exp (-x) ≤ 0.379316

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (9 / 10) (11 / 10), 0.356443 ≤ x * Real.exp (-x) ∧ x * Real.exp (-x) ≤ 0.379316

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (9 / 10) (11 / 10), x * Real.exp (-x) ≤ 0.379316

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x)| ≤ 0.379316

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x) - 0.367879| ≤ 11437e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[0].neg.exp))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (9 / 10) (11 / 10) ⋯].get coordinate)
      (↑6064578444609289948060458934526468133587 / ↑17014118346046923173168730371588410572800)
      (↑12907420930551572231962666464743635725551 / ↑34028236692093846346337460743176821145600)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[0].neg.exp))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (9 / 10) (11 / 10) ⋯].get coordinate)
      (↑12907420930551572231962666464743635725551 / ↑34028236692093846346337460743176821145600)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].mul 𝕏[0].neg.exp) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (9 / 10) (11 / 10) ⋯].get coordinate)
      (↑12907420930551572231962666464743635725551 / ↑34028236692093846346337460743176821145600)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[0].neg.exp))
      (fun x ↦ ↑1001463112790806085123343373351862879709 / ↑2722258935367507707706996859454145691648)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (9 / 10) (11 / 10) ⋯].get coordinate)
      (↑778264041332992335841748595690699458377 / ↑68056473384187692692674921486353642291200)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [9/10, 11/10] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [6064578444609289948060458934526468133587/17014118346046923173168730371588410572800, 12907420930551572231962666464743635725551/34028236692093846346337460743176821145600]

A narrow interval gives a narrow enclosure:

In[7]:=
#cas [enclose x in [10, 1001 / 100]] (sin x)
Out[7]=

certified interval in ℝ

[−0.552385, −0.544021]
[-0.552385, -0.544021]
Domain
x ∈ [10, 1001/100] ⊆ ℝ
Upper bound
-0.544021
Absolute bound
0.552385
Center and radius
≈-0.548203 ± 0.004182

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 10 (1001 / 100), -0.552385 ≤ Real.sin x ∧ Real.sin x ≤ -0.544021

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 10 (1001 / 100), -0.552385 ≤ Real.sin x ∧ Real.sin x ≤ -0.544021

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 10 (1001 / 100), Real.sin x ≤ -0.544021

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x| ≤ 0.552385

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x + 0.548203| ≤ 4182e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate)
      (↑(-187966700178627751492036751887906017459) / ↑340282366920938463463374607431768211456)
      (↑(-92560395634196545154218951384246197009) / ↑170141183460469231731687303715884105728)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate)
      (↑(-92560395634196545154218951384246197009) / ↑170141183460469231731687303715884105728)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].sin x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate)
      (↑187966700178627751492036751887906017459 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].sin)
      (fun x ↦ ↑(-373087491447020841800474654656398411477) / ↑680564733841876926926749214863536422912)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate)
      (↑2845908910234661183598849119413623441 / ↑680564733841876926926749214863536422912)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [10, 1001/100] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [-187966700178627751492036751887906017459/340282366920938463463374607431768211456, -92560395634196545154218951384246197009/170141183460469231731687303715884105728]

Absolute values, inverse and hyperbolic functions:

In[8]:=
#cas [enclose x in [-2, 1]] (|x|)
Out[8]=

certified interval in ℝ

[0, 2]
[0, 2]
Domain
x ∈ [-2, 1] ⊆ ℝ
Upper bound
2
Absolute bound
2
Center and radius
1 ± 1

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (-2) 1, 0 ≤ |x| ∧ |x| ≤ 2

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (-2) 1, 0 ≤ |x| ∧ |x| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (-2) 1, |x| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (-2) 1, |(|x|)| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (-2) 1, ||x| - 1| ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].pow 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 1 ⋯].get coordinate)
      (↑0 / ↑1) (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].pow 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 1 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].pow 2).sqrt x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 1 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].pow 2).sqrt) (fun x ↦ ↑1 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 1 ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [-2, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
In[9]:=
#cas [enclose x in [-1 / 2, 1 / 2]] (arcsin x)
Out[9]=

certified interval in ℝ

[−0.523599, 0.523599]
[-0.523599, 0.523599]
Domain
x ∈ [-1/2, 1/2] ⊆ ℝ
Upper bound
0.523599
Absolute bound
0.523599
Center and radius
0 ± 0.523599

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (-1 / 2) (1 / 2), -0.523599 ≤ Real.arcsin x ∧ Real.arcsin x ≤ 0.523599

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (-1 / 2) (1 / 2), -0.523599 ≤ Real.arcsin x ∧ Real.arcsin x ≤ 0.523599

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (-1 / 2) (1 / 2), Real.arcsin x ≤ 0.523599

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (-1 / 2) (1 / 2), |Real.arcsin x| ≤ 0.523599

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (-1 / 2) (1 / 2), |Real.arcsin x - 0| ≤ 0.523599

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].asin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-1 / 2) (1 / 2) ⋯].get coordinate)
      (↑(-178171430677865191171890821864242709953) / ↑340282366920938463463374607431768211456)
      (↑178171430677865191171890821864242709953 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].asin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-1 / 2) (1 / 2) ⋯].get coordinate)
      (↑178171430677865191171890821864242709953 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].asin x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-1 / 2) (1 / 2) ⋯].get coordinate)
      (↑178171430677865191171890821864242709953 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].asin) (fun x ↦ ↑0 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-1 / 2) (1 / 2) ⋯].get coordinate)
      (↑178171430677865191171890821864242709953 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [-1/2, 1/2] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [-178171430677865191171890821864242709953/340282366920938463463374607431768211456, 178171430677865191171890821864242709953/340282366920938463463374607431768211456]
In[10]:=
#cas [enclose x in [-5, 5]] (tanh x)
Out[10]=

certified interval in ℝ

[−0.999910, 0.999910]
[-0.999910, 0.999910]
Domain
x ∈ [-5, 5] ⊆ ℝ
Upper bound
0.999910
Absolute bound
0.999910
Center and radius
≈-0.000001 ± 0.999911

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (-5) 5, -0.999910 ≤ Real.tanh x ∧ Real.tanh x ≤ 0.999910

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (-5) 5, -0.999910 ≤ Real.tanh x ∧ Real.tanh x ≤ 0.999910

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (-5) 5, Real.tanh x ≤ 0.999910

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (-5) 5, |Real.tanh x| ≤ 0.999910

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (-5) 5, |Real.tanh x + 1e-6| ≤ 0.999911

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn
      (CAS.Exact.exprFn
        (((𝕏[0].exp.sub 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2)).div
          ((𝕏[0].exp.add 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-5) 5 ⋯].get coordinate)
      (↑(-185792032812268841120352661050400084943005841151432191930040344956816538178694827660960473118578708278793672052285241976218393185506201563733907812904658906264481070343468634471638370977502450751537545313601233345966335) /
        ↑185808903465232841914589434357735480471843918754078541718075562553914089007724926174983043021839136189239245673053278781499290394997825072192033886672060060512211542539426701657678371580988990401920599782886238910287617)
      (↑4092341918708448340149001210283847666644878947375806173343262818303635370037695033668012011620822322951338872248882041944659401488188933413122025483232741329362395751913414586627864057087730027449957315924854519038208525185 /
        ↑4092713519644725841832036152379255802210293797135711684076910934211146100664881453421847955136962740795806905166607380465417119171769437439757951424932318048329172444526297481963993373830288518891110774069951006510464779137)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn
      (CAS.Exact.exprFn
        (((𝕏[0].exp.sub 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2)).div
          ((𝕏[0].exp.add 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-5) 5 ⋯].get coordinate)
      (↑4092341918708448340149001210283847666644878947375806173343262818303635370037695033668012011620822322951338872248882041944659401488188933413122025483232741329362395751913414586627864057087730027449957315924854519038208525185 /
        ↑4092713519644725841832036152379255802210293797135711684076910934211146100664881453421847955136962740795806905166607380465417119171769437439757951424932318048329172444526297481963993373830288518891110774069951006510464779137)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦
        |CAS.Exact.exprFn
            (((𝕏[0].exp.sub 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2)).div
              ((𝕏[0].exp.add 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2)))
            x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-5) 5 ⋯].get coordinate)
      (↑185792032812268841120352661050400084943005841151432191930040344956816538178694827660960473118578708278793672052285241976218393185506201563733907812904658906264481070343468634471638370977502450751537545313601233345966335 /
        ↑185808903465232841914589434357735480471843918754078541718075562553914089007724926174983043021839136189239245673053278781499290394997825072192033886672060060512211542539426701657678371580988990401920599782886238910287617)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn
      (CAS.Exact.exprFn
        (((𝕏[0].exp.sub 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2)).div
          ((𝕏[0].exp.add 𝕏[0].neg.exp).div (CAS.Verified.Expr.nat 2))))
      (fun x ↦
        ↑(-6512688017056914857037300055267465500584054326244808679174828943748761220680546210331435763859664598217666340172559482054382857331046049260659816659199017867324807159667689354076009270447684185973030530468244560687360621717842069464257183961436793602404630066387461177043312872212526315421330709683453681773399333466535857842970561223948140085196339897642856013056498721630544592740552651716338233780297759378296918820167937109375) /
          ↑760462611282520200293139804711691710701242633696753894471636467197887745048351293017146354381430934444456210199885881057130347574316632991222374816049131367164013639877213849285676138125316352325759429574363474923497692410494745318766930355566685359944096916138241954563667301362060002749469521965676650009477288235687677625342816773946590892293127112465065202012319111916261897510662097761727221260822562458206771598114656229285969051046529)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-5) 5 ⋯].get coordinate)
      (↑760393564526536511859248838904815230965803867046899725972873301831762712497550525869889432606770404305635656884988489524090316480216776353050647150747842685622916932462397854443006666804997915119459918544254661063735386192271324041567867729824566008497794710179969909399208990124017991855707196315961945171113689885645860277187245660857790397834770754087082907657462020709989703682088726864240169804842661303244749095585860503694537675243520 /
        ↑760462611282520200293139804711691710701242633696753894471636467197887745048351293017146354381430934444456210199885881057130347574316632991222374816049131367164013639877213849285676138125316352325759429574363474923497692410494745318766930355566685359944096916138241954563667301362060002749469521965676650009477288235687677625342816773946590892293127112465065202012319111916261897510662097761727221260822562458206771598114656229285969051046529)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [-5, 5] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [-185792032812268841120352661050400084943005841151432191930040344956816538178694827660960473118578708278793672052285241976218393185506201563733907812904658906264481070343468634471638370977502450751537545313601233345966335/185808903465232841914589434357735480471843918754078541718075562553914089007724926174983043021839136189239245673053278781499290394997825072192033886672060060512211542539426701657678371580988990401920599782886238910287617, 4092341918708448340149001210283847666644878947375806173343262818303635370037695033668012011620822322951338872248882041944659401488188933413122025483232741329362395751913414586627864057087730027449957315924854519038208525185/4092713519644725841832036152379255802210293797135711684076910934211146100664881453421847955136962740795806905166607380465417119171769437439757951424932318048329172444526297481963993373830288518891110774069951006510464779137]

Options (3)

On [−2,2] the first enclosure of x/(1+x2) is loose:

In[11]:=
#cas [enclose x in [-2, 2]] (x / (1 + x ^ 2))
Out[11]=

certified interval in ℝ

[−2, 2]
[-2, 2]
Domain
x ∈ [-2, 2] ⊆ ℝ
Upper bound
2
Absolute bound
2
Center and radius
0 ± 2

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (-2) 2, -2 ≤ x / (1 + x ^ 2) ∧ x / (1 + x ^ 2) ≤ 2

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (-2) 2, -2 ≤ x / (1 + x ^ 2) ∧ x / (1 + x ^ 2) ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (-2) 2, x / (1 + x ^ 2) ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (-2) 2, |x / (1 + x ^ 2)| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (-2) 2, |x / (1 + x ^ 2) - 0| ≤ 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn
      (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑(-2) / ↑1) (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦ |CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (fun x ↦ ↑0 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑2 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [-2, 2] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

With (depth := 2) the box is cut at 0 and at ±1, the function is monotone on each piece, and the enclosure is its exact range:

In[12]:=
#cas (depth := 2) [enclose x in [-2, 2]] (x / (1 + x ^ 2))
Out[12]=

certified interval in ℝ

[−12, 12]
[-1/2, 1/2]
Domain
x ∈ [-2, 2] ⊆ ℝ
Upper bound
1/2
Absolute bound
1/2
Center and radius
0 ± 1/2

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (-2) 2, -1 / 2 ≤ x / (1 + x ^ 2) ∧ x / (1 + x ^ 2) ≤ 1 / 2

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (-2) 2, -1 / 2 ≤ x / (1 + x ^ 2) ∧ x / (1 + x ^ 2) ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (-2) 2, x / (1 + x ^ 2) ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (-2) 2, |x / (1 + x ^ 2)| ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (-2) 2, |x / (1 + x ^ 2) - 0| ≤ 1 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn
      (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑(-1) / ↑2) (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦ |CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].div ((CAS.Verified.Expr.nat 1).add (𝕏[0].pow 2))))
      (fun x ↦ ↑0 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (-2) 2 ⋯].get coordinate)
      (↑1 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [-2, 2] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

(prec := n) raises the precision of the series and square roots. For 2 the width of the interval goes from 1/4096, in the third basic example, to 1/65536:

In[13]:=
#cas (prec := 16) [enclose] (sqrt 2)
Out[13]=

certified interval in ℝ

[9268165536, 4634132768]
[92681/65536, 46341/32768]
Domain
closed real expression
Upper bound
46341/32768
Absolute bound
46341/32768
Center and radius
185363/131072 ± 1/131072

Checked by Lean’s kernel: Enclosure of the input

92681 / 65536 ≤ √2 ∧ √2 ≤ 46341 / 32768

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    92681 / 65536 ≤ √2 ∧ √2 ≤ 46341 / 32768

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    √2 ≤ 46341 / 32768

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    |√2| ≤ 46341 / 32768

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    |√2 - 185363 / 131072| ≤ 1 / 131072

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑92681 / ↑65536)
      (↑46341 / ↑32768)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑46341 / ↑32768)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑46341 / ↑32768)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (CAS.Verified.Expr.nat 2).sqrt)
      (fun x ↦ ↑185363 / ↑131072) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate)
      (↑1 / ↑131072)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: none
    Certified domain: closed real expression
  • Certified numerical guarantee

    Guarantee: the real value lies in the output interval
    Precision policy: exp order 16, sqrt digits 16, log terms 16, subdivision depth 2

On a box, compare the exact output under “More details” without the option and with it:

In[14]:=
#cas [enclose x in [0, 1]] (exp x)
Out[14]=

certified interval in ℝ

[1, 2.718282]
[1, 2.718282]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
2.718282
Absolute bound
2.718282
Center and radius
≈1.859140 ± 0.859142

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1) (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].exp)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].exp x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].exp)
      (fun x ↦ ↑632632870910952179062207851607879121261 / ↑340282366920938463463374607431768211456)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑292350503990013715598833244176110909805 / ↑340282366920938463463374607431768211456)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [1, 462491687450482947330520547891995015533/170141183460469231731687303715884105728]
In[15]:=
#cas (prec := 40) [enclose x in [0, 1]] (exp x)
Out[15]=

certified interval in ℝ

[1, 2.718282]
[1, 2.718282]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
2.718282
Absolute bound
2.718282
Center and radius
≈1.859140 ± 0.859142

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].exp)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].exp x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].exp)
      (fun x ↦ ↑158158217683394850076785705409388125817 / ↑85070591730234615865843651857942052864)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑73087625953160234210942053551446072953 / ↑85070591730234615865843651857942052864)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [1, 115622921818277542143863879480417099385/42535295865117307932921825928971026432]
    Precision policy: exp order 40, sqrt digits 40, log terms 40, subdivision depth 2

Applications (3)

A bound in a proof. cas takes the box from the hypotheses and proves the bound by an enclosure, and cas? shows the query it ran:

In[16]:=
example (x : ℝ) (h₀ : 0 ≤ x) (h₁ : x ≤ 1) : Real.exp x ≤ 3 := by
  cas?
Out[16]=

Try this

cega

Lean checked the suggested replacement against the original goal. Selected route: CAS route: checked CEGA box enclosure of an ordinary inequality.

cega [enclose ...] names the box and the expression itself. Here it proves x(1−x)≤1/4 on [0,1]:

In[17]:=
example (x : ℝ) (h0 : 0 ≤ x) (h1 : x ≤ 1) : x * (1 - x) ≤ 1 / 4 := by
  cega [enclose x in [0, 1]] (x * (1 - x))
Out[17]=

Lean accepts the proof.


With (arith := binary64) the query computes with binary64 floats, rounded outward:

In[18]:=
example (x : ℝ) (h₀ : 0 ≤ x) (h₁ : x ≤ 1) : Real.exp x ≤ 2.72 := by
  cega (arith := binary64) [enclose x in [0, 1]] (Real.exp x)
Out[18]=

Lean accepts the proof.

Properties and Relations (3)

An identity encloses to a point:

In[19]:=
#cas [enclose x in [0, 1]] (sin x ^ 2 + cos x ^ 2)
Out[19]=

certified interval in ℝ

[1, 1]
[1, 1]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
1
Absolute bound
1
Center and radius
1 ± 0

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 1 ≤ Real.sin x ^ 2 + Real.cos x ^ 2 ∧ Real.sin x ^ 2 + Real.cos x ^ 2 ≤ 1

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.sin x ^ 2 + Real.cos x ^ 2 ∧ Real.sin x ^ 2 + Real.cos x ^ 2 ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, Real.sin x ^ 2 + Real.cos x ^ 2 ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |Real.sin x ^ 2 + Real.cos x ^ 2| ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |Real.sin x ^ 2 + Real.cos x ^ 2 - 1| ≤ 0

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn ((𝕏[0].sin.pow 2).add (𝕏[0].cos.pow 2)))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1) (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn ((𝕏[0].sin.pow 2).add (𝕏[0].cos.pow 2)))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn ((𝕏[0].sin.pow 2).add (𝕏[0].cos.pow 2)) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn ((𝕏[0].sin.pow 2).add (𝕏[0].cos.pow 2)))
      (fun x ↦ ↑1 / ↑1)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑0 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

maximize gives the largest value itself, and enclose only bounds it:

In[20]:=
#cas [maximize x in [0, 1]] (x * (1 - x))
Out[20]=

exact maximum on the interval

max = 1/4 at x = 1/2
Domain
x ∈ [0, 1]
Input (polynomial)
(x * (1 - x))

Checked by Lean’s kernel: Bound on the interval attained at the point

(∀ x ∈ Set.Icc 0 1, x * (1 - x) ≤ 1 / 4) ∧
  1 / 2 ∈ Set.Icc 0 1 ∧ (fun x ↦ x * (1 - x)) (1 / 2) = 1 / 4
The certificate: 1 checked step
  1. Bound on the interval attained at the point

    (∀ x ∈ Set.Icc 0 1, x * (1 - x) ≤ 1 / 4) ∧
      1 / 2 ∈ Set.Icc 0 1 ∧ (fun x ↦ x * (1 - x)) (1 / 2) = 1 / 4

    Checked by Lean’s kernel

The computation
  • Candidates

    Endpoints and real roots of the derivative in the interval (not proof): 3
In[21]:=
#cas [enclose x in [0, 1]] (x * (1 - x))
Out[21]=

certified interval in ℝ

[0, 14]
[0, 1/4]
Domain
x ∈ [0, 1] ⊆ ℝ
Upper bound
1/4
Absolute bound
1/4
Center and radius
1/8 ± 1/8

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 1, 0 ≤ x * (1 - x) ∧ x * (1 - x) ≤ 1 / 4

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 1, 0 ≤ x * (1 - x) ∧ x * (1 - x) ≤ 1 / 4

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 1, x * (1 - x) ≤ 1 / 4

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 1, |x * (1 - x)| ≤ 1 / 4

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 1, |x * (1 - x) - 1 / 8| ≤ 1 / 8

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].mul ((CAS.Verified.Expr.nat 1).sub 𝕏[0])))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑0 / ↑1) (↑1 / ↑4)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].mul ((CAS.Verified.Expr.nat 1).sub 𝕏[0])))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑4)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦ |CAS.Exact.exprFn (𝕏[0].mul ((CAS.Verified.Expr.nat 1).sub 𝕏[0])) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑4)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].mul ((CAS.Verified.Expr.nat 1).sub 𝕏[0])))
      (fun x ↦ ↑1 / ↑8)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate)
      (↑1 / ↑8)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

N gives digits of a closed expression, and enclose gives an interval:

In[22]:=
#cas [N 10] (sqrt 2)
Out[22]=

first 10 significant digits, truncated

1.414213562
Domain
closed real expression

Checked by Lean’s kernel: Certified decimal digits

1414213562 / 10 ^ 9 ≤ √2 ∧ √2 < (1414213562 + 1) / 10 ^ 9

from CAS.Continuum.DigitsEval.eval_sound

The certificate: 1 checked step
  1. Certified decimal digits

    1414213562 / 10 ^ 9 ≤ √2 ∧ √2 < (1414213562 + 1) / 10 ^ 9

    Checked by Lean’s kernel · CAS.Continuum.DigitsEval.eval_sound

The computation
  • Certified numerical evaluation

    Working precision: 73 bits, 34 series terms, 62 logarithm terms
    Guarantee: every printed digit is a digit of the real value, truncated toward zero

Possible Issues (3)

1/x is unbounded near 0, so no interval holds its values on [−1,1]. Enclose it on a box that leaves out 0, such as [1/10,1]:

In[23]:=
#cas [enclose x in [-1, 1]] (1 / x)
Out[23]=

Error

no checked interval route succeeded on this box. Possible domain obstruction: check whether denominator intervals exclude zero. This is a search diagnostic, not a proof that the expression is singular. Restrict the domain or rewrite the expression to make these facts interval-visible. `(depth := n)` subdivision still needs a checked enclosure on every child box
In[24]:=
#cas [enclose x in [1/10, 1]] (1 / x)
Out[24]=

certified interval in ℝ

[1, 10]
[1, 10]
Domain
x ∈ [1/10, 1] ⊆ ℝ
Upper bound
10
Absolute bound
10
Center and radius
11/2 ± 9/2

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc (1 / 10) 1, 1 ≤ 1 / x ∧ 1 / x ≤ 10

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc (1 / 10) 1, 1 ≤ 1 / x ∧ 1 / x ≤ 10

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc (1 / 10) 1, 1 / x ≤ 10

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc (1 / 10) 1, |1 / x| ≤ 10

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc (1 / 10) 1, |1 / x - 11 / 2| ≤ 9 / 2

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div 𝕏[0]))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (1 / 10) 1 ⋯].get coordinate)
      (↑1 / ↑1) (↑10 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div 𝕏[0]))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (1 / 10) 1 ⋯].get coordinate)
      (↑10 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div 𝕏[0]) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (1 / 10) 1 ⋯].get coordinate)
      (↑10 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div 𝕏[0])) (fun x ↦ ↑11 / ↑2)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds (1 / 10) 1 ⋯].get coordinate)
      (↑9 / ↑2)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [1/10, 1] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box

Endpoints are rational literals. For [0,π], use a rational interval that contains it, such as [0,315/100]:

In[25]:=
#cas [enclose x in [0, pi]] (sin x)
Out[25]=

Error

interval endpoints must be exact rational literals, such as -1, 3/2, -1/10, or 0.1
In[26]:=
#cas [enclose x in [0, 315/100]] (sin x)
Out[26]=

certified interval in ℝ

[−0.575009, 1]
[-0.575009, 1]
Domain
x ∈ [0, 63/20] ⊆ ℝ
Upper bound
1
Absolute bound
1
Center and radius
≈0.212495 ± 0.787505

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 (63 / 20), -0.575009 ≤ Real.sin x ∧ Real.sin x ≤ 1

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 (63 / 20), -0.575009 ≤ Real.sin x ∧ Real.sin x ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 (63 / 20), Real.sin x ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 (63 / 20), |Real.sin x| ≤ 1

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 (63 / 20), |Real.sin x - 0.212495| ≤ 157501 / 200000

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 (63 / 20) ⋯].get coordinate)
      (↑(-195665367517577221813521366733317542071) / ↑340282366920938463463374607431768211456) (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].sin)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 (63 / 20) ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].sin x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 (63 / 20) ⋯].get coordinate)
      (↑1 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].sin)
      (fun x ↦ ↑144616999403361241649853240698450669385 / ↑680564733841876926926749214863536422912)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 (63 / 20) ⋯].get coordinate)
      (↑535947734438515685276895974165085753527 / ↑680564733841876926926749214863536422912)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 63/20] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [-195665367517577221813521366733317542071/340282366920938463463374607431768211456, 1]

The smaller endpoint comes first:

In[27]:=
#cas [enclose x in [1, 0]] (x)
Out[27]=

Error

interval endpoints are reversed: 1 > 0

Neat Examples (2)

A tiny number is rounded outward to 6 places, and the radius covers the rounding of the center. In the theorem, Lean prints the decimals 0.000000 and 0.000001 as 0e-6 and 1e-6:

In[28]:=
#cas [enclose] (1 / 1000000000000000000000000)
Out[28]=

certified interval in ℝ

[0.000000, 0.000001]
[0.000000, 0.000001]
Domain
closed real expression
Upper bound
0.000001
Absolute bound
0.000001
Center and radius
≈0.000000 ± 0.000001

Checked by Lean’s kernel: Enclosure of the input

0e-6 ≤ 1 / 1000000000000000000000000 ∧ 1 / 1000000000000000000000000 ≤ 1e-6

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    0e-6 ≤ 1 / 1000000000000000000000000 ∧ 1 / 1000000000000000000000000 ≤ 1e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    1 / 1000000000000000000000000 ≤ 1e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    |1 / 1000000000000000000000000| ≤ 1e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    |1 / 1000000000000000000000000 - 0e-6| ≤ 1e-6

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn
      (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div (CAS.Verified.Expr.nat 1000000000000000000000000)))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate)
      (↑1 / ↑1000000000000000000000000) (↑1 / ↑1000000000000000000000000)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn
      (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div (CAS.Verified.Expr.nat 1000000000000000000000000)))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate)
      (↑1 / ↑1000000000000000000000000)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn
      (fun x ↦
        |CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div (CAS.Verified.Expr.nat 1000000000000000000000000)) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate)
      (↑1 / ↑1000000000000000000000000)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn
      (CAS.Exact.exprFn ((CAS.Verified.Expr.nat 1).div (CAS.Verified.Expr.nat 1000000000000000000000000)))
      (fun x ↦ ↑1 / ↑1000000000000000000000000)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [].get coordinate) (↑0 / ↑1)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: none
    Certified domain: closed real expression
  • Certified numerical guarantee

    Guarantee: the real value lies in the output interval
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [1/1000000000000000000000000, 1/1000000000000000000000000]

Three levels of bisection on sinxcosx:

In[29]:=
#cas (depth := 3) [enclose x in [0, 2]] (sin x * cos x)
Out[29]=

certified interval in ℝ

[−0.378402, 0.544012]
[-0.378402, 0.544012]
Domain
x ∈ [0, 2] ⊆ ℝ
Upper bound
0.544012
Absolute bound
0.544012
Center and radius
≈0.082805 ± 0.461207

Checked by Lean’s kernel: Enclosure of the input

∀ x ∈ Set.Icc 0 2, -0.378402 ≤ Real.sin x * Real.cos x ∧ Real.sin x * Real.cos x ≤ 0.544012

from CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

The certificate: 8 checked steps
  1. Enclosure of the input

    ∀ x ∈ Set.Icc 0 2, -0.378402 ≤ Real.sin x * Real.cos x ∧ Real.sin x * Real.cos x ≤ 0.544012

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.mem_of_enclosedOn_box

  2. Upper bound of the input

    ∀ x ∈ Set.Icc 0 2, Real.sin x * Real.cos x ≤ 0.544012

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.le_of_boundOn_box

  3. Absolute bound of the input

    ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x| ≤ 0.544012

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box

  4. Center and radius of the input

    ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x - 82805e-6| ≤ 0.461207

    Checked by Lean’s kernel · CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box

  5. Certified enclosure

    CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].sin.mul 𝕏[0].cos))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 2 ⋯].get coordinate)
      (↑(-2738491939741224980065545710511944340592687821623911616333681165377358429451) /
        ↑7237005577332262213973186563042994240829374041602535252466099000494570602496)
      (↑31496104119253840352539446916394688164217738877448090787965650547754896521097 /
        ↑57896044618658097711785492504343953926634992332820282019728792003956564819968)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq

  6. Certified upper bound

    CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].sin.mul 𝕏[0].cos))
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 2 ⋯].get coordinate)
      (↑31496104119253840352539446916394688164217738877448090787965650547754896521097 /
        ↑57896044618658097711785492504343953926634992332820282019728792003956564819968)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq

  7. Certified absolute bound

    CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].sin.mul 𝕏[0].cos) x|)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 2 ⋯].get coordinate)
      (↑31496104119253840352539446916394688164217738877448090787965650547754896521097 /
        ↑57896044618658097711785492504343953926634992332820282019728792003956564819968)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq

  8. Certified center and radius

    CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].sin.mul 𝕏[0].cos))
      (fun x ↦
        ↑9588168601324040512015081232299133439476236304456797857296201224736029085489 /
          ↑115792089237316195423570985008687907853269984665640564039457584007913129639936)
      (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦
        [CAS.Continuum.RationalInterval.ofBounds 0 2 ⋯].get coordinate)
      (↑53404039637183640193063812600490242888959241450439383718635099870773763956705 /
        ↑115792089237316195423570985008687907853269984665640564039457584007913129639936)

    Checked by Lean’s kernel · CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq

The computation
  • Coordinates: x
    Certified domain: x ∈ [0, 2] ⊆ ℝ
  • Certified numerical guarantee

    Guarantee: the input lies in the output interval throughout the box
    Decimal preview: outward-rounded to 6 places where it is a bound
    Exact certified output: [-2738491939741224980065545710511944340592687821623911616333681165377358429451/7237005577332262213973186563042994240829374041602535252466099000494570602496, 31496104119253840352539446916394688164217738877448090787965650547754896521097/57896044618658097711785492504343953926634992332820282019728792003956564819968]
    Precision policy: exp order 8, sqrt digits 12, log terms 10, subdivision depth 3

See Also

N · cega · maximize · minimize · nintegrate · Options